|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Visitor
xtc.parser.GrammarVisitor
xtc.parser.ProductionVoider
public class ProductionVoider
Visitor to turn the semantic value of a production to void. This visitor converts non-void productions whose semantic values are never bound to void productions. As a practical matter, it only converts productions that do not contain (parser) actions.
This visitor assumes that the entire grammar is contained in a single module.
| Nested Class Summary | |
|---|---|
static class |
ProductionVoider.Tester
Visitor to determine which productions are voidable. |
| Field Summary |
|---|
| Fields inherited from class xtc.parser.GrammarVisitor |
|---|
analyzer, isBound, isLastElement, isPredicate, isRepeatedOnce, isTopLevel, isVoided, needsSequence, runtime, transformInPlace |
| Constructor Summary | |
|---|---|
ProductionVoider(Runtime runtime,
Analyzer analyzer)
Create a new production voider. |
|
| Method Summary | |
|---|---|
Element |
visit(Binding b)
Visit the specified binding. |
java.lang.Object |
visit(Module m)
Visit the specified grammar. |
Element |
visit(ValueElement e)
Visit the specified value element. |
Element |
visit(VoidedElement v)
Visit the specified voided element. |
| Methods inherited from class xtc.parser.GrammarVisitor |
|---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
| 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 |
| Constructor Detail |
|---|
public ProductionVoider(Runtime runtime,
Analyzer analyzer)
runtime - The runtime.analyzer - The analyzer utility.| Method Detail |
|---|
public java.lang.Object visit(Module m)
visit in class GrammarVisitorpublic Element visit(VoidedElement v)
visit in class GrammarVisitorpublic Element visit(Binding b)
visit in class GrammarVisitorpublic Element visit(ValueElement e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||