Class Definition

java.lang.Object
  extended by Definition

public class Definition
extends Object


Constructor Summary
Definition()
          Create a new definition for a non-terminal
 
Method Summary
 void add(Vector<String> prod)
          pre: prod is a non-null vector of Strings
 Vector<String> get(int index)
          pre: 0 <= index < size() post: return the production at given index
 int size()
          post: return the number of productions
 String toString()
          Print out the productions for this definition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Definition

public Definition()
Create a new definition for a non-terminal

Method Detail

add

public void add(Vector<String> prod)
pre: prod is a non-null vector of Strings

post: prod is added as a production for the definition.


size

public int size()
post: return the number of productions


get

public Vector<String> get(int index)
pre: 0 <= index < size() post: return the production at given index


toString

public String toString()
Print out the productions for this definition.

Overrides:
toString in class Object