OrderedLR1TablesImpl

An implementation suitable for use by an LR1 parser.

@author SöKa

Constructors

this
this(Grammar grammar, Action[][] parserActionRows, Goto[][] gotoRows)

Constructor method.

Members

Functions

eof
Terminal eof()
Undocumented in source. Be warned that the author may not have intended to support it.
getSortedGotoRow
Goto[] getSortedGotoRow(size_t state)
Undocumented in source. Be warned that the author may not have intended to support it.
getSortedParserActionRow
Action[] getSortedParserActionRow(size_t state)
Undocumented in source. Be warned that the author may not have intended to support it.
grammar
Grammar grammar()
Undocumented in source. Be warned that the author may not have intended to support it.
stateCount
size_t stateCount()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From OrderedLR1Tables

Action
class Action
Undocumented in source.
Shift
class Shift
Undocumented in source.
Halt
class Halt
Undocumented in source.
Reduce
class Reduce
Undocumented in source.
Goto
class Goto
Undocumented in source.
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.

eof
Terminal eof()

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

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.

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.

Meta