org.antlr.grammar.v3
Class CodeGenTreeWalker

java.lang.Object
  extended by org.antlr.runtime.BaseRecognizer
      extended by org.antlr.runtime.tree.TreeParser
          extended by 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


Nested Class Summary
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
           
 
Field Summary
static int ACTION
           
static int ACTION_CHAR_LITERAL
           
static int ACTION_ESC
           
static int ACTION_STRING_LITERAL
           
static int ALT
           
static int AMPERSAND
           
static int ARG
           
static int ARG_ACTION
           
static int ARGLIST
           
static int ASSIGN
           
static int BACKTRACK_SEMPRED
           
static int BANG
           
static int BLOCK
           
protected  int blockNestingLevel
           
static int CATCH
           
static int CHAR_LITERAL
           
static int CHAR_RANGE
           
static int CLOSE_ELEMENT_OPTION
           
static int CLOSURE
           
static int COLON
           
static int COMBINED_GRAMMAR
           
static int COMMA
           
static int COMMENT
           
protected  boolean currentAltHasASTRewrite
           
protected  org.stringtemplate.v4.ST currentBlockST
           
protected  org.antlr.grammar.v3.CodeGenTreeWalker.DFA46 dfa46
           
static int DIGIT
           
static int DOC_COMMENT
           
static int DOLLAR
           
static int DOT
           
static int DOUBLE_ANGLE_STRING_LITERAL
           
static int DOUBLE_QUOTE_STRING_LITERAL
           
static int EOA
           
static int EOB
           
static int EOF
           
static int EOR
           
static int EPSILON
           
static int ESC
           
static int ETC
           
static int FINALLY
           
static BitSet FOLLOW_ACTION_in_attrScope134
           
static BitSet FOLLOW_ACTION_in_element_action1123
           
static BitSet FOLLOW_ACTION_in_exceptionHandler763
           
static BitSet FOLLOW_ACTION_in_finallyClause783
           
static BitSet FOLLOW_ACTION_in_rewrite_atom2164
           
static BitSet FOLLOW_ACTION_in_rewrite_template2211
           
static BitSet FOLLOW_ACTION_in_rewrite_template2242
           
static BitSet FOLLOW_ACTION_in_rewrite_template2312
           
static BitSet FOLLOW_ACTION_in_ruleScopeSpec552
           
static BitSet FOLLOW_ALT_in_alternative812
           
static BitSet FOLLOW_ALT_in_rewrite_alternative1811
           
static BitSet FOLLOW_ALT_in_rewrite_template2187
           
static BitSet FOLLOW_ALT_in_setAlternative710
           
static BitSet FOLLOW_alternative_in_block637
           
static BitSet FOLLOW_AMPERSAND_in_attrScope125
           
static BitSet FOLLOW_AMPERSAND_in_grammarSpec229
           
static BitSet FOLLOW_AMPERSAND_in_rule435
           
static BitSet FOLLOW_AMPERSAND_in_ruleScopeSpec542
           
static BitSet FOLLOW_ARG_ACTION_in_atom1481
           
static BitSet FOLLOW_ARG_ACTION_in_atom1504
           
static BitSet FOLLOW_ARG_ACTION_in_exceptionHandler761
           
static BitSet FOLLOW_ARG_ACTION_in_rewrite_atom2121
           
static BitSet FOLLOW_ARG_ACTION_in_rule381
           
static BitSet FOLLOW_ARG_ACTION_in_rule393
           
static BitSet FOLLOW_ARG_in_rewrite_template2234
           
static BitSet FOLLOW_ARG_in_rule378
           
static BitSet FOLLOW_ARGLIST_in_rewrite_template2224
           
static BitSet FOLLOW_ASSIGN_in_element932
           
static BitSet FOLLOW_atom_in_atom1561
           
static BitSet FOLLOW_atom_in_element1024
           
static BitSet FOLLOW_attrScope_in_grammarSpec220
           
static BitSet FOLLOW_BACKTRACK_SEMPRED_in_element1094
           
static BitSet FOLLOW_BANG_in_element895
           
static BitSet FOLLOW_BLOCK_in_block612
           
static BitSet FOLLOW_block_in_ebnf1249
           
static BitSet FOLLOW_block_in_ebnf1272
           
static BitSet FOLLOW_block_in_ebnf1297
           
static BitSet FOLLOW_block_in_ebnf1322
           
static BitSet FOLLOW_BLOCK_in_notElement1203
           
static BitSet FOLLOW_BLOCK_in_rewrite_block1759
           
static BitSet FOLLOW_block_in_rule449
           
static BitSet FOLLOW_BLOCK_in_set1619
           
static BitSet FOLLOW_BLOCK_in_setBlock690
           
static BitSet FOLLOW_CATCH_in_exceptionHandler759
           
static BitSet FOLLOW_CHAR_LITERAL_in_atom1520
           
static BitSet FOLLOW_CHAR_LITERAL_in_element981
           
static BitSet FOLLOW_CHAR_LITERAL_in_element985
           
static BitSet FOLLOW_CHAR_LITERAL_in_notElement1163
           
static BitSet FOLLOW_CHAR_LITERAL_in_rewrite_atom2132
           
static BitSet FOLLOW_CHAR_LITERAL_in_setElement1639
           
static BitSet FOLLOW_CHAR_LITERAL_in_setElement1657
           
static BitSet FOLLOW_CHAR_LITERAL_in_setElement1659
           
static BitSet FOLLOW_CHAR_RANGE_in_element977
           
static BitSet FOLLOW_CHAR_RANGE_in_setElement1655
           
static BitSet FOLLOW_CLOSURE_in_ebnf1293
           
static BitSet FOLLOW_CLOSURE_in_rewrite_ebnf1972
           
static BitSet FOLLOW_COMBINED_GRAMMAR_in_grammar_97
           
static BitSet FOLLOW_DOC_COMMENT_in_grammarSpec159
           
static BitSet FOLLOW_DOT_in_atom1555
           
static BitSet FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2288
           
static BitSet FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2275
           
static BitSet FOLLOW_ebnf_in_element1014
           
static BitSet FOLLOW_element_action_in_element1045
           
static BitSet FOLLOW_element_action_in_synpred2_CodeGenTreeWalker1393
           
static BitSet FOLLOW_element_action_in_tree_1404
           
static BitSet FOLLOW_element_in_alternative825
           
static BitSet FOLLOW_element_in_element882
           
static BitSet FOLLOW_element_in_element899
           
static BitSet FOLLOW_element_in_element940
           
static BitSet FOLLOW_element_in_element963
           
static BitSet FOLLOW_element_in_tree_1367
           
static BitSet FOLLOW_element_in_tree_1426
           
static BitSet FOLLOW_EOA_in_alternative843
           
static BitSet FOLLOW_EOA_in_rewrite_alternative1866
           
static BitSet FOLLOW_EOA_in_rewrite_template2191
           
static BitSet FOLLOW_EOA_in_setAlternative715
           
