Replies: 2 comments 4 replies
-
use macro! ? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Do you have a gramma? When I did btw, putting your white space parser inside the operator |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing a parser for very limited boolean expressions, of the form
foo = 'literal' OR (bar = 'xxx' AND baz <> 'xxxxxxx')
.I'd like the parser to ignore whitespaces. I implemented that by defining a whitespace-ignoring combinator:
I'm using that combinator in various places to ignore whitespace, e.g.:
I've already had bugs where I forgot to put
space_around()
somewhere, which I discovered in testing (or in unnit testing at best).So my question is: is there a simpler, more idiomatic, or just a more consistent way to ignore whitespace?
Beta Was this translation helpful? Give feedback.
All reactions