Java Doc for CodeGenTreeWalker.java in  » Parser » antlr-3.0.1 » org » antlr » codegen » 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.codegen 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.antlr.codegen.CodeGenTreeWalker

CodeGenTreeWalker
public class CodeGenTreeWalker extends antlr.TreeParser implements CodeGenTreeWalkerTokenTypes(Code)
Walk a grammar and generate code by gradually building up a bigger and bigger StringTemplate. Terence Parr University of San Francisco June 15, 2004


Field Summary
final protected static  intOUTER_REWRITE_NESTING_LEVEL
    
final protected static  intRULE_BLOCK_NESTING_LEVEL
    
final public static  String[]_tokenNames
    
protected  intblockNestingLevel
    
protected  booleancurrentAltHasASTRewrite
    
protected  StringTemplatecurrentBlockST
    
protected  StringcurrentRuleName
    
protected  CodeGeneratorgenerator
    
protected  Grammargrammar
    
protected  StringTemplateheaderFileST
    
protected  intouterAltNum
    
protected  StringTemplateoutputFileST
    
protected  StringoutputOption
    
protected  StringTemplaterecognizerST
     The overall lexer/parser template; simulate dynamically scoped attributes by making this an instance var of the walker.
protected  intrewriteBlockNestingLevel
    
protected  SetrewriteRuleRefs
    
protected  intrewriteTreeNestingLevel
    
protected  StringTemplateGrouptemplates
    

Constructor Summary
public  CodeGenTreeWalker()
    

Method Summary
final public  StringTemplatealternative(AST _t)
    
final public  voidast_suffix(AST _t)
    
final public  StringTemplateatom(AST _t, GrammarAST label, GrammarAST astSuffix)
    
final public  voidattrScope(AST _t)
    
final public  StringTemplateblock(AST _t, String blockTemplateName, DFA dfa)
    
final public  StringTemplateebnf(AST _t)
    
final public  StringTemplateelement(AST _t, GrammarAST label, GrammarAST astSuffix)
    
final public  StringTemplateelement_action(AST _t)
    
final public  voidexceptionGroup(AST _t, StringTemplate ruleST)
    
final public  voidexceptionHandler(AST _t, StringTemplate ruleST)
    
final public  voidfinallyClause(AST _t, StringTemplate ruleST)
    
protected  StringTemplategetRuleElementST(String name, String elementName, GrammarAST elementAST, GrammarAST ast_suffix, String label)
    
protected  StringgetSTSuffix(GrammarAST ast_suffix, String label)
     Return a non-empty template name suffix if the token is to be tracked, added to a tree, or both.
protected  StringTemplategetTokenElementST(String name, String elementName, GrammarAST elementAST, GrammarAST ast_suffix, String label)
    
protected  List<String>getTokenTypesAsTargetLabels(Set<GrammarAST> refs)
    
protected  StringTemplategetWildcardST(GrammarAST elementAST, GrammarAST ast_suffix, String label)
    
final public  voidgrammar(AST _t, Grammar g, StringTemplate recognizerST, StringTemplate outputFileST, StringTemplate headerFileST)
    
final public  voidgrammarSpec(AST _t)
    
protected  voidinit(Grammar g)
    
public  booleanisListLabel(String label)
    
final public  voidmodifier(AST _t)
    
final public  StringTemplatenotElement(AST _t, GrammarAST n, GrammarAST label, GrammarAST astSuffix)
    
public  voidreportError(RecognitionException ex)
    
public  voidreportError(String s)
    
final public  StringTemplaterewrite(AST _t)
    
final public  StringTemplaterewrite_alternative(AST _t)
    
final public  StringTemplaterewrite_atom(AST _t, boolean isRoot)
    
final public  StringTemplaterewrite_block(AST _t, String blockTemplateName)
    
final public  StringTemplaterewrite_ebnf(AST _t)
    
final public  StringTemplaterewrite_element(AST _t)
    
final public  StringTemplaterewrite_template(AST _t)
    
final public  StringTemplaterewrite_tree(AST _t)
    
final public  StringTemplaterule(AST _t)
    
final public  voidruleScopeSpec(AST _t)
    
final public  voidrules(AST _t, StringTemplate recognizerST)
    
final public  StringTemplateset(AST _t, GrammarAST label, GrammarAST astSuffix)
    
final public  StringTemplatesetBlock(AST _t)
    
final public  voidsetElement(AST _t)
    
final public  StringTemplatetree(AST _t)
    

Field Detail
OUTER_REWRITE_NESTING_LEVEL
final protected static int OUTER_REWRITE_NESTING_LEVEL(Code)



RULE_BLOCK_NESTING_LEVEL
final protected static int RULE_BLOCK_NESTING_LEVEL(Code)



_tokenNames
final public static String[] _tokenNames(Code)



blockNestingLevel
protected int blockNestingLevel(Code)



currentAltHasASTRewrite
protected boolean currentAltHasASTRewrite(Code)



currentBlockST
protected StringTemplate currentBlockST(Code)



currentRuleName
protected String currentRuleName(Code)



generator
protected CodeGenerator generator(Code)



grammar
protected Grammar grammar(Code)



headerFileST
protected StringTemplate headerFileST(Code)



outerAltNum
protected int outerAltNum(Code)



outputFileST
protected StringTemplate outputFileST(Code)



outputOption
protected String outputOption(Code)



recognizerST
protected StringTemplate recognizerST(Code)
The overall lexer/parser template; simulate dynamically scoped attributes by making this an instance var of the walker.



rewriteBlockNestingLevel
protected int rewriteBlockNestingLevel(Code)



rewriteRuleRefs
protected Set rewriteRuleRefs(Code)



rewriteTreeNestingLevel
protected int rewriteTreeNestingLevel(Code)



templates
protected StringTemplateGroup templates(Code)




Constructor Detail
CodeGenTreeWalker
public CodeGenTreeWalker()(Code)




Method Detail
alternative
final public StringTemplate alternative(AST _t) throws RecognitionException(Code)



ast_suffix
final public void ast_suffix(AST _t) throws RecognitionException(Code)



atom
final public StringTemplate atom(AST _t, GrammarAST label, GrammarAST astSuffix) throws RecognitionException(Code)



attrScope
final public void attrScope(AST _t) throws RecognitionException(Code)



block
final public StringTemplate block(AST _t, String blockTemplateName, DFA dfa) throws RecognitionException(Code)



ebnf
final public StringTemplate ebnf(AST _t) throws RecognitionException(Code)



element
final public StringTemplate element(AST _t, GrammarAST label, GrammarAST astSuffix) throws RecognitionException(Code)



element_action
final public StringTemplate element_action(AST _t) throws RecognitionException(Code)



exceptionGroup
final public void exceptionGroup(AST _t, StringTemplate ruleST) throws RecognitionException(Code)



exceptionHandler
final public void exceptionHandler(AST _t, StringTemplate ruleST) throws RecognitionException(Code)



finallyClause
final public void finallyClause(AST _t, StringTemplate ruleST) throws RecognitionException(Code)



getRuleElementST
protected StringTemplate getRuleElementST(String name, String elementName, GrammarAST elementAST, GrammarAST ast_suffix, String label)(Code)



getSTSuffix
protected String getSTSuffix(GrammarAST ast_suffix, String label)(Code)
Return a non-empty template name suffix if the token is to be tracked, added to a tree, or both.



getTokenElementST
protected StringTemplate getTokenElementST(String name, String elementName, GrammarAST elementAST, GrammarAST ast_suffix, String label)(Code)



getTokenTypesAsTargetLabels
protected List<String> getTokenTypesAsTargetLabels(Set<GrammarAST> refs)(Code)
Convert rewrite AST lists to target labels list



getWildcardST
protected StringTemplate getWildcardST(GrammarAST elementAST, GrammarAST ast_suffix, String label)(Code)



grammar
final public void grammar(AST _t, Grammar g, StringTemplate recognizerST, StringTemplate outputFileST, StringTemplate headerFileST) throws RecognitionException(Code)



grammarSpec
final public void grammarSpec(AST _t) throws RecognitionException(Code)



init
protected void init(Grammar g)(Code)



isListLabel
public boolean isListLabel(String label)(Code)



modifier
final public void modifier(AST _t) throws RecognitionException(Code)



notElement
final public StringTemplate notElement(AST _t, GrammarAST n, GrammarAST label, GrammarAST astSuffix) throws RecognitionException(Code)



reportError
public void reportError(RecognitionException ex)(Code)



reportError
public void reportError(String s)(Code)



rewrite
final public StringTemplate rewrite(AST _t) throws RecognitionException(Code)



rewrite_alternative
final public StringTemplate rewrite_alternative(AST _t) throws RecognitionException(Code)



rewrite_atom
final public StringTemplate rewrite_atom(AST _t, boolean isRoot) throws RecognitionException(Code)



rewrite_block
final public StringTemplate rewrite_block(AST _t, String blockTemplateName) throws RecognitionException(Code)



rewrite_ebnf
final public StringTemplate rewrite_ebnf(AST _t) throws RecognitionException(Code)



rewrite_element
final public StringTemplate rewrite_element(AST _t) throws RecognitionException(Code)



rewrite_template
final public StringTemplate rewrite_template(AST _t) throws RecognitionException(Code)



rewrite_tree
final public StringTemplate rewrite_tree(AST _t) throws RecognitionException(Code)



rule
final public StringTemplate rule(AST _t) throws RecognitionException(Code)



ruleScopeSpec
final public void ruleScopeSpec(AST _t) throws RecognitionException(Code)



rules
final public void rules(AST _t, StringTemplate recognizerST) throws RecognitionException(Code)



set
final public StringTemplate set(AST _t, GrammarAST label, GrammarAST astSuffix) throws RecognitionException(Code)



setBlock
final public StringTemplate setBlock(AST _t) throws RecognitionException(Code)



setElement
final public void setElement(AST _t) throws RecognitionException(Code)



tree
final public StringTemplate tree(AST _t) throws RecognitionException(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.