public abstract class ProductionRule extends Object
Modifier and Type | Field and Description |
---|---|
private Condition |
condition
What must be true for this rule to be true
|
private Set<String> |
matchReferences
The set of match name Strings which the production part of this rule references
|
private ProductionList |
production
What is produced when this rule is true
|
Constructor and Description |
---|
ProductionRule() |
Modifier and Type | Method and Description |
---|---|
private boolean |
conditionIsEllipsAndOtherNameSpacesOnly(Condition condition) |
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.
|
private Condition condition
private ProductionList production
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()
private boolean conditionIsEllipsAndOtherNameSpacesOnly(Condition condition)
Copyright © 2018. All rights reserved.