torero.model
Class AttributeGrammar
java.lang.Object
|
+--torero.model.Grammar
|
+--torero.model.AttributeGrammar
- All Implemented Interfaces:
- Serializable
- public class AttributeGrammar
- extends Grammar
- implements Serializable
Attribute Grammar extends Grammar in that way, that you can define Attributes and assign them to Symbols.
It represents a complete attributed Grammar that can be expressed in Ox Notation via the toOx() method.
To make Assignments between Attributes you have to create AttributeAssingnments via the corresponding
methods in the Production Class.
- See Also:
Grammar
,
Production
,
AttributeAssingnment
,
Attribute
, Serialized Form
Methods inherited from class torero.model.Grammar |
addProduction, declareLiteral, declareLiteral, declareLiteral, declareLiteral, declareStartSymbol, declareToken, declareToken, declareToken, declareToken, getProductionMap, getStartSymbol, getSymbolMap, toString |
AttributeGrammar
public AttributeGrammar()
getAttributeMap
public AttributeMap getAttributeMap()
- Returns the AttributeMap that contains all Attributes defined in this grammar.
- Returns:
- returns the AttributeMap that contains all Attributes defined in this grammar
toOx
public String toOx()
- Returns the full Ox Representation of this Attribute Grammar.
- Returns:
- returns the full Ox Representation of this Attribute Grammar
checkFunctionConsistency
public void checkFunctionConsistency()
- Checks the consistency of AttributeAssingnment Functions and updates the validity State.
This method is expensive - it goes through the whole grammar.
checkIfLoop
public boolean checkIfLoop(AttributeAssingnment.AttribKey source,
AttributeAssingnment.AttribKey dest)
- Checks if a new Assignment with the given Source and Destination would cause a Assignmet Loop.
This method is expensive.