|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--torero.model.Production
The Production Class composits a production in terms of a grammar by just refering to unique Instances of Tokens, Nonterms, Traversals. This means that its free of any redandancy and therefore very fexible and robust regarding underlying modifications (of Tokens, Nonterms, Traversals). A Production can define AttributeAssignments for it`s scope and Traversals can be associated to a Production.
Token
,
Nonterm
,
AttributeAssingnment
,
Attribute
,
Traversal
, Serialized FormInner Class Summary | |
class |
Production.ListElement
Inner Class for representing the unique Position of a Symbol inside a Production. |
class |
Production.ProductionRHS
Class for internal representation of the Right Hand Side (RHS) of the production. |
Constructor Summary | |
Production(Nonterm LHS,
Iterator RHSSymbols)
Creating new Productions can be done by using this constructor. |
Method Summary | |
boolean |
addTraversal(Traversal t)
Adds a Traversal to the Production. |
int |
compareTo(Object o)
Sort order via LHS Symbol sort order. |
boolean |
containsTrav(Traversal t)
Does the Production contain the given Traversal ? |
boolean |
equals(Object o)
Equality defined as structural equality. |
Iterator |
getAllAssignments()
Returns all AttibuteAssignments this Production has as Iterator of AttibuteAssignments. |
Iterator |
getAssignmentsHavingDest(Production.ListElement dest)
|
Iterator |
getCompatibleAssignments(AttributeAssingnment.AttribKey ak)
|
Production.ListElement |
getLHS()
Returns the LHS of this Production encapsulated as ListElement. |
Production.ProductionRHS |
getRHS()
Returns the RHS of this Production. |
Iterator |
getTraversals()
Returns all Traversals that are associated to this Production. |
AttributeAssingnment |
hasAssignment(Production.ListElement destle,
Attribute destAttr)
|
AttributeAssingnment |
hasAssignmentWithSource(Production.ListElement destle,
Attribute destAttr,
Production.ListElement sourcele,
Attribute sourceAttr)
|
AttributeAssingnment |
hasIncompatibleAssignment(Production.ListElement destle,
Attribute destAttr)
|
AttributeAssingnment |
obtainAssignment(Production.ListElement destle,
Attribute destAttr)
|
AttributeAssingnment |
obtainAssignment(Production.ListElement destle,
Attribute destAttr,
Production.ListElement srcle,
Attribute srcAttr)
|
void |
removeAssignment(AttributeAssingnment ass)
|
void |
removeTraversal(Traversal t)
Removes a Traversal from the Production. |
void |
setLHS(Production.ListElement LHS)
Set a ListElement as new LHS. |
void |
setPrecedence(Token precToken)
Support for Yacc specific extensions. |
String |
toDot(Derivat der,
String offset,
boolean withattribs)
Support for Dot File generation. |
StringBuffer |
toOx(StringBuffer sb,
boolean firstline)
Support for Ox File generation. |
String |
toString()
|
String |
toString2()
|
String |
toString3()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Production(Nonterm LHS, Iterator RHSSymbols)
LHS
- takes a Nonterminal Symbol used as LHS for the new ProductionRHSSymbols
- takes an Iterator of Symbols used as RHS for the new ProductionMethod Detail |
public Production.ListElement getLHS()
public int compareTo(Object o)
compareTo
in interface Comparable
public void setLHS(Production.ListElement LHS)
LHS
- takes a ListElement that as new LHSpublic Production.ProductionRHS getRHS()
public boolean equals(Object o)
equals
in class Object
public void setPrecedence(Token precToken)
public String toString()
toString
in class Object
public String toString2()
public String toString3()
public String toDot(Derivat der, String offset, boolean withattribs)
public StringBuffer toOx(StringBuffer sb, boolean firstline)
public AttributeAssingnment obtainAssignment(Production.ListElement destle, Attribute destAttr) throws AssignmentIncompatibleException
public AttributeAssingnment obtainAssignment(Production.ListElement destle, Attribute destAttr, Production.ListElement srcle, Attribute srcAttr) throws AssignmentIncompatibleException, AssignLoopException, AssignException
public AttributeAssingnment hasAssignment(Production.ListElement destle, Attribute destAttr)
public AttributeAssingnment hasIncompatibleAssignment(Production.ListElement destle, Attribute destAttr)
public void removeAssignment(AttributeAssingnment ass)
public AttributeAssingnment hasAssignmentWithSource(Production.ListElement destle, Attribute destAttr, Production.ListElement sourcele, Attribute sourceAttr)
public Iterator getAssignmentsHavingDest(Production.ListElement dest)
public Iterator getCompatibleAssignments(AttributeAssingnment.AttribKey ak)
public Iterator getAllAssignments()
public boolean addTraversal(Traversal t)
public void removeTraversal(Traversal t)
public boolean containsTrav(Traversal t)
public Iterator getTraversals()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |