antlr
public abstract class Grammar extends Object
| Field Summary | |
|---|---|
| protected boolean | analyzerDebug |
| protected Tool | antlrTool |
| protected boolean | buildAST |
| protected Token | classMemberAction |
| protected String | className |
| protected String | comment |
| protected boolean | debuggingOutput |
| protected boolean | defaultErrorHandler |
| protected String | exportVocab The name of the export vocabulary...used to generate the output
token types interchange file. |
| protected String | fileName |
| protected CodeGenerator | generator |
| protected boolean | hasSyntacticPredicate |
| protected boolean | hasUserErrorHandling |
| protected String | importVocab The name of the import vocabulary. |
| protected boolean | interactive |
| protected int | maxk |
| protected Hashtable | options |
| protected Token | preambleAction |
| protected Vector | rules |
| protected String | superClass |
| protected Hashtable | symbols |
| protected LLkGrammarAnalyzer | theLLkAnalyzer |
| protected TokenManager | tokenManager The token manager associated with the grammar, if any.
|
| protected boolean | traceRules |
| Constructor Summary | |
|---|---|
| Grammar(String className_, Tool tool_, String superClass) | |
| Method Summary | |
|---|---|
| void | define(RuleSymbol rs) Define a rule |
| abstract void | generate() Top-level call to generate the code for this grammar |
| protected String | getClassName() |
| boolean | getDefaultErrorHandler() |
| String | getFilename() |
| int | getIntegerOption(String key) Get an integer option. |
| Token | getOption(String key) Get an option. |
| protected abstract String | getSuperClass() |
| GrammarSymbol | getSymbol(String s) |
| Enumeration | getSymbols() |
| boolean | hasOption(String key) Check the existence of an option in the table |
| boolean | isDefined(String s) Is a rule symbol defined? |
| abstract void | processArguments(String[] args) Process command line arguments. |
| void | setCodeGenerator(CodeGenerator gen) |
| void | setFilename(String s) |
| void | setGrammarAnalyzer(LLkGrammarAnalyzer a) |
| boolean | setOption(String key, Token value) Set a generic option.
|
| void | setTokenManager(TokenManager tokenManager_) |
| String | toString() Print out the grammar without actions |
Parameters: key The name of the option
Returns: The value associated with the key.
Parameters: key The name of the option
Returns: The value associated with the key, or null if the key has not been set.
Parameters: key The name of the option
Returns: true if the option is in the table
Parameters: key The name of the option. value The value to associate with the key.
Returns: true if the option was a valid generic grammar option, false o/w