|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectantlr.TreeParser
org.antlr.grammar.v2.TreeToNFAConverter
public class TreeToNFAConverter
Build an NFA from a tree representing an ANTLR grammar.
| Field Summary | |
|---|---|
static java.lang.String[] |
_tokenNames
|
static antlr.collections.impl.BitSet |
_tokenSet_0
|
protected int |
blockLevel
|
protected java.lang.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
|
| Fields inherited from class antlr.TreeParser |
|---|
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth |
| Constructor Summary | |
|---|---|
TreeToNFAConverter()
|
|
TreeToNFAConverter(Grammar g,
NFA nfa,
NFAFactory factory)
|
|
| Method Summary | |
|---|---|
protected void |
addFollowTransition(java.lang.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,
java.lang.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)
|
| Methods inherited from class antlr.TreeParser |
|---|
getAST, getASTFactory, getTokenName, getTokenNames, match, match, matchNot, panic, reportError, reportWarning, setASTFactory, setASTNodeClass, setASTNodeType, traceIn, traceIndent, traceOut |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected NFAFactory factory
protected NFA nfa
protected Grammar grammar
protected java.lang.String currentRuleName
protected int outerAltNum
protected int blockLevel
public static final java.lang.String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
| Constructor Detail |
|---|
public TreeToNFAConverter(Grammar g,
NFA nfa,
NFAFactory factory)
public TreeToNFAConverter()
| Method Detail |
|---|
protected void addFollowTransition(java.lang.String ruleName,
NFAState following)
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,
java.lang.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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||