<private> new NT(_name, _index)
Creates a new non-terminal representation for EBNF.
Parameters:
Name | Type | Description |
---|---|---|
_name |
string | non-terminal's name. |
_index |
number | non-terminal's index in page.EBNF |
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | non-terminal's name. |
index |
number | non-terminal's index in page.EBNF |
ord |
number | non-terminal's global index; transient, set in page.EBNF#init. |
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. |
rule |
page.EBNF.Rule | defining |
Extends
Methods
-
dump()
-
Displays index or ord and name and contents of all sets.
- Inherited From:
- Source:
Returns:
- Type
- string
-
<private> init()
-
Called 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.NT.nt
.- Source:
-
<private> toBNF(_grammar)
-
Called once by page.EBNF#init to recursively translate into BNF.
Parameters:
Name Type Description _grammar
page.EBNF object to which the construct belongs.
- Source:
Returns:
non-terminal with the same name.
- Type
- page.BNF.NT
-
toString()
-
Displays name.
- Inherited From:
- Source:
Returns:
- Type
- string