torero.model
Class Nonterm

java.lang.Object
  |
  +--torero.model.Symbol
        |
        +--torero.model.Nonterm
All Implemented Interfaces:
Comparable, Serializable

public class Nonterm
extends Symbol
implements Serializable

A Nonterm Symbol Object is used to represent expandable Symbols in Toreros Attribute Grammar Model. It can be used on the Left Hand Side (LHS) of Productions. It can be expanded/replaced to a sequence of other symbols (defined at the RHS of the Production). Nonterm Instances should be obtained via the SymbolMap that can guarantee their uniqueness.

See Also:
AttributeGrammar, SymbolMap, Serialized Form

Constructor Summary
protected Nonterm(String Name, SymbolMap sm)
          This constuctor should not be called directly.
 
Method Summary
 boolean isLeaf()
          Return false as Nonterms can be expanded/replaced to a sequence of other symbols.
 String toString()
          Returns the String Representation of the Nonterm.
 
Methods inherited from class torero.model.Symbol
addAttribute, changeName, compareTo, equals, getAttributePos, getAttributes, getAttributesSize, getName, getStringRep, hasAttribute, isEpsilon, isLiteral, removeAttribute, toDot, toOx, toOxDecl
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Nonterm

protected Nonterm(String Name,
                  SymbolMap sm)
This constuctor should not be called directly. To get an instance use the SymbolMap class.
Method Detail

toString

public String toString()
Returns the String Representation of the Nonterm.
Overrides:
toString in class Object
Returns:
It returns the String Representation of the Nonterm

isLeaf

public boolean isLeaf()
Return false as Nonterms can be expanded/replaced to a sequence of other symbols.
Overrides:
isLeaf in class Symbol
Returns:
false as Nonterms can be expanded/replaced to a sequence of other symbols