public class TreeToNFAConverter extends antlr.TreeParser implements TreeToNFAConverterTokenTypes
Modifier and Type | Field and Description |
---|---|
static String[] |
_tokenNames |
static antlr.collections.impl.BitSet |
_tokenSet_0 |
protected int |
blockLevel |
protected String |
currentRuleName |
protected NFAFactory |
factory
Factory used to create nodes and submachines
|
protected Grammar |
grammar
Which grammar are we converting an NFA for?
|
protected NFA |
nfa
Which NFA object are we filling in?
|
protected int |
outerAltNum |
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth
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 and Description |
---|
TreeToNFAConverter() |
TreeToNFAConverter(Grammar g,
NFA nfa,
NFAFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFollowTransition(String ruleName,
NFAState following) |
StateCluster |
alternative(antlr.collections.AST _t) |
void |
ast_suffix(antlr.collections.AST _t) |
StateCluster |
atom_or_notatom(antlr.collections.AST _t) |
StateCluster |
atom(antlr.collections.AST _t,
String scopeName) |
void |
attrScope(antlr.collections.AST _t) |
StateCluster |
block(antlr.collections.AST _t) |
StateCluster |
ebnf(antlr.collections.AST _t) |
StateCluster |
element(antlr.collections.AST _t) |
void |
exceptionGroup(antlr.collections.AST _t) |
void |
exceptionHandler(antlr.collections.AST _t) |
void |
finallyClause(antlr.collections.AST _t) |
protected void |
finish() |
void |
grammar(antlr.collections.AST _t) |
void |
grammarSpec(antlr.collections.AST _t) |
void |
modifier(antlr.collections.AST _t) |
void |
reportError(antlr.RecognitionException ex) |
void |
rewrite(antlr.collections.AST _t) |
void |
rule(antlr.collections.AST _t) |
void |
rules(antlr.collections.AST _t) |
void |
ruleScopeSpec(antlr.collections.AST _t) |
StateCluster |
set(antlr.collections.AST _t) |
void |
setElement(antlr.collections.AST _t,
IntSet elements) |
IntSet |
setRule(antlr.collections.AST _t) |
void |
testBlockAsSet(antlr.collections.AST _t)
Check to see if this block can be a set.
|
void |
testSetElement(antlr.collections.AST _t)
Match just an element; no ast suffix etc..
|
void |
testSetRule(antlr.collections.AST _t) |
StateCluster |
tree(antlr.collections.AST _t) |
protected NFAFactory factory
protected NFA nfa
protected Grammar grammar
protected String currentRuleName
protected int outerAltNum
protected int blockLevel
public static final String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public TreeToNFAConverter(Grammar g, NFA nfa, NFAFactory factory)
public TreeToNFAConverter()
protected void finish()
public void reportError(antlr.RecognitionException ex)
reportError
in class antlr.TreeParser
public final void grammar(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void grammarSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void attrScope(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rules(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rule(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void modifier(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ruleScopeSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster block(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void exceptionGroup(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster set(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster alternative(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rewrite(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster element(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void exceptionHandler(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void finallyClause(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster atom(antlr.collections.AST _t, String scopeName) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster atom_or_notatom(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster ebnf(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final StateCluster tree(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ast_suffix(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void setElement(antlr.collections.AST _t, IntSet elements) throws antlr.RecognitionException
antlr.RecognitionException
public final IntSet setRule(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void testBlockAsSet(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void testSetElement(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void testSetRule(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
Copyright © 2020. All rights reserved.