antlr
Class ParserGrammar
java.lang.Object
|
+--antlr.Grammar
|
+--antlr.ParserGrammar
- class ParserGrammar
- extends Grammar
Parser-specific grammar subclass
Fields inherited from class antlr.Grammar |
analyzerDebug, buildAST, classMemberAction, className, comment, debuggingOutput, defaultErrorHandler, exportVocab, fileName, generator, hasSyntacticPredicate, hasUserErrorHandling, importVocab, interactive, maxk, options, preambleAction, rules, superClass, symbols, theLLkAnalyzer, tokenManager, tool, traceRules |
Constructor Summary |
(package private) |
ParserGrammar(java.lang.String className_,
Tool tool_,
java.lang.String superClass)
|
Method Summary |
void |
generate()
Top-level call to generate the code for this grammar |
protected java.lang.String |
getSuperClass()
|
void |
processArguments(java.lang.String[] args)
Process command line arguments. |
boolean |
setOption(java.lang.String key,
Token value)
Set parser options -- performs action on the following options: |
Methods inherited from class antlr.Grammar |
define, getClassName, getDefaultErrorHandler, getFilename, getIntegerOption, getOption, getSymbol, getSymbols, hasOption, isDefined, setCodeGenerator, setFilename, setGrammarAnalyzer, setTokenManager, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ParserGrammar
ParserGrammar(java.lang.String className_,
Tool tool_,
java.lang.String superClass)
generate
public void generate()
throws java.io.IOException
- Top-level call to generate the code for this grammar
- Specified by:
generate
in class Grammar
java.io.IOException
getSuperClass
protected java.lang.String getSuperClass()
- Specified by:
getSuperClass
in class Grammar
processArguments
public void processArguments(java.lang.String[] args)
- Process command line arguments.
-trace have all rules call traceIn/traceOut
-traceParser have parser rules call traceIn/traceOut
-debug generate debugging output for parser debugger
- Specified by:
processArguments
in class Grammar
setOption
public boolean setOption(java.lang.String key,
Token value)
- Set parser options -- performs action on the following options:
- Overrides:
setOption
in class Grammar
- 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