Class: Config

page.SLR1. Config

Represents a mark in a rule.


<private> new Config(_rule, _position)

Creates a new representation for a marked rule.

Parameters:
Name Type Description
_rule page.BNF.Rule

rule to mark.

_position number

position in rule, before a symbol or after all.

Properties:
Name Type Description
rule page.BNF.Rule

rule to mark.

position number

position in rule, before a symbol or after all.

complete boolean

true if position is after all symbols.

Source:

Methods


advance(_factory)

Advances the mark.

Parameters:
Name Type Description
_factory page.SLR1

the keeper of the state table, factory for new configurations.

Source:
Returns:

a new configuration with the mark moved right; the actual class depends on the factory.

Type
page.SLR1.Config

equals(_c)

Compares two configurations.

Parameters:
Name Type Description
_c page.SLR1.Config

to compare to this.

Source:
Returns:

true same rule and same position.


toString()

Displays the marked rule.

Source:
Returns:
Type
string