<private> new Seq(_nodes)
Creates a new representation of a sequence for EBNF.
Parameters:
Name | Type | Description |
---|---|---|
_nodes |
Array.<eNode> | sequence, at least two; null during unmarshalling. |
- Source:
Properties:
Name | Type | Description |
---|---|---|
nodes |
Array.<eNode> | descendants, at least two. |
nt |
page.BNF.NT | corresponding non-terminal for BNF. |
empty |
boolean | true if no input can be accepted. |
first |
Map | terminals at front, maps ord to page.BNF.T. |
follow |
Map | terminals following, maps ord to page.BNF.T. |
Example
groups: a b | c d;
Methods
-
<private> init()
-
Called once by page.EBNF#init to complete EBNF grammar initialization. Imports page.BNF.NT
.empty
, page.BNF.NT.first
, and page.BNF.NT.follow
from page.EBNF.Seq.nt
and then delegates to the descendants.- Source:
-
<private> toBNF(_grammar [, _nt])
-
Parameters:
Name Type Argument Description _grammar
page.EBNF object to which the construct belongs.
_nt
page.EBNF.NT <optional>
left-hand side, if known; avoids the need for a fresh non-terminal.
- Source:
Returns:
non-terminal representing the translated construct.
- Type
- page.BNF.NT
-
toString()
-
Displays a sequence in EBNF notation.
- Source:
Returns:
.
- Type
- string