PTBL
Class TableReader

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

public class TableReader
extends java.lang.Object

This class contains a static method for reading a predictive parsing table from a file


Constructor Summary
TableReader()
           
 
Method Summary
static PTBL.ParsingTable readTable(java.lang.String fname)
          Reads a predictive parsing table from a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableReader

public TableReader()
Method Detail

readTable

public static PTBL.ParsingTable readTable(java.lang.String fname)
                                   throws java.lang.Exception
Reads a predictive parsing table from a file. File should have one line per table entry, where each line has the form
nonterm -> symbol1 symbol2 .... Start symbol should be the nonterminal in the first line of the file. Empty string is indicated by absence of any symbol.

Parameters:
fname - name of the file
Returns:
ParsingTable object built from lines in file
Throws:
java.lang.Exception - on file open/read error or malformed table