Java Doc for ANTLRParser.java in  » Parser » antlr-3.0.1 » org » antlr » tool » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Parser » antlr 3.0.1 » org.antlr.tool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.antlr.tool.ANTLRParser

ANTLRParser
public class ANTLRParser extends antlr.LLkParser implements ANTLRTokenTypes(Code)
Read in an ANTLR grammar and build an AST. Try not to do any actions, just build the tree. The phases are: antlr.g (this file) assign.types.g define.g buildnfa.g antlr.print.g (optional) codegen.g Terence Parr University of San Francisco 2005


Field Summary
final public static  String[]_tokenNames
    
final public static  BitSet_tokenSet_0
    
final public static  BitSet_tokenSet_1
    
final public static  BitSet_tokenSet_10
    
final public static  BitSet_tokenSet_11
    
final public static  BitSet_tokenSet_12
    
final public static  BitSet_tokenSet_13
    
final public static  BitSet_tokenSet_14
    
final public static  BitSet_tokenSet_15
    
final public static  BitSet_tokenSet_16
    
final public static  BitSet_tokenSet_17
    
final public static  BitSet_tokenSet_18
    
final public static  BitSet_tokenSet_19
    
final public static  BitSet_tokenSet_2
    
final public static  BitSet_tokenSet_20
    
final public static  BitSet_tokenSet_21
    
final public static  BitSet_tokenSet_22
    
final public static  BitSet_tokenSet_23
    
final public static  BitSet_tokenSet_24
    
final public static  BitSet_tokenSet_25
    
final public static  BitSet_tokenSet_26
    
final public static  BitSet_tokenSet_27
    
final public static  BitSet_tokenSet_28
    
final public static  BitSet_tokenSet_29
    
final public static  BitSet_tokenSet_3
    
final public static  BitSet_tokenSet_30
    
final public static  BitSet_tokenSet_31
    
final public static  BitSet_tokenSet_32
    
final public static  BitSet_tokenSet_33
    
final public static  BitSet_tokenSet_34
    
final public static  BitSet_tokenSet_35
    
final public static  BitSet_tokenSet_36
    
final public static  BitSet_tokenSet_37
    
final public static  BitSet_tokenSet_38
    
final public static  BitSet_tokenSet_39
    
final public static  BitSet_tokenSet_4
    
final public static  BitSet_tokenSet_5
    
final public static  BitSet_tokenSet_6
    
final public static  BitSet_tokenSet_7
    
final public static  BitSet_tokenSet_8
    
final public static  BitSet_tokenSet_9
    
protected  GrammarASTcurrentBlockAST
    
protected  StringcurrentRuleName
    
 Grammargrammar
    
protected  intgtype
    
protected  ListlexerRuleNames
    

Constructor Summary
protected  ANTLRParser(TokenBuffer tokenBuf, int k)
    
public  ANTLRParser(TokenBuffer tokenBuf)
    
protected  ANTLRParser(TokenStream lexer, int k)
    
public  ANTLRParser(TokenStream lexer)
    
public  ANTLRParser(ParserSharedInputState state)
    

Method Summary
final public  voidaction()
    
final public  voidactionScopeName()
     Sometimes the scope names will collide with keywords; allow them as ids for action scopes.
final public  voidactions()
    
final public  voidaltList(Map opts)
    
final public  voidalternative()
    
final public  voidatom()
    
final public  voidattrScope()
    
final public  voidattrScopes()
    
final public  voidblock()
    
protected  voidbuildTokenTypeASTClassMap()
    
public  voidcleanup(GrammarAST root)
    
protected  GrammarASTcreateBlockFromDupAlt(GrammarAST alt)
     Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed.
public  GrammarASTcreateSimpleRuleAST(String name, GrammarAST block, boolean fragment)
    
protected  GrammarASTcreateSynSemPredFromBlock(GrammarAST synpredBlockAST, int synpredTokenType)
    
final public  voidebnf()
    
final public  GrammarASTebnfSuffix(GrammarAST elemAST, boolean inRewrite)
    
final public  voidelement()
    
final public  voidelementNoOptionSpec()
    
final public  voidexceptionGroup()
    
final public  voidexceptionHandler()
    
final public  voidfinallyClause()
    
public  ListgetLexerRuleNames()
    
final public  voidgrammar(Grammar g)
    
final public  voidgrammarType()
    
final public  voidid()
    
final public  voididList()
    
final public  voididToken()
    
final public  voidnotSet()
    
final public  voidnotTerminal()
    
final public  voidoption(Map opts)
    
final public  ObjectoptionValue()
    
final public  MapoptionsSpec()
    
protected  voidprefixWithSynPred(GrammarAST alt)
     Rewrite alt to have a synpred as first element; (xxx)=>xxx but only if they didn't specify one manually.
final public  voidrange()
    
public  voidreportError(RecognitionException ex)
    
final public  voidrewrite()
    
final public  voidrewrite_alternative()
    
final public  voidrewrite_atom()
    
final public  voidrewrite_block()
    
final public  voidrewrite_ebnf()
    
final public  voidrewrite_element()
    
final public  voidrewrite_indirect_template_head()
    
final public  voidrewrite_template()
     Build a tree for a template rewrite: ^(TEMPLATE (ID|ACTION) ^(ARGLIST ^(ARG ID ACTION) ...) ) where ARGLIST is always there even if no args exist. ID can be "template" keyword.
final public  voidrewrite_template_arg()
    
final public  voidrewrite_template_args()
    
final public  voidrewrite_template_head()
    
final public  voidrewrite_tree()
    
final public  voidrule()
    
final public  voidruleAction()
    
final public  voidruleActions()
    
final public  voidruleScopeSpec()
    
final public  voidrules()
    
protected  GrammarASTsetToBlockWithSet(GrammarAST b)
    
final public  voidterminal()
    
final public  voidthrowsSpec()
    
final public  voidtokenSpec()
    
final public  voidtokensSpec()
    
final public  voidtree()
    

Field Detail
_tokenNames
final public static String[] _tokenNames(Code)



_tokenSet_0
final public static BitSet _tokenSet_0(Code)



_tokenSet_1
final public static BitSet _tokenSet_1(Code)



_tokenSet_10
final public static BitSet _tokenSet_10(Code)



_tokenSet_11
final public static BitSet _tokenSet_11(Code)



_tokenSet_12
final public static BitSet _tokenSet_12(Code)



_tokenSet_13
final public static BitSet _tokenSet_13(Code)



_tokenSet_14
final public static BitSet _tokenSet_14(Code)



_tokenSet_15
final public static BitSet _tokenSet_15(Code)



_tokenSet_16
final public static BitSet _tokenSet_16(Code)



_tokenSet_17
final public static BitSet _tokenSet_17(Code)



_tokenSet_18
final public static BitSet _tokenSet_18(Code)



_tokenSet_19
final public static BitSet _tokenSet_19(Code)



_tokenSet_2
final public static BitSet _tokenSet_2(Code)



_tokenSet_20
final public static BitSet _tokenSet_20(Code)



_tokenSet_21
final public static BitSet _tokenSet_21(Code)



_tokenSet_22
final public static BitSet _tokenSet_22(Code)



_tokenSet_23
final public static BitSet _tokenSet_23(Code)



_tokenSet_24
final public static BitSet _tokenSet_24(Code)



_tokenSet_25
final public static BitSet _tokenSet_25(Code)



_tokenSet_26
final public static BitSet _tokenSet_26(Code)



_tokenSet_27
final public static BitSet _tokenSet_27(Code)



_tokenSet_28
final public static BitSet _tokenSet_28(Code)



_tokenSet_29
final public static BitSet _tokenSet_29(Code)



_tokenSet_3
final public static BitSet _tokenSet_3(Code)



_tokenSet_30
final public static BitSet _tokenSet_30(Code)



_tokenSet_31
final public static BitSet _tokenSet_31(Code)



_tokenSet_32
final public static BitSet _tokenSet_32(Code)



_tokenSet_33
final public static BitSet _tokenSet_33(Code)



_tokenSet_34
final public static BitSet _tokenSet_34(Code)



_tokenSet_35
final public static BitSet _tokenSet_35(Code)



_tokenSet_36
final public static BitSet _tokenSet_36(Code)



_tokenSet_37
final public static BitSet _tokenSet_37(Code)



_tokenSet_38
final public static BitSet _tokenSet_38(Code)



_tokenSet_39
final public static BitSet _tokenSet_39(Code)



_tokenSet_4
final public static BitSet _tokenSet_4(Code)



_tokenSet_5
final public static BitSet _tokenSet_5(Code)



_tokenSet_6
final public static BitSet _tokenSet_6(Code)



_tokenSet_7
final public static BitSet _tokenSet_7(Code)



_tokenSet_8
final public static BitSet _tokenSet_8(Code)



_tokenSet_9
final public static BitSet _tokenSet_9(Code)



currentBlockAST
protected GrammarAST currentBlockAST(Code)



currentRuleName
protected String currentRuleName(Code)



grammar
Grammar grammar(Code)



gtype
protected int gtype(Code)



lexerRuleNames
protected List lexerRuleNames(Code)




Constructor Detail
ANTLRParser
protected ANTLRParser(TokenBuffer tokenBuf, int k)(Code)



ANTLRParser
public ANTLRParser(TokenBuffer tokenBuf)(Code)



ANTLRParser
protected ANTLRParser(TokenStream lexer, int k)(Code)



ANTLRParser
public ANTLRParser(TokenStream lexer)(Code)



ANTLRParser
public ANTLRParser(ParserSharedInputState state)(Code)




Method Detail
action
final public void action() throws RecognitionException, TokenStreamException(Code)
Match stuff like @parser::members {int i;}



actionScopeName
final public void actionScopeName() throws RecognitionException, TokenStreamException(Code)
Sometimes the scope names will collide with keywords; allow them as ids for action scopes.



actions
final public void actions() throws RecognitionException, TokenStreamException(Code)



altList
final public void altList(Map opts) throws RecognitionException, TokenStreamException(Code)



alternative
final public void alternative() throws RecognitionException, TokenStreamException(Code)



atom
final public void atom() throws RecognitionException, TokenStreamException(Code)



attrScope
final public void attrScope() throws RecognitionException, TokenStreamException(Code)



attrScopes
final public void attrScopes() throws RecognitionException, TokenStreamException(Code)



block
final public void block() throws RecognitionException, TokenStreamException(Code)
Build #(BLOCK ( #(ALT ...) EOB )+ )



buildTokenTypeASTClassMap
protected void buildTokenTypeASTClassMap()(Code)



cleanup
public void cleanup(GrammarAST root)(Code)



createBlockFromDupAlt
protected GrammarAST createBlockFromDupAlt(GrammarAST alt)(Code)
Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed.



createSimpleRuleAST
public GrammarAST createSimpleRuleAST(String name, GrammarAST block, boolean fragment)(Code)



createSynSemPredFromBlock
protected GrammarAST createSynSemPredFromBlock(GrammarAST synpredBlockAST, int synpredTokenType)(Code)



ebnf
final public void ebnf() throws RecognitionException, TokenStreamException(Code)
matches ENBF blocks (and sets via block rule)



ebnfSuffix
final public GrammarAST ebnfSuffix(GrammarAST elemAST, boolean inRewrite) throws RecognitionException, TokenStreamException(Code)



element
final public void element() throws RecognitionException, TokenStreamException(Code)



elementNoOptionSpec
final public void elementNoOptionSpec() throws RecognitionException, TokenStreamException(Code)



exceptionGroup
final public void exceptionGroup() throws RecognitionException, TokenStreamException(Code)



exceptionHandler
final public void exceptionHandler() throws RecognitionException, TokenStreamException(Code)



finallyClause
final public void finallyClause() throws RecognitionException, TokenStreamException(Code)



getLexerRuleNames
public List getLexerRuleNames()(Code)



