|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Visitor
xtc.parser.Annotator.Detector
public class Annotator.Detector
A visitor to detect whether productions need to be rewritten. This visitor detects non-left-recursive generic or list-valued productions that contain:
Properties.SPLIT property. For each (flattened) alternative
that contains any of the two cases, it also annotates the last
sequence with a Annotator.IndexPair. The first index is
non-negative for the first case. The second index is
non-negative for the second case.
| Field Summary | |
|---|---|
protected java.util.List<Element> |
elements
The list of elements. |
protected boolean |
needToSplit
The flag for whether the production needs to be split. |
| Constructor Summary | |
|---|---|
Annotator.Detector()
Create a new detector. |
|
| Method Summary | |
|---|---|
void |
visit(FullProduction p)
Visit the specified production. |
void |
visit(Module m)
Visit the specified module. |
void |
visit(OrderedChoice c)
Visit the specified choice. |
void |
visit(Sequence s)
Visit the specified sequence. |
| 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 boolean needToSplit
protected java.util.List<Element> elements
| Constructor Detail |
|---|
public Annotator.Detector()
| Method Detail |
|---|
public void visit(Module m)
public void visit(FullProduction p)
public void visit(OrderedChoice c)
public void visit(Sequence s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||