Package net.emustudio.edigen.passes
Class RemoveUnreachablePatternsVisitor
- java.lang.Object
-
- net.emustudio.edigen.Visitor
-
- net.emustudio.edigen.passes.RemoveUnreachablePatternsVisitor
-
public class RemoveUnreachablePatternsVisitor extends Visitor
A visitor which removes patterns which are children of zero-only masks.This represents the fact that masks containing only zeroes do not require comparing with the pattern because the result is always true.
-
-
Constructor Summary
Constructors Constructor Description RemoveUnreachablePatternsVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvisit(Mask mask)Removes the child pattern if the mask contains only zeroes.
-
-
-
Method Detail
-
visit
public void visit(Mask mask) throws SemanticException
Removes the child pattern if the mask contains only zeroes.- Overrides:
visitin classVisitor- Parameters:
mask- the mask node- Throws:
SemanticException- never
-
-