PTBL
Class ParsingTable

java.lang.Object
  |
  +--PTBL.ParsingTable

public class ParsingTable
extends java.lang.Object

This class implements a predictive parsing table.


Constructor Summary
ParsingTable()
           
 
Method Summary
 PTBL.Production getEntry(java.lang.String nonterminal, java.lang.String input)
          Returns entry (production) from predictive parsing table.
 java.lang.String getStartSymbol()
          Returns the start symbol of the grammar from which this table was built.
 boolean isTerminal(java.lang.String symbol)
          Returns true if symbol is terminal, false otherwise.
 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

ParsingTable

public ParsingTable()
Method Detail

getEntry

public PTBL.Production getEntry(java.lang.String nonterminal,
                                java.lang.String input)
Returns entry (production) from predictive parsing table.

Parameters:
nonterminal - nonterminal symbol in row
input - input symbol in column
Returns:
entry, or null on error

getStartSymbol

public java.lang.String getStartSymbol()
Returns the start symbol of the grammar from which this table was built.

Returns:
start symbol

isTerminal

public boolean isTerminal(java.lang.String symbol)
Returns true if symbol is terminal, false otherwise.


toString

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

Overrides:
toString in class java.lang.Object