OrderedLR1Tables

Abstract view on the parse tables for a deterministic ordered LR-like parser with 1-symbol lookahead. The information provided also indicates a continuation automaton for Röhrich's error repair method. Note that the represented parser may well be a <emph>nondeterministic</emph> one.

@author SöKa

Members

Classes

Action
class Action
Undocumented in source.
Goto
class Goto
Undocumented in source.
Halt
class Halt
Undocumented in source.
Reduce
class Reduce
Undocumented in source.
Shift
class Shift
Undocumented in source.

Functions

eof
Terminal eof()

Returns the end-of-file Terminal symbol that has been added to the original grammar to generate the parser.

getSortedGotoRow
Goto[] getSortedGotoRow(size_t state)

Returns a List of the Goto entries for the given state's "goto table" row. Entries are guaranteed to be sorted by the List entries's lhs.index(). <p> Implementation must be such that this method can safely be called multiple times for a fixed <code>state</code> without performance becoming an issue.

getSortedParserActionRow
Action[] getSortedParserActionRow(size_t state)

Returns a List of the Shift, Halt, and Reduce entries for the given state's "parser action table" row. Entries are guaranteed to be sorted by the List entries' lookahead.index(). <p> Implementation must be such that this method can safely be called multiple times for a fixed <code>state</code> without performance becoming an issue.

grammar
Grammar grammar()

Returns the (extended) grammar that underlies the ordered LR tables.

stateCount
size_t stateCount()

Returns the number of states in the parser.

Meta