|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--torero.model.Derivat
The Derivation is the most complex Class in the Torero Model - it represents derivations in grammars. Like the Production class its free of any redandancy. Changes in the underlying referenced Objects doesn't harm the Derivation (changes of the used Productions are possible). A Derivation has a so called usedProduction that refers to the Production to that the "appliedTo"-ListElement is expanded. Additionally a Derivation has Childrens that are also Derivation Objects. This Subderivations can have on of the RHS ListElements of the (Parents) usedProduction as their "appliedTo"-ListElements. Therefore Derivation Objects build tree structures that can represent complex Derivations in a certain Grammar.
Production
Method Summary | |
Production.ListElement |
getAppliedTo()
Returns the ListElement for what this (Sub)Derivation is the expansion. |
Iterator |
getChildList()
Returns an Iterator of (Sub)Derivations of this Derivation. |
int |
getChildSize()
Returns the number of (Sub)Derivations this Derivation has. |
String |
getDerivedWord()
Returns the word this derivation builds (currently under development). |
Production.ListElement |
getExpansionElement(int pos)
This method returns the ListElement on a specific Position that can be expanded on this derivation level. |
Iterator |
getExpansionList()
This method returns an Iteration of ListElements that can be expanded on this derivation level. |
int |
getExpansionPos(Production.ListElement expe)
This method returns the Position of a specific ListElement that can be expanded on this derivation level. |
int |
getExpansionSize()
This method returns the number of ListElements that can be expanded on this derivation level. |
Derivat |
getParent()
Returns the Derivations this (Sub)Derivation extends (the Parent Derivation). |
Production |
getUsedProduction()
Returns the Production used for the extension of the "AppliedTo"-ListElement at this derivation level. |
static Derivat |
makeRoot(Production rootProduction)
This static factory method is used to create a root for a Derivation tree. |
void |
mkSubDerivation(Production.ListElement applyTo,
Production useProduction)
This method is used to make a new (Sub)Derivation on this derivation level. |
String |
toDot(boolean withattribs)
Returns the Dot Graph Representation of this Derivation. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static Derivat makeRoot(Production rootProduction)
rootProduction
- takes the Production that should be used as the first Production that can have expanded RHS ListElements.public Iterator getExpansionList()
public int getExpansionSize()
public Production.ListElement getExpansionElement(int pos)
public int getExpansionPos(Production.ListElement expe)
public void mkSubDerivation(Production.ListElement applyTo, Production useProduction)
applyTo
- takes a ListElement from the RHS ListElement's that should be expandeduseProduction
- takes the Production to which the given "applyTo"-ListElement should be expandedpublic Production.ListElement getAppliedTo()
public Iterator getChildList()
public int getChildSize()
public Derivat getParent()
public Production getUsedProduction()
public String toString()
toString
in class Object
public String getDerivedWord()
public String toDot(boolean withattribs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |