antlr
public class DefineGrammarSymbols extends Object implements ANTLRGrammarParseBehavior
| Field Summary | |
|---|---|
| LLkAnalyzer | analyzer |
| String[] | args |
| static String | DEFAULT_TOKENMANAGER_NAME |
| protected Grammar | grammar |
| protected Hashtable | grammars |
| protected Hashtable | headerActions |
| String | language |
| protected int | numLexers |
| protected int | numParsers |
| protected int | numTreeParsers |
| Token | thePreambleAction |
| protected Hashtable | tokenManagers |
| protected Tool | tool |
| Constructor Summary | |
|---|---|
| DefineGrammarSymbols(Tool tool_, String[] args_, LLkAnalyzer analyzer_) | |
| Method Summary | |
|---|---|
| void | abortGrammar() Abort the processing of a grammar due to syntax errors |
| void | beginAlt(boolean doAST_) |
| void | beginChildList() |
| void | beginExceptionGroup() |
| void | beginExceptionSpec(Token label) |
| void | beginSubRule(Token label, Token start, boolean not) |
| void | beginTree(Token tok) |
| void | defineRuleName(Token r, String access, boolean ruleAutoGen, String docComment) Define a lexer or parser rule |
| void | defineToken(Token tokname, Token tokliteral) Define a token from tokens {...}.
|
| void | endAlt() |
| void | endChildList() |
| void | endExceptionGroup() |
| void | endExceptionSpec() |
| void | endGrammar() |
| void | endOptions() Called after the optional options section, to compensate for
options that may not have been set.
|
| void | endRule(String r) |
| void | endSubRule() |
| void | endTree() |
| String | getHeaderAction(String name) |
| int | getHeaderActionLine(String name) |
| void | hasError() |
| void | noASTSubRule() |
| void | oneOrMoreSubRule() |
| void | optionalSubRule() |
| void | refAction(Token action) |
| void | refArgAction(Token action) |
| void | refCharLiteral(Token lit, Token label, boolean inverted, int autoGenType, boolean lastInRule) |
| void | refCharRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule) |
| void | refElementOption(Token option, Token value) |
| void | refExceptionHandler(Token exTypeAndName, Token action) |
| void | refHeaderAction(Token name, Token act) |
| void | refInitAction(Token action) |
| void | refMemberAction(Token act) |
| void | refPreambleAction(Token act) |
| void | refReturnAction(Token returnAction) |
| void | refRule(Token idAssign, Token r, Token label, Token args, int autoGenType) |
| void | refSemPred(Token pred) |
| void | refStringLiteral(Token lit, Token label, int autoGenType, boolean lastInRule) |
| void | refToken(Token assignId, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule) Reference a token |
| void | refTokenRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule) |
| void | refTokensSpecElementOption(Token tok, Token option, Token value) |
| void | refTreeSpecifier(Token treeSpec) |
| void | refWildcard(Token t, Token label, int autoGenType) |
| void | reset() Get ready to process a new grammar |
| void | setArgOfRuleRef(Token argaction) |
| void | setCharVocabulary(BitSet b) Set the character vocabulary for a lexer |
| void | setFileOption(Token key, Token value, String filename) setFileOption: Associate an option value with a key.
|
| void | setGrammarOption(Token key, Token value) setGrammarOption: Associate an option value with a key.
|
| void | setRuleOption(Token key, Token value) |
| void | setSubruleOption(Token key, Token value) |
| void | setUserExceptions(String thr) |
| void | startLexer(String file, Token name, String superClass, String doc) Start a new lexer |
| void | startParser(String file, Token name, String superClass, String doc) Start a new parser |
| void | startTreeWalker(String file, Token name, String superClass, String doc) Start a new tree-walker |
| void | synPred() |
| void | zeroOrMoreSubRule() |
| void | _refStringLiteral(Token lit, Token label, int autoGenType, boolean lastInRule) |
| void | _refToken(Token assignId, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule) Reference a token |
Parameters: key The token containing the option name value The token containing the option value.
Parameters: key The token containing the option name value The token containing the option value.