xtc.parser
Class TransientMarker

java.lang.Object
  extended by xtc.tree.Visitor
      extended by xtc.parser.GrammarVisitor
          extended by xtc.parser.TransientMarker

public class TransientMarker
extends GrammarVisitor

Visitor to detect productions that can be treated as transient.

Note that this visitor requires that a grammar's productions have been reference counted. Further note that this visitor assumes that the entire grammar is contained in a single module.

Version:
$Revision: 1.22 $
Author:
Robert Grimm

Field Summary
 
Fields inherited from class xtc.parser.GrammarVisitor
analyzer, isBound, isLastElement, isPredicate, isRepeatedOnce, isTopLevel, isVoided, needsSequence, runtime, transformInPlace
 
Constructor Summary
TransientMarker(Runtime runtime, Analyzer analyzer)
          Create a new transient marker.
 
Method Summary
 java.lang.Object visit(Module m)
          Visit the specified grammar.
 
Methods inherited from class xtc.parser.GrammarVisitor
visit, visit, 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

TransientMarker

public TransientMarker(Runtime runtime,
                       Analyzer analyzer)
Create a new transient marker.

Parameters:
runtime - The runtime.
analyzer - The analyzer utility.
Method Detail

visit

public java.lang.Object visit(Module m)
Visit the specified grammar.

Overrides:
visit in class GrammarVisitor
Parameters:
m - The grammar module.
Returns:
Boolean.TRUE if the grammar has been modified, otherwise Boolean.FALSE.


Copyright © 2012. All Rights Reserved.