Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
antlr.DefineGrammarSymbols
Field Summary | |
(package private) static String | |
(package private) LLkAnalyzer | |
(package private) String[] | |
protected Grammar | |
protected Hashtable | |
protected Hashtable | |
(package private) String | |
protected int | |
protected int | |
protected int | |
(package private) Token | |
protected Hashtable | |
protected Tool |
Constructor Summary | |
|
Method Summary | |
void |
|
void | |
void |
|
void |
|
void | |
void | |
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void | |
void | |
void | |
void | |
void |
|
void |
|
void | |
void |
|
String |
|
void |
|
void | |
void | |
void | |
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
(package private) static final String DEFAULT_TOKENMANAGER_NAME
(package private) String[] args
protected Hashtable grammars
protected Hashtable headerActions
(package private) String language
protected int numLexers
protected int numParsers
protected int numTreeParsers
protected Hashtable tokenManagers
public void _refStringLiteral(Token lit, Token label, int autoGenType, boolean lastInRule)
public void _refToken(Token assignId, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule)
Reference a token
public void abortGrammar()
Abort the processing of a grammar due to syntax errors
- Specified by:
- abortGrammar in interface ANTLRGrammarParseBehavior
public void beginAlt(boolean doAST_)
- Specified by:
- beginAlt in interface ANTLRGrammarParseBehavior
public void beginChildList()
- Specified by:
- beginChildList in interface ANTLRGrammarParseBehavior
public void beginExceptionGroup()
- Specified by:
- beginExceptionGroup in interface ANTLRGrammarParseBehavior
public void beginExceptionSpec(Token label)
- Specified by:
- beginExceptionSpec in interface ANTLRGrammarParseBehavior
public void beginSubRule(Token label, Token start, boolean not)
- Specified by:
- beginSubRule in interface ANTLRGrammarParseBehavior
public void beginTree(Token tok) throws SemanticException
- Specified by:
- beginTree in interface ANTLRGrammarParseBehavior
public void defineRuleName(Token r, String access, boolean ruleAutoGen, String docComment) throws SemanticException
Define a lexer or parser rule
- Specified by:
- defineRuleName in interface ANTLRGrammarParseBehavior
public void defineToken(Token tokname, Token tokliteral)
Define a token from tokens {...}. Must be label and literal or just label or just a literal.
- Specified by:
- defineToken in interface ANTLRGrammarParseBehavior
public void endChildList()
- Specified by:
- endChildList in interface ANTLRGrammarParseBehavior
public void endExceptionGroup()
- Specified by:
- endExceptionGroup in interface ANTLRGrammarParseBehavior
public void endExceptionSpec()
- Specified by:
- endExceptionSpec in interface ANTLRGrammarParseBehavior
public void endOptions()
Called after the optional options section, to compensate for options that may not have been set. This method is bigger than it needs to be, but is much more clear if I delineate all the cases.
- Specified by:
- endOptions in interface ANTLRGrammarParseBehavior
public String getHeaderAction(String name)
public void noASTSubRule()
- Specified by:
- noASTSubRule in interface ANTLRGrammarParseBehavior
public void oneOrMoreSubRule()
- Specified by:
- oneOrMoreSubRule in interface ANTLRGrammarParseBehavior
public void optionalSubRule()
- Specified by:
- optionalSubRule in interface ANTLRGrammarParseBehavior
public void refAction(Token action)
- Specified by:
- refAction in interface ANTLRGrammarParseBehavior
public void refArgAction(Token action)
- Specified by:
- refArgAction in interface ANTLRGrammarParseBehavior
public void refCharLiteral(Token lit, Token label, boolean inverted, int autoGenType, boolean lastInRule)
- Specified by:
- refCharLiteral in interface ANTLRGrammarParseBehavior
public void refCharRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule)
- Specified by:
- refCharRange in interface ANTLRGrammarParseBehavior
public void refElementOption(Token option, Token value)
- Specified by:
- refElementOption in interface ANTLRGrammarParseBehavior
public void refExceptionHandler(Token exTypeAndName, Token action)
- Specified by:
- refExceptionHandler in interface ANTLRGrammarParseBehavior
public void refHeaderAction(Token name, Token act)
- Specified by:
- refHeaderAction in interface ANTLRGrammarParseBehavior
public void refInitAction(Token action)
- Specified by:
- refInitAction in interface ANTLRGrammarParseBehavior
public void refMemberAction(Token act)
- Specified by:
- refMemberAction in interface ANTLRGrammarParseBehavior
public void refPreambleAction(Token act)
- Specified by:
- refPreambleAction in interface ANTLRGrammarParseBehavior
public void refReturnAction(Token returnAction)
- Specified by:
- refReturnAction in interface ANTLRGrammarParseBehavior
public void refRule(Token idAssign, Token r, Token label, Token args, int autoGenType)
- Specified by:
- refRule in interface ANTLRGrammarParseBehavior
public void refSemPred(Token pred)
- Specified by:
- refSemPred in interface ANTLRGrammarParseBehavior
public void refStringLiteral(Token lit, Token label, int autoGenType, boolean lastInRule)
- Specified by:
- refStringLiteral in interface ANTLRGrammarParseBehavior
public void refToken(Token assignId, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule)
Reference a token
- Specified by:
- refToken in interface ANTLRGrammarParseBehavior
public void refTokenRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule)
- Specified by:
- refTokenRange in interface ANTLRGrammarParseBehavior
public void refTokensSpecElementOption(Token tok, Token option, Token value)
- Specified by:
- refTokensSpecElementOption in interface ANTLRGrammarParseBehavior
public void refTreeSpecifier(Token treeSpec)
- Specified by:
- refTreeSpecifier in interface ANTLRGrammarParseBehavior
public void refWildcard(Token t, Token label, int autoGenType)
- Specified by:
- refWildcard in interface ANTLRGrammarParseBehavior
public void reset()
Get ready to process a new grammar
public void setArgOfRuleRef(Token argaction)
- Specified by:
- setArgOfRuleRef in interface ANTLRGrammarParseBehavior
public void setCharVocabulary(BitSet b)
Set the character vocabulary for a lexer
- Specified by:
- setCharVocabulary in interface ANTLRGrammarParseBehavior
public void setFileOption(Token key, Token value, String filename)
setFileOption: Associate an option value with a key. This applies to options for an entire grammar file.
- Specified by:
- setFileOption in interface ANTLRGrammarParseBehavior
- Parameters:
key
- The token containing the option namevalue
- The token containing the option value.
public void setGrammarOption(Token key, Token value)
setGrammarOption: Associate an option value with a key. This function forwards to Grammar.setOption for some options.
- Specified by:
- setGrammarOption in interface ANTLRGrammarParseBehavior
- Parameters:
key
- The token containing the option namevalue
- The token containing the option value.
public void setRuleOption(Token key, Token value)
- Specified by:
- setRuleOption in interface ANTLRGrammarParseBehavior
public void setSubruleOption(Token key, Token value)
- Specified by:
- setSubruleOption in interface ANTLRGrammarParseBehavior
public void setUserExceptions(String thr)
- Specified by:
- setUserExceptions in interface ANTLRGrammarParseBehavior
public void startLexer(String file, Token name, String superClass, String doc)
Start a new lexer
- Specified by:
- startLexer in interface ANTLRGrammarParseBehavior
public void startParser(String file, Token name, String superClass, String doc)
Start a new parser
- Specified by:
- startParser in interface ANTLRGrammarParseBehavior
public void startTreeWalker(String file, Token name, String superClass, String doc)
Start a new tree-walker
- Specified by:
- startTreeWalker in interface ANTLRGrammarParseBehavior
public void zeroOrMoreSubRule()
- Specified by:
- zeroOrMoreSubRule in interface ANTLRGrammarParseBehavior