xtc.parser
Class Annotator.Rewriter

java.lang.Object
  extended by xtc.tree.Visitor
      extended by xtc.parser.Annotator.Rewriter
Enclosing class:
Annotator

public class Annotator.Rewriter
extends Visitor

A visitor to rewrite productions. This visitor rewrites productions that have been marked with the Properties.SPLIT property to generate the same basic AST with annotations as without annotations.

See Also:
Annotator.Detector

Field Summary
protected  Sequence alternative
          The current top-level alternative.
protected  java.util.List<Element> elements
          The list of elements.
protected  boolean isTopLevel
          The flag for whether the current choice is top-level.
protected  java.util.List<Sequence> replacements
          The list of replacement sequences.
 
Constructor Summary
Annotator.Rewriter()
          Create a new rewriter.
 
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

elements

protected java.util.List<Element> elements
The list of elements.


isTopLevel

protected boolean isTopLevel
The flag for whether the current choice is top-level.


alternative

protected Sequence alternative
The current top-level alternative.


replacements

protected java.util.List<Sequence> replacements
The list of replacement sequences.

Constructor Detail

Annotator.Rewriter

public Annotator.Rewriter()
Create a new rewriter.

Method Detail

visit

public void visit(Module m)
Visit the specified module.


visit

public void visit(FullProduction p)
Visit the specified production.


visit

public void visit(OrderedChoice c)
Visit the specified choice.


visit

public void visit(Sequence s)
Visit the specified sequence.



Copyright © 2012. All Rights Reserved.