public abstract class ProductionRule extends Object
Constructor and Description |
---|
ProductionRule() |
Modifier and Type | Method and Description |
---|---|
Condition |
getCondition() |
ProductionList |
getProduction() |
protected abstract String |
getSymbol()
Returns the symbol of this production rule.
|
boolean |
isLoop()
Returns true if it is known that this rule matches its own output.
|
void |
makeReferences(RuleBase rules) |
boolean |
matches(RuleEvaluation e)
Returns whether this rule matches the given query
|
Set<String> |
matchReferences()
Returns the set of context names the production of this rule references
|
void |
produce(RuleEvaluation e)
Carries out the production of this rule
|
void |
setCondition(Condition condition)
Sets what must be true for this rule to be true
|
void |
setProduction(ProductionList production)
Sets what is produced when this rule is true
|
String |
toString()
Returns the canonical string representation of this rule.
|
public void setCondition(Condition condition)
public Condition getCondition()
public void setProduction(ProductionList production)
public ProductionList getProduction()
public boolean matches(RuleEvaluation e)
public Set<String> matchReferences()
public void makeReferences(RuleBase rules)
public void produce(RuleEvaluation e)
public String toString()
protected abstract String getSymbol()
condition symbol production
.public boolean isLoop()
Copyright © 2018. All rights reserved.