dk.brics.servletvalidator
Class UselessProductionRemovalVisitor

java.lang.Object
  extended by dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
      extended by dk.brics.servletvalidator.UselessProductionRemovalVisitor
All Implemented Interfaces:
GrammarEntityVisitor

public class UselessProductionRemovalVisitor
extends AbstractGrammarEntityVisitor

Removes useless productions from a Grammar using the algorithm described in [JüDode]


Field Summary
 
Fields inherited from class dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
marked
 
Constructor Summary
UselessProductionRemovalVisitor()
           
 
Method Summary
 void apply(Grammar g)
           
 boolean shouldPrettyPrint()
          If this method returns true the grammar will be printed to debug after the visitor has run
 
Methods inherited from class dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
apply, apply, apply, getPath, in, in, in, isMarked, mark, out, out, out, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UselessProductionRemovalVisitor

public UselessProductionRemovalVisitor()
Method Detail

apply

public void apply(Grammar g)
Specified by:
apply in interface GrammarEntityVisitor
Overrides:
apply in class AbstractGrammarEntityVisitor

shouldPrettyPrint

public boolean shouldPrettyPrint()
Description copied from class: AbstractGrammarEntityVisitor
If this method returns true the grammar will be printed to debug after the visitor has run

Specified by:
shouldPrettyPrint in interface GrammarEntityVisitor
Overrides:
shouldPrettyPrint in class AbstractGrammarEntityVisitor


Copyright © 2008 Mathias Schwarz.