#include <archon/util/lr_parser_base.H>
Inheritance diagram for Archon::Utilities::LrParserBase:
Public Member Functions | |
virtual | ~LrParserBase () |
void | parse (LexerBase &lexer, Logger *l=0) const |
Use this method if you want to do syntax checking only. | |
void | parse (LexerBase &lexer, Context &c, Logger *l=0) const |
Use this method if your result becomes available through the context object. | |
template<class R> | |
void | parse (LexerBase &lexer, Context &c, Ref< const R > &result, Logger *l=0) |
Use this method if your result is the value of the start symbol of the grammar. | |
Protected Member Functions | |
LrParserBase (CFG &, const ActorBase *, const Printer *) | |
virtual int | getAction (int state, int terminal) const =0 |
The end of input (EOI) is represented by a terminal value of -1. | |
virtual int | getGoto (int state, int nonterminal) const =0 |
Returns: i > -1 => goto state i i <= -1 => error. | |
Protected Attributes | |
CFG | grammar |
vector< Production > | productions |
Classes | |
class | Actor |
struct | ActorBase |
struct | AttributeTypeException |
struct | CallException |
For internal use only. More... | |
struct | Context |
struct | Printer |
struct | Production |
Definition at line 86 of file lr_parser_base.H.
|
The end of input (EOI) is represented by a terminal value of -1. Actions are represented by one integer where: i > -1 => shift and goto state i i = -1 => error i = -2 => accept i < -2 => reduce by production -3-i |
|
Use this method if your result is the value of the start symbol of the grammar.
Definition at line 306 of file lr_parser_base.H. References Archon::Utilities::Ref< T >::get(). |