CIDER Toolkit
Version 0.3.0

au.edu.monash.csse.tonyj.cider.interpreter
Class GrammarSymbol

java.lang.Object
  |
  +--GrammarSymbol
Direct Known Subclasses:
ExampleSymbol

public abstract class GrammarSymbol
extends java.lang.Object

This abstract base class is used by the CIDER compiler when creating grammar symbols that are specific to a particular diagrammatic language.


Method Summary
 java.util.Set getChildren()
          Returns a set containing all child symbols in the parse tree, or null if the symbol is not registered.
 int getIDNumber()
          Returns the unique ID number associated with this grammar symbol.
abstract  java.lang.String getName()
          Returns the name of this grammar symbol type.
 java.util.Set getParents()
          Returns a set containing all parent symbols in the parse tree, or null if the symbol is not registered.
 java.util.Set getSiblings()
          Returns a set containing all sibling symbols in the parse tree (that is, other symbols that were produced by the same production), or null if the symbol is not registered.
 boolean isRegistered()
          Returns true if and only if the symbol is associated with an Interpreter.
 boolean isTerminal()
          Returns true if the symbol is a terminal symbol, false otherwise
abstract  java.lang.String toString()
          Overrides this method in the Object class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isRegistered

public boolean isRegistered()
Returns true if and only if the symbol is associated with an Interpreter.


isTerminal

public boolean isTerminal()
Returns true if the symbol is a terminal symbol, false otherwise


getChildren

public java.util.Set getChildren()
Returns a set containing all child symbols in the parse tree, or null if the symbol is not registered.


getSiblings

public java.util.Set getSiblings()
Returns a set containing all sibling symbols in the parse tree (that is, other symbols that were produced by the same production), or null if the symbol is not registered.


getParents

public java.util.Set getParents()
Returns a set containing all parent symbols in the parse tree, or null if the symbol is not registered.


getIDNumber

public int getIDNumber()
Returns the unique ID number associated with this grammar symbol.


toString

public abstract java.lang.String toString()
Overrides this method in the Object class. Primarily used for debugging purposes.

Overrides:
toString in class java.lang.Object

getName

public abstract java.lang.String getName()
Returns the name of this grammar symbol type.


CIDER Toolkit
Version 0.3.0