public class AssignTokenTypesBehavior extends AssignTokenTypesWalker
AssignTokenTypesWalker.block_return, AssignTokenTypesWalker.modifier_return, AssignTokenTypesWalker.optionValue_return| Modifier and Type | Field | Description |
|---|---|---|
protected Map<String,String> |
aliases |
|
protected Map<String,String> |
aliasesReverseIndex |
|
protected Map<String,Integer> |
stringLiterals |
|
protected Set<String> |
tokenRuleDefs |
Track actual lexer rule defs so we don't get repeated token defs in
generated lexer.
|
protected Map<String,Integer> |
tokens |
|
protected static Integer |
UNASSIGNED |
|
protected static Integer |
UNASSIGNED_IN_PARSER_RULE |
ACTION, ACTION_CHAR_LITERAL, ACTION_ESC, ACTION_STRING_LITERAL, ALT, AMPERSAND, ARG, ARG_ACTION, ARGLIST, ASSIGN, BACKTRACK_SEMPRED, BANG, BLOCK, CATCH, CHAR_LITERAL, CHAR_RANGE, charAlias, charAlias2, CHARSET, CLOSE_ELEMENT_OPTION, CLOSURE, COLON, COMBINED_GRAMMAR, COMMA, COMMENT, currentRuleName, DIGIT, DOC_COMMENT, DOLLAR, DOT, DOUBLE_ANGLE_STRING_LITERAL, DOUBLE_QUOTE_STRING_LITERAL, EOA, EOB, EOF, EOR, EPSILON, ESC, ETC, FINALLY, FOLLOW_ACTION_in_attrScope220, FOLLOW_ACTION_in_element988, FOLLOW_ACTION_in_exceptionHandler830, FOLLOW_ACTION_in_finallyClause845, FOLLOW_ACTION_in_ruleScopeSpec713, FOLLOW_ALT_in_alternative779, FOLLOW_alternative_in_block752, FOLLOW_AMPERSAND_in_attrScope211, FOLLOW_AMPERSAND_in_grammarSpec179, FOLLOW_AMPERSAND_in_ruleBody615, FOLLOW_AMPERSAND_in_ruleScopeSpec703, FOLLOW_ARG_ACTION_in_atom1094, FOLLOW_ARG_ACTION_in_atom1110, FOLLOW_ARG_ACTION_in_exceptionHandler828, FOLLOW_ARG_ACTION_in_ruleBody573, FOLLOW_ARG_ACTION_in_ruleBody584, FOLLOW_ARG_in_ruleBody570, FOLLOW_ASSIGN_in_delegateGrammars386, FOLLOW_ASSIGN_in_element941, FOLLOW_ASSIGN_in_option261, FOLLOW_ASSIGN_in_tokenSpec457, FOLLOW_atom_in_atom1152, FOLLOW_atom_in_element904, FOLLOW_atom_in_element921, FOLLOW_atom_in_element923, FOLLOW_atom_in_element932, FOLLOW_atom_in_element934, FOLLOW_attrScope_in_grammarSpec170, FOLLOW_BACKTRACK_SEMPRED_in_element1004, FOLLOW_BANG_in_element896, FOLLOW_BLOCK_in_block737, FOLLOW_block_in_ebnf1029, FOLLOW_block_in_ebnf1038, FOLLOW_block_in_ebnf1049, FOLLOW_block_in_ebnf1060, FOLLOW_block_in_element976, FOLLOW_block_in_ruleBody628, FOLLOW_CATCH_in_exceptionHandler826, FOLLOW_CHAR_LITERAL_in_atom1124, FOLLOW_CHAR_LITERAL_in_charSetElement339, FOLLOW_CHAR_LITERAL_in_charSetElement348, FOLLOW_CHAR_LITERAL_in_charSetElement350, FOLLOW_CHAR_LITERAL_in_charSetElement361, FOLLOW_CHAR_LITERAL_in_charSetElement363, FOLLOW_CHAR_LITERAL_in_optionValue301, FOLLOW_CHAR_LITERAL_in_tokenSpec492, FOLLOW_CHAR_RANGE_in_element930, FOLLOW_CHARSET_in_charSet324, FOLLOW_charSetElement_in_charSet326, FOLLOW_CLOSURE_in_ebnf1047, FOLLOW_COMBINED_GRAMMAR_in_grammar_114, FOLLOW_delegateGrammars_in_grammarSpec156, FOLLOW_DOC_COMMENT_in_grammarSpec142, FOLLOW_DOT_in_atom1148, FOLLOW_ebnf_in_element962, FOLLOW_element_in_alternative782, FOLLOW_element_in_element889, FOLLOW_element_in_element898, FOLLOW_element_in_element912, FOLLOW_element_in_element945, FOLLOW_element_in_element956, FOLLOW_element_in_tree_1076, FOLLOW_EOA_in_alternative786, FOLLOW_EOB_in_block762, FOLLOW_EOR_in_ruleBody639, FOLLOW_EPSILON_in_element1018, FOLLOW_exceptionGroup_in_ruleBody633, FOLLOW_exceptionHandler_in_exceptionGroup801, FOLLOW_FINALLY_in_finallyClause843, FOLLOW_finallyClause_in_exceptionGroup807, FOLLOW_finallyClause_in_exceptionGroup814, FOLLOW_FORCED_ACTION_in_element983, FOLLOW_GATED_SEMPRED_in_element1013, FOLLOW_grammarSpec_in_grammar_104, FOLLOW_grammarSpec_in_grammar_116, FOLLOW_grammarSpec_in_grammar_74, FOLLOW_grammarSpec_in_grammar_88, FOLLOW_ID_in_atom1150, FOLLOW_ID_in_attrScope206, FOLLOW_ID_in_delegateGrammars388, FOLLOW_ID_in_delegateGrammars390, FOLLOW_ID_in_delegateGrammars398, FOLLOW_ID_in_element943, FOLLOW_ID_in_element954, FOLLOW_ID_in_grammarSpec135, FOLLOW_ID_in_option263, FOLLOW_ID_in_optionValue291, FOLLOW_ID_in_ruleBody554, FOLLOW_ID_in_ruleScopeSpec719, FOLLOW_ID_in_throwsSpec683, FOLLOW_IMPORT_in_delegateGrammars378, FOLLOW_INT_in_optionValue306, FOLLOW_LEXER_GRAMMAR_in_grammar_69, FOLLOW_modifier_in_ruleBody563, FOLLOW_NOT_in_element910, FOLLOW_option_in_optionsSpec242, FOLLOW_OPTIONAL_in_ebnf1036, FOLLOW_OPTIONS_in_optionsSpec239, FOLLOW_optionsSpec_in_block743, FOLLOW_optionsSpec_in_grammarSpec149, FOLLOW_optionsSpec_in_ruleBody599, FOLLOW_optionValue_in_option265, FOLLOW_OR_in_charSetElement346, FOLLOW_PARSER_GRAMMAR_in_grammar_84, FOLLOW_PLUS_ASSIGN_in_element952, FOLLOW_POSITIVE_CLOSURE_in_ebnf1058, FOLLOW_PREC_RULE_in_rule538, FOLLOW_RANGE_in_charSetElement359, FOLLOW_RANGE_in_element919, FOLLOW_RET_in_ruleBody581, FOLLOW_rewrite_in_block754, FOLLOW_REWRITE_in_rewrite863, FOLLOW_REWRITES_in_rewrite858, FOLLOW_ROOT_in_element887, FOLLOW_RULE_in_rule529, FOLLOW_rule_in_rules516, FOLLOW_RULE_REF_in_atom1091, FOLLOW_ruleBody_in_rule531, FOLLOW_ruleBody_in_rule540, FOLLOW_rules_in_grammarSpec191, FOLLOW_ruleScopeSpec_in_ruleBody606, FOLLOW_SCOPE_in_attrScope204, FOLLOW_SCOPE_in_ruleScopeSpec698, FOLLOW_SEMPRED_in_element993, FOLLOW_STRING_LITERAL_in_atom1135, FOLLOW_STRING_LITERAL_in_optionValue296, FOLLOW_STRING_LITERAL_in_tokenSpec481, FOLLOW_SYN_SEMPRED_in_element998, FOLLOW_SYNPRED_in_element974, FOLLOW_THROWS_in_throwsSpec681, FOLLOW_throwsSpec_in_ruleBody592, FOLLOW_TOKEN_REF_in_atom1107, FOLLOW_TOKEN_REF_in_tokenSpec437, FOLLOW_TOKEN_REF_in_tokenSpec464, FOLLOW_TOKENS_in_tokensSpec420, FOLLOW_tokenSpec_in_tokensSpec422, FOLLOW_tokensSpec_in_grammarSpec163, FOLLOW_tree__in_element967, FOLLOW_TREE_BEGIN_in_tree_1074, FOLLOW_TREE_GRAMMAR_in_grammar_98, FOLLOW_WILDCARD_in_atom1142, FORCED_ACTION, FRAGMENT, GATED_SEMPRED, grammar, GRAMMAR, ID, IMPLIES, IMPORT, INITACTION, INT, LABEL, LEXER, LEXER_GRAMMAR, LPAREN, ML_COMMENT, NESTED_ACTION, NESTED_ARG_ACTION, NOT, OPEN_ELEMENT_OPTION, OPTIONAL, OPTIONS, OR, PARSER, PARSER_GRAMMAR, PLUS, PLUS_ASSIGN, POSITIVE_CLOSURE, PREC_RULE, PRIVATE, PROTECTED, PUBLIC, QUESTION, RANGE, RCURLY, RECURSIVE_RULE_REF, RET, RETURNS, REWRITE, REWRITES, ROOT, RPAREN, RULE, RULE_REF, SCOPE, SEMI, SEMPRED, SL_COMMENT, SRC, STAR, STRAY_BRACKET, STRING_LITERAL, stringAlias, stringAlias2, SYN_SEMPRED, SYNPRED, TEMPLATE, THROWS, TOKEN_REF, tokenNames, TOKENS, TREE, TREE_BEGIN, TREE_GRAMMAR, WILDCARD, WS, WS_LOOP, WS_OPT, XDIGITDEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, stateDOWN, input, UP| Constructor | Description |
|---|---|
AssignTokenTypesBehavior() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
alias(GrammarAST t,
GrammarAST s) |
|
protected void |
aliasTokenIDsAndLiterals(Grammar root) |
|
protected void |
assignStringTypes(Grammar root) |
|
protected void |
assignTokenIDTypes(Grammar root) |
|
protected void |
defineTokenNamesAndLiteralsInGrammar(Grammar root) |
|
void |
defineTokens(Grammar root) |
|
protected void |
init(Grammar g) |
|
protected void |
trackString(GrammarAST t) |
Track string literals (could be in tokens{} section)
|
protected void |
trackToken(GrammarAST t) |
|
protected void |
trackTokenRule(GrammarAST t,
GrammarAST modifier,
GrammarAST block) |
alternative, ast_suffix, atom, attrScope, block, charSet, charSetElement, defineStringLiteralsFromDelegates, delegateGrammars, ebnf, element, exceptionGroup, exceptionHandler, finallyClause, getDelegates, getGrammarFileName, getTokenNames, grammar_, grammarSpec, initASTPatterns, modifier, option, optionsSpec, optionValue, reportError, rewrite, rule, ruleBody, rules, ruleScopeSpec, throwsSpec, tokenSpec, tokensSpec, tree_alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, endResync, failed, getBacktrackingLevel, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, match, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, setBacktrackingLevel, toStrings, traceIn, traceOutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOutprotected static final Integer UNASSIGNED
protected static final Integer UNASSIGNED_IN_PARSER_RULE
protected void init(Grammar g)
init in class AssignTokenTypesWalkerprotected void trackString(GrammarAST t)
trackString in class AssignTokenTypesWalkerprotected void trackToken(GrammarAST t)
trackToken in class AssignTokenTypesWalkerprotected void trackTokenRule(GrammarAST t, GrammarAST modifier, GrammarAST block)
trackTokenRule in class AssignTokenTypesWalkerprotected void alias(GrammarAST t, GrammarAST s)
alias in class AssignTokenTypesWalkerpublic void defineTokens(Grammar root)
defineTokens in class AssignTokenTypesWalkerprotected void assignStringTypes(Grammar root)
assignStringTypes in class AssignTokenTypesWalkerprotected void aliasTokenIDsAndLiterals(Grammar root)
aliasTokenIDsAndLiterals in class AssignTokenTypesWalkerprotected void assignTokenIDTypes(Grammar root)
assignTokenIDTypes in class AssignTokenTypesWalkerprotected void defineTokenNamesAndLiteralsInGrammar(Grammar root)
defineTokenNamesAndLiteralsInGrammar in class AssignTokenTypesWalkerCopyright © 1992–2018 ANTLR. All rights reserved.