Java Doc for HTMLCodeGenerator.java in  » Database-ORM » toplink » persistence » antlr » 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 » Database ORM » toplink » persistence.antlr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   persistence.antlr.CodeGenerator
      persistence.antlr.HTMLCodeGenerator

HTMLCodeGenerator
public class HTMLCodeGenerator extends CodeGenerator (Code)
Generate P.html, a cross-linked representation of P with or without actions


Field Summary
protected  booleandoingLexRules
    
protected  booleanfirstElementInAlt
    
protected  AlternativeElementprevAltElem
    
protected  intsyntacticPredLevel
    

Constructor Summary
public  HTMLCodeGenerator()
     Create a Diagnostic code-generator using the given Grammar The caller must still call setTool, setBehavior, and setAnalyzer before generating code.

Method Summary
static  StringHTMLEncode(String s)
     Encode a string for printing in a HTML document.. e.g.
public  voidgen()
    
public  voidgen(ActionElement action)
     Generate code for the given grammar element.
public  voidgen(AlternativeBlock blk)
     Generate code for the given grammar element.
public  voidgen(BlockEndElement end)
     Generate code for the given grammar element.
Parameters:
  blk - The block-end element to generate.
public  voidgen(CharLiteralElement atom)
     Generate code for the given grammar element.
public  voidgen(CharRangeElement r)
     Generate code for the given grammar element.
public  voidgen(LexerGrammar g)
    
public  voidgen(OneOrMoreBlock blk)
     Generate code for the given grammar element.
public  voidgen(ParserGrammar g)
    
public  voidgen(RuleRefElement rr)
     Generate code for the given grammar element.
public  voidgen(StringLiteralElement atom)
     Generate code for the given grammar element.
public  voidgen(TokenRangeElement r)
     Generate code for the given grammar element.
public  voidgen(TokenRefElement atom)
     Generate code for the given grammar element.
public  voidgen(TreeElement t)
    
public  voidgen(TreeWalkerGrammar g)
    
public  voidgen(WildcardElement wc)
    
public  voidgen(ZeroOrMoreBlock blk)
     Generate code for the given grammar element.
protected  voidgenAlt(Alternative alt)
    
public  voidgenCommonBlock(AlternativeBlock blk)
     Generate common code for a block of alternatives; return a postscript that needs to be generated at the end of the block.
public  voidgenFollowSetForRuleBlock(RuleBlock blk)
     Generate a textual representation of the follow set for a block.
protected  voidgenGenericBlock(AlternativeBlock blk, String blkOp)
    
protected  voidgenHeader()
    
protected  voidgenLookaheadSetForAlt(Alternative alt)
     Generate the lookahead set for an alternate.
public  voidgenLookaheadSetForBlock(AlternativeBlock blk)
     Generate a textual representation of the lookahead set for a block.
public  voidgenNextToken()
     Generate the nextToken rule.
public  voidgenRule(RuleSymbol s)
    
protected  voidgenSynPred(SynPredBlock blk)
     Generate the syntactic predicate.
public  voidgenTail()
    
protected  voidgenTokenTypes(TokenManager tm)
    
public  StringgetASTCreateString(Vector v)
     Get a string for an expression to generate creation of an AST subtree.
public  StringgetASTCreateString(GrammarAtom atom, String str)
    
public  StringmapTreeId(String id, ActionTransInfo tInfo)
     Map an identifier to it's corresponding tree-node variable.
public  voidprintSet(int depth, int k, Lookahead lookahead)
     Format a lookahead or follow set.
protected  StringprocessActionForSpecialSymbols(String actionStr, int line, RuleBlock currentRule, ActionTransInfo tInfo)
    

Field Detail
doingLexRules
protected boolean doingLexRules(Code)
true during lexer generation, false during parser generation



firstElementInAlt
protected boolean firstElementInAlt(Code)



prevAltElem
protected AlternativeElement prevAltElem(Code)



syntacticPredLevel
protected int syntacticPredLevel(Code)
non-zero if inside syntactic predicate generation




Constructor Detail
HTMLCodeGenerator
public HTMLCodeGenerator()(Code)
Create a Diagnostic code-generator using the given Grammar The caller must still call setTool, setBehavior, and setAnalyzer before generating code.




Method Detail
HTMLEncode
static String HTMLEncode(String s)(Code)
Encode a string for printing in a HTML document.. e.g. encode '<' '>' and similar stuff
Parameters:
  s - the string to encode



gen
public void gen()(Code)



gen
public void gen(ActionElement action)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The {...} action to generate



