Replies: 2 comments
-
I think the tilde symbol ease up the parsing, it acts as infix operator. It's converted into an |
Beta Was this translation helpful? Give feedback.
0 replies
-
I also came across this question in my mind. I think we can eliminate the tilde. That way we would not introduce any ambiguity, and we can make writing grammar much more comfortable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pest uses tilde (
~
) between symbols and literals in grammars. So, instead of this which we would see in a typical EBNF-based grammarwe see this in Pest
Is there significance to the tilde operator in a generated parser? Most parser generators use whitespace to denote the end of a non-terminal name. Iso14977 allows spaces within non-terminal names but avoids tilde with two passes to parse the grammar in order to recognize non-terminals with gap.
Beta Was this translation helpful? Give feedback.
All reactions