Class AssignTokenTypesWalker

  • Direct Known Subclasses:
    AssignTokenTypesBehavior

    public class AssignTokenTypesWalker
    extends org.antlr.runtime.tree.TreeParser
    [Warning: TJP says that this is probably out of date as of 11/19/2005, but since it's probably still useful, I'll leave in. Don't have energy to update at the moment.] Compute the token types for all literals and rules etc.. There are a few different cases to consider for grammar types and a few situations within. CASE 1 : pure parser grammar a) Any reference to a token gets a token type. b) The tokens section may alias a token name to a string or char CASE 2 : pure lexer grammar a) Import token vocabulary if available. Set token types for any new tokens to values above last imported token type b) token rule definitions get token types if not already defined c) literals do NOT get token types CASE 3 : merged parser / lexer grammar a) Any char or string literal gets a token type in a parser rule b) Any reference to a token gets a token type if not referencing a fragment lexer rule c) The tokens section may alias a token name to a string or char which must add a rule to the lexer d) token rule definitions get token types if not already defined e) token rule definitions may also alias a token name to a literal. E.g., Rule 'FOR : "for";' will alias FOR to "for" in the sense that references to either in the parser grammar will yield the token type What this pass does: 0. Collects basic info about the grammar like grammar name and type; Oh, I have go get the options in case they affect the token types. E.g., tokenVocab option. Imports any token vocab name/type pairs into a local hashtable. 1. Finds a list of all literals and token names. 2. Finds a list of all token name rule definitions; no token rules implies pure parser. 3. Finds a list of all simple token rule defs of form "<NAME> : <literal>;" and aliases them. 4. Walks token names table and assign types to any unassigned 5. Walks aliases and assign types to referenced literals 6. Walks literals, assigning types if untyped 4. Informs the Grammar object of the type definitions such as: g.defineToken(<charliteral>, ttype); g.defineToken(<stringliteral>, ttype); g.defineToken(<tokenID>, ttype); where some of the ttype values will be the same for aliases tokens.
    • Field Detail

      • tokenNames

        public static final String[] tokenNames
      • DOUBLE_ANGLE_STRING_LITERAL

        public static final int DOUBLE_ANGLE_STRING_LITERAL
        See Also:
        Constant Field Values
      • DOUBLE_QUOTE_STRING_LITERAL

        public static final int DOUBLE_QUOTE_STRING_LITERAL
        See Also:
        Constant Field Values
      • grammar

        protected Grammar grammar
      • currentRuleName

        protected String currentRuleName
      • stringAlias

        protected static GrammarAST stringAlias
      • charAlias

        protected static GrammarAST charAlias
      • stringAlias2

        protected static GrammarAST stringAlias2
      • charAlias2

        protected static GrammarAST charAlias2
      • FOLLOW_LEXER_GRAMMAR_in_grammar_69

        public static final org.antlr.runtime.BitSet FOLLOW_LEXER_GRAMMAR_in_grammar_69
      • FOLLOW_grammarSpec_in_grammar_74

        public static final org.antlr.runtime.BitSet FOLLOW_grammarSpec_in_grammar_74
      • FOLLOW_PARSER_GRAMMAR_in_grammar_84

        public static final org.antlr.runtime.BitSet FOLLOW_PARSER_GRAMMAR_in_grammar_84
      • FOLLOW_grammarSpec_in_grammar_88

        public static final org.antlr.runtime.BitSet FOLLOW_grammarSpec_in_grammar_88
      • FOLLOW_TREE_GRAMMAR_in_grammar_98

        public static final org.antlr.runtime.BitSet FOLLOW_TREE_GRAMMAR_in_grammar_98
      • FOLLOW_grammarSpec_in_grammar_104

        public static final org.antlr.runtime.BitSet FOLLOW_grammarSpec_in_grammar_104
      • FOLLOW_COMBINED_GRAMMAR_in_grammar_114

        public static final org.antlr.runtime.BitSet FOLLOW_COMBINED_GRAMMAR_in_grammar_114
      • FOLLOW_grammarSpec_in_grammar_116

        public static final org.antlr.runtime.BitSet FOLLOW_grammarSpec_in_grammar_116
      • FOLLOW_ID_in_grammarSpec135

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_grammarSpec135
      • FOLLOW_DOC_COMMENT_in_grammarSpec142

        public static final org.antlr.runtime.BitSet FOLLOW_DOC_COMMENT_in_grammarSpec142
      • FOLLOW_optionsSpec_in_grammarSpec149

        public static final org.antlr.runtime.BitSet FOLLOW_optionsSpec_in_grammarSpec149
      • FOLLOW_delegateGrammars_in_grammarSpec156

        public static final org.antlr.runtime.BitSet FOLLOW_delegateGrammars_in_grammarSpec156
      • FOLLOW_tokensSpec_in_grammarSpec163

        public static final org.antlr.runtime.BitSet FOLLOW_tokensSpec_in_grammarSpec163
      • FOLLOW_attrScope_in_grammarSpec170

        public static final org.antlr.runtime.BitSet FOLLOW_attrScope_in_grammarSpec170
      • FOLLOW_AMPERSAND_in_grammarSpec179

        public static final org.antlr.runtime.BitSet FOLLOW_AMPERSAND_in_grammarSpec179
      • FOLLOW_rules_in_grammarSpec191

        public static final org.antlr.runtime.BitSet FOLLOW_rules_in_grammarSpec191
      • FOLLOW_SCOPE_in_attrScope204

        public static final org.antlr.runtime.BitSet FOLLOW_SCOPE_in_attrScope204
      • FOLLOW_ID_in_attrScope206

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_attrScope206
      • FOLLOW_AMPERSAND_in_attrScope211

        public static final org.antlr.runtime.BitSet FOLLOW_AMPERSAND_in_attrScope211
      • FOLLOW_ACTION_in_attrScope220

        public static final org.antlr.runtime.BitSet FOLLOW_ACTION_in_attrScope220
      • FOLLOW_OPTIONS_in_optionsSpec239

        public static final org.antlr.runtime.BitSet FOLLOW_OPTIONS_in_optionsSpec239
      • FOLLOW_option_in_optionsSpec242

        public static final org.antlr.runtime.BitSet FOLLOW_option_in_optionsSpec242
      • FOLLOW_ASSIGN_in_option261

        public static final org.antlr.runtime.BitSet FOLLOW_ASSIGN_in_option261
      • FOLLOW_ID_in_option263

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_option263
      • FOLLOW_optionValue_in_option265

        public static final org.antlr.runtime.BitSet FOLLOW_optionValue_in_option265
      • FOLLOW_ID_in_optionValue291

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_optionValue291
      • FOLLOW_STRING_LITERAL_in_optionValue296

        public static final org.antlr.runtime.BitSet FOLLOW_STRING_LITERAL_in_optionValue296
      • FOLLOW_CHAR_LITERAL_in_optionValue301

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_optionValue301
      • FOLLOW_INT_in_optionValue306

        public static final org.antlr.runtime.BitSet FOLLOW_INT_in_optionValue306
      • FOLLOW_CHARSET_in_charSet324

        public static final org.antlr.runtime.BitSet FOLLOW_CHARSET_in_charSet324
      • FOLLOW_charSetElement_in_charSet326

        public static final org.antlr.runtime.BitSet FOLLOW_charSetElement_in_charSet326
      • FOLLOW_CHAR_LITERAL_in_charSetElement339

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_charSetElement339
      • FOLLOW_OR_in_charSetElement346

        public static final org.antlr.runtime.BitSet FOLLOW_OR_in_charSetElement346
      • FOLLOW_CHAR_LITERAL_in_charSetElement348

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_charSetElement348
      • FOLLOW_CHAR_LITERAL_in_charSetElement350

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_charSetElement350
      • FOLLOW_RANGE_in_charSetElement359

        public static final org.antlr.runtime.BitSet FOLLOW_RANGE_in_charSetElement359
      • FOLLOW_CHAR_LITERAL_in_charSetElement361

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_charSetElement361
      • FOLLOW_CHAR_LITERAL_in_charSetElement363

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_charSetElement363
      • FOLLOW_IMPORT_in_delegateGrammars378

        public static final org.antlr.runtime.BitSet FOLLOW_IMPORT_in_delegateGrammars378
      • FOLLOW_ASSIGN_in_delegateGrammars386

        public static final org.antlr.runtime.BitSet FOLLOW_ASSIGN_in_delegateGrammars386
      • FOLLOW_ID_in_delegateGrammars388

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_delegateGrammars388
      • FOLLOW_ID_in_delegateGrammars390

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_delegateGrammars390
      • FOLLOW_ID_in_delegateGrammars398

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_delegateGrammars398
      • FOLLOW_TOKENS_in_tokensSpec420

        public static final org.antlr.runtime.BitSet FOLLOW_TOKENS_in_tokensSpec420
      • FOLLOW_tokenSpec_in_tokensSpec422

        public static final org.antlr.runtime.BitSet FOLLOW_tokenSpec_in_tokensSpec422
      • FOLLOW_TOKEN_REF_in_tokenSpec437

        public static final org.antlr.runtime.BitSet FOLLOW_TOKEN_REF_in_tokenSpec437
      • FOLLOW_ASSIGN_in_tokenSpec457

        public static final org.antlr.runtime.BitSet FOLLOW_ASSIGN_in_tokenSpec457
      • FOLLOW_TOKEN_REF_in_tokenSpec464

        public static final org.antlr.runtime.BitSet FOLLOW_TOKEN_REF_in_tokenSpec464
      • FOLLOW_STRING_LITERAL_in_tokenSpec481

        public static final org.antlr.runtime.BitSet FOLLOW_STRING_LITERAL_in_tokenSpec481
      • FOLLOW_CHAR_LITERAL_in_tokenSpec492

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_tokenSpec492
      • FOLLOW_rule_in_rules516

        public static final org.antlr.runtime.BitSet FOLLOW_rule_in_rules516
      • FOLLOW_RULE_in_rule529

        public static final org.antlr.runtime.BitSet FOLLOW_RULE_in_rule529
      • FOLLOW_ruleBody_in_rule531

        public static final org.antlr.runtime.BitSet FOLLOW_ruleBody_in_rule531
      • FOLLOW_PREC_RULE_in_rule538

        public static final org.antlr.runtime.BitSet FOLLOW_PREC_RULE_in_rule538
      • FOLLOW_ruleBody_in_rule540

        public static final org.antlr.runtime.BitSet FOLLOW_ruleBody_in_rule540
      • FOLLOW_ID_in_ruleBody554

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_ruleBody554
      • FOLLOW_modifier_in_ruleBody563

        public static final org.antlr.runtime.BitSet FOLLOW_modifier_in_ruleBody563
      • FOLLOW_ARG_in_ruleBody570

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_in_ruleBody570
      • FOLLOW_ARG_ACTION_in_ruleBody573

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_ACTION_in_ruleBody573
      • FOLLOW_RET_in_ruleBody581

        public static final org.antlr.runtime.BitSet FOLLOW_RET_in_ruleBody581
      • FOLLOW_ARG_ACTION_in_ruleBody584

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_ACTION_in_ruleBody584
      • FOLLOW_throwsSpec_in_ruleBody592

        public static final org.antlr.runtime.BitSet FOLLOW_throwsSpec_in_ruleBody592
      • FOLLOW_optionsSpec_in_ruleBody599

        public static final org.antlr.runtime.BitSet FOLLOW_optionsSpec_in_ruleBody599
      • FOLLOW_ruleScopeSpec_in_ruleBody606

        public static final org.antlr.runtime.BitSet FOLLOW_ruleScopeSpec_in_ruleBody606
      • FOLLOW_AMPERSAND_in_ruleBody615

        public static final org.antlr.runtime.BitSet FOLLOW_AMPERSAND_in_ruleBody615
      • FOLLOW_block_in_ruleBody628

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_ruleBody628
      • FOLLOW_exceptionGroup_in_ruleBody633

        public static final org.antlr.runtime.BitSet FOLLOW_exceptionGroup_in_ruleBody633
      • FOLLOW_EOR_in_ruleBody639

        public static final org.antlr.runtime.BitSet FOLLOW_EOR_in_ruleBody639
      • FOLLOW_THROWS_in_throwsSpec681

        public static final org.antlr.runtime.BitSet FOLLOW_THROWS_in_throwsSpec681
      • FOLLOW_ID_in_throwsSpec683

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_throwsSpec683
      • FOLLOW_SCOPE_in_ruleScopeSpec698

        public static final org.antlr.runtime.BitSet FOLLOW_SCOPE_in_ruleScopeSpec698
      • FOLLOW_AMPERSAND_in_ruleScopeSpec703

        public static final org.antlr.runtime.BitSet FOLLOW_AMPERSAND_in_ruleScopeSpec703
      • FOLLOW_ACTION_in_ruleScopeSpec713

        public static final org.antlr.runtime.BitSet FOLLOW_ACTION_in_ruleScopeSpec713
      • FOLLOW_ID_in_ruleScopeSpec719

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_ruleScopeSpec719
      • FOLLOW_BLOCK_in_block737

        public static final org.antlr.runtime.BitSet FOLLOW_BLOCK_in_block737
      • FOLLOW_optionsSpec_in_block743

        public static final org.antlr.runtime.BitSet FOLLOW_optionsSpec_in_block743
      • FOLLOW_alternative_in_block752

        public static final org.antlr.runtime.BitSet FOLLOW_alternative_in_block752
      • FOLLOW_rewrite_in_block754

        public static final org.antlr.runtime.BitSet FOLLOW_rewrite_in_block754
      • FOLLOW_EOB_in_block762

        public static final org.antlr.runtime.BitSet FOLLOW_EOB_in_block762
      • FOLLOW_ALT_in_alternative779

        public static final org.antlr.runtime.BitSet FOLLOW_ALT_in_alternative779
      • FOLLOW_element_in_alternative782

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_alternative782
      • FOLLOW_EOA_in_alternative786

        public static final org.antlr.runtime.BitSet FOLLOW_EOA_in_alternative786
      • FOLLOW_exceptionHandler_in_exceptionGroup801

        public static final org.antlr.runtime.BitSet FOLLOW_exceptionHandler_in_exceptionGroup801
      • FOLLOW_finallyClause_in_exceptionGroup807

        public static final org.antlr.runtime.BitSet FOLLOW_finallyClause_in_exceptionGroup807
      • FOLLOW_finallyClause_in_exceptionGroup814

        public static final org.antlr.runtime.BitSet FOLLOW_finallyClause_in_exceptionGroup814
      • FOLLOW_CATCH_in_exceptionHandler826

        public static final org.antlr.runtime.BitSet FOLLOW_CATCH_in_exceptionHandler826
      • FOLLOW_ARG_ACTION_in_exceptionHandler828

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_ACTION_in_exceptionHandler828
      • FOLLOW_ACTION_in_exceptionHandler830

        public static final org.antlr.runtime.BitSet FOLLOW_ACTION_in_exceptionHandler830
      • FOLLOW_FINALLY_in_finallyClause843

        public static final org.antlr.runtime.BitSet FOLLOW_FINALLY_in_finallyClause843
      • FOLLOW_ACTION_in_finallyClause845

        public static final org.antlr.runtime.BitSet FOLLOW_ACTION_in_finallyClause845
      • FOLLOW_REWRITES_in_rewrite858

        public static final org.antlr.runtime.BitSet FOLLOW_REWRITES_in_rewrite858
      • FOLLOW_REWRITE_in_rewrite863

        public static final org.antlr.runtime.BitSet FOLLOW_REWRITE_in_rewrite863
      • FOLLOW_ROOT_in_element887

        public static final org.antlr.runtime.BitSet FOLLOW_ROOT_in_element887
      • FOLLOW_element_in_element889

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_element889
      • FOLLOW_BANG_in_element896

        public static final org.antlr.runtime.BitSet FOLLOW_BANG_in_element896
      • FOLLOW_element_in_element898

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_element898
      • FOLLOW_atom_in_element904

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_element904
      • FOLLOW_NOT_in_element910

        public static final org.antlr.runtime.BitSet FOLLOW_NOT_in_element910
      • FOLLOW_element_in_element912

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_element912
      • FOLLOW_RANGE_in_element919

        public static final org.antlr.runtime.BitSet FOLLOW_RANGE_in_element919
      • FOLLOW_atom_in_element921

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_element921
      • FOLLOW_atom_in_element923

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_element923
      • FOLLOW_CHAR_RANGE_in_element930

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_RANGE_in_element930
      • FOLLOW_atom_in_element932

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_element932
      • FOLLOW_atom_in_element934

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_element934
      • FOLLOW_ASSIGN_in_element941

        public static final org.antlr.runtime.BitSet FOLLOW_ASSIGN_in_element941
      • FOLLOW_ID_in_element943

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_element943
      • FOLLOW_element_in_element945

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_element945
      • FOLLOW_PLUS_ASSIGN_in_element952

        public static final org.antlr.runtime.BitSet FOLLOW_PLUS_ASSIGN_in_element952
      • FOLLOW_ID_in_element954

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_element954
      • FOLLOW_element_in_element956

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_element956
      • FOLLOW_ebnf_in_element962

        public static final org.antlr.runtime.BitSet FOLLOW_ebnf_in_element962
      • FOLLOW_tree__in_element967

        public static final org.antlr.runtime.BitSet FOLLOW_tree__in_element967
      • FOLLOW_SYNPRED_in_element974

        public static final org.antlr.runtime.BitSet FOLLOW_SYNPRED_in_element974
      • FOLLOW_block_in_element976

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_element976
      • FOLLOW_FORCED_ACTION_in_element983

        public static final org.antlr.runtime.BitSet FOLLOW_FORCED_ACTION_in_element983
      • FOLLOW_ACTION_in_element988

        public static final org.antlr.runtime.BitSet FOLLOW_ACTION_in_element988
      • FOLLOW_SEMPRED_in_element993

        public static final org.antlr.runtime.BitSet FOLLOW_SEMPRED_in_element993
      • FOLLOW_SYN_SEMPRED_in_element998

        public static final org.antlr.runtime.BitSet FOLLOW_SYN_SEMPRED_in_element998
      • FOLLOW_BACKTRACK_SEMPRED_in_element1004

        public static final org.antlr.runtime.BitSet FOLLOW_BACKTRACK_SEMPRED_in_element1004
      • FOLLOW_GATED_SEMPRED_in_element1013

        public static final org.antlr.runtime.BitSet FOLLOW_GATED_SEMPRED_in_element1013
      • FOLLOW_EPSILON_in_element1018

        public static final org.antlr.runtime.BitSet FOLLOW_EPSILON_in_element1018
      • FOLLOW_block_in_ebnf1029

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_ebnf1029
      • FOLLOW_OPTIONAL_in_ebnf1036

        public static final org.antlr.runtime.BitSet FOLLOW_OPTIONAL_in_ebnf1036
      • FOLLOW_block_in_ebnf1038

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_ebnf1038
      • FOLLOW_CLOSURE_in_ebnf1047

        public static final org.antlr.runtime.BitSet FOLLOW_CLOSURE_in_ebnf1047
      • FOLLOW_block_in_ebnf1049

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_ebnf1049
      • FOLLOW_POSITIVE_CLOSURE_in_ebnf1058

        public static final org.antlr.runtime.BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnf1058
      • FOLLOW_block_in_ebnf1060

        public static final org.antlr.runtime.BitSet FOLLOW_block_in_ebnf1060
      • FOLLOW_TREE_BEGIN_in_tree_1074

        public static final org.antlr.runtime.BitSet FOLLOW_TREE_BEGIN_in_tree_1074
      • FOLLOW_element_in_tree_1076

        public static final org.antlr.runtime.BitSet FOLLOW_element_in_tree_1076
      • FOLLOW_RULE_REF_in_atom1091

        public static final org.antlr.runtime.BitSet FOLLOW_RULE_REF_in_atom1091
      • FOLLOW_ARG_ACTION_in_atom1094

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_ACTION_in_atom1094
      • FOLLOW_TOKEN_REF_in_atom1107

        public static final org.antlr.runtime.BitSet FOLLOW_TOKEN_REF_in_atom1107
      • FOLLOW_ARG_ACTION_in_atom1110

        public static final org.antlr.runtime.BitSet FOLLOW_ARG_ACTION_in_atom1110
      • FOLLOW_CHAR_LITERAL_in_atom1124

        public static final org.antlr.runtime.BitSet FOLLOW_CHAR_LITERAL_in_atom1124
      • FOLLOW_STRING_LITERAL_in_atom1135

        public static final org.antlr.runtime.BitSet FOLLOW_STRING_LITERAL_in_atom1135
      • FOLLOW_WILDCARD_in_atom1142

        public static final org.antlr.runtime.BitSet FOLLOW_WILDCARD_in_atom1142
      • FOLLOW_DOT_in_atom1148

        public static final org.antlr.runtime.BitSet FOLLOW_DOT_in_atom1148
      • FOLLOW_ID_in_atom1150

        public static final org.antlr.runtime.BitSet FOLLOW_ID_in_atom1150
      • FOLLOW_atom_in_atom1152

        public static final org.antlr.runtime.BitSet FOLLOW_atom_in_atom1152
    • Constructor Detail

      • AssignTokenTypesWalker

        public AssignTokenTypesWalker​(org.antlr.runtime.tree.TreeNodeStream input)
      • AssignTokenTypesWalker

        public AssignTokenTypesWalker​(org.antlr.runtime.tree.TreeNodeStream input,
                                      org.antlr.runtime.RecognizerSharedState state)
    • Method Detail

      • getDelegates

        public org.antlr.runtime.tree.TreeParser[] getDelegates()
      • getTokenNames

        public String[] getTokenNames()
        Overrides:
        getTokenNames in class org.antlr.runtime.BaseRecognizer
      • getGrammarFileName

        public String getGrammarFileName()
        Overrides:
        getGrammarFileName in class org.antlr.runtime.BaseRecognizer
      • reportError

        public void reportError​(org.antlr.runtime.RecognitionException ex)
        Overrides:
        reportError in class org.antlr.runtime.BaseRecognizer
      • initASTPatterns

        protected void initASTPatterns()
      • trackString

        protected void trackString​(GrammarAST t)
      • trackToken

        protected void trackToken​(GrammarAST t)
      • defineTokens

        public void defineTokens​(Grammar root)
      • defineStringLiteralsFromDelegates

        protected void defineStringLiteralsFromDelegates()
      • assignStringTypes

        protected void assignStringTypes​(Grammar root)
      • aliasTokenIDsAndLiterals

        protected void aliasTokenIDsAndLiterals​(Grammar root)
      • assignTokenIDTypes

        protected void assignTokenIDTypes​(Grammar root)
      • defineTokenNamesAndLiteralsInGrammar

        protected void defineTokenNamesAndLiteralsInGrammar​(Grammar root)
      • init

        protected void init​(Grammar root)
      • grammar_

        public final void grammar_​(Grammar g)
                            throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • grammarSpec

        public final void grammarSpec()
                               throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • attrScope

        public final void attrScope()
                             throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • optionsSpec

        public final Map<Object,​Object> optionsSpec()
                                                   throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • option

        public final void option​(Map<Object,​Object> opts)
                          throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • charSet

        public final void charSet()
                           throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • charSetElement

        public final void charSetElement()
                                  throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • delegateGrammars

        public final void delegateGrammars()
                                    throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • tokensSpec

        public final void tokensSpec()
                              throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • tokenSpec

        public final void tokenSpec()
                             throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • rules

        public final void rules()
                         throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • rule

        public final void rule()
                        throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • ruleBody

        public final void ruleBody()
                            throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • throwsSpec

        public final void throwsSpec()
                              throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • ruleScopeSpec

        public final void ruleScopeSpec()
                                 throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • alternative

        public final void alternative()
                               throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • exceptionGroup

        public final void exceptionGroup()
                                  throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • exceptionHandler

        public final void exceptionHandler()
                                    throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • finallyClause

        public final void finallyClause()
                                 throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • rewrite

        public final void rewrite()
                           throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • element

        public final void element()
                           throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • ebnf

        public final void ebnf()
                        throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • tree_

        public final void tree_()
                         throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • atom

        public final void atom()
                        throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException
      • ast_suffix

        public final void ast_suffix()
                              throws org.antlr.runtime.RecognitionException
        Throws:
        org.antlr.runtime.RecognitionException