com.turtle3d.formallanguage.grammar
Class ProductionFamily

java.lang.Object
  extended by com.turtle3d.formallanguage.grammar.ProductionFamily

public class ProductionFamily
extends java.lang.Object


Constructor Summary
ProductionFamily(Symbol leftSideSymbol)
           
 
Method Summary
 boolean addProduction(Production production)
           
 Symbol getLeftSideSymbol()
           
 Production getProduction()
           
 Production getProduction(java.util.ArrayList<Symbol> symbolSequence, int symbolIndex)
          The first production with defined and met condition is chosen.
 java.util.ArrayList<Production> getProductions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductionFamily

public ProductionFamily(Symbol leftSideSymbol)
Method Detail

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: