torero.model
Class Epsilon
java.lang.Object
|
+--torero.model.Symbol
|
+--torero.model.Epsilon
- All Implemented Interfaces:
- Comparable, Serializable
- public class Epsilon
- extends Symbol
- implements Serializable
The Epsilon Symbol Object used in Toreros Attribute Grammar Model to represent the Null-Symbol.
This Class represents the Epsilon Symbol in Grammars. It's derived from the Symbol
Base class. Its unique for each Grammar Instance.
- See Also:
AttributeGrammar
,
SymbolMap
, Serialized Form
Constructor Summary |
protected |
Epsilon(SymbolMap sm)
This constuctor should not be called directly. |
Method Summary |
boolean |
isEpsilon()
Return true - nothing more to say. |
boolean |
isLeaf()
Returns true because epsilon is definitely a Leaf Symbol. |
boolean |
isLiteral()
Returns true because epsilon behaves as Literal. |
StringBuffer |
toOx(StringBuffer sb)
As Epsilon has no Ox Representation nothing happens on the given StringBuffer. |
String |
toString()
Returns Epsilons String Representation. |
Methods inherited from class torero.model.Symbol |
addAttribute, changeName, compareTo, equals, getAttributePos, getAttributes, getAttributesSize, getName, getStringRep, hasAttribute, removeAttribute, toDot, toOxDecl |
Epsilon
protected Epsilon(SymbolMap sm)
- This constuctor should not be called directly. To get an instance of Epsilon use the
SymbolMap class.
toString
public String toString()
- Returns Epsilons String Representation.
- Overrides:
toString
in class Object
toOx
public StringBuffer toOx(StringBuffer sb)
- As Epsilon has no Ox Representation nothing happens on the given StringBuffer.
- Overrides:
toOx
in class Symbol
- Parameters:
sb
- the StringBuffer to write onto
isLeaf
public boolean isLeaf()
- Returns true because epsilon is definitely a Leaf Symbol.
- Overrides:
isLeaf
in class Symbol
- Returns:
- true because epsilon is definitely a Leaf Symbol
isLiteral
public boolean isLiteral()
- Returns true because epsilon behaves as Literal.
- Overrides:
isLiteral
in class Symbol
- Returns:
- true because epsilon behaves as Literal
isEpsilon
public boolean isEpsilon()
- Return true - nothing more to say.
- Overrides:
isEpsilon
in class Symbol
- Returns:
- true