grammar
final public void grammar(Grammar g) throws RecognitionException, TokenStreamException(Code)



grammarType
final public void grammarType() throws RecognitionException, TokenStreamException(Code)



id
final public void id() throws RecognitionException, TokenStreamException(Code)



idList
final public void idList() throws RecognitionException, TokenStreamException(Code)



idToken
final public void idToken() throws RecognitionException, TokenStreamException(Code)
Match anything that looks like an ID and return tree as token type ID



notSet
final public void notSet() throws RecognitionException, TokenStreamException(Code)



notTerminal
final public void notTerminal() throws RecognitionException, TokenStreamException(Code)



option
final public void option(Map opts) throws RecognitionException, TokenStreamException(Code)



optionValue
final public Object optionValue() throws RecognitionException, TokenStreamException(Code)



optionsSpec
final public Map optionsSpec() throws RecognitionException, TokenStreamException(Code)



prefixWithSynPred
protected void prefixWithSynPred(GrammarAST alt)(Code)
Rewrite alt to have a synpred as first element; (xxx)=>xxx but only if they didn't specify one manually.



range
final public void range() throws RecognitionException, TokenStreamException(Code)



reportError
public void reportError(RecognitionException ex)(Code)



rewrite
final public void rewrite() throws RecognitionException, TokenStreamException(Code)



rewrite_alternative
final public void rewrite_alternative() throws RecognitionException, TokenStreamException(Code)



rewrite_atom
final public void rewrite_atom() throws RecognitionException, TokenStreamException(Code)



rewrite_block
final public void rewrite_block() throws RecognitionException, TokenStreamException(Code)



rewrite_ebnf
final public void rewrite_ebnf() throws RecognitionException, TokenStreamException(Code)



rewrite_element
final public void rewrite_element() throws RecognitionException, TokenStreamException(Code)



rewrite_indirect_template_head
final public void rewrite_indirect_template_head() throws RecognitionException, TokenStreamException(Code)
-> ({expr})(a={...}, ...)



rewrite_template
final public void rewrite_template() throws RecognitionException, TokenStreamException(Code)
Build a tree for a template rewrite: ^(TEMPLATE (ID|ACTION) ^(ARGLIST ^(ARG ID ACTION) ...) ) where ARGLIST is always there even if no args exist. ID can be "template" keyword. If first child is ACTION then it's an indirect template ref -> foo(a={...}, b={...}) -> ({string-e})(a={...}, b={...}) // e evaluates to template name -> {%{$ID.text}} // create literal template from string (done in ActionTranslator) -> {st-expr} // st-expr evaluates to ST



rewrite_template_arg
final public void rewrite_template_arg() throws RecognitionException, TokenStreamException(Code)



rewrite_template_args
final public void rewrite_template_args() throws RecognitionException, TokenStreamException(Code)



rewrite_template_head
final public void rewrite_template_head() throws RecognitionException, TokenStreamException(Code)
-> foo(a={...}, ...)



rewrite_tree
final public void rewrite_tree() throws RecognitionException, TokenStreamException(Code)



rule
final public void rule() throws RecognitionException, TokenStreamException(Code)



ruleAction
final public void ruleAction() throws RecognitionException, TokenStreamException(Code)
Match stuff like @init {int i;}



ruleActions
final public void ruleActions() throws RecognitionException, TokenStreamException(Code)



ruleScopeSpec
final public void ruleScopeSpec() throws RecognitionException, TokenStreamException(Code)



rules
final public void rules() throws RecognitionException, TokenStreamException(Code)



setToBlockWithSet
protected GrammarAST setToBlockWithSet(GrammarAST b)(Code)



terminal
final public void terminal() throws RecognitionException, TokenStreamException(Code)



throwsSpec
final public void throwsSpec() throws RecognitionException, TokenStreamException(Code)



tokenSpec
final public void tokenSpec() throws RecognitionException, TokenStreamException(Code)



tokensSpec
final public void tokensSpec() throws RecognitionException, TokenStreamException(Code)



tree
final public void tree() throws RecognitionException, TokenStreamException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.