-
Here is a simplified version of a simple parser I wrote
It parses simple expressions using and/or/not operators, optionally quoted arguments, and parentheses. However, my naïve approach causes the expression In order to revent this, I coded the following alternative:
This parser successfully errors on How could I achieve this in a simpler, cleaner, way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Why not rename it to _ws? Or better, just _WS? Then it won't appear in the tree. ?q_or : q_and (_WS "or" _WS q_and)* |
Beta Was this translation helpful? Give feedback.
Why not rename it to _ws? Or better, just _WS? Then it won't appear in the tree.