static BitSet FOLLOW_EOB_in_block658
           
static BitSet FOLLOW_EOB_in_rewrite_block1776
           
static BitSet FOLLOW_EOR_in_rule470
           
static BitSet FOLLOW_EPSILON_in_element1106
           
static BitSet FOLLOW_EPSILON_in_rewrite_alternative1850
           
static BitSet FOLLOW_EPSILON_in_rewrite_template2189
           
static BitSet FOLLOW_ETC_in_rewrite_alternative1892
           
static BitSet FOLLOW_exceptionGroup_in_rule462
           
static BitSet FOLLOW_exceptionHandler_in_exceptionGroup730
           
static BitSet FOLLOW_FINALLY_in_finallyClause781
           
static BitSet FOLLOW_finallyClause_in_exceptionGroup737
           
static BitSet FOLLOW_finallyClause_in_exceptionGroup745
           
static BitSet FOLLOW_FORCED_ACTION_in_element_action1134
           
static BitSet FOLLOW_GATED_SEMPRED_in_element1064
           
static BitSet FOLLOW_grammarSpec_in_grammar_63
           
static BitSet FOLLOW_grammarSpec_in_grammar_75
           
static BitSet FOLLOW_grammarSpec_in_grammar_87
           
static BitSet FOLLOW_grammarSpec_in_grammar_99
           
static BitSet FOLLOW_ID_in_atom1557
           
static BitSet FOLLOW_ID_in_attrScope120
           
static BitSet FOLLOW_ID_in_element936
           
static BitSet FOLLOW_ID_in_element959
           
static BitSet FOLLOW_ID_in_grammarSpec151
           
static BitSet FOLLOW_ID_in_rewrite_template2207
           
static BitSet FOLLOW_ID_in_rewrite_template2238
           
static BitSet FOLLOW_ID_in_rule357
           
static BitSet FOLLOW_ID_in_ruleScopeSpec558
           
static BitSet FOLLOW_ID_in_throwsSpec522
           
static BitSet FOLLOW_IMPORT_in_grammarSpec194
           
static BitSet FOLLOW_LABEL_in_rewrite_atom2154
           
static BitSet FOLLOW_LEXER_GRAMMAR_in_grammar_61
           
static BitSet FOLLOW_modifier_in_rule370
           
static BitSet FOLLOW_NOT_in_element915
           
static BitSet FOLLOW_notElement_in_element917
           
static BitSet FOLLOW_OPTIONAL_in_ebnf1268
           
static BitSet FOLLOW_OPTIONAL_in_rewrite_ebnf1952
           
static BitSet FOLLOW_OPTIONS_in_block620
           
static BitSet FOLLOW_OPTIONS_in_grammarSpec180
           
static BitSet FOLLOW_OPTIONS_in_rule412
           
static BitSet FOLLOW_PARSER_GRAMMAR_in_grammar_73
           
static BitSet FOLLOW_PLUS_ASSIGN_in_element955
           
static BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnf1318
           
static BitSet FOLLOW_POSITIVE_CLOSURE_in_rewrite_ebnf1992
           
static BitSet FOLLOW_PREC_RULE_in_rules311
           
static BitSet FOLLOW_RET_in_rule390
           
static BitSet FOLLOW_rewrite_alternative_in_rewrite_block1771
           
static BitSet FOLLOW_rewrite_alternative_in_rewrite1716
           
static BitSet FOLLOW_rewrite_atom_in_rewrite_element1912
           
static BitSet FOLLOW_rewrite_atom_in_rewrite_tree2034
           
static BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1954
           
static BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1974
           
static BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1994
           
static BitSet FOLLOW_rewrite_ebnf_in_rewrite_element1922
           
static BitSet FOLLOW_rewrite_element_in_rewrite_alternative1829
           
static BitSet FOLLOW_rewrite_element_in_rewrite_tree2054
           
static BitSet FOLLOW_rewrite_in_block641
           
static BitSet FOLLOW_REWRITE_in_rewrite1705
           
static BitSet FOLLOW_rewrite_template_in_rewrite_alternative1879
           
static BitSet FOLLOW_rewrite_tree_in_rewrite_element1931
           
static BitSet FOLLOW_REWRITES_in_rewrite1684
           
static BitSet FOLLOW_ROOT_in_element878
           
static BitSet FOLLOW_RULE_in_rule353
           
static BitSet FOLLOW_rule_in_rules285
           
static BitSet FOLLOW_RULE_in_rules299
           
static BitSet FOLLOW_RULE_REF_in_atom1476
           
static BitSet FOLLOW_RULE_REF_in_rewrite_atom2099
           
static BitSet FOLLOW_rules_in_grammarSpec240
           
static BitSet FOLLOW_ruleScopeSpec_in_rule425
           
static BitSet FOLLOW_SCOPE_in_attrScope118
           
static BitSet FOLLOW_SCOPE_in_ruleScopeSpec537
           
static BitSet FOLLOW_SEMPRED_in_element1060
           
static BitSet FOLLOW_SEMPRED_in_rewrite1710
           
static BitSet FOLLOW_set_in_ast_suffix0
           
static BitSet FOLLOW_set_in_atom1574
           
static BitSet FOLLOW_set_in_modifier0
           
static BitSet FOLLOW_set_in_synpred1_CodeGenTreeWalker999
           
static BitSet FOLLOW_setBlock_in_block599
           
static BitSet FOLLOW_setElement_in_setAlternative712
           
static BitSet FOLLOW_STRING_LITERAL_in_atom1532
           
static BitSet FOLLOW_STRING_LITERAL_in_notElement1176
           
static BitSet FOLLOW_STRING_LITERAL_in_rewrite_atom2140
           
static BitSet FOLLOW_STRING_LITERAL_in_setElement1649
           
static BitSet FOLLOW_SYN_SEMPRED_in_element1075
           
static BitSet FOLLOW_SYNPRED_in_element1083
           
static BitSet FOLLOW_TEMPLATE_in_rewrite_template2202
           
static BitSet FOLLOW_THROWS_in_throwsSpec520
           
static BitSet FOLLOW_throwsSpec_in_rule402
           
static BitSet FOLLOW_TOKEN_REF_in_atom1499
           
static BitSet FOLLOW_TOKEN_REF_in_notElement1189
           
static BitSet FOLLOW_TOKEN_REF_in_rewrite_atom2116
           
static BitSet FOLLOW_TOKEN_REF_in_setElement1644
           
static BitSet FOLLOW_TOKENS_in_grammarSpec208
           
static BitSet FOLLOW_tree__in_element1035
           
static BitSet FOLLOW_TREE_BEGIN_in_rewrite_tree2027
           
static BitSet FOLLOW_TREE_BEGIN_in_tree_1360
           
static BitSet FOLLOW_TREE_GRAMMAR_in_grammar_85
           
static BitSet FOLLOW_WILDCARD_in_atom1544
           
static int FORCED_ACTION
           
static int FRAGMENT
           
static int GATED_SEMPRED
           
protected  CodeGenerator generator
           
protected  Grammar grammar
           
static int GRAMMAR
           
protected  org.stringtemplate.v4.ST headerFileST
           
static int ID
           
static int IMPLIES
           
static int IMPORT
           
static int INITACTION
           
static int INT
           
static int LABEL
           
static int LEXER
           
static int LEXER_GRAMMAR
           
static int LPAREN
           
static int ML_COMMENT
           
static int NESTED_ACTION
           
static int NESTED_ARG_ACTION
           
static int NOT
           
static int OPEN_ELEMENT_OPTION
           
static int OPTIONAL
           
static int OPTIONS
           
static int OR
           
protected static int OUTER_REWRITE_NESTING_LEVEL
           
protected  org.stringtemplate.v4.ST outputFileST
           
protected  String outputOption
           
static int PARSER
           
static int PARSER_GRAMMAR
           
static int PLUS
           
static int PLUS_ASSIGN
           
static int POSITIVE_CLOSURE
           
static int PREC_RULE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int QUESTION
           
static int RANGE
           
static int RCURLY
           
protected  org.stringtemplate.v4.ST recognizerST
          The overall lexer/parser template; simulate dynamically scoped attributes by making this an instance var of the walker.
static int RECURSIVE_RULE_REF
           
static int RET
           
static int RETURNS
           
static int REWRITE
           
protected  int rewriteBlockNestingLevel
           
protected  HashSet<Object> rewriteRuleRefs
           
static int REWRITES
           
protected  int rewriteTreeNestingLevel
           
static int ROOT
           
static int RPAREN
           
static int RULE
           
protected static int RULE_BLOCK_NESTING_LEVEL
           
static int RULE_REF
           
static int SCOPE
           
static int SEMI
           
static int SEMPRED
           
static int SL_COMMENT
           
static int SRC
           
static int STAR
           
static int STRAY_BRACKET
           
static int STRING_LITERAL
           
static int SYN_SEMPRED
           
static int SYNPRED
           
static int TEMPLATE
           
protected  org.stringtemplate.v4.STGroup templates
           
static int THROWS
           
static int TOKEN_REF
           
static String[] tokenNames
           
static int TOKENS
           
static int TREE
           
static int TREE_BEGIN
           
static int TREE_GRAMMAR
           
static int WILDCARD
           
static int WS
           
static int WS_LOOP
           
static int WS_OPT
           
static int XDIGIT
           
 
Fields inherited from class org.antlr.runtime.tree.TreeParser
DOWN, input, UP
 
Fields inherited from class org.antlr.runtime.BaseRecognizer
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
 
Constructor Summary
CodeGenTreeWalker(TreeNodeStream input)
           
CodeGenTreeWalker(TreeNodeStream input, RecognizerSharedState state)
           
 
Method Summary
 CodeGenTreeWalker.alternative_return alternative()
           
 void ast_suffix()
           
 CodeGenTreeWalker.atom_return atom(GrammarAST scope, GrammarAST label, GrammarAST astSuffix)
           
 void attrScope()
           
 CodeGenTreeWalker.block_return block(String blockTemplateName, DFA dfa)
           
 CodeGenTreeWalker.ebnf_return ebnf()
           
 CodeGenTreeWalker.element_action_return element_action()
           
 CodeGenTreeWalker.element_return element(GrammarAST label, GrammarAST astSuffix)
           
 void exceptionGroup(org.stringtemplate.v4.ST ruleST)
           
 void exceptionHandler(org.stringtemplate.v4.ST ruleST)
           
 void finallyClause(org.stringtemplate.v4.ST ruleST)
           
 String getCurrentRuleName()
           
 String getGrammarFileName()
           
 int getOuterAltNum()
           
protected  org.stringtemplate.v4.ST getRuleElementST(String name, String ruleTargetName, GrammarAST elementAST, GrammarAST ast_suffix, String label)
           
protected  String getSTSuffix(GrammarAST elementAST, GrammarAST ast_suffix, 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(String name, String elementName, GrammarAST elementAST, GrammarAST ast_suffix, String label)
           
 String[] getTokenNames()
           
protected  List<String> getTokenTypesAsTargetLabels(Collection<GrammarAST> refs)
          Convert rewrite AST lists to target labels list
protected  org.stringtemplate.v4.ST getWildcardST(GrammarAST elementAST, GrammarAST ast_suffix, 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(String label)
           
 CodeGenTreeWalker.modifier_return modifier()
           
 org.stringtemplate.v4.ST notElement(GrammarAST n, GrammarAST label, GrammarAST astSuffix)
           
 void reportError(RecognitionException ex)
           
 void reportError(String s)
           
 org.stringtemplate.v4.ST rewrite_alternative()
           
 CodeGenTreeWalker.rewrite_atom_return rewrite_atom(boolean isRoot)
           
 org.stringtemplate.v4.ST rewrite_block(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.rewrite_return rewrite()
           
 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(String value)
           
 void setElement()
           
 void setOuterAltNum(int value)
           
 void synpred1_CodeGenTreeWalker_fragment()
           
 boolean synpred1_CodeGenTreeWalker()
           
 void synpred2_CodeGenTreeWalker_fragment()
           
 boolean synpred2_CodeGenTreeWalker()
           
 void throwsSpec()
           
 CodeGenTreeWalker.tree__return tree_()
           
 
Methods inherited from class org.antlr.runtime.tree.TreeParser
getAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut
 
Methods inherited from class 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenNames

public static final String[] tokenNames

EOF

public static final int EOF
See Also:
Constant Field Values

LEXER

public static final int LEXER
See Also:
Constant Field Values

PARSER

public static final int PARSER
See Also:
Constant Field Values

CATCH

public static final int CATCH
See Also:
Constant Field Values

FINALLY

public static final int FINALLY
See Also:
Constant Field Values

GRAMMAR

public static final int GRAMMAR
See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

RETURNS

public static final int RETURNS
See Also:
Constant Field Values

THROWS

public static final int THROWS
See Also:
Constant Field Values

TREE

public static final int TREE
See Also:
Constant Field Values

RULE

public static final int RULE
See Also:
Constant Field Values

PREC_RULE

public static final int PREC_RULE
See Also:
Constant Field Values

RECURSIVE_RULE_REF

public static final int RECURSIVE_RULE_REF
See Also:
Constant Field Values

BLOCK

public static final int BLOCK
See Also:
Constant Field Values

OPTIONAL

public static final int OPTIONAL
See Also:
Constant Field Values

CLOSURE

public static final int CLOSURE
See Also:
Constant Field Values

POSITIVE_CLOSURE

public static final int POSITIVE_CLOSURE
See Also:
Constant Field Values

SYNPRED

public static final int SYNPRED
See Also:
Constant Field Values

RANGE

public static final int RANGE
See Also:
Constant Field Values

CHAR_RANGE

public static final int CHAR_RANGE
See Also:
Constant Field Values

EPSILON

public static final int EPSILON
See Also:
Constant Field Values

ALT

public static final int ALT
See Also:
Constant Field Values

EOR

public static final int EOR
See Also:
Constant Field Values

EOB

public static final int EOB
See Also:
Constant Field Values

EOA

public static final int EOA
See Also:
Constant Field Values

ID

public static final int ID
See Also:
Constant Field Values

ARG

public static final int ARG
See Also:
Constant Field Values

ARGLIST

public static final int ARGLIST
See Also:
Constant Field Values

RET

public static final int RET
See Also:
Constant Field Values

LEXER_GRAMMAR

public static final int LEXER_GRAMMAR
See Also:
Constant Field Values

PARSER_GRAMMAR

public static final int PARSER_GRAMMAR
See Also:
Constant Field Values

TREE_GRAMMAR

public static final int TREE_GRAMMAR
See Also:
Constant Field Values

COMBINED_GRAMMAR

public static final int COMBINED_GRAMMAR
See Also:
Constant Field Values

INITACTION

public static final int INITACTION
See Also:
Constant Field Values

FORCED_ACTION

public static final int FORCED_ACTION
See Also:
Constant Field Values

LABEL

public static final int LABEL
See Also:
Constant Field Values

TEMPLATE

public static final int TEMPLATE
See Also:
Constant Field Values

SCOPE

public static final int SCOPE
See Also:
Constant Field Values

IMPORT

public static final int IMPORT
See Also:
Constant Field Values

GATED_SEMPRED

public static final int GATED_SEMPRED
See Also:
Constant Field Values

SYN_SEMPRED

public static final int SYN_SEMPRED
See Also:
Constant Field Values

BACKTRACK_SEMPRED

public static final int BACKTRACK_SEMPRED
See Also:
Constant Field Values

FRAGMENT

public static final int FRAGMENT
See Also:
Constant Field Values

DOT

public static final int DOT
See Also:
Constant Field Values

REWRITES

public static final int REWRITES
See Also:
Constant Field Values

ACTION

public static final int ACTION
See Also:
Constant Field Values

DOC_COMMENT

public static final int DOC_COMMENT
See Also:
Constant Field Values

SEMI

public static final int SEMI
See Also:
Constant Field Values

AMPERSAND

public static final int AMPERSAND
See Also:
Constant Field Values

COLON

public static final int COLON
See Also:
Constant Field Values

OPTIONS

public static final int OPTIONS
See Also:
Constant Field Values

RCURLY

public static final int RCURLY
See Also:
Constant Field Values

ASSIGN

public static final int ASSIGN
See Also:
Constant Field Values

STRING_LITERAL

public static final int STRING_LITERAL
See Also:
Constant Field Values

CHAR_LITERAL

public static final int CHAR_LITERAL
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

STAR

public static final int STAR
See Also:
Constant Field Values

COMMA

public static final int COMMA
See Also:
Constant Field Values

TOKENS

public static final int TOKENS
See Also:
Constant Field Values

TOKEN_REF

public static final int TOKEN_REF
See Also:
Constant Field Values

BANG

public static final int BANG
See Also:
Constant Field Values

ARG_ACTION

public static final int ARG_ACTION
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

LPAREN

public static final int LPAREN
See Also:
Constant Field Values

RPAREN

public static final int RPAREN
See Also:
Constant Field Values

PLUS_ASSIGN

public static final int PLUS_ASSIGN
See Also:
Constant Field Values

SEMPRED

public static final int SEMPRED
See Also:
Constant Field Values

IMPLIES

public static final int IMPLIES
See Also:
Constant Field Values

ROOT

public static final int ROOT
See Also:
Constant Field Values

WILDCARD

public static final int WILDCARD
See Also:
Constant Field Values

RULE_REF

public static final int RULE_REF
See Also:
Constant Field Values

NOT

public static final int NOT
See Also:
Constant Field Values

TREE_BEGIN

public static final int TREE_BEGIN
See Also:
Constant Field Values

QUESTION

public static final int QUESTION
See Also:
Constant Field Values

PLUS

public static final int PLUS
See Also:
Constant Field Values

OPEN_ELEMENT_OPTION

public static final int OPEN_ELEMENT_OPTION
See Also:
Constant Field Values

CLOSE_ELEMENT_OPTION

public static final int CLOSE_ELEMENT_OPTION
See Also:
Constant Field Values

DOUBLE_QUOTE_STRING_LITERAL

public static final int DOUBLE_QUOTE_STRING_LITERAL
See Also:
Constant Field Values

DOUBLE_ANGLE_STRING_LITERAL

public static final int DOUBLE_ANGLE_STRING_LITERAL
See Also:
Constant Field Values

REWRITE

public static final int REWRITE
See Also:
Constant Field Values

ETC

public static final int ETC
See Also:
Constant Field Values

DOLLAR

public static final int DOLLAR
See Also:
Constant Field Values

WS

public static final int WS
See Also:
Constant Field Values

SL_COMMENT

public static final int SL_COMMENT
See Also:
Constant Field Values

ML_COMMENT

public static final int ML_COMMENT
See Also:
Constant Field Values

COMMENT

public static final int COMMENT
See Also:
Constant Field Values

SRC

public static final int SRC
See Also:
Constant Field Values

STRAY_BRACKET

public static final int STRAY_BRACKET
See Also:
Constant Field Values

ESC

public static final int ESC
See Also:
Constant Field Values

DIGIT

public static final int DIGIT
See Also:
Constant Field Values

XDIGIT

public static final int XDIGIT
See Also:
Constant Field Values

NESTED_ARG_ACTION

public static final int NESTED_ARG_ACTION
See Also:
Constant Field Values

ACTION_STRING_LITERAL

public static final int ACTION_STRING_LITERAL
See Also:
Constant Field Values

ACTION_CHAR_LITERAL

public static final int ACTION_CHAR_LITERAL
See Also:
Constant Field Values

NESTED_ACTION

public static final int NESTED_ACTION
See Also:
Constant Field Values

ACTION_ESC

public static final int ACTION_ESC
See Also:
Constant Field Values

WS_LOOP

public static final int WS_LOOP
See Also:
Constant Field Values

WS_OPT

public static final int WS_OPT
See Also:
Constant Field Values

RULE_BLOCK_NESTING_LEVEL

protected static final int RULE_BLOCK_NESTING_LEVEL
See Also:
Constant Field Values

OUTER_REWRITE_NESTING_LEVEL

protected static final int OUTER_REWRITE_NESTING_LEVEL
See Also:
Constant Field Values

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 HashSet<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 String outputOption

dfa46

protected org.antlr.grammar.v3.CodeGenTreeWalker.DFA46 dfa46

FOLLOW_LEXER_GRAMMAR_in_grammar_61

public static final BitSet FOLLOW_LEXER_GRAMMAR_in_grammar_61

FOLLOW_grammarSpec_in_grammar_63

public static final BitSet FOLLOW_grammarSpec_in_grammar_63

FOLLOW_PARSER_GRAMMAR_in_grammar_73

public static final BitSet FOLLOW_PARSER_GRAMMAR_in_grammar_73

FOLLOW_grammarSpec_in_grammar_75

public static final BitSet FOLLOW_grammarSpec_in_grammar_75

FOLLOW_TREE_GRAMMAR_in_grammar_85

public static final BitSet FOLLOW_TREE_GRAMMAR_in_grammar_85

FOLLOW_grammarSpec_in_grammar_87

public static final BitSet FOLLOW_grammarSpec_in_grammar_87

FOLLOW_COMBINED_GRAMMAR_in_grammar_97

public static final BitSet FOLLOW_COMBINED_GRAMMAR_in_grammar_97

FOLLOW_grammarSpec_in_grammar_99

public static final BitSet FOLLOW_grammarSpec_in_grammar_99

FOLLOW_SCOPE_in_attrScope118

public static final BitSet FOLLOW_SCOPE_in_attrScope118

FOLLOW_ID_in_attrScope120

public static final BitSet FOLLOW_ID_in_attrScope120

FOLLOW_AMPERSAND_in_attrScope125

public static final BitSet FOLLOW_AMPERSAND_in_attrScope125

FOLLOW_ACTION_in_attrScope134

public static final BitSet FOLLOW_ACTION_in_attrScope134

FOLLOW_ID_in_grammarSpec151

public static final BitSet FOLLOW_ID_in_grammarSpec151

FOLLOW_DOC_COMMENT_in_grammarSpec159

public static final BitSet FOLLOW_DOC_COMMENT_in_grammarSpec159

FOLLOW_OPTIONS_in_grammarSpec180

public static final BitSet FOLLOW_OPTIONS_in_grammarSpec180

FOLLOW_IMPORT_in_grammarSpec194

public static final BitSet FOLLOW_IMPORT_in_grammarSpec194

FOLLOW_TOKENS_in_grammarSpec208

public static final BitSet FOLLOW_TOKENS_in_grammarSpec208

FOLLOW_attrScope_in_grammarSpec220

public static final BitSet FOLLOW_attrScope_in_grammarSpec220

FOLLOW_AMPERSAND_in_grammarSpec229

public static final BitSet FOLLOW_AMPERSAND_in_grammarSpec229

FOLLOW_rules_in_grammarSpec240

public static final BitSet FOLLOW_rules_in_grammarSpec240

FOLLOW_rule_in_rules285

public static final BitSet FOLLOW_rule_in_rules285

FOLLOW_RULE_in_rules299

public static final BitSet FOLLOW_RULE_in_rules299

FOLLOW_PREC_RULE_in_rules311

public static final BitSet FOLLOW_PREC_RULE_in_rules311

FOLLOW_RULE_in_rule353

public static final BitSet FOLLOW_RULE_in_rule353

FOLLOW_ID_in_rule357

public static final BitSet FOLLOW_ID_in_rule357

FOLLOW_modifier_in_rule370

public static final BitSet FOLLOW_modifier_in_rule370

FOLLOW_ARG_in_rule378

public static final BitSet FOLLOW_ARG_in_rule378

FOLLOW_ARG_ACTION_in_rule381

public static final BitSet FOLLOW_ARG_ACTION_in_rule381

FOLLOW_RET_in_rule390

public static final BitSet FOLLOW_RET_in_rule390

FOLLOW_ARG_ACTION_in_rule393

public static final BitSet FOLLOW_ARG_ACTION_in_rule393

FOLLOW_throwsSpec_in_rule402

public static final BitSet FOLLOW_throwsSpec_in_rule402

FOLLOW_OPTIONS_in_rule412

public static final BitSet FOLLOW_OPTIONS_in_rule412

FOLLOW_ruleScopeSpec_in_rule425

public static final BitSet FOLLOW_ruleScopeSpec_in_rule425

FOLLOW_AMPERSAND_in_rule435

public static final BitSet FOLLOW_AMPERSAND_in_rule435

FOLLOW_block_in_rule449

public static final BitSet FOLLOW_block_in_rule449

FOLLOW_exceptionGroup_in_rule462

public static final BitSet FOLLOW_exceptionGroup_in_rule462

FOLLOW_EOR_in_rule470

public static final BitSet FOLLOW_EOR_in_rule470

FOLLOW_set_in_modifier0

public static final BitSet FOLLOW_set_in_modifier0

FOLLOW_THROWS_in_throwsSpec520

public static final BitSet FOLLOW_THROWS_in_throwsSpec520

FOLLOW_ID_in_throwsSpec522

public static final BitSet FOLLOW_ID_in_throwsSpec522

FOLLOW_SCOPE_in_ruleScopeSpec537

public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec537

FOLLOW_AMPERSAND_in_ruleScopeSpec542

public static final BitSet FOLLOW_AMPERSAND_in_ruleScopeSpec542

FOLLOW_ACTION_in_ruleScopeSpec552

public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec552

FOLLOW_ID_in_ruleScopeSpec558

public static final BitSet FOLLOW_ID_in_ruleScopeSpec558

FOLLOW_setBlock_in_block599

public static final BitSet FOLLOW_setBlock_in_block599

FOLLOW_BLOCK_in_block612

public static final BitSet FOLLOW_BLOCK_in_block612

FOLLOW_OPTIONS_in_block620

public static final BitSet FOLLOW_OPTIONS_in_block620

FOLLOW_alternative_in_block637

public static final BitSet FOLLOW_alternative_in_block637

FOLLOW_rewrite_in_block641

public static final BitSet FOLLOW_rewrite_in_block641

FOLLOW_EOB_in_block658

public static final BitSet FOLLOW_EOB_in_block658

FOLLOW_BLOCK_in_setBlock690

public static final BitSet FOLLOW_BLOCK_in_setBlock690

FOLLOW_ALT_in_setAlternative710

public static final BitSet FOLLOW_ALT_in_setAlternative710

FOLLOW_setElement_in_setAlternative712

public static final BitSet FOLLOW_setElement_in_setAlternative712

FOLLOW_EOA_in_setAlternative715

public static final BitSet FOLLOW_EOA_in_setAlternative715

FOLLOW_exceptionHandler_in_exceptionGroup730

public static final BitSet FOLLOW_exceptionHandler_in_exceptionGroup730

FOLLOW_finallyClause_in_exceptionGroup737

public static final BitSet FOLLOW_finallyClause_in_exceptionGroup737

FOLLOW_finallyClause_in_exceptionGroup745

public static final BitSet FOLLOW_finallyClause_in_exceptionGroup745

FOLLOW_CATCH_in_exceptionHandler759

public static final BitSet FOLLOW_CATCH_in_exceptionHandler759

FOLLOW_ARG_ACTION_in_exceptionHandler761

public static final BitSet FOLLOW_ARG_ACTION_in_exceptionHandler761

FOLLOW_ACTION_in_exceptionHandler763

public static final BitSet FOLLOW_ACTION_in_exceptionHandler763

FOLLOW_FINALLY_in_finallyClause781

public static final BitSet FOLLOW_FINALLY_in_finallyClause781

FOLLOW_ACTION_in_finallyClause783

public static final BitSet FOLLOW_ACTION_in_finallyClause783

FOLLOW_ALT_in_alternative812

public static final BitSet FOLLOW_ALT_in_alternative812

FOLLOW_element_in_alternative825

public static final BitSet FOLLOW_element_in_alternative825

FOLLOW_EOA_in_alternative843

public static final BitSet FOLLOW_EOA_in_alternative843

FOLLOW_ROOT_in_element878

public static final BitSet FOLLOW_ROOT_in_element878

FOLLOW_element_in_element882

public static final BitSet FOLLOW_element_in_element882

FOLLOW_BANG_in_element895

public static final BitSet FOLLOW_BANG_in_element895

FOLLOW_element_in_element899

public static final BitSet FOLLOW_element_in_element899

FOLLOW_NOT_in_element915

public static final BitSet FOLLOW_NOT_in_element915

FOLLOW_notElement_in_element917

public static final BitSet FOLLOW_notElement_in_element917

FOLLOW_ASSIGN_in_element932

public static final BitSet FOLLOW_ASSIGN_in_element932

FOLLOW_ID_in_element936

public static final BitSet FOLLOW_ID_in_element936

FOLLOW_element_in_element940

public static final BitSet FOLLOW_element_in_element940

FOLLOW_PLUS_ASSIGN_in_element955

public static final BitSet FOLLOW_PLUS_ASSIGN_in_element955

FOLLOW_ID_in_element959

public static final BitSet FOLLOW_ID_in_element959

FOLLOW_element_in_element963

public static final BitSet FOLLOW_element_in_element963

FOLLOW_CHAR_RANGE_in_element977

public static final BitSet FOLLOW_CHAR_RANGE_in_element977

FOLLOW_CHAR_LITERAL_in_element981

public static final BitSet FOLLOW_CHAR_LITERAL_in_element981

FOLLOW_CHAR_LITERAL_in_element985

public static final BitSet FOLLOW_CHAR_LITERAL_in_element985

FOLLOW_ebnf_in_element1014

public static final BitSet FOLLOW_ebnf_in_element1014

FOLLOW_atom_in_element1024

public static final BitSet FOLLOW_atom_in_element1024

FOLLOW_tree__in_element1035

public static final BitSet FOLLOW_tree__in_element1035

FOLLOW_element_action_in_element1045

public static final BitSet FOLLOW_element_action_in_element1045

FOLLOW_SEMPRED_in_element1060

public static final BitSet FOLLOW_SEMPRED_in_element1060

FOLLOW_GATED_SEMPRED_in_element1064

public static final BitSet FOLLOW_GATED_SEMPRED_in_element1064

FOLLOW_SYN_SEMPRED_in_element1075

public static final BitSet FOLLOW_SYN_SEMPRED_in_element1075

FOLLOW_SYNPRED_in_element1083

public static final BitSet FOLLOW_SYNPRED_in_element1083

FOLLOW_BACKTRACK_SEMPRED_in_element1094

public static final BitSet FOLLOW_BACKTRACK_SEMPRED_in_element1094

FOLLOW_EPSILON_in_element1106

public static final BitSet FOLLOW_EPSILON_in_element1106

FOLLOW_ACTION_in_element_action1123

public static final BitSet FOLLOW_ACTION_in_element_action1123

FOLLOW_FORCED_ACTION_in_element_action1134

public static final BitSet FOLLOW_FORCED_ACTION_in_element_action1134

FOLLOW_CHAR_LITERAL_in_notElement1163

public static final BitSet FOLLOW_CHAR_LITERAL_in_notElement1163

FOLLOW_STRING_LITERAL_in_notElement1176

public static final BitSet FOLLOW_STRING_LITERAL_in_notElement1176

FOLLOW_TOKEN_REF_in_notElement1189

public static final BitSet FOLLOW_TOKEN_REF_in_notElement1189

FOLLOW_BLOCK_in_notElement1203

public static final BitSet FOLLOW_BLOCK_in_notElement1203

FOLLOW_block_in_ebnf1249

public static final BitSet FOLLOW_block_in_ebnf1249

FOLLOW_OPTIONAL_in_ebnf1268

public static final BitSet FOLLOW_OPTIONAL_in_ebnf1268

FOLLOW_block_in_ebnf1272

public static final BitSet FOLLOW_block_in_ebnf1272

FOLLOW_CLOSURE_in_ebnf1293

public static final BitSet FOLLOW_CLOSURE_in_ebnf1293

FOLLOW_block_in_ebnf1297

public static final BitSet FOLLOW_block_in_ebnf1297

FOLLOW_POSITIVE_CLOSURE_in_ebnf1318

public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnf1318

FOLLOW_block_in_ebnf1322

public static final BitSet FOLLOW_block_in_ebnf1322

FOLLOW_TREE_BEGIN_in_tree_1360

public static final BitSet FOLLOW_TREE_BEGIN_in_tree_1360

FOLLOW_element_in_tree_1367

public static final BitSet FOLLOW_element_in_tree_1367

FOLLOW_element_action_in_tree_1404

public static final BitSet FOLLOW_element_action_in_tree_1404

FOLLOW_element_in_tree_1426

public static final BitSet FOLLOW_element_in_tree_1426

FOLLOW_RULE_REF_in_atom1476

public static final BitSet FOLLOW_RULE_REF_in_atom1476

FOLLOW_ARG_ACTION_in_atom1481

public static final BitSet FOLLOW_ARG_ACTION_in_atom1481

FOLLOW_TOKEN_REF_in_atom1499

public static final BitSet FOLLOW_TOKEN_REF_in_atom1499

FOLLOW_ARG_ACTION_in_atom1504

public static final BitSet FOLLOW_ARG_ACTION_in_atom1504

FOLLOW_CHAR_LITERAL_in_atom1520

public static final BitSet FOLLOW_CHAR_LITERAL_in_atom1520

FOLLOW_STRING_LITERAL_in_atom1532

public static final BitSet FOLLOW_STRING_LITERAL_in_atom1532

FOLLOW_WILDCARD_in_atom1544

public static final BitSet FOLLOW_WILDCARD_in_atom1544

FOLLOW_DOT_in_atom1555

public static final BitSet FOLLOW_DOT_in_atom1555

FOLLOW_ID_in_atom1557

public static final BitSet FOLLOW_ID_in_atom1557

FOLLOW_atom_in_atom1561

public static final BitSet FOLLOW_atom_in_atom1561

FOLLOW_set_in_atom1574

public static final BitSet FOLLOW_set_in_atom1574

FOLLOW_set_in_ast_suffix0

public static final BitSet FOLLOW_set_in_ast_suffix0

FOLLOW_BLOCK_in_set1619

public static final BitSet FOLLOW_BLOCK_in_set1619

FOLLOW_CHAR_LITERAL_in_setElement1639

public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1639

FOLLOW_TOKEN_REF_in_setElement1644

public static final BitSet FOLLOW_TOKEN_REF_in_setElement1644

FOLLOW_STRING_LITERAL_in_setElement1649

public static final BitSet FOLLOW_STRING_LITERAL_in_setElement1649

FOLLOW_CHAR_RANGE_in_setElement1655

public static final BitSet FOLLOW_CHAR_RANGE_in_setElement1655

FOLLOW_CHAR_LITERAL_in_setElement1657

public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1657

FOLLOW_CHAR_LITERAL_in_setElement1659

public static final BitSet FOLLOW_CHAR_LITERAL_in_setElement1659

FOLLOW_REWRITES_in_rewrite1684

public static final BitSet FOLLOW_REWRITES_in_rewrite1684

FOLLOW_REWRITE_in_rewrite1705

public static final BitSet FOLLOW_REWRITE_in_rewrite1705

FOLLOW_SEMPRED_in_rewrite1710

public static final BitSet FOLLOW_SEMPRED_in_rewrite1710

FOLLOW_rewrite_alternative_in_rewrite1716

public static final BitSet FOLLOW_rewrite_alternative_in_rewrite1716

FOLLOW_BLOCK_in_rewrite_block1759

public static final BitSet FOLLOW_BLOCK_in_rewrite_block1759

FOLLOW_rewrite_alternative_in_rewrite_block1771

public static final BitSet FOLLOW_rewrite_alternative_in_rewrite_block1771

FOLLOW_EOB_in_rewrite_block1776

public static final BitSet FOLLOW_EOB_in_rewrite_block1776

FOLLOW_ALT_in_rewrite_alternative1811

public static final BitSet FOLLOW_ALT_in_rewrite_alternative1811

FOLLOW_rewrite_element_in_rewrite_alternative1829

public static final BitSet FOLLOW_rewrite_element_in_rewrite_alternative1829

FOLLOW_EPSILON_in_rewrite_alternative1850

public static final BitSet FOLLOW_EPSILON_in_rewrite_alternative1850

FOLLOW_EOA_in_rewrite_alternative1866

public static final BitSet FOLLOW_EOA_in_rewrite_alternative1866

FOLLOW_rewrite_template_in_rewrite_alternative1879

public static final BitSet FOLLOW_rewrite_template_in_rewrite_alternative1879

FOLLOW_ETC_in_rewrite_alternative1892

public static final BitSet FOLLOW_ETC_in_rewrite_alternative1892

FOLLOW_rewrite_atom_in_rewrite_element1912

public static final BitSet FOLLOW_rewrite_atom_in_rewrite_element1912

FOLLOW_rewrite_ebnf_in_rewrite_element1922

public static final BitSet FOLLOW_rewrite_ebnf_in_rewrite_element1922

FOLLOW_rewrite_tree_in_rewrite_element1931

public static final BitSet FOLLOW_rewrite_tree_in_rewrite_element1931

FOLLOW_OPTIONAL_in_rewrite_ebnf1952

public static final BitSet FOLLOW_OPTIONAL_in_rewrite_ebnf1952

FOLLOW_rewrite_block_in_rewrite_ebnf1954

public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1954

FOLLOW_CLOSURE_in_rewrite_ebnf1972

public static final BitSet FOLLOW_CLOSURE_in_rewrite_ebnf1972

FOLLOW_rewrite_block_in_rewrite_ebnf1974

public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1974

FOLLOW_POSITIVE_CLOSURE_in_rewrite_ebnf1992

public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_rewrite_ebnf1992

FOLLOW_rewrite_block_in_rewrite_ebnf1994

public static final BitSet FOLLOW_rewrite_block_in_rewrite_ebnf1994

FOLLOW_TREE_BEGIN_in_rewrite_tree2027

public static final BitSet FOLLOW_TREE_BEGIN_in_rewrite_tree2027

FOLLOW_rewrite_atom_in_rewrite_tree2034

public static final BitSet FOLLOW_rewrite_atom_in_rewrite_tree2034

FOLLOW_rewrite_element_in_rewrite_tree2054

public static final BitSet FOLLOW_rewrite_element_in_rewrite_tree2054

FOLLOW_RULE_REF_in_rewrite_atom2099

public static final BitSet FOLLOW_RULE_REF_in_rewrite_atom2099

FOLLOW_TOKEN_REF_in_rewrite_atom2116

public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_atom2116

FOLLOW_ARG_ACTION_in_rewrite_atom2121

public static final BitSet FOLLOW_ARG_ACTION_in_rewrite_atom2121

FOLLOW_CHAR_LITERAL_in_rewrite_atom2132

public static final BitSet FOLLOW_CHAR_LITERAL_in_rewrite_atom2132

FOLLOW_STRING_LITERAL_in_rewrite_atom2140

public static final BitSet FOLLOW_STRING_LITERAL_in_rewrite_atom2140

FOLLOW_LABEL_in_rewrite_atom2154

public static final BitSet FOLLOW_LABEL_in_rewrite_atom2154

FOLLOW_ACTION_in_rewrite_atom2164

public static final BitSet FOLLOW_ACTION_in_rewrite_atom2164

FOLLOW_ALT_in_rewrite_template2187

public static final BitSet FOLLOW_ALT_in_rewrite_template2187

FOLLOW_EPSILON_in_rewrite_template2189

public static final BitSet FOLLOW_EPSILON_in_rewrite_template2189

FOLLOW_EOA_in_rewrite_template2191

public static final BitSet FOLLOW_EOA_in_rewrite_template2191

FOLLOW_TEMPLATE_in_rewrite_template2202

public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template2202

FOLLOW_ID_in_rewrite_template2207

public static final BitSet FOLLOW_ID_in_rewrite_template2207

FOLLOW_ACTION_in_rewrite_template2211

public static final BitSet FOLLOW_ACTION_in_rewrite_template2211

FOLLOW_ARGLIST_in_rewrite_template2224

public static final BitSet FOLLOW_ARGLIST_in_rewrite_template2224

FOLLOW_ARG_in_rewrite_template2234

public static final BitSet FOLLOW_ARG_in_rewrite_template2234

FOLLOW_ID_in_rewrite_template2238

public static final BitSet FOLLOW_ID_in_rewrite_template2238

FOLLOW_ACTION_in_rewrite_template2242

public static final BitSet FOLLOW_ACTION_in_rewrite_template2242

FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2275

public static final BitSet FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2275

FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2288

public static final BitSet FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2288

FOLLOW_ACTION_in_rewrite_template2312

public static final BitSet FOLLOW_ACTION_in_rewrite_template2312

FOLLOW_set_in_synpred1_CodeGenTreeWalker999

public static final BitSet FOLLOW_set_in_synpred1_CodeGenTreeWalker999

FOLLOW_element_action_in_synpred2_CodeGenTreeWalker1393

public static final BitSet FOLLOW_element_action_in_synpred2_CodeGenTreeWalker1393
Constructor Detail

CodeGenTreeWalker

public CodeGenTreeWalker(TreeNodeStream input)

CodeGenTreeWalker

public CodeGenTreeWalker(TreeNodeStream input,
                         RecognizerSharedState state)
Method Detail

getTokenNames

public String[] getTokenNames()
Overrides:
getTokenNames in class BaseRecognizer

getGrammarFileName

public String getGrammarFileName()
Overrides:
getGrammarFileName in class BaseRecognizer

getCurrentRuleName

public String getCurrentRuleName()

setCurrentRuleName

public void setCurrentRuleName(String value)

getOuterAltNum

public int getOuterAltNum()

setOuterAltNum

public void setOuterAltNum(int value)

reportError

public void reportError(RecognitionException ex)
Overrides:
reportError in class BaseRecognizer

reportError

public final void reportError(String s)

getWildcardST

protected final org.stringtemplate.v4.ST getWildcardST(GrammarAST elementAST,
                                                       GrammarAST ast_suffix,
                                                       String label)

getRuleElementST

protected final org.stringtemplate.v4.ST getRuleElementST(String name,
                                                          String ruleTargetName,
                                                          GrammarAST elementAST,
                                                          GrammarAST ast_suffix,
                                                          String label)

getTokenElementST

protected final org.stringtemplate.v4.ST getTokenElementST(String name,
                                                           String elementName,
                                                           GrammarAST elementAST,
                                                           GrammarAST ast_suffix,
                                                           String label)

isListLabel

public final boolean isListLabel(String label)

getSTSuffix

protected final String getSTSuffix(GrammarAST elementAST,
                                   GrammarAST ast_suffix,
                                   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 List<String> getTokenTypesAsTargetLabels(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
Throws:
RecognitionException

attrScope

public final void attrScope()
                     throws RecognitionException
Throws:
RecognitionException

grammarSpec

public final void grammarSpec()
                       throws RecognitionException
Throws:
RecognitionException

rules

public final void rules(org.stringtemplate.v4.ST recognizerST)
                 throws RecognitionException
Throws:
RecognitionException

rule

public final CodeGenTreeWalker.rule_return rule()
                                         throws RecognitionException
Throws:
RecognitionException

modifier

public final CodeGenTreeWalker.modifier_return modifier()
                                                 throws RecognitionException
Throws:
RecognitionException

throwsSpec

public final void throwsSpec()
                      throws RecognitionException
Throws:
RecognitionException

ruleScopeSpec

public final void ruleScopeSpec()
                         throws RecognitionException
Throws:
RecognitionException

block

public final CodeGenTreeWalker.block_return block(String blockTemplateName,
                                                  DFA dfa)
                                           throws RecognitionException
Throws:
RecognitionException

setBlock

public final CodeGenTreeWalker.setBlock_return setBlock()
                                                 throws RecognitionException
Throws:
RecognitionException

setAlternative

public final void setAlternative()
                          throws RecognitionException
Throws:
RecognitionException

exceptionGroup

public final void exceptionGroup(org.stringtemplate.v4.ST ruleST)
                          throws RecognitionException
Throws:
RecognitionException

exceptionHandler

public final void exceptionHandler(org.stringtemplate.v4.ST ruleST)
                            throws RecognitionException
Throws:
RecognitionException

finallyClause

public final void finallyClause(org.stringtemplate.v4.ST ruleST)
                         throws RecognitionException
Throws:
RecognitionException

alternative

public final CodeGenTreeWalker.alternative_return alternative()
                                                       throws RecognitionException
Throws:
RecognitionException

element

public final CodeGenTreeWalker.element_return element(GrammarAST label,
                                                      GrammarAST astSuffix)
                                               throws RecognitionException
Throws:
RecognitionException

element_action

public final CodeGenTreeWalker.element_action_return element_action()
                                                             throws RecognitionException
Throws:
RecognitionException

notElement

public final org.stringtemplate.v4.ST notElement(GrammarAST n,
                                                 GrammarAST label,
                                                 GrammarAST astSuffix)
                                          throws RecognitionException
Throws:
RecognitionException

ebnf

public final CodeGenTreeWalker.ebnf_return ebnf()
                                         throws RecognitionException
Throws:
RecognitionException

tree_

public final CodeGenTreeWalker.tree__return tree_()
                                           throws RecognitionException
Throws:
RecognitionException

atom

public final CodeGenTreeWalker.atom_return atom(GrammarAST scope,
                                                GrammarAST label,
                                                GrammarAST astSuffix)
                                         throws RecognitionException
Throws:
RecognitionException

ast_suffix

public final void ast_suffix()
                      throws RecognitionException
Throws:
RecognitionException

set

public final org.stringtemplate.v4.ST set(GrammarAST label,
                                          GrammarAST astSuffix)
                                   throws RecognitionException
Throws:
RecognitionException

setElement

public final void setElement()
                      throws RecognitionException
Throws:
RecognitionException

rewrite

public final CodeGenTreeWalker.rewrite_return rewrite()
                                               throws RecognitionException
Throws:
RecognitionException

rewrite_block

public final org.stringtemplate.v4.ST rewrite_block(String blockTemplateName)
                                             throws RecognitionException
Throws:
RecognitionException

rewrite_alternative

public final org.stringtemplate.v4.ST rewrite_alternative()
                                                   throws RecognitionException
Throws:
RecognitionException

rewrite_element

public final CodeGenTreeWalker.rewrite_element_return rewrite_element()
                                                               throws RecognitionException
Throws:
RecognitionException

rewrite_ebnf

public final CodeGenTreeWalker.rewrite_ebnf_return rewrite_ebnf()
                                                         throws RecognitionException
Throws:
RecognitionException

rewrite_tree

public final CodeGenTreeWalker.rewrite_tree_return rewrite_tree()
                                                         throws RecognitionException
Throws:
RecognitionException

rewrite_atom

public final CodeGenTreeWalker.rewrite_atom_return rewrite_atom(boolean isRoot)
                                                         throws RecognitionException
Throws:
RecognitionException

rewrite_template

public final org.stringtemplate.v4.ST rewrite_template()
                                                throws RecognitionException
Throws:
RecognitionException

synpred1_CodeGenTreeWalker_fragment

public final void synpred1_CodeGenTreeWalker_fragment()
                                               throws RecognitionException
Throws:
RecognitionException

synpred2_CodeGenTreeWalker_fragment

public final void synpred2_CodeGenTreeWalker_fragment()
                                               throws RecognitionException
Throws:
RecognitionException

synpred1_CodeGenTreeWalker

public final boolean synpred1_CodeGenTreeWalker()

synpred2_CodeGenTreeWalker

public final boolean synpred2_CodeGenTreeWalker()


Copyright © 2011. All Rights Reserved.