Return values
start: die /^\Z/
die: 'd' number
| number 'd' number
number: /\d+/
- A rule returns the value of the production that matched;
undefined if no production matched.
- If a production matches, it will return the return value of the last
non-comment item. (This is not always true!).
- Items return:
- Subrule: what the subrule matches.
- Token: the substring of the literal
or regex match.
- Action: the value of the last statement
of the block.
- Directive: we'll come back to that.
- Comment: doesn't return anything.
[Prev]
[Next]
[Index]