Type Definitions
-
Builder(_values, _env, _tuple, _sender)
-
Builder function implementing a semantic action for page.LL1#reflect and page.SLR1#reflect.
Parameters:
Name Type Description _valuesArray.<object> top-level value list, collected for this semantic action.
_envobject environment, originally connected to the observer.
_tuplepage.Tuple current input.
_senderobject Throws:
-
a string with an error message to continue parsing or an
Errorwith an error message to abort further parsing. - Type
- string | Error
Returns:
a value which will be pushed, or concatenated by the observer.
- Type
- object | Array.<object>
-
-
eNode
-
Nodes in an EBNF grammar.
Type:
- page.BNF.Lit | page.BNF.Token | page.EBNF.Alt | page.EBNF.Lst | page.EBNF.NT | page.EBNF.Rep | page.EBNF.Seq
- Source:
-
epNode
-
Nodes in an EBNFP grammar.
Type:
- page.BNF.Lit | page.BNF.Token | page.EBNF.Alt | page.EBNFP.Lst | page.EBNF.NT | page.EBNFP.Rep | page.EBNFP.Seq
- Source:
-
Map
-
Hashtable with strings or numbers as keys.
Type:
- object
- Source:
- See:
-
Node
-
Nodes in a BNF grammar.
Type:
- Source:
-
Observer(_at, _tuple, _action, _info, _sender)
-
The result of page.trace, page.LL1#reflect, or page.SLR1#reflect: a function which can observe a parser.
Parameters:
Name Type Description _atnumber where the parser is, e.g., a rule or state number.
_tuplepage.Tuple current input.
_actionstring 'rule','shift', or'reduce'for LL(1),'shift','reduce','goto', or'accept'for SLR(1), or'error'._infopage.BNF.Rule | page.BNF.T | number | string a reference to the relevant rule, terminal, or state number, or an error message.
_senderobject Throws:
-
a string with an error message to continue parsing or an
Errorwith an error message to abort further parsing. - Type
- string | Error
Returns:
anything on success.
- Type
- object
-
-
Tokenizer(input)
-
The result of page.BNF#tokenizer
Parameters:
Name Type Description inputstring to be divided into literals and tokens.
- Source:
Properties:
Name Type Description patternstring read-only, used to disect the input, combines all tokens, literals and the
skippattern.Returns:
a list of literals and tokens.
- Type
- Array.<page.Tuple>
page