agg.parser
Class LayeredExcludeParser

java.lang.Object
  extended by agg.parser.AbstractParser
      extended by agg.parser.ExcludeParser
          extended by 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
 
Fields inherited from class agg.parser.ExcludeParser
correct, stack, stop
 
Fields inherited from class agg.parser.AbstractParser
delay, grammar, graph, listener, pairContainer, stopGraph
 
Constructor Summary
LayeredExcludeParser(GraGra grammar, Graph hostGraph, Graph stopGraph, LayeredExcludePairContainer excludeContainer, LayerFunction layer)
          Deprecated.  
LayeredExcludeParser(GraGra grammar, Graph hostGraph, Graph stopGraph, LayeredExcludePairContainer excludeContainer, RuleLayer layer)
          Creates a new parser.
 
Method Summary
 boolean parse()
          Starts the parser.
 
Methods inherited from class agg.parser.ExcludeParser
finalize, findInclusions, isMatchCritic, makeLightContainer, run, stop, wasStopped
 
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
 

Field Detail

layer

protected RuleLayer layer
The layer function for the parser

Constructor Detail

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 pairs
layer - 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
Method Detail

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.