Class: Action

page.SLR1. Action

Represents an action of the SLR(1) automaton.


<private> new Action(_action, _symbol [, _info])

Creates a new action.

Parameters:
Name Type Argument Description
_action string

one of 'accept', 'goto', 'reduce', or 'shift'.

_symbol page.BNF.T | page.BNF.NT

symbol on which to take the action.

_info page.BNF.T | page.BNF.Rule <optional>

additional information.

Properties:
Name Type Description
action string

one of 'accept', 'error', 'goto', 'reduce', or 'shift'.

symbol page.BNF.T | page.BNF.NT

symbol on which to take the action.

info Number | page.BNF.Rule

additional information, if any.

Source:

Methods


toString()

Displays symbol, action, and additional information if any.

Source:
Returns:
Type
string