- All Implemented Interfaces:
- java.io.Serializable, java.util.function.Predicate<Tree>
public class FilterConfusingRules
extends java.lang.Object
implements java.util.function.Predicate<Tree>, java.io.Serializable
This filter rejects Trees which have unary or binary productions
which the given parser does not contain.
One situation where this happens often is when grammar compaction
is turned on; this can often result in a Tree where there is no
BinaryRule which could explicitely create a particular node, but
the Tree is still valid. However, for various applications of the
DVParser, this kind of Tree is useless. A good way to eliminate
most of this kind of tree is to make sure the parser is trained
with -compactGrammar 0
.
- See Also:
- Serialized Form