Closed LiamRiddell closed 4 years ago
Try %ws:*
@mcrawshaw Awesome, that's worked. Thanks! Out of curiosity what does the EBNF modifier :*
doing?
I believe its none or more. It's lightly documented here https://nearley.js.org/docs/grammar#more-syntax-tips-and-tricks. I guess the assumed default is only one.
@mcrawshaw - Thank you for the help 😄
Problem
I'm using the example
arithmetic.ne
grammar but trying to convert it to use moo lexer instead. I've started by swapping out the tokens for whitespace, float, integers.Lexer and Nearley Input
Input:
100 + (10 * 100) * 20
Arithmetic.ne (Modified)
Parser Output
What I thought is the issue
Since I'm no longer using Nearley builtin's the
_
or__
will no longer work. How would I implement optional whitespaces using moo in this example?