com.turtle3d.formallanguage.grammar
Class ProductionFamily
java.lang.Object
com.turtle3d.formallanguage.grammar.ProductionFamily
public class ProductionFamily
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProductionFamily
public ProductionFamily(Symbol leftSideSymbol)
getLeftSideSymbol
public Symbol getLeftSideSymbol()
getProductions
public java.util.ArrayList<Production> getProductions()
addProduction
public boolean addProduction(Production production)
getProduction
public Production getProduction()
getProduction
public Production getProduction(java.util.ArrayList<Symbol> symbolSequence,
int symbolIndex)
- The first production with defined and met condition is chosen.
If there are conditions defined, but none is met, null is returned.
If there are none conditions defined, then a toss is made and
one is chosen based on production weight.
- Parameters:
symbolSequence
- symbolIndex
-
- Returns: