类 CodeGenTreeWalker
- java.lang.Object
-
- org.antlr.runtime.BaseRecognizer
-
- org.antlr.runtime.tree.TreeParser
-
- org.antlr.grammar.v3.CodeGenTreeWalker
-
public class CodeGenTreeWalker extends TreeParser
Walk a grammar and generate code by gradually building up a bigger and bigger ST. Terence Parr University of San Francisco June 15, 2004
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
CodeGenTreeWalker.alternative_return
static class
CodeGenTreeWalker.atom_return
static class
CodeGenTreeWalker.block_return
static class
CodeGenTreeWalker.ebnf_return
static class
CodeGenTreeWalker.element_action_return
static class
CodeGenTreeWalker.element_return
static class
CodeGenTreeWalker.modifier_return
static class
CodeGenTreeWalker.rewrite_atom_return
static class
CodeGenTreeWalker.rewrite_ebnf_return
static class
CodeGenTreeWalker.rewrite_element_return
static class
CodeGenTreeWalker.rewrite_return
static class
CodeGenTreeWalker.rewrite_tree_return
static class
CodeGenTreeWalker.rule_return
static class
CodeGenTreeWalker.setBlock_return
static class
CodeGenTreeWalker.tree__return
-
字段概要
-
从类继承的字段 org.antlr.runtime.tree.TreeParser
DOWN, input, UP
-
从类继承的字段 org.antlr.runtime.BaseRecognizer
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
-
-
构造器概要
构造器 构造器 说明 CodeGenTreeWalker(TreeNodeStream input)
CodeGenTreeWalker(TreeNodeStream input, RecognizerSharedState state)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CodeGenTreeWalker.alternative_return
alternative(GrammarAST label)
void
ast_suffix()
CodeGenTreeWalker.atom_return
atom(GrammarAST scope, GrammarAST label, GrammarAST astSuffix)
void
attrScope()
CodeGenTreeWalker.block_return
block(java.lang.String blockTemplateName, DFA dfa, GrammarAST label)
CodeGenTreeWalker.ebnf_return
ebnf(GrammarAST label)
CodeGenTreeWalker.element_return
element(GrammarAST label, GrammarAST astSuffix)
CodeGenTreeWalker.element_action_return
element_action()
void
exceptionGroup(org.stringtemplate.v4.ST ruleST)
void
exceptionHandler(org.stringtemplate.v4.ST ruleST)
void
finallyClause(org.stringtemplate.v4.ST ruleST)
java.lang.String
getCurrentRuleName()
TreeParser[]
getDelegates()
java.lang.String
getGrammarFileName()
For debugging and other purposes, might want the grammar name.int
getOuterAltNum()
protected org.stringtemplate.v4.ST
getRuleElementST(java.lang.String name, java.lang.String ruleTargetName, GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
protected java.lang.String
getSTSuffix(GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
Return a non-empty template name suffix if the token is to be tracked, added to a tree, or both.protected org.stringtemplate.v4.ST
getTokenElementST(java.lang.String name, java.lang.String elementName, GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
java.lang.String[]
getTokenNames()
Used to print out token names like ID during debugging and error reporting.protected java.util.List<java.lang.String>
getTokenTypesAsTargetLabels(java.util.Collection<GrammarAST> refs)
Convert rewrite AST lists to target labels listprotected org.stringtemplate.v4.ST
getWildcardST(GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
void
grammar_(Grammar g, org.stringtemplate.v4.ST recognizerST, org.stringtemplate.v4.ST outputFileST, org.stringtemplate.v4.ST headerFileST)
void
grammarSpec()
void
init(Grammar g)
boolean
isListLabel(java.lang.String label)
CodeGenTreeWalker.modifier_return
modifier()
org.stringtemplate.v4.ST
notElement(GrammarAST n, GrammarAST label, GrammarAST astSuffix)
void
reportError(java.lang.String s)
void
reportError(RecognitionException ex)
Report a recognition problem.CodeGenTreeWalker.rewrite_return
rewrite()
org.stringtemplate.v4.ST
rewrite_alternative()
CodeGenTreeWalker.rewrite_atom_return
rewrite_atom(boolean isRoot)
org.stringtemplate.v4.ST
rewrite_block(java.lang.String blockTemplateName)
CodeGenTreeWalker.rewrite_ebnf_return
rewrite_ebnf()
CodeGenTreeWalker.rewrite_element_return
rewrite_element()
org.stringtemplate.v4.ST
rewrite_template()
CodeGenTreeWalker.rewrite_tree_return
rewrite_tree()
CodeGenTreeWalker.rule_return
rule()
void
rules(org.stringtemplate.v4.ST recognizerST)
void
ruleScopeSpec()
org.stringtemplate.v4.ST
set(GrammarAST label, GrammarAST astSuffix)
void
setAlternative()
CodeGenTreeWalker.setBlock_return
setBlock()
void
setCurrentRuleName(java.lang.String value)
void
setElement()
void
setOuterAltNum(int value)
boolean
synpred1_CodeGenTreeWalker()
void
synpred1_CodeGenTreeWalker_fragment()
boolean
synpred2_CodeGenTreeWalker()
void
synpred2_CodeGenTreeWalker_fragment()
void
throwsSpec()
CodeGenTreeWalker.tree__return
tree_()
-
从类继承的方法 org.antlr.runtime.tree.TreeParser
getAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut
-
从类继承的方法 org.antlr.runtime.BaseRecognizer
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, traceOut
-
-
-
-
字段详细资料
-
tokenNames
public static final java.lang.String[] tokenNames
-
EOF
public static final int EOF
- 另请参阅:
- 常量字段值
-
ACTION
public static final int ACTION
- 另请参阅:
- 常量字段值
-
ACTION_CHAR_LITERAL
public static final int ACTION_CHAR_LITERAL
- 另请参阅:
- 常量字段值
-
ACTION_ESC
public static final int ACTION_ESC
- 另请参阅:
- 常量字段值
-
ACTION_STRING_LITERAL
public static final int ACTION_STRING_LITERAL
- 另请参阅:
- 常量字段值
-
ALT
public static final int ALT
- 另请参阅:
- 常量字段值
-
AMPERSAND
public static final int AMPERSAND
- 另请参阅:
- 常量字段值
-
ARG
public static final int ARG
- 另请参阅:
- 常量字段值
-
ARGLIST
public static final int ARGLIST
- 另请参阅:
- 常量字段值
-
ARG_ACTION
public static final int ARG_ACTION
- 另请参阅:
- 常量字段值
-
ASSIGN
public static final int ASSIGN
- 另请参阅:
- 常量字段值
-
BACKTRACK_SEMPRED
public static final int BACKTRACK_SEMPRED
- 另请参阅:
- 常量字段值
-
BANG
public static final int BANG
- 另请参阅:
- 常量字段值
-
BLOCK
public static final int BLOCK
- 另请参阅:
- 常量字段值
-
CATCH
public static final int CATCH
- 另请参阅:
- 常量字段值
-
CHAR_LITERAL
public static final int CHAR_LITERAL
- 另请参阅:
- 常量字段值
-
CHAR_RANGE
public static final int CHAR_RANGE
- 另请参阅:
- 常量字段值
-
CLOSE_ELEMENT_OPTION
public static final int CLOSE_ELEMENT_OPTION
- 另请参阅:
- 常量字段值
-
CLOSURE
public static final int CLOSURE
- 另请参阅:
- 常量字段值
-
COLON
public static final int COLON
- 另请参阅:
- 常量字段值
-
COMBINED_GRAMMAR
public static final int COMBINED_GRAMMAR
- 另请参阅:
- 常量字段值
-
COMMA
public static final int COMMA
- 另请参阅:
- 常量字段值
-
COMMENT
public static final int COMMENT
- 另请参阅:
- 常量字段值
-
DIGIT
public static final int DIGIT
- 另请参阅:
- 常量字段值
-
DOC_COMMENT
public static final int DOC_COMMENT
- 另请参阅:
- 常量字段值
-
DOLLAR
public static final int DOLLAR
- 另请参阅:
- 常量字段值
-
DOT
public static final int DOT
- 另请参阅:
- 常量字段值
-
DOUBLE_ANGLE_STRING_LITERAL
public static final int DOUBLE_ANGLE_STRING_LITERAL
- 另请参阅:
- 常量字段值
-
DOUBLE_QUOTE_STRING_LITERAL
public static final int DOUBLE_QUOTE_STRING_LITERAL
- 另请参阅:
- 常量字段值
-
EOA
public static final int EOA
- 另请参阅:
- 常量字段值
-
EOB
public static final int EOB
- 另请参阅:
- 常量字段值
-
EOR
public static final int EOR
- 另请参阅:
- 常量字段值
-
EPSILON
public static final int EPSILON
- 另请参阅:
- 常量字段值
-
ESC
public static final int ESC
- 另请参阅:
- 常量字段值
-
ETC
public static final int ETC
- 另请参阅:
- 常量字段值
-
FINALLY
public static final int FINALLY
- 另请参阅:
- 常量字段值
-
FORCED_ACTION
public static final int FORCED_ACTION
- 另请参阅:
- 常量字段值
-
FRAGMENT
public static final int FRAGMENT
- 另请参阅:
- 常量字段值
-
GATED_SEMPRED
public static final int GATED_SEMPRED
- 另请参阅:
- 常量字段值
-
GRAMMAR
public static final int GRAMMAR
- 另请参阅:
- 常量字段值
-
ID
public static final int ID
- 另请参阅:
- 常量字段值
-
IMPLIES
public static final int IMPLIES
- 另请参阅:
- 常量字段值
-
IMPORT
public static final int IMPORT
- 另请参阅:
- 常量字段值
-
INITACTION
public static final int INITACTION
- 另请参阅:
- 常量字段值
-
INT
public static final int INT
- 另请参阅:
- 常量字段值
-
LABEL
public static final int LABEL
- 另请参阅:
- 常量字段值
-
LEXER
public static final int LEXER
- 另请参阅:
- 常量字段值
-
LEXER_GRAMMAR
public static final int LEXER_GRAMMAR
- 另请参阅:
- 常量字段值
-
LPAREN
public static final int LPAREN
- 另请参阅:
- 常量字段值
-
ML_COMMENT
public static final int ML_COMMENT
- 另请参阅:
- 常量字段值
-
NESTED_ACTION
public static final int NESTED_ACTION
- 另请参阅:
- 常量字段值
-
NESTED_ARG_ACTION
public static final int NESTED_ARG_ACTION
- 另请参阅:
- 常量字段值
-
NOT
public static final int NOT
- 另请参阅:
- 常量字段值
-
OPEN_ELEMENT_OPTION
public static final int OPEN_ELEMENT_OPTION
- 另请参阅:
- 常量字段值
-
OPTIONAL
public static final int OPTIONAL
- 另请参阅:
- 常量字段值
-
OPTIONS
public static final int OPTIONS
- 另请参阅:
- 常量字段值
-
OR
public static final int OR
- 另请参阅:
- 常量字段值
-
PARSER
public static final int PARSER
- 另请参阅:
- 常量字段值
-
PARSER_GRAMMAR
public static final int PARSER_GRAMMAR
- 另请参阅:
- 常量字段值
-
PLUS
public static final int PLUS
- 另请参阅:
- 常量字段值
-
PLUS_ASSIGN
public static final int PLUS_ASSIGN
- 另请参阅:
- 常量字段值
-
POSITIVE_CLOSURE
public static final int POSITIVE_CLOSURE
- 另请参阅:
- 常量字段值
-
PREC_RULE
public static final int PREC_RULE
- 另请参阅:
- 常量字段值
-
PRIVATE
public static final int PRIVATE
- 另请参阅:
- 常量字段值
-
PROTECTED
public static final int PROTECTED
- 另请参阅:
- 常量字段值
-
PUBLIC
public static final int PUBLIC
- 另请参阅:
- 常量字段值
-
QUESTION
public static final int QUESTION
- 另请参阅:
- 常量字段值
-
RANGE
public static final int RANGE
- 另请参阅:
- 常量字段值
-
RCURLY
public static final int RCURLY
- 另请参阅:
- 常量字段值
-
RECURSIVE_RULE_REF
public static final int RECURSIVE_RULE_REF
- 另请参阅:
- 常量字段值
-
RET
public static final int RET
- 另请参阅:
- 常量字段值
-
RETURNS
public static final int RETURNS
- 另请参阅:
- 常量字段值
-
REWRITE
public static final int REWRITE
- 另请参阅:
- 常量字段值
-
REWRITES
public static final int REWRITES
- 另请参阅:
- 常量字段值
-
ROOT
public static final int ROOT
- 另请参阅:
- 常量字段值
-
RPAREN
public static final int RPAREN
- 另请参阅:
- 常量字段值
-
RULE
public static final int RULE
- 另请参阅:
- 常量字段值
-
RULE_REF
public static final int RULE_REF
- 另请参阅:
- 常量字段值
-
SCOPE
public static final int SCOPE
- 另请参阅:
- 常量字段值
-
SEMI
public static final int SEMI
- 另请参阅:
- 常量字段值
-
SEMPRED
public static final int SEMPRED
- 另请参阅:
- 常量字段值
-
SL_COMMENT
public static final int SL_COMMENT
- 另请参阅:
- 常量字段值
-
SRC
public static final int SRC
- 另请参阅:
- 常量字段值
-
STAR
public static final int STAR
- 另请参阅:
- 常量字段值
-
STRAY_BRACKET
public static final int STRAY_BRACKET
- 另请参阅:
- 常量字段值
-
STRING_LITERAL
public static final int STRING_LITERAL
- 另请参阅:
- 常量字段值
-
SYNPRED
public static final int SYNPRED
- 另请参阅:
- 常量字段值
-
SYN_SEMPRED
public static final int SYN_SEMPRED
- 另请参阅:
- 常量字段值
-
TEMPLATE
public static final int TEMPLATE
- 另请参阅:
- 常量字段值
-
THROWS
public static final int THROWS
- 另请参阅:
- 常量字段值
-
TOKENS
public static final int TOKENS
- 另请参阅:
- 常量字段值
-
TOKEN_REF
public static final int TOKEN_REF
- 另请参阅:
- 常量字段值
-
TREE
public static final int TREE
- 另请参阅:
- 常量字段值
-
TREE_BEGIN
public static final int TREE_BEGIN
- 另请参阅:
- 常量字段值
-
TREE_GRAMMAR
public static final int TREE_GRAMMAR
- 另请参阅:
- 常量字段值
-
WILDCARD
public static final int WILDCARD
- 另请参阅:
- 常量字段值
-
WS
public static final int WS
- 另请参阅:
- 常量字段值
-
WS_LOOP
public static final int WS_LOOP
- 另请参阅:
- 常量字段值
-
WS_OPT
public static final int WS_OPT
- 另请参阅:
- 常量字段值
-
XDIGIT
public static final int XDIGIT
- 另请参阅:
- 常量字段值
-
RULE_BLOCK_NESTING_LEVEL
protected static final int RULE_BLOCK_NESTING_LEVEL
- 另请参阅:
- 常量字段值
-
OUTER_REWRITE_NESTING_LEVEL
protected static final int OUTER_REWRITE_NESTING_LEVEL
- 另请参阅:
- 常量字段值
-
blockNestingLevel
protected int blockNestingLevel
-
rewriteBlockNestingLevel
protected int rewriteBlockNestingLevel
-
currentBlockST
protected org.stringtemplate.v4.ST currentBlockST
-
currentAltHasASTRewrite
protected boolean currentAltHasASTRewrite
-
rewriteTreeNestingLevel
protected int rewriteTreeNestingLevel
-
rewriteRuleRefs
protected java.util.HashSet<java.lang.Object> rewriteRuleRefs
-
generator
protected CodeGenerator generator
-
grammar
protected Grammar grammar
-
templates
protected org.stringtemplate.v4.STGroup templates
-
recognizerST
protected org.stringtemplate.v4.ST recognizerST
The overall lexer/parser template; simulate dynamically scoped attributes by making this an instance var of the walker.
-
outputFileST
protected org.stringtemplate.v4.ST outputFileST
-
headerFileST
protected org.stringtemplate.v4.ST headerFileST
-
outputOption
protected java.lang.String outputOption
-
FOLLOW_LEXER_GRAMMAR_in_grammar_67
public static final BitSet FOLLOW_LEXER_GRAMMAR_in_grammar_67
-
FOLLOW_grammarSpec_in_grammar_69
public static final BitSet FOLLOW_grammarSpec_in_grammar_69
-
FOLLOW_PARSER_GRAMMAR_in_grammar_79
public static final BitSet FOLLOW_PARSER_GRAMMAR_in_grammar_79
-
FOLLOW_grammarSpec_in_grammar_81
public static final BitSet FOLLOW_grammarSpec_in_grammar_81
-
FOLLOW_TREE_GRAMMAR_in_grammar_91
public static final BitSet FOLLOW_TREE_GRAMMAR_in_grammar_91
-
FOLLOW_grammarSpec_in_grammar_93
public static final BitSet FOLLOW_grammarSpec_in_grammar_93
-
FOLLOW_COMBINED_GRAMMAR_in_grammar_103
public static final BitSet FOLLOW_COMBINED_GRAMMAR_in_grammar_103
-
FOLLOW_grammarSpec_in_grammar_105
public static final BitSet FOLLOW_grammarSpec_in_grammar_105
-
FOLLOW_SCOPE_in_attrScope124
public static final BitSet FOLLOW_SCOPE_in_attrScope124
-
FOLLOW_ID_in_attrScope126
public static final BitSet FOLLOW_ID_in_attrScope126
-
FOLLOW_AMPERSAND_in_attrScope131
public static final BitSet FOLLOW_AMPERSAND_in_attrScope131
-
FOLLOW_ACTION_in_attrScope140
public static final BitSet FOLLOW_ACTION_in_attrScope140
-
FOLLOW_ID_in_grammarSpec157
public static final BitSet FOLLOW_ID_in_grammarSpec157
-
FOLLOW_DOC_COMMENT_in_grammarSpec165
public static final BitSet FOLLOW_DOC_COMMENT_in_grammarSpec165
-
FOLLOW_OPTIONS_in_grammarSpec186
public static final BitSet FOLLOW_OPTIONS_in_grammarSpec186
-
FOLLOW_IMPORT_in_grammarSpec200
public static final BitSet FOLLOW_IMPORT_in_grammarSpec200
-
FOLLOW_TOKENS_in_grammarSpec214
public static final BitSet FOLLOW_TOKENS_in_grammarSpec214
-
FOLLOW_attrScope_in_grammarSpec226
public static final BitSet FOLLOW_attrScope_in_grammarSpec226
-
FOLLOW_AMPERSAND_in_grammarSpec235
public static final BitSet FOLLOW_AMPERSAND_in_grammarSpec235
-
FOLLOW_rules_in_grammarSpec246
public static final BitSet FOLLOW_rules_in_grammarSpec246
-
FOLLOW_rule_in_rules291
public static final BitSet FOLLOW_rule_in_rules291
-
FOLLOW_RULE_in_rules305
public static final BitSet FOLLOW_RULE_in_rules305
-
FOLLOW_PREC_RULE_in_rules317
public static final BitSet FOLLOW_PREC_RULE_in_rules317
-
FOLLOW_RULE_in_rule359
public static final BitSet FOLLOW_RULE_in_rule359
-
FOLLOW_ID_in_rule363
public static final BitSet FOLLOW_ID_in_rule363
-
FOLLOW_modifier_in_rule376
public static final BitSet FOLLOW_modifier_in_rule376
-
FOLLOW_ARG_in_rule384
public static final BitSet FOLLOW_ARG_in_rule384
-
FOLLOW_ARG_ACTION_in_rule387
public static final BitSet FOLLOW_ARG_ACTION_in_rule387
-
FOLLOW_RET_in_rule396
public static final BitSet FOLLOW_RET_in_rule396
-
FOLLOW_ARG_ACTION_in_rule399
public static final BitSet FOLLOW_ARG_ACTION_in_rule399
-
FOLLOW_throwsSpec_in_rule408
public static final BitSet FOLLOW_throwsSpec_in_rule408
-
FOLLOW_OPTIONS_in_rule418
public static final BitSet FOLLOW_OPTIONS_in_rule418
-
FOLLOW_ruleScopeSpec_in_rule431
public static final BitSet FOLLOW_ruleScopeSpec_in_rule431
-
FOLLOW_AMPERSAND_in_rule441
public static final BitSet FOLLOW_AMPERSAND_in_rule441
-
FOLLOW_block_in_rule455
public static final BitSet FOLLOW_block_in_rule455
-
FOLLOW_exceptionGroup_in_rule468
public static final BitSet FOLLOW_exceptionGroup_in_rule468
-
FOLLOW_EOR_in_rule476
public static final BitSet FOLLOW_EOR_in_rule476
-
FOLLOW_THROWS_in_throwsSpec526
public static final BitSet FOLLOW_THROWS_in_throwsSpec526
-
FOLLOW_ID_in_throwsSpec528
public static final BitSet FOLLOW_ID_in_throwsSpec528
-
FOLLOW_SCOPE_in_ruleScopeSpec543
public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec543
-
FOLLOW_AMPERSAND_in_ruleScopeSpec548
public static final BitSet FOLLOW_AMPERSAND_in_ruleScopeSpec548
-
FOLLOW_ACTION_in_ruleScopeSpec558
public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec558
-
FOLLOW_ID_in_ruleScopeSpec564
public static final BitSet FOLLOW_ID_in_ruleScopeSpec564
-
FOLLOW_setBlock_in_block605
public static final BitSet FOLLOW_setBlock_in_block605
-
FOLLOW_BLOCK_in_block618
public static final BitSet FOLLOW_BLOCK_in_block618
-
FOLLOW_OPTIONS_in_block626
public static final BitSet FOLLOW_OPTIONS_in_block626
-
FOLLOW_alternative_in_block643
public static final BitSet FOLLOW_alternative_in_block643
-
FOLLOW_rewrite_in_block648
public static final BitSet FOLLOW_rewrite_in_block648
-
FOLLOW_EOB_in_block665
public static final BitSet FOLLOW_EOB_in_block665
-
FOLLOW_BLOCK_in_setBlock697
public static final BitSet FOLLOW_BLOCK_in_setBlock697
-
FOLLOW_ALT_in_setAlternative717
public static final BitSet FOLLOW_ALT_in_setAlternative717
-
FOLLOW_setElement_in_setAlternative719
public static final BitSet FOLLOW_setElement_in_setAlternative719
-
FOLLOW_EOA_in_setAlternative722
public static final BitSet FOLLOW_EOA_in_setAlternative722
-
FOLLOW_exceptionHandler_in_exceptionGroup737
public static final BitSet FOLLOW_exceptionHandler_in_exceptionGroup737
-
FOLLOW_finallyClause_in_exceptionGroup744
public static final BitSet FOLLOW_finallyClause_in_exceptionGroup744
-
FOLLOW_finallyClause_in_exceptionGroup752
public static final BitSet FOLLOW_finallyClause_in_exceptionGroup752
-
FOLLOW_CATCH_in_exceptionHandler766
public static final BitSet FOLLOW_CATCH_in_exceptionHandler766
-
FOLLOW_ARG_ACTION_in_exceptionHandler768
public static final BitSet FOLLOW_ARG_ACTION_in_exceptionHandler768
-
FOLLOW_ACTION_in_exceptionHandler770
public static final BitSet FOLLOW_ACTION_in_exceptionHandler770
-
FOLLOW_FINALLY_in_finallyClause788
public static final BitSet FOLLOW_FINALLY_in_finallyClause788
-
FOLLOW_ACTION_in_finallyClause790
public static final BitSet FOLLOW_ACTION_in_finallyClause790
-
FOLLOW_ALT_in_alternative820
public static final BitSet FOLLOW_ALT_in_alternative820
-
FOLLOW_element_in_alternative833
public static final BitSet FOLLOW_element_in_alternative833
-
FOLLOW_EOA_in_alternative851
public static final BitSet FOLLOW_EOA_in_alternative851
-
FOLLOW_ROOT_in_element886
public static final BitSet FOLLOW_ROOT_in_element886
-
FOLLOW_element_in_element890
public static final BitSet FOLLOW_element_in_element890
-
FOLLOW_BANG_in_element903
public static final BitSet FOLLOW_BANG_in_element903
-
FOLLOW_element_in_element907
public static final BitSet FOLLOW_element_in_element907
-
FOLLOW_NOT_in_element923
public static final BitSet FOLLOW_NOT_in_element923
-
FOLLOW_notElement_in_element927
public static final BitSet FOLLOW_notElement_in_element927
-
FOLLOW_ASSIGN_in_element942
public static final BitSet FOLLOW_ASSIGN_in_element942
-
FOLLOW_ID_in_element946
public static final BitSet FOLLOW_ID_in_element946
-
FOLLOW_element_in_element950
public static final BitSet FOLLOW_element_in_element950
-
FOLLOW_PLUS_ASSIGN_in_element965
public static final BitSet FOLLOW_PLUS_ASSIGN_in_element965
-
FOLLOW_ID_in_element969
public static final BitSet FOLLOW_ID_in_element969
-
FOLLOW_element_in_element973
public static final BitSet FOLLOW_element_in_element973
-
FOLLOW_CHAR_RANGE_in_element987
public static final BitSet FOLLOW_CHAR_RANGE_in_element987
-
FOLLOW_CHAR_LITERAL_in_element991
public static final BitSet FOLLOW_CHAR_LITERAL_in_element991
-
FOLLOW_CHAR_LITERAL_in_element995
public static final BitSet FOLLOW_CHAR_LITERAL_in_element995
-
FOLLOW_ebnf_in_element1024
public static final BitSet FOLLOW_ebnf_in_element1024
-
FOLLOW_atom_in_element1035
public static final BitSet FOLLOW_atom_in_element1035
-
FOLLOW_tree__in_element1046
public static final BitSet FOLLOW_tree__in_element1046
-
FOLLOW_element_action_in_element1056
public static final BitSet FOLLOW_element_action_in_element1056
-
FOLLOW_SEMPRED_in_element1071
public static final BitSet FOLLOW_SEMPRED_in_element1071
-
FOLLOW_GATED_SEMPRED_in_element1075
public static final BitSet FOLLOW_GATED_SEMPRED_in_element1075
-
FOLLOW_SYN_SEMPRED_in_element1086
public static final BitSet FOLLOW_SYN_SEMPRED_in_element1086
-
FOLLOW_SYNPRED_in_element1094
public static final BitSet FOLLOW_SYNPRED_in_element1094
-
FOLLOW_BACKTRACK_SEMPRED_in_element1105
public static final BitSet FOLLOW_BACKTRACK_SEMPRED_in_element1105
-
FOLLOW_EPSILON_in_element1117
public static final BitSet FOLLOW_EPSILON_in_element1117
-
FOLLOW_ACTION_in_element_action1134
public static final BitSet FOLLOW_ACTION_in_element_action1134
-
FOLLOW_FORCED_ACTION_in_element_action1145
public static final BitSet FOLLOW_FORCED_ACTION_in_element_action1145
-
FOLLOW_CHAR_LITERAL_in_notElement1174
public static final BitSet FOLLOW_CHAR_LITERAL_in_notElement1174
-
FOLLOW_STRING_LITERAL_in_notElement1187
public static final BitSet FOLLOW_STRING_LITERAL_in_notElement1187
-
FOLLOW_TOKEN_REF_in_notElement1200
public static final BitSet FOLLOW_TOKEN_REF_in_notElement1200
-
FOLLOW_BLOCK_in_notElement1214
public static final BitSet FOLLOW_BLOCK_in_notElement1214
-
FOLLOW_block_in_ebnf1261
public static final BitSet FOLLOW_block_in_ebnf1261
-
FOLLOW_OPTIONAL_in_ebnf1280
public static final BitSet FOLLOW_OPTIONAL_in_ebnf1280
-
FOLLOW_block_in_ebnf1284
public static final BitSet FOLLOW_block_in_ebnf1284
-
FOLLOW_CLOSURE_in_ebnf1305
public static final BitSet FOLLOW_CLOSURE_in_ebnf1305
-
FOLLOW_block_in_ebnf1309
public static final BitSet FOLLOW_block_in_ebnf1309
-
FOLLOW_POSITIVE_CLOSURE_in_ebnf1330
public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnf1330
-
FOLLOW_block_in_ebnf1334
public static final BitSet FOLLOW_block_in_ebnf1334
-
FOLLOW_TREE_BEGIN_in_tree_1372
public static final BitSet FOLLOW_TREE_BEGIN_in_tree_1372
-
FOLLOW_element_in_tree_1379
public static final BitSet FOLLOW_element_in_tree_1379
-
FOLLOW_element_action_in_tree_1416
public static final BitSet FOLLOW_element_action_in_tree_1416
-
FOLLOW_element_in_tree_1438
public static final BitSet FOLLOW_element_in_tree_1438
-
FOLLOW_RULE_REF_in_atom1488
public static final BitSet FOLLOW_RULE_REF_in_atom1488
-
FOLLOW_ARG_ACTION_in_atom1493
public static final BitSet FOLLOW_ARG_ACTION_in_atom1493
-
FOLLOW_TOKEN_REF_in_atom1511
public static final BitSet FOLLOW_TOKEN_REF_in_atom1511
-
FOLLOW_ARG_ACTION_in_atom1516
public static final BitSet FOLLOW_ARG_ACTION_in_atom1516
-
FOLLOW_CHAR_LITERAL_in_atom1532
public static final BitSet FOLLOW_CHAR_LITERAL_in_atom1532
-
FOLLOW_STRING_LITERAL_in_atom1544
public static final BitSet FOLLOW_STRING_LITERAL_in_atom1544
-
FOLLOW_WILDCARD_in_atom1556
public static final BitSet FOLLOW_WILDCARD_in_atom1556
-
FOLLOW_DOT_in_atom1567
public static final BitSet FOLLOW_DOT_in_atom1567
-
FOLLOW_ID_in_atom1569
public static final BitSet FOLLOW_ID_in_atom1569
-
FOLLOW_atom_in_atom1573
public static final BitSet FOLLOW_atom_in_atom1573
-
FOLLOW_set_in_atom1586
public static final BitSet FOLLOW_set_in_atom1586
-
FOLLOW_BLOCK_in_set1631
public static final BitSet FOLLOW_BLOCK_in_set1631
-
FOLLOW_CHAR_LITERAL_in_setElement1651
public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1651
-
FOLLOW_TOKEN_REF_in_setElement1656
public static final BitSet FOLLOW_TOKEN_REF_in_setElement1656
-
FOLLOW_STRING_LITERAL_in_setElement1661
public static final BitSet FOLLOW_STRING_LITERAL_in_setElement1661
-
FOLLOW_CHAR_RANGE_in_setElement1667
public static final BitSet FOLLOW_CHAR_RANGE_in_setElement1667
-
FOLLOW_CHAR_LITERAL_in_setElement1669
public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1669
-
FOLLOW_CHAR_LITERAL_in_setElement1671
public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1671
-
FOLLOW_REWRITES_in_rewrite1696
public static final BitSet FOLLOW_REWRITES_in_rewrite1696
-
FOLLOW_REWRITE_in_rewrite1717
public static final BitSet FOLLOW_REWRITE_in_rewrite1717
-
FOLLOW_SEMPRED_in_rewrite1722
public static final BitSet FOLLOW_SEMPRED_in_rewrite1722
-
FOLLOW_rewrite_alternative_in_rewrite1728
public static final BitSet FOLLOW_rewrite_alternative_in_rewrite1728
-
FOLLOW_BLOCK_in_rewrite_block1771
public static final BitSet FOLLOW_BLOCK_in_rewrite_block1771
-
FOLLOW_rewrite_alternative_in_rewrite_block1783
public static final BitSet FOLLOW_rewrite_alternative_in_rewrite_block1783
-
FOLLOW_EOB_in_rewrite_block1788
public static final BitSet FOLLOW_EOB_in_rewrite_block1788
-
FOLLOW_ALT_in_rewrite_alternative1823
public static final BitSet FOLLOW_ALT_in_rewrite_alternative1823
-
FOLLOW_rewrite_element_in_rewrite_alternative1841
public static final BitSet FOLLOW_rewrite_element_in_rewrite_alternative1841
-
FOLLOW_EPSILON_in_rewrite_alternative1862
public static final BitSet FOLLOW_EPSILON_in_rewrite_alternative1862
-
FOLLOW_EOA_in_rewrite_alternative1878
public static final BitSet FOLLOW_EOA_in_rewrite_alternative1878
-
FOLLOW_rewrite_template_in_rewrite_alternative1891
public static final BitSet FOLLOW_rewrite_template_in_rewrite_alternative1891
-
FOLLOW_ETC_in_rewrite_alternative1904
public static final BitSet FOLLOW_ETC_in_rewrite_alternative1904
-
FOLLOW_rewrite_atom_in_rewrite_element1924
public static final BitSet FOLLOW_rewrite_atom_in_rewrite_element1924
-
FOLLOW_rewrite_ebnf_in_rewrite_element1934
public static final BitSet FOLLOW_rewrite_ebnf_in_rewrite_element1934
-
FOLLOW_rewrite_tree_in_rewrite_element1943
public static final BitSet FOLLOW_rewrite_tree_in_rewrite_element1943
-
FOLLOW_OPTIONAL_in_rewrite_ebnf1964
public static final BitSet FOLLOW_OPTIONAL_in_rewrite_ebnf1964
-
FOLLOW_rewrite_block_in_rewrite_ebnf1966
public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1966
-
FOLLOW_CLOSURE_in_rewrite_ebnf1984
public static final BitSet FOLLOW_CLOSURE_in_rewrite_ebnf1984
-
FOLLOW_rewrite_block_in_rewrite_ebnf1986
public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1986
-
FOLLOW_POSITIVE_CLOSURE_in_rewrite_ebnf2004
public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_rewrite_ebnf2004
-
FOLLOW_rewrite_block_in_rewrite_ebnf2006
public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf2006
-
FOLLOW_TREE_BEGIN_in_rewrite_tree2039
public static final BitSet FOLLOW_TREE_BEGIN_in_rewrite_tree2039
-
FOLLOW_rewrite_atom_in_rewrite_tree2046
public static final BitSet FOLLOW_rewrite_atom_in_rewrite_tree2046
-
FOLLOW_rewrite_element_in_rewrite_tree2066
public static final BitSet FOLLOW_rewrite_element_in_rewrite_tree2066
-
FOLLOW_RULE_REF_in_rewrite_atom2111
public static final BitSet FOLLOW_RULE_REF_in_rewrite_atom2111
-
FOLLOW_TOKEN_REF_in_rewrite_atom2128
public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_atom2128
-
FOLLOW_ARG_ACTION_in_rewrite_atom2133
public static final BitSet FOLLOW_ARG_ACTION_in_rewrite_atom2133
-
FOLLOW_CHAR_LITERAL_in_rewrite_atom2144
public static final BitSet FOLLOW_CHAR_LITERAL_in_rewrite_atom2144
-
FOLLOW_STRING_LITERAL_in_rewrite_atom2152
public static final BitSet FOLLOW_STRING_LITERAL_in_rewrite_atom2152
-
FOLLOW_LABEL_in_rewrite_atom2166
public static final BitSet FOLLOW_LABEL_in_rewrite_atom2166
-
FOLLOW_ACTION_in_rewrite_atom2176
public static final BitSet FOLLOW_ACTION_in_rewrite_atom2176
-
FOLLOW_ALT_in_rewrite_template2199
public static final BitSet FOLLOW_ALT_in_rewrite_template2199
-
FOLLOW_EPSILON_in_rewrite_template2201
public static final BitSet FOLLOW_EPSILON_in_rewrite_template2201
-
FOLLOW_EOA_in_rewrite_template2203
public static final BitSet FOLLOW_EOA_in_rewrite_template2203
-
FOLLOW_TEMPLATE_in_rewrite_template2214
public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template2214
-
FOLLOW_ID_in_rewrite_template2219
public static final BitSet FOLLOW_ID_in_rewrite_template2219
-
FOLLOW_ACTION_in_rewrite_template2223
public static final BitSet FOLLOW_ACTION_in_rewrite_template2223
-
FOLLOW_ARGLIST_in_rewrite_template2236
public static final BitSet FOLLOW_ARGLIST_in_rewrite_template2236
-
FOLLOW_ARG_in_rewrite_template2246
public static final BitSet FOLLOW_ARG_in_rewrite_template2246
-
FOLLOW_ID_in_rewrite_template2250
public static final BitSet FOLLOW_ID_in_rewrite_template2250
-
FOLLOW_ACTION_in_rewrite_template2254
public static final BitSet FOLLOW_ACTION_in_rewrite_template2254
-
FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2287
public static final BitSet FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2287
-
FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2300
public static final BitSet FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2300
-
FOLLOW_ACTION_in_rewrite_template2324
public static final BitSet FOLLOW_ACTION_in_rewrite_template2324
-
FOLLOW_set_in_synpred1_CodeGenTreeWalker1009
public static final BitSet FOLLOW_set_in_synpred1_CodeGenTreeWalker1009
-
FOLLOW_element_action_in_synpred2_CodeGenTreeWalker1405
public static final BitSet FOLLOW_element_action_in_synpred2_CodeGenTreeWalker1405
-
-
构造器详细资料
-
CodeGenTreeWalker
public CodeGenTreeWalker(TreeNodeStream input)
-
CodeGenTreeWalker
public CodeGenTreeWalker(TreeNodeStream input, RecognizerSharedState state)
-
-
方法详细资料
-
getDelegates
public TreeParser[] getDelegates()
-
getTokenNames
public java.lang.String[] getTokenNames()
从类复制的说明:BaseRecognizer
Used to print out token names like ID during debugging and error reporting. The generated parsers implement a method that overrides this to point to their String[] tokenNames.- 覆盖:
getTokenNames
在类中BaseRecognizer
-
getGrammarFileName
public java.lang.String getGrammarFileName()
从类复制的说明:BaseRecognizer
For debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.- 覆盖:
getGrammarFileName
在类中BaseRecognizer
-
getCurrentRuleName
public java.lang.String getCurrentRuleName()
-
setCurrentRuleName
public void setCurrentRuleName(java.lang.String value)
-
getOuterAltNum
public int getOuterAltNum()
-
setOuterAltNum
public void setOuterAltNum(int value)
-
reportError
public void reportError(RecognitionException ex)
从类复制的说明:BaseRecognizer
Report a recognition problem. This method sets errorRecovery to indicate the parser is recovering not parsing. Once in recovery mode, no errors are generated. To get out of recovery mode, the parser must successfully match a token (after a resync). So it will go: 1. error occurs 2. enter recovery mode, report error 3. consume until token found in resynch set 4. try to resume parsing 5. next match() will reset errorRecovery mode If you override, make sure to update syntaxErrors if you care about that.- 覆盖:
reportError
在类中BaseRecognizer
-
reportError
public final void reportError(java.lang.String s)
-
getWildcardST
protected final org.stringtemplate.v4.ST getWildcardST(GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
-
getRuleElementST
protected final org.stringtemplate.v4.ST getRuleElementST(java.lang.String name, java.lang.String ruleTargetName, GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
-
getTokenElementST
protected final org.stringtemplate.v4.ST getTokenElementST(java.lang.String name, java.lang.String elementName, GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
-
isListLabel
public final boolean isListLabel(java.lang.String label)
-
getSTSuffix
protected final java.lang.String getSTSuffix(GrammarAST elementAST, GrammarAST ast_suffix, java.lang.String label)
Return a non-empty template name suffix if the token is to be tracked, added to a tree, or both.
-
getTokenTypesAsTargetLabels
protected final java.util.List<java.lang.String> getTokenTypesAsTargetLabels(java.util.Collection<GrammarAST> refs)
Convert rewrite AST lists to target labels list
-
init
public final void init(Grammar g)
-
grammar_
public final void grammar_(Grammar g, org.stringtemplate.v4.ST recognizerST, org.stringtemplate.v4.ST outputFileST, org.stringtemplate.v4.ST headerFileST) throws RecognitionException
-
attrScope
public final void attrScope() throws RecognitionException
-
grammarSpec
public final void grammarSpec() throws RecognitionException
-
rules
public final void rules(org.stringtemplate.v4.ST recognizerST) throws RecognitionException
-
rule
public final CodeGenTreeWalker.rule_return rule() throws RecognitionException
-
modifier
public final CodeGenTreeWalker.modifier_return modifier() throws RecognitionException
-
throwsSpec
public final void throwsSpec() throws RecognitionException
-
ruleScopeSpec
public final void ruleScopeSpec() throws RecognitionException
-
block
public final CodeGenTreeWalker.block_return block(java.lang.String blockTemplateName, DFA dfa, GrammarAST label) throws RecognitionException
-
setBlock
public final CodeGenTreeWalker.setBlock_return setBlock() throws RecognitionException
-
setAlternative
public final void setAlternative() throws RecognitionException
-
exceptionGroup
public final void exceptionGroup(org.stringtemplate.v4.ST ruleST) throws RecognitionException
-
exceptionHandler
public final void exceptionHandler(org.stringtemplate.v4.ST ruleST) throws RecognitionException
-
finallyClause
public final void finallyClause(org.stringtemplate.v4.ST ruleST) throws RecognitionException
-
alternative
public final CodeGenTreeWalker.alternative_return alternative(GrammarAST label) throws RecognitionException
-
element
public final CodeGenTreeWalker.element_return element(GrammarAST label, GrammarAST astSuffix) throws RecognitionException
-
element_action
public final CodeGenTreeWalker.element_action_return element_action() throws RecognitionException
-
notElement
public final org.stringtemplate.v4.ST notElement(GrammarAST n, GrammarAST label, GrammarAST astSuffix) throws RecognitionException
-
ebnf
public final CodeGenTreeWalker.ebnf_return ebnf(GrammarAST label) throws RecognitionException
-
tree_
public final CodeGenTreeWalker.tree__return tree_() throws RecognitionException
-
atom
public final CodeGenTreeWalker.atom_return atom(GrammarAST scope, GrammarAST label, GrammarAST astSuffix) throws RecognitionException
-
ast_suffix
public final void ast_suffix() throws RecognitionException
-
set
public final org.stringtemplate.v4.ST set(GrammarAST label, GrammarAST astSuffix) throws RecognitionException
-
setElement
public final void setElement() throws RecognitionException
-
rewrite
public final CodeGenTreeWalker.rewrite_return rewrite() throws RecognitionException
-
rewrite_block
public final org.stringtemplate.v4.ST rewrite_block(java.lang.String blockTemplateName) throws RecognitionException
-
rewrite_alternative
public final org.stringtemplate.v4.ST rewrite_alternative() throws RecognitionException
-
rewrite_element
public final CodeGenTreeWalker.rewrite_element_return rewrite_element() throws RecognitionException
-
rewrite_ebnf
public final CodeGenTreeWalker.rewrite_ebnf_return rewrite_ebnf() throws RecognitionException
-
rewrite_tree
public final CodeGenTreeWalker.rewrite_tree_return rewrite_tree() throws RecognitionException
-
rewrite_atom
public final CodeGenTreeWalker.rewrite_atom_return rewrite_atom(boolean isRoot) throws RecognitionException
-
rewrite_template
public final org.stringtemplate.v4.ST rewrite_template() throws RecognitionException
-
synpred1_CodeGenTreeWalker_fragment
public final void synpred1_CodeGenTreeWalker_fragment() throws RecognitionException
-
synpred2_CodeGenTreeWalker_fragment
public final void synpred2_CodeGenTreeWalker_fragment() throws RecognitionException
-
synpred2_CodeGenTreeWalker
public final boolean synpred2_CodeGenTreeWalker()
-
synpred1_CodeGenTreeWalker
public final boolean synpred1_CodeGenTreeWalker()
-
-