See: Description
The main-class is GeneralMaterializationStrategy
which is the only class which should be called from outside.
The GeneralMaterializationStrategy gets two components from outside to configure
the materialization prozess (e.g. to adapt the process to handle indexed grammars).
The first component is a MaterializationRuleManager
this component is responsible for choosing the correct rules to apply for a given
violation point.
Choose DefaultMaterializationRuleManager
if you have only basic grammars and
IndexedMaterializationRuleManager for
indexed or mixed grammars.
The MaterializationRuleManager itself gets a ViolationPointResolver
which is responsible to get and cache the rules resolving a specific violation point.
An IndexedMaterializationRuleManager
additionally gets a IndexMatcher which ensures that
indexed rules are instantiated appropriately and that also provides the necessary materialization
whichh has to be applied before applying the rule graph.
The second component of the GeneralMaterializationStrategy
is a GrammarResponseApplier. It is
responsible for materializing the graph with the rules determined by the MaterializationRuleManager.
The DefaultGrammarResponseApplier consists
only of a GraphMaterializer which replaces
the nonterminal by the rule graph. The IndexedGrammarResponseApplier
additionally consists of a IndexMaterializationStrategy
which applies the materilaization to indices.
Note that you may get an error if you combine an IndexedMaterializationRuleManager
with a DefaultGrammarResponseApplier since
the latter is not able to handle the response of the first.
Copyright © 2018. All rights reserved.