Replies: 3 comments
-
That's a core problem with the parser Pest generates with can only parse LL grammars. A left recursive parser should be Earley or GLR/GLL. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@xacrimon, that is not very accurate. pest uses parsing expression grammars. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah, my fault. I am quite new to parsers. |
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
-
Say a piece of code:
I want to parse
code
as the result:I can use lalrpop-script like this:
But the same code written in pest-script:
Will throw an error:
I have found the all-hand-written calculator in
pest/test
, so must I written like that if I want to deal with theleft-recursive
problem? Any better idea?Beta Was this translation helpful? Give feedback.
All reactions