gen
public void gen(AlternativeBlock blk)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The "x|y|z|..." block to generate



gen
public void gen(BlockEndElement end)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The block-end element to generate. Block-endelements are synthesized by the grammar parser to representthe end of a block.



gen
public void gen(CharLiteralElement atom)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The character literal reference to generate



gen
public void gen(CharRangeElement r)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The character-range reference to generate



gen
public void gen(LexerGrammar g) throws IOException(Code)
Generate the lexer HTML file



gen
public void gen(OneOrMoreBlock blk)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The (...)+ block to generate



gen
public void gen(ParserGrammar g) throws IOException(Code)
Generate the parser HTML file



gen
public void gen(RuleRefElement rr)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The rule-reference to generate



gen
public void gen(StringLiteralElement atom)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The string-literal reference to generate



gen
public void gen(TokenRangeElement r)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The token-range reference to generate



gen
public void gen(TokenRefElement atom)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The token-reference to generate



gen
public void gen(TreeElement t)(Code)



gen
public void gen(TreeWalkerGrammar g) throws IOException(Code)
Generate the tree-walker TXT file



gen
public void gen(WildcardElement wc)(Code)
Generate a wildcard element



gen
public void gen(ZeroOrMoreBlock blk)(Code)
Generate code for the given grammar element.
Parameters:
  blk - The (...)* block to generate



genAlt
protected void genAlt(Alternative alt)(Code)



genCommonBlock
public void genCommonBlock(AlternativeBlock blk)(Code)
Generate common code for a block of alternatives; return a postscript that needs to be generated at the end of the block. Other routines may append else-clauses and such for error checking before the postfix is generated.



genFollowSetForRuleBlock
public void genFollowSetForRuleBlock(RuleBlock blk)(Code)
Generate a textual representation of the follow set for a block.
Parameters:
  blk - The rule block of interest



genGenericBlock
protected void genGenericBlock(AlternativeBlock blk, String blkOp)(Code)



genHeader
protected void genHeader()(Code)
Generate a header that is common to all TXT files



genLookaheadSetForAlt
protected void genLookaheadSetForAlt(Alternative alt)(Code)
Generate the lookahead set for an alternate.



genLookaheadSetForBlock
public void genLookaheadSetForBlock(AlternativeBlock blk)(Code)
Generate a textual representation of the lookahead set for a block.
Parameters:
  blk - The block of interest



genNextToken
public void genNextToken()(Code)
Generate the nextToken rule. nextToken is a synthetic lexer rule that is the implicit OR of all user-defined lexer rules.



genRule
public void genRule(RuleSymbol s)(Code)
Generate code for a named rule block
Parameters:
  s - The RuleSymbol describing the rule to generate



genSynPred
protected void genSynPred(SynPredBlock blk)(Code)
Generate the syntactic predicate. This basically generates the alternative block, buts tracks if we are inside a synPred
Parameters:
  blk - The syntactic predicate block



genTail
public void genTail()(Code)



genTokenTypes
protected void genTokenTypes(TokenManager tm) throws IOException(Code)
Generate the token types TXT file



getASTCreateString
public String getASTCreateString(Vector v)(Code)
Get a string for an expression to generate creation of an AST subtree.
Parameters:
  v - A Vector of String, where each element is an expression in the target language yielding an AST node.



getASTCreateString
public String getASTCreateString(GrammarAtom atom, String str)(Code)
Get a string for an expression to generate creating of an AST node
Parameters:
  str - The arguments to the AST constructor



mapTreeId
public String mapTreeId(String id, ActionTransInfo tInfo)(Code)
Map an identifier to it's corresponding tree-node variable. This is context-sensitive, depending on the rule and alternative being generated
Parameters:
  id - The identifier name to map
Parameters:
  forInput - true if the input tree node variable is to be returned, otherwise the output variable is returned.



printSet
public void printSet(int depth, int k, Lookahead lookahead)(Code)
Format a lookahead or follow set.
Parameters:
  depth - The depth of the entire lookahead/follow
Parameters:
  k - The lookahead level to print
Parameters:
  lookahead - The lookahead/follow set to print



processActionForSpecialSymbols
protected String processActionForSpecialSymbols(String actionStr, int line, RuleBlock currentRule, ActionTransInfo tInfo)(Code)



Fields inherited from persistence.antlr.CodeGenerator
final protected static int BITSET_OPTIMIZE_INIT_THRESHOLD(Code)(Java Doc)
protected boolean DEBUG_CODE_GENERATOR(Code)(Java Doc)
final protected static int DEFAULT_BITSET_TEST_THRESHOLD(Code)(Java Doc)
final protected static int DEFAULT_MAKE_SWITCH_THRESHOLD(Code)(Java Doc)
public static String TokenTypesFileExt(Code)(Java Doc)
public static String TokenTypesFileSuffix(Code)(Java Doc)
protected LLkGrammarAnalyzer analyzer(Code)(Java Doc)
protected persistence.antlr.Tool antlrTool(Code)(Java Doc)
protected DefineGrammarSymbols behavior(Code)(Java Doc)
protected int bitsetTestThreshold(Code)(Java Doc)
protected Vector bitsetsUsed(Code)(Java Doc)
protected CharFormatter charFormatter(Code)(Java Doc)
protected transient PrintWriter currentOutput(Code)(Java Doc)
protected Grammar grammar(Code)(Java Doc)
protected int makeSwitchThreshold(Code)(Java Doc)
protected int tabs(Code)(Java Doc)

Methods inherited from persistence.antlr.CodeGenerator
protected void _print(String s)(Code)(Java Doc)
protected void _printAction(String s)(Code)(Java Doc)
protected void _println(String s)(Code)(Java Doc)
public static String decodeLexerRuleName(String id)(Code)(Java Doc)
public static boolean elementsAreRange(int[] elems)(Code)(Java Doc)
public static String encodeLexerRuleName(String id)(Code)(Java Doc)
protected String extractIdOfAction(Token t)(Code)(Java Doc)
protected String extractIdOfAction(String s, int line, int column)(Code)(Java Doc)
protected String extractTypeOfAction(Token t)(Code)(Java Doc)
protected String extractTypeOfAction(String s, int line, int column)(Code)(Java Doc)
abstract public void gen()(Code)(Java Doc)
abstract public void gen(ActionElement action)(Code)(Java Doc)
abstract public void gen(AlternativeBlock blk)(Code)(Java Doc)
abstract public void gen(BlockEndElement end)(Code)(Java Doc)
abstract public void gen(CharLiteralElement atom)(Code)(Java Doc)
abstract public void gen(CharRangeElement r)(Code)(Java Doc)
abstract public void gen(LexerGrammar g) throws IOException(Code)(Java Doc)
abstract public void gen(OneOrMoreBlock blk)(Code)(Java Doc)
abstract public void gen(ParserGrammar g) throws IOException(Code)(Java Doc)
abstract public void gen(RuleRefElement rr)(Code)(Java Doc)
abstract public void gen(StringLiteralElement atom)(Code)(Java Doc)
abstract public void gen(TokenRangeElement r)(Code)(Java Doc)
abstract public void gen(TokenRefElement atom)(Code)(Java Doc)
abstract public void gen(TreeElement t)(Code)(Java Doc)
abstract public void gen(TreeWalkerGrammar g) throws IOException(Code)(Java Doc)
abstract public void gen(WildcardElement wc)(Code)(Java Doc)
abstract public void gen(ZeroOrMoreBlock blk)(Code)(Java Doc)
protected void genTokenInterchange(TokenManager tm) throws IOException(Code)(Java Doc)
abstract public String getASTCreateString(Vector v)(Code)(Java Doc)
abstract public String getASTCreateString(GrammarAtom atom, String str)(Code)(Java Doc)
protected String getBitsetName(int index)(Code)(Java Doc)
public String getFIRSTBitSet(String ruleName, int k)(Code)(Java Doc)
public String getFOLLOWBitSet(String ruleName, int k)(Code)(Java Doc)
abstract public String mapTreeId(String id, ActionTransInfo tInfo)(Code)(Java Doc)
protected int markBitsetForGen(BitSet p)(Code)(Java Doc)
protected void print(String s)(Code)(Java Doc)
protected void printAction(String s)(Code)(Java Doc)
protected void printTabs()(Code)(Java Doc)
protected void println(String s)(Code)(Java Doc)
abstract protected String processActionForSpecialSymbols(String actionStr, int line, RuleBlock currentRule, ActionTransInfo tInfo)(Code)(Java Doc)
public String processStringForASTConstructor(String str)(Code)(Java Doc)
protected String removeAssignmentFromDeclaration(String d)(Code)(Java Doc)
public static String reverseLexerRuleName(String id)(Code)(Java Doc)
public void setAnalyzer(LLkGrammarAnalyzer analyzer_)(Code)(Java Doc)
public void setBehavior(DefineGrammarSymbols behavior_)(Code)(Java Doc)
protected void setGrammar(Grammar g)(Code)(Java Doc)
public void setTool(Tool tool)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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