Class Production

java.lang.Object
  |
  +--Production

public class Production
extends java.lang.Object

This class implements a grammar production (rule).


Constructor Summary
Production(java.lang.String lhs, java.lang.String[] rhs)
          Build a production from a left-hand side symbol and sequence of right-hand-side symbols
 
Method Summary
 java.lang.String getLHS()
          Returns the left-hand-side symbol of this production.
 java.lang.String[] getRHS()
          Returns the right-hand-side symbols of this production as an array.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Production

public Production(java.lang.String lhs,
                  java.lang.String[] rhs)
Build a production from a left-hand side symbol and sequence of right-hand-side symbols

Method Detail

getLHS

public java.lang.String getLHS()
Returns the left-hand-side symbol of this production.


getRHS

public java.lang.String[] getRHS()
Returns the right-hand-side symbols of this production as an array. Zero-length array means empty string.


toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object