|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Visitor
xtc.parser.LeftRecurser
public class LeftRecurser
Visitor to detect left-recursion in a grammar.
This visitor requires that text-only productionshave been marked as such.
| Field Summary | |
|---|---|
protected Analyzer |
analyzer
The analyzer utility. |
protected Runtime |
runtime
The runtime. |
protected boolean |
terminated
The flag for whether we have seen a terminal. |
| Constructor Summary | |
|---|---|
LeftRecurser(Runtime runtime,
Analyzer analyzer)
Create a new left-recurser. |
|
| Method Summary | |
|---|---|
java.util.Set<NonTerminal> |
recursive()
Get the set of nonterminals corresponding to left-recursive productions. |
void |
visit(Binding b)
Visit the specified binding. |
void |
visit(Element e)
Visit the specified element. |
void |
visit(FullProduction p)
Visit the specified production. |
void |
visit(Grammar g)
Visit the specified grammar. |
void |
visit(Module m)
Visit the specified self-contained module. |
void |
visit(NonTerminal nt)
Visit the specified nonterminal. |
void |
visit(OrderedChoice c)
Visit the specified ordered choice. |
void |
visit(ParserAction pa)
Visit the specified parser action. |
void |
visit(Repetition r)
Visit the specified repetition. |
void |
visit(Sequence s)
Visit the specified sequence. |
void |
visit(StringMatch m)
Visit the specified string match. |
void |
visit(Terminal t)
Visit the specified terminal. |
void |
visit(UnaryOperator op)
Visit the specified unary operator. |
void |
visit(VoidedElement v)
Visit the specified voided element. |
| Methods inherited from class xtc.tree.Visitor |
|---|
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Runtime runtime
protected final Analyzer analyzer
protected boolean terminated
| Constructor Detail |
|---|
public LeftRecurser(Runtime runtime,
Analyzer analyzer)
runtime - The runtime.analyzer - The analyzer utility.| Method Detail |
|---|
public java.util.Set<NonTerminal> recursive()
public void visit(Grammar g)
public void visit(Module m)
public void visit(FullProduction p)
public void visit(OrderedChoice c)
public void visit(Repetition r)
public void visit(Sequence s)
public void visit(VoidedElement v)
public void visit(Binding b)
public void visit(StringMatch m)
public void visit(NonTerminal nt)
public void visit(Terminal t)
public void visit(UnaryOperator op)
public void visit(ParserAction pa)
public void visit(Element e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||