Package org.antlr.grammar.v2
Class ANTLRParser
- java.lang.Object
-
- antlr.Parser
-
- antlr.LLkParser
-
- org.antlr.grammar.v2.ANTLRParser
-
- All Implemented Interfaces:
ANTLRTokenTypes
public class ANTLRParser extends antlr.LLkParser implements ANTLRTokenTypes
Read in an ANTLR grammar and build an AST. Try not to do any actions, just build the tree. The phases are: antlr.g (this file) assign.types.g define.g buildnfa.g antlr.print.g (optional) codegen.g Terence Parr University of San Francisco 2005
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
_tokenNames
static antlr.collections.impl.BitSet
_tokenSet_0
static antlr.collections.impl.BitSet
_tokenSet_1
static antlr.collections.impl.BitSet
_tokenSet_10
static antlr.collections.impl.BitSet
_tokenSet_11
static antlr.collections.impl.BitSet
_tokenSet_12
static antlr.collections.impl.BitSet
_tokenSet_13
static antlr.collections.impl.BitSet
_tokenSet_14
static antlr.collections.impl.BitSet
_tokenSet_15
static antlr.collections.impl.BitSet
_tokenSet_16
static antlr.collections.impl.BitSet
_tokenSet_17
static antlr.collections.impl.BitSet
_tokenSet_18
static antlr.collections.impl.BitSet
_tokenSet_19
static antlr.collections.impl.BitSet
_tokenSet_2
static antlr.collections.impl.BitSet
_tokenSet_20
static antlr.collections.impl.BitSet
_tokenSet_21
static antlr.collections.impl.BitSet
_tokenSet_22
static antlr.collections.impl.BitSet
_tokenSet_23
static antlr.collections.impl.BitSet
_tokenSet_24
static antlr.collections.impl.BitSet
_tokenSet_25
static antlr.collections.impl.BitSet
_tokenSet_26
static antlr.collections.impl.BitSet
_tokenSet_27
static antlr.collections.impl.BitSet
_tokenSet_28
static antlr.collections.impl.BitSet
_tokenSet_29
static antlr.collections.impl.BitSet
_tokenSet_3
static antlr.collections.impl.BitSet
_tokenSet_30
static antlr.collections.impl.BitSet
_tokenSet_31
static antlr.collections.impl.BitSet
_tokenSet_32
static antlr.collections.impl.BitSet
_tokenSet_33
static antlr.collections.impl.BitSet
_tokenSet_34
static antlr.collections.impl.BitSet
_tokenSet_35
static antlr.collections.impl.BitSet
_tokenSet_36
static antlr.collections.impl.BitSet
_tokenSet_37
static antlr.collections.impl.BitSet
_tokenSet_38
static antlr.collections.impl.BitSet
_tokenSet_39
static antlr.collections.impl.BitSet
_tokenSet_4
static antlr.collections.impl.BitSet
_tokenSet_40
static antlr.collections.impl.BitSet
_tokenSet_41
static antlr.collections.impl.BitSet
_tokenSet_42
static antlr.collections.impl.BitSet
_tokenSet_43
static antlr.collections.impl.BitSet
_tokenSet_44
static antlr.collections.impl.BitSet
_tokenSet_45
static antlr.collections.impl.BitSet
_tokenSet_46
static antlr.collections.impl.BitSet
_tokenSet_47
static antlr.collections.impl.BitSet
_tokenSet_48
static antlr.collections.impl.BitSet
_tokenSet_49
static antlr.collections.impl.BitSet
_tokenSet_5
static antlr.collections.impl.BitSet
_tokenSet_50
static antlr.collections.impl.BitSet
_tokenSet_51
static antlr.collections.impl.BitSet
_tokenSet_6
static antlr.collections.impl.BitSet
_tokenSet_7
static antlr.collections.impl.BitSet
_tokenSet_8
static antlr.collections.impl.BitSet
_tokenSet_9
protected boolean
atTreeRoot
protected GrammarAST
currentBlockAST
protected java.lang.String
currentRuleName
protected Grammar
grammar
protected int
gtype
-
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
-
Fields inherited from interface org.antlr.grammar.v2.ANTLRTokenTypes
ACTION, ACTION_CHAR_LITERAL, ACTION_ESC, ACTION_STRING_LITERAL, ALT, AMPERSAND, ARG, ARG_ACTION, ARGLIST, ASSIGN, BACKTRACK_SEMPRED, BANG, BLOCK, CHAR_LITERAL, CHAR_RANGE, CLOSE_ELEMENT_OPTION, CLOSURE, COLON, COMBINED_GRAMMAR, COMMA, COMMENT, DIGIT, DOC_COMMENT, DOLLAR, DOT, DOUBLE_ANGLE_STRING_LITERAL, DOUBLE_QUOTE_STRING_LITERAL, EOA, EOB, EOF, EOR, EPSILON, ESC, ETC, FORCED_ACTION, FRAGMENT, GATED_SEMPRED, ID, IMPLIES, IMPORT, INITACTION, INT, INTERNAL_RULE_REF, LABEL, LEXER, LEXER_GRAMMAR, LITERAL_catch, LITERAL_finally, LITERAL_grammar, LITERAL_lexer, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_returns, LITERAL_throws, LITERAL_tree, LPAREN, ML_COMMENT, NESTED_ACTION, NESTED_ARG_ACTION, NOT, NULL_TREE_LOOKAHEAD, OPEN_ELEMENT_OPTION, OPTIONAL, OPTIONS, OR, PARSER, PARSER_GRAMMAR, PLUS, PLUS_ASSIGN, POSITIVE_CLOSURE, QUESTION, RANGE, RCURLY, RET, REWRITE, ROOT, RPAREN, RULE, RULE_REF, SCOPE, SEMI, SEMPRED, SL_COMMENT, SRC, STAR, STRAY_BRACKET, STRING_LITERAL, SYN_SEMPRED, SYNPRED, TEMPLATE, TOKEN_REF, TOKENS, TREE_BEGIN, TREE_GRAMMAR, WILDCARD, WS, WS_LOOP, WS_OPT, XDIGIT
-
-
Constructor Summary
Constructors Modifier Constructor Description ANTLRParser(antlr.ParserSharedInputState state)
ANTLRParser(antlr.TokenBuffer tokenBuf)
protected
ANTLRParser(antlr.TokenBuffer tokenBuf, int k)
ANTLRParser(antlr.TokenStream lexer)
protected
ANTLRParser(antlr.TokenStream lexer, int k)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action()
Match stuff like @parser::members {int i;}void
actions()
void
actionScopeName()
Sometimes the scope names will collide with keywords; allow them as ids for action scopes.void
alternative()
void
altList(java.util.Map opts)
void
atom()
void
attrScope()
void
attrScopes()
void
block()
Build #(BLOCK ( #(ALT ...) EOB )+ )protected void
buildTokenTypeASTClassMap()
void
cleanup(GrammarAST root)
protected GrammarAST
createBlockFromDupAlt(GrammarAST alt)
Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed.GrammarAST
createSimpleRuleAST(java.lang.String name, GrammarAST block, boolean fragment)
protected GrammarAST
createSynSemPredFromBlock(GrammarAST synpredBlockAST, int synpredTokenType)
void
defaultNodeOption(GrammarAST terminalAST)
void
delegateGrammar()
void
delegateGrammars()
void
ebnf()
matches ENBF blocks (and sets via block rule)GrammarAST
ebnfSuffix(GrammarAST elemAST, boolean inRewrite)
void
element()
void
elementNoOptionSpec()
void
elementOption(GrammarAST terminalAST)
void
elementOptions(GrammarAST terminalAST)
void
exceptionGroup()
void
exceptionHandler()
void
finallyClause()
Grammar
getGrammar()
int
getGtype()
void
grammar(Grammar g)
void
grammarType()
void
id()
void
idList()
private static long[]
mk_tokenSet_0()
private static long[]
mk_tokenSet_1()
private static long[]
mk_tokenSet_10()
private static long[]
mk_tokenSet_11()
private static long[]
mk_tokenSet_12()
private static long[]
mk_tokenSet_13()
private static long[]
mk_tokenSet_14()
private static long[]
mk_tokenSet_15()
private static long[]
mk_tokenSet_16()
private static long[]
mk_tokenSet_17()
private static long[]
mk_tokenSet_18()
private static long[]
mk_tokenSet_19()
private static long[]
mk_tokenSet_2()
private static long[]
mk_tokenSet_20()
private static long[]
mk_tokenSet_21()
private static long[]
mk_tokenSet_22()
private static long[]
mk_tokenSet_23()
private static long[]
mk_tokenSet_24()
private static long[]
mk_tokenSet_25()
private static long[]
mk_tokenSet_26()
private static long[]
mk_tokenSet_27()
private static long[]
mk_tokenSet_28()
private static long[]
mk_tokenSet_29()
private static long[]
mk_tokenSet_3()
private static long[]
mk_tokenSet_30()
private static long[]
mk_tokenSet_31()
private static long[]
mk_tokenSet_32()
private static long[]
mk_tokenSet_33()
private static long[]
mk_tokenSet_34()
private static long[]
mk_tokenSet_35()
private static long[]
mk_tokenSet_36()
private static long[]
mk_tokenSet_37()
private static long[]
mk_tokenSet_38()
private static long[]
mk_tokenSet_39()
private static long[]
mk_tokenSet_4()
private static long[]
mk_tokenSet_40()
private static long[]
mk_tokenSet_41()
private static long[]
mk_tokenSet_42()
private static long[]
mk_tokenSet_43()
private static long[]
mk_tokenSet_44()
private static long[]
mk_tokenSet_45()
private static long[]
mk_tokenSet_46()
private static long[]
mk_tokenSet_47()
private static long[]
mk_tokenSet_48()
private static long[]
mk_tokenSet_49()
private static long[]
mk_tokenSet_5()
private static long[]
mk_tokenSet_50()
private static long[]
mk_tokenSet_51()
private static long[]
mk_tokenSet_6()
private static long[]
mk_tokenSet_7()
private static long[]
mk_tokenSet_8()
private static long[]
mk_tokenSet_9()
void
notSet()
void
notTerminal()
void
option(java.util.Map opts)
java.util.Map
optionsSpec()
java.lang.Object
optionValue()
protected void
prefixWithSynPred(GrammarAST alt)
Rewrite alt to have a synpred as first element; (xxx)=>xxx but only if they didn't specify one manually.void
range()
void
reportError(antlr.RecognitionException ex)
void
rewrite()
void
rewrite_alternative()
void
rewrite_atom()
void
rewrite_block()
void
rewrite_ebnf()
void
rewrite_element()
void
rewrite_indirect_template_head()
-> ({expr})(a={...}, ...)void
rewrite_template()
Build a tree for a template rewrite: ^(TEMPLATE (ID|ACTION) ^(ARGLIST ^(ARG ID ACTION) ...) ) where ARGLIST is always there even if no args exist.void
rewrite_template_arg()
void
rewrite_template_args()
void
rewrite_template_head()
-> foo(a={...}, ...)void
rewrite_tree()
void
rule()
void
ruleAction()
Match stuff like @init {int i;}void
ruleActions()
void
ruleref()
void
rules()
void
ruleScopeSpec()
void
setGrammar(Grammar grammar)
void
setGtype(int gtype)
protected GrammarAST
setToBlockWithSet(GrammarAST b)
void
terminal()
void
throwsSpec()
void
tokenSpec()
void
tokensSpec()
void
tree()
void
treeRoot()
-
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
-
-
-
-
Field Detail
-
grammar
protected Grammar grammar
-
gtype
protected int gtype
-
currentRuleName
protected java.lang.String currentRuleName
-
currentBlockAST
protected GrammarAST currentBlockAST
-
atTreeRoot
protected boolean atTreeRoot
-
_tokenNames
public static final java.lang.String[] _tokenNames
-
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
-
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
-
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
-
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
-
_tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_4
-
_tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_5
-
_tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_6
-
_tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_7
-
_tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_8
-
_tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_9
-
_tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_10
-
_tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_11
-
_tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_12
-
_tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_13
-
_tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_14
-
_tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_15
-
_tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_16
-
_tokenSet_17
public static final antlr.collections.impl.BitSet _tokenSet_17
-
_tokenSet_18
public static final antlr.collections.impl.BitSet _tokenSet_18
-
_tokenSet_19
public static final antlr.collections.impl.BitSet _tokenSet_19
-
_tokenSet_20
public static final antlr.collections.impl.BitSet _tokenSet_20
-
_tokenSet_21
public static final antlr.collections.impl.BitSet _tokenSet_21
-
_tokenSet_22
public static final antlr.collections.impl.BitSet _tokenSet_22
-
_tokenSet_23
public static final antlr.collections.impl.BitSet _tokenSet_23
-
_tokenSet_24
public static final antlr.collections.impl.BitSet _tokenSet_24
-
_tokenSet_25
public static final antlr.collections.impl.BitSet _tokenSet_25
-
_tokenSet_26
public static final antlr.collections.impl.BitSet _tokenSet_26
-
_tokenSet_27
public static final antlr.collections.impl.BitSet _tokenSet_27
-
_tokenSet_28
public static final antlr.collections.impl.BitSet _tokenSet_28
-
_tokenSet_29
public static final antlr.collections.impl.BitSet _tokenSet_29
-
_tokenSet_30
public static final antlr.collections.impl.BitSet _tokenSet_30
-
_tokenSet_31
public static final antlr.collections.impl.BitSet _tokenSet_31
-
_tokenSet_32
public static final antlr.collections.impl.BitSet _tokenSet_32
-
_tokenSet_33
public static final antlr.collections.impl.BitSet _tokenSet_33
-
_tokenSet_34
public static final antlr.collections.impl.BitSet _tokenSet_34
-
_tokenSet_35
public static final antlr.collections.impl.BitSet _tokenSet_35
-
_tokenSet_36
public static final antlr.collections.impl.BitSet _tokenSet_36
-
_tokenSet_37
public static final antlr.collections.impl.BitSet _tokenSet_37
-
_tokenSet_38
public static final antlr.collections.impl.BitSet _tokenSet_38
-
_tokenSet_39
public static final antlr.collections.impl.BitSet _tokenSet_39
-
_tokenSet_40
public static final antlr.collections.impl.BitSet _tokenSet_40
-
_tokenSet_41
public static final antlr.collections.impl.BitSet _tokenSet_41
-
_tokenSet_42
public static final antlr.collections.impl.BitSet _tokenSet_42
-
_tokenSet_43
public static final antlr.collections.impl.BitSet _tokenSet_43
-
_tokenSet_44
public static final antlr.collections.impl.BitSet _tokenSet_44
-
_tokenSet_45
public static final antlr.collections.impl.BitSet _tokenSet_45
-
_tokenSet_46
public static final antlr.collections.impl.BitSet _tokenSet_46
-
_tokenSet_47
public static final antlr.collections.impl.BitSet _tokenSet_47
-
_tokenSet_48
public static final antlr.collections.impl.BitSet _tokenSet_48
-
_tokenSet_49
public static final antlr.collections.impl.BitSet _tokenSet_49
-
_tokenSet_50
public static final antlr.collections.impl.BitSet _tokenSet_50
-
_tokenSet_51
public static final antlr.collections.impl.BitSet _tokenSet_51
-
-
Constructor Detail
-
ANTLRParser
protected ANTLRParser(antlr.TokenBuffer tokenBuf, int k)
-
ANTLRParser
public ANTLRParser(antlr.TokenBuffer tokenBuf)
-
ANTLRParser
protected ANTLRParser(antlr.TokenStream lexer, int k)
-
ANTLRParser
public ANTLRParser(antlr.TokenStream lexer)
-
ANTLRParser
public ANTLRParser(antlr.ParserSharedInputState state)
-
-
Method Detail
-
getGrammar
public Grammar getGrammar()
-
setGrammar
public void setGrammar(Grammar grammar)
-
getGtype
public int getGtype()
-
setGtype
public void setGtype(int gtype)
-
setToBlockWithSet
protected GrammarAST setToBlockWithSet(GrammarAST b)
-
createBlockFromDupAlt
protected GrammarAST createBlockFromDupAlt(GrammarAST alt)
Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed.
-
prefixWithSynPred
protected void prefixWithSynPred(GrammarAST alt)
Rewrite alt to have a synpred as first element; (xxx)=>xxx but only if they didn't specify one manually.
-
createSynSemPredFromBlock
protected GrammarAST createSynSemPredFromBlock(GrammarAST synpredBlockAST, int synpredTokenType)
-
createSimpleRuleAST
public GrammarAST createSimpleRuleAST(java.lang.String name, GrammarAST block, boolean fragment)
-
reportError
public void reportError(antlr.RecognitionException ex)
- Overrides:
reportError
in classantlr.Parser
-
cleanup
public void cleanup(GrammarAST root)
-
grammar
public final void grammar(Grammar g) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
grammarType
public final void grammarType() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
id
public final void id() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
optionsSpec
public final java.util.Map optionsSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
delegateGrammars
public final void delegateGrammars() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
tokensSpec
public final void tokensSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
attrScopes
public final void attrScopes() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
actions
public final void actions() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rules
public final void rules() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
action
public final void action() throws antlr.RecognitionException, antlr.TokenStreamException
Match stuff like @parser::members {int i;}- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
actionScopeName
public final void actionScopeName() throws antlr.RecognitionException, antlr.TokenStreamException
Sometimes the scope names will collide with keywords; allow them as ids for action scopes.- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
option
public final void option(java.util.Map opts) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
optionValue
public final java.lang.Object optionValue() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
delegateGrammar
public final void delegateGrammar() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
tokenSpec
public final void tokenSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
attrScope
public final void attrScope() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rule
public final void rule() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
throwsSpec
public final void throwsSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ruleScopeSpec
public final void ruleScopeSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ruleActions
public final void ruleActions() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
altList
public final void altList(java.util.Map opts) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
exceptionGroup
public final void exceptionGroup() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ruleAction
public final void ruleAction() throws antlr.RecognitionException, antlr.TokenStreamException
Match stuff like @init {int i;}- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
idList
public final void idList() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
block
public final void block() throws antlr.RecognitionException, antlr.TokenStreamException
Build #(BLOCK ( #(ALT ...) EOB )+ )- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
alternative
public final void alternative() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite
public final void rewrite() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
element
public final void element() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
exceptionHandler
public final void exceptionHandler() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
finallyClause
public final void finallyClause() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
elementNoOptionSpec
public final void elementNoOptionSpec() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
atom
public final void atom() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ebnfSuffix
public final GrammarAST ebnfSuffix(GrammarAST elemAST, boolean inRewrite) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ebnf
public final void ebnf() throws antlr.RecognitionException, antlr.TokenStreamException
matches ENBF blocks (and sets via block rule)- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
tree
public final void tree() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
range
public final void range() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
terminal
public final void terminal() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
ruleref
public final void ruleref() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
notSet
public final void notSet() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
notTerminal
public final void notTerminal() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
treeRoot
public final void treeRoot() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
elementOptions
public final void elementOptions(GrammarAST terminalAST) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
defaultNodeOption
public final void defaultNodeOption(GrammarAST terminalAST) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
elementOption
public final void elementOption(GrammarAST terminalAST) throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_alternative
public final void rewrite_alternative() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_block
public final void rewrite_block() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_template
public final void rewrite_template() throws antlr.RecognitionException, antlr.TokenStreamException
Build a tree for a template rewrite: ^(TEMPLATE (ID|ACTION) ^(ARGLIST ^(ARG ID ACTION) ...) ) where ARGLIST is always there even if no args exist. ID can be "template" keyword. If first child is ACTION then it's an indirect template ref -> foo(a={...}, b={...}) -> ({string-e})(a={...}, b={...}) // e evaluates to template name -> {%{$ID.text}} // create literal template from string (done in ActionTranslator) -> {st-expr} // st-expr evaluates to ST- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_element
public final void rewrite_element() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_atom
public final void rewrite_atom() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_ebnf
public final void rewrite_ebnf() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_tree
public final void rewrite_tree() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_template_head
public final void rewrite_template_head() throws antlr.RecognitionException, antlr.TokenStreamException
-> foo(a={...}, ...)- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_indirect_template_head
public final void rewrite_indirect_template_head() throws antlr.RecognitionException, antlr.TokenStreamException
-> ({expr})(a={...}, ...)- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_template_args
public final void rewrite_template_args() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
rewrite_template_arg
public final void rewrite_template_arg() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
buildTokenTypeASTClassMap
protected void buildTokenTypeASTClassMap()
-
mk_tokenSet_0
private static final long[] mk_tokenSet_0()
-
mk_tokenSet_1
private static final long[] mk_tokenSet_1()
-
mk_tokenSet_2
private static final long[] mk_tokenSet_2()
-
mk_tokenSet_3
private static final long[] mk_tokenSet_3()
-
mk_tokenSet_4
private static final long[] mk_tokenSet_4()
-
mk_tokenSet_5
private static final long[] mk_tokenSet_5()
-
mk_tokenSet_6
private static final long[] mk_tokenSet_6()
-
mk_tokenSet_7
private static final long[] mk_tokenSet_7()
-
mk_tokenSet_8
private static final long[] mk_tokenSet_8()
-
mk_tokenSet_9
private static final long[] mk_tokenSet_9()
-
mk_tokenSet_10
private static final long[] mk_tokenSet_10()
-
mk_tokenSet_11
private static final long[] mk_tokenSet_11()
-
mk_tokenSet_12
private static final long[] mk_tokenSet_12()
-
mk_tokenSet_13
private static final long[] mk_tokenSet_13()
-
mk_tokenSet_14
private static final long[] mk_tokenSet_14()
-
mk_tokenSet_15
private static final long[] mk_tokenSet_15()
-
mk_tokenSet_16
private static final long[] mk_tokenSet_16()
-
mk_tokenSet_17
private static final long[] mk_tokenSet_17()
-
mk_tokenSet_18
private static final long[] mk_tokenSet_18()
-
mk_tokenSet_19
private static final long[] mk_tokenSet_19()
-
mk_tokenSet_20
private static final long[] mk_tokenSet_20()
-
mk_tokenSet_21
private static final long[] mk_tokenSet_21()
-
mk_tokenSet_22
private static final long[] mk_tokenSet_22()
-
mk_tokenSet_23
private static final long[] mk_tokenSet_23()
-
mk_tokenSet_24
private static final long[] mk_tokenSet_24()
-
mk_tokenSet_25
private static final long[] mk_tokenSet_25()
-
mk_tokenSet_26
private static final long[] mk_tokenSet_26()
-
mk_tokenSet_27
private static final long[] mk_tokenSet_27()
-
mk_tokenSet_28
private static final long[] mk_tokenSet_28()
-
mk_tokenSet_29
private static final long[] mk_tokenSet_29()
-
mk_tokenSet_30
private static final long[] mk_tokenSet_30()
-
mk_tokenSet_31
private static final long[] mk_tokenSet_31()
-
mk_tokenSet_32
private static final long[] mk_tokenSet_32()
-
mk_tokenSet_33
private static final long[] mk_tokenSet_33()
-
mk_tokenSet_34
private static final long[] mk_tokenSet_34()
-
mk_tokenSet_35
private static final long[] mk_tokenSet_35()
-
mk_tokenSet_36
private static final long[] mk_tokenSet_36()
-
mk_tokenSet_37
private static final long[] mk_tokenSet_37()
-
mk_tokenSet_38
private static final long[] mk_tokenSet_38()
-
mk_tokenSet_39
private static final long[] mk_tokenSet_39()
-
mk_tokenSet_40
private static final long[] mk_tokenSet_40()
-
mk_tokenSet_41
private static final long[] mk_tokenSet_41()
-
mk_tokenSet_42
private static final long[] mk_tokenSet_42()
-
mk_tokenSet_43
private static final long[] mk_tokenSet_43()
-
mk_tokenSet_44
private static final long[] mk_tokenSet_44()
-
mk_tokenSet_45
private static final long[] mk_tokenSet_45()
-
mk_tokenSet_46
private static final long[] mk_tokenSet_46()
-
mk_tokenSet_47
private static final long[] mk_tokenSet_47()
-
mk_tokenSet_48
private static final long[] mk_tokenSet_48()
-
mk_tokenSet_49
private static final long[] mk_tokenSet_49()
-
mk_tokenSet_50
private static final long[] mk_tokenSet_50()
-
mk_tokenSet_51
private static final long[] mk_tokenSet_51()
-
-