Absimpa v684

absimpa
Interface Parser<N,C extends java.lang.Enum<C>>

Type Parameters:
N - is the type of the objects created by the parser
C - is the type of token codes provided by the lexer
All Known Implementing Classes:
ExprLanguage.Eparser

public interface Parser<N,C extends java.lang.Enum<C>>

parses input in the form of token codes as provided by a lexical analyzer and constructs result objects. To obtain a parser, use the GrammarBuilder and compile the resulting Grammar.


Method Summary
 N parse(Lexer<N,C> lex)
           parses a sequence of objects of type <C> from the given Lexer and transforms it into an object of type <N>.
 

Method Detail

parse

N parse(Lexer<N,C> lex)
        throws ParseException

parses a sequence of objects of type <C> from the given Lexer and transforms it into an object of type <N>.

Returns:
is a value created by a NodeFactory therefore may in particular be null.
Throws:
ParseException - if the sequence of <C> objects provided by the Lexer does not match the grammar for which this parser was created.

Absimpa v684