Class: Precedence

page.BNFP. Precedence

Represents a list of terminals of equal precedence and associativity. Precedences are used in the context of SLR(1) disambiguation.


<private> new Precedence(_assoc, _terminals)

Creates a new representation for a list of terminals of equal precedence and associativity.

Parameters:
Name Type Description
_assoc string

associativity, 'left', 'right', or 'nonassoc'.

_terminals Array.<page.BNF.T>

list of terminals.

Properties:
Name Type Description
assoc string

associativity, 'left', 'right', or 'nonassoc'.

terminals Array.<page.BNF.T>

list of terminals.

Source:
See:

Methods


dump()

Displays associativity and the list of terminals.

Source:
Returns:

.

Type
string

toString()

Displays associativity and the list of terminals.

Source:
Returns:

.

Type
string