agg.parser
Class LayeredSimpleParser
java.lang.Object
agg.parser.AbstractParser
agg.parser.SimpleParser
agg.parser.LayeredSimpleParser
- All Implemented Interfaces:
- Parser, java.lang.Runnable
public class LayeredSimpleParser
- extends SimpleParser
This class provides a parser which works without critical pair analysis. So a
simple backtracking algorithm is implemented. The only optimization can made
by the layer function.
- See Also:
createParser(...)
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, finalize, 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.
LayeredSimpleParser
public LayeredSimpleParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph,
LayerFunction layer)
- Deprecated.
- Creates a new parser.
- Parameters:
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.layer
- The layer function.
LayeredSimpleParser
public LayeredSimpleParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph,
RuleLayer layer)
- Creates a new parser.
- Parameters:
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.
parse
public boolean parse()
- Starts the parser.
- Specified by:
parse
in interface Parser
- Overrides:
parse
in class SimpleParser
- Returns:
- true if the graph can be parsed.