org.waxeye.parser
Class Parser<E extends java.lang.Enum<?>>

java.lang.Object
  extended by org.waxeye.parser.Parser<E>
Type Parameters:
E - The node types for the AST.
All Implemented Interfaces:
IParser<E>

public abstract class Parser<E extends java.lang.Enum<?>>
extends java.lang.Object
implements IParser<E>

Implements the logic of the parser.

Author:
Orlando Hill

Constructor Summary
Parser(java.util.List<FA<E>> automata, boolean eofCheck, int start, E emptyType, E charType, E posType, E negType)
          Creates a new Parser.
 
Method Summary
 ParseResult<E> parse(IParserInput input)
          Parses the input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(java.util.List<FA<E>> automata,
              boolean eofCheck,
              int start,
              E emptyType,
              E charType,
              E posType,
              E negType)
Creates a new Parser.

Parameters:
automata - The automata of the parser.
eofCheck - Whether to check that all input gets parsed.
start - The starting automaton.
emptyType - The empty type.
charType - The char type.
posType - The positive check type.
negType - The negative check type.
Method Detail

parse

public final ParseResult<E> parse(IParserInput input)
Parses the input.

Specified by:
parse in interface IParser<E extends java.lang.Enum<?>>
Parameters:
input - The input to parse.
Returns:
A ParseResult with either an AST or an error.


Waxeye Parser Generator