Class LRTable

java.lang.Object
  |
  +--LRTable

public class LRTable
extends java.lang.Object

This class implements an LR parsing table.


Constructor Summary
LRTable()
           
 
Method Summary
 Action action(int s, java.lang.String a)
          Returns action[s, a], or null on error.
 int getStartState()
          Returns the initial state of the parser.
 int goTo(int s, java.lang.String a)
          Returns goto[s, a].
 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

LRTable

public LRTable()
Method Detail

action

public Action action(int s,
                     java.lang.String a)
Returns action[s, a], or null on error.


goTo

public int goTo(int s,
                java.lang.String a)
         throws java.lang.Exception
Returns goto[s, a].

Throws:
java.lang.Exception - on missing entry

getStartState

public int getStartState()
Returns the initial state of the parser.

Returns:
initial state

toString

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

Overrides:
toString in class java.lang.Object