|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.parser.AbstractParser
agg.parser.SimpleParser
public class SimpleParser
This class provides a parser which works without critical pair analysis. So a simple backtracking algorithm is implemented.
createParser(...)
Field Summary | |
---|---|
protected boolean |
correct
|
protected boolean |
stop
|
Fields inherited from class agg.parser.AbstractParser |
---|
delay, grammar, graph, listener, pairContainer, stopGraph |
Constructor Summary | |
---|---|
SimpleParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph)
Created a new parser. |
Method Summary | |
---|---|
boolean |
parse()
Starts the parser. |
void |
run()
Usually this method is invoked by the start method from the class Thread . |
void |
stop()
Stops the running. |
boolean |
wasStopped()
|
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 |
Field Detail |
---|
protected boolean stop
protected boolean correct
Constructor Detail |
---|
public SimpleParser(GraGra grammar, Graph hostGraph, Graph stopGraph)
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.Method Detail |
---|
public void run()
Thread
.
This method starts the parser.
run
in interface java.lang.Runnable
public void stop()
public boolean wasStopped()
public boolean parse()
parse
in interface Parser
parse
in class AbstractParser
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |