agg.parser
Class LayeredExcludeParser
java.lang.Object
agg.parser.AbstractParser
agg.parser.ExcludeParser
agg.parser.LayeredExcludeParser
- All Implemented Interfaces:
- Parser, java.lang.Runnable
- Direct Known Subclasses:
- LayeredSimpleExcludeParser
public class LayeredExcludeParser
- extends ExcludeParser
This class provides a parser which needs critical pairs. The criticl pair
must be LayeredExcludePair
. So objects has to be instaciated
with LayeredExcludePairContainer
. To be independent of a
grammar it is necessary to instanciate a object with a host graph and stop
graph seperately.
Field Summary |
protected RuleLayer |
layer
The layer function for the parser |
Method Summary |
boolean |
parse()
Starts the parser. |
Methods inherited from class agg.parser.AbstractParser |
addParserEventListener, applyRule, findMatch, findMatch, fireParserEvent, getGraph, getHostGraph, getStopGraph, parseString, printGraph, printImageGraph, removeParserEventListener, setCriticalPairs, setDelayAfterApplyRule, setGrammar, setHostGraph, setStopGraph |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
layer
protected RuleLayer layer
- The layer function for the parser
LayeredExcludeParser
public LayeredExcludeParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph,
LayeredExcludePairContainer excludeContainer,
LayerFunction layer)
- Deprecated.
- Creates a new parser. This parser uses critical pair analysis for
optimized parsing. Additionaly layered graph grammars provides more
efficiency.
- Parameters:
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.excludeContainer
- The critical pairslayer
- The layer function
LayeredExcludeParser
public LayeredExcludeParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph,
LayeredExcludePairContainer excludeContainer,
RuleLayer layer)
- Creates a new parser. This parser uses critical pair analysis for
optimized parsing. Additionaly layered graph grammars provides more
efficiency.
- Parameters:
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.excludeContainer
- The critical pairs
parse
public boolean parse()
- Starts the parser.
- Specified by:
parse
in interface Parser
- Overrides:
parse
in class ExcludeParser
- Returns:
- true if the graph can be parsed.