|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.Grammar
Untamed:
Field Summary | |
protected boolean |
analyzerDebug
|
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 Tool |
tool
|
protected boolean |
traceRules
|
Constructor Summary | |
Grammar(String className_,
Tool tool_,
String superClass)
Enabled: |
Method Summary | |
void |
define(RuleSymbol rs)
Enabled: Define a rule |
abstract void |
generate()
Enabled: Top-level call to generate the code for this grammar |
protected String |
getClassName()
|
boolean |
getDefaultErrorHandler()
Enabled: |
String |
getFilename()
Enabled: |
int |
getIntegerOption(String key)
Enabled: Get an integer option. |
Token |
getOption(String key)
Enabled: Get an option. |
protected abstract String |
getSuperClass()
|
GrammarSymbol |
getSymbol(String s)
Enabled: |
Enumeration |
getSymbols()
Enabled: |
boolean |
hasOption(String key)
Enabled: Check the existence of an option in the table |
boolean |
isDefined(String s)
Enabled: Is a rule symbol defined? (not used for tokens) |
abstract void |
processArguments(String[] args)
Enabled: Process command line arguments. |
void |
setCodeGenerator(CodeGenerator gen)
Enabled: |
void |
setFilename(String s)
Enabled: |
void |
setGrammarAnalyzer(LLkGrammarAnalyzer a)
Enabled: |
boolean |
setOption(String key,
Token value)
Enabled: Set a generic option. |
void |
setTokenManager(TokenManager tokenManager_)
Enabled: |
String |
toString()
Suppressed: Print out the grammar without actions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Tool tool
protected CodeGenerator generator
protected LLkGrammarAnalyzer theLLkAnalyzer
protected Hashtable symbols
protected boolean buildAST
protected boolean analyzerDebug
protected boolean interactive
protected String superClass
protected TokenManager tokenManager
protected String exportVocab
protected String importVocab
protected Hashtable options
protected Vector rules
protected Token preambleAction
protected String className
protected String fileName
protected Token classMemberAction
protected boolean hasSyntacticPredicate
protected boolean hasUserErrorHandling
protected int maxk
protected boolean traceRules
protected boolean debuggingOutput
protected boolean defaultErrorHandler
protected String comment
Constructor Detail |
public Grammar(String className_, Tool tool_, String superClass)
Method Detail |
public void define(RuleSymbol rs)
public abstract void generate() throws IOException
IOException
protected String getClassName()
public boolean getDefaultErrorHandler()
public String getFilename()
public int getIntegerOption(String key) throws NumberFormatException
key
- The name of the option
NumberFormatException
public Token getOption(String key)
key
- The name of the option
protected abstract String getSuperClass()
public GrammarSymbol getSymbol(String s)
public Enumeration getSymbols()
public boolean hasOption(String key)
key
- The name of the option
public boolean isDefined(String s)
public abstract void processArguments(String[] args)
public void setCodeGenerator(CodeGenerator gen)
public void setFilename(String s)
public void setGrammarAnalyzer(LLkGrammarAnalyzer a)
public boolean setOption(String key, Token value)
key
- The name of the option.value
- The value to associate with the key.
public void setTokenManager(TokenManager tokenManager_)
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |