fr.umlv.tatoo.runtime.parser
Class Parser<T,P>

java.lang.Object
  extended by fr.umlv.tatoo.runtime.parser.Parser<T,P>
Type Parameters:
T - type of terminals.
P - type of productions.

public class Parser<T,P>
extends Object

Author:
julien

Method Summary
 void close()
           
static
<T,P> Parser<T,P>
createParser(ParserTable<T,P> table, ParserListener<T,P> listener)
           
 Set<? extends T> getLookaheads(LookaheadStates<T> lookaheadStates)
          returns the set of Terminals which don't lead to an error for the current state.
 ParserTable<T,P> getTable()
          Returns the parser table.
 void step(T next)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createParser

public static <T,P> Parser<T,P> createParser(ParserTable<T,P> table,
                                             ParserListener<T,P> listener)

getLookaheads

public Set<? extends T> getLookaheads(LookaheadStates<T> lookaheadStates)
returns the set of Terminals which don't lead to an error for the current state.

Parameters:
lookaheadStates - the lookahead states object
Returns:
a set of terminals

getTable

public ParserTable<T,P> getTable()
Returns the parser table.

Returns:
the parser table.

step

public void step(T next)

close

public void close()