Java Doc for Grammar.java in  » Parser » Rats-Parser-Generators » 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 » Parser » Rats Parser Generators » antlr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   antlr.Grammar

Grammar
abstract public class Grammar (Code)
A Grammar holds a set of rules (which are stored in a symbol table). Most of the time a grammar needs a code generator and an LLkAnalyzer too.


Field Summary
protected  booleananalyzerDebug
    
protected  ToolantlrTool
    
protected  booleanbuildAST
    
protected  TokenclassMemberAction
    
protected  StringclassName
    
protected  Stringcomment
    
protected  booleandebuggingOutput
    
protected  booleandefaultErrorHandler
    
protected  StringexportVocab
     The name of the export vocabulary...used to generate the output token types interchange file.
protected  StringfileName
    
protected  CodeGeneratorgenerator
    
protected  booleanhasSyntacticPredicate
    
protected  booleanhasUserErrorHandling
    
protected  StringimportVocab
     The name of the import vocabulary.
protected  booleaninteractive
    
protected  intmaxk
    
protected  Hashtableoptions
    
protected  TokenpreambleAction
    
protected  Vectorrules
    
protected  StringsuperClass
    
protected  Hashtablesymbols
    
protected  LLkGrammarAnalyzertheLLkAnalyzer
    
protected  TokenManagertokenManager
     The token manager associated with the grammar, if any. // The token manager is responsible for maintaining the set of valid tokens, and // is conceptually shared between the lexer and parser.
protected  booleantraceRules
    

Constructor Summary
public  Grammar(String className_, Tool tool_, String superClass)
    

Method Summary
public  voiddefine(RuleSymbol rs)
    
abstract public  voidgenerate()
    
protected  StringgetClassName()
    
public  booleangetDefaultErrorHandler()
    
public  StringgetFilename()
    
public  intgetIntegerOption(String key)
     Get an integer option.
public  TokengetOption(String key)
     Get an option.
abstract protected  StringgetSuperClass()
    
public  GrammarSymbolgetSymbol(String s)
    
public  EnumerationgetSymbols()
    
public  booleanhasOption(String key)
    
public  booleanisDefined(String s)
    
abstract public  voidprocessArguments(String[] args)
     Process command line arguments.
public  voidsetCodeGenerator(CodeGenerator gen)
    
public  voidsetFilename(String s)
    
public  voidsetGrammarAnalyzer(LLkGrammarAnalyzer a)
    
public  booleansetOption(String key, Token value)
     Set a generic option. This associates a generic option key with a Token value. No validation is performed by this method, although users of the value (code generation and/or analysis) may require certain formats. The value is stored as a token so that the location of an error can be reported.
Parameters:
  key - The name of the option.
Parameters:
  value - The value to associate with the key.
public  voidsetTokenManager(TokenManager tokenManager_)
    
public  StringtoString()
    

Field Detail
analyzerDebug
protected boolean analyzerDebug(Code)



antlrTool
protected Tool antlrTool(Code)



buildAST
protected boolean buildAST(Code)



classMemberAction
protected Token classMemberAction(Code)



className
protected String className(Code)



comment
protected String comment(Code)



debuggingOutput
protected boolean debuggingOutput(Code)



defaultErrorHandler
protected boolean defaultErrorHandler(Code)



exportVocab
protected String exportVocab(Code)
The name of the export vocabulary...used to generate the output token types interchange file.



fileName
protected String fileName(Code)



generator
protected CodeGenerator generator(Code)



hasSyntacticPredicate
protected boolean hasSyntacticPredicate(Code)



hasUserErrorHandling
protected boolean hasUserErrorHandling(Code)



importVocab
protected String importVocab(Code)
The name of the import vocabulary. "Initial conditions"



interactive
protected boolean interactive(Code)



maxk
protected int maxk(Code)



options
protected Hashtable options(Code)



preambleAction
protected Token preambleAction(Code)



rules
protected Vector rules(Code)



superClass
protected String superClass(Code)



symbols
protected Hashtable symbols(Code)



theLLkAnalyzer
protected LLkGrammarAnalyzer theLLkAnalyzer(Code)



tokenManager
protected TokenManager tokenManager(Code)
The token manager associated with the grammar, if any. // The token manager is responsible for maintaining the set of valid tokens, and // is conceptually shared between the lexer and parser. This may be either a // LexerGrammar or a ImportVocabTokenManager.



traceRules
protected boolean traceRules(Code)




Constructor Detail
Grammar
public Grammar(String className_, Tool tool_, String superClass)(Code)




Method Detail
define
public void define(RuleSymbol rs)(Code)
Define a rule



generate
abstract public void generate() throws IOException(Code)
Top-level call to generate the code for this grammar



getClassName
protected String getClassName()(Code)



getDefaultErrorHandler
public boolean getDefaultErrorHandler()(Code)



getFilename
public String getFilename()(Code)



getIntegerOption
public int getIntegerOption(String key) throws NumberFormatException(Code)
Get an integer option. Given the name of the option find its associated integer value. If the associated value is not an integer or is not in the table, then throw an exception of type NumberFormatException.
Parameters:
  key - The name of the option The value associated with the key.



getOption
public Token getOption(String key)(Code)
Get an option. Given the name of the option find its associated value.
Parameters:
  key - The name of the option The value associated with the key, or null if the key has not been set.



getSuperClass
abstract protected String getSuperClass()(Code)



getSymbol
public GrammarSymbol getSymbol(String s)(Code)



getSymbols
public Enumeration getSymbols()(Code)



hasOption
public boolean hasOption(String key)(Code)
Check the existence of an option in the table
Parameters:
  key - The name of the option true if the option is in the table



isDefined
public boolean isDefined(String s)(Code)
Is a rule symbol defined? (not used for tokens)



processArguments
abstract public void processArguments(String[] args)(Code)
Process command line arguments. Implemented in subclasses



setCodeGenerator
public void setCodeGenerator(CodeGenerator gen)(Code)



setFilename
public void setFilename(String s)(Code)



setGrammarAnalyzer
public void setGrammarAnalyzer(LLkGrammarAnalyzer a)(Code)



setOption
public boolean setOption(String key, Token value)(Code)
Set a generic option. This associates a generic option key with a Token value. No validation is performed by this method, although users of the value (code generation and/or analysis) may require certain formats. The value is stored as a token so that the location of an error can be reported.
Parameters:
  key - The name of the option.
Parameters:
  value - The value to associate with the key. true if the option was a valid generic grammar option, false o/w



setTokenManager
public void setTokenManager(TokenManager tokenManager_)(Code)



toString
public String toString()(Code)
Print out the grammar without actions



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.