Parser forgets to check every alteration sometimes. #459
Replies: 2 comments 1 reply
-
|
Ah, i think i found the issue. The parser gets too greedy. For example, |
Beta Was this translation helpful? Give feedback.
-
|
Yes, Ohm works in a way that's fundamentally different than some other tools you might have used in the past. It's based a formalism called parsing expression grammars. The main differences are exactly as you describe:
The latter is mentioned on the Patterns & Pitfalls page, but I see now that the tutorial doesn't mention these things! It's probably worth adding. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this code for a Rule:
And the parser is not checking
Value_FunctionnorValue_String.Value_Expressionleads it to the end of the string and the parser forgets that it could useValue_FunctionorValue_Stringinstead ofValue_Function nor Value_Expression. I have a part ofValue_Expressionthat includesend. Am I supposed to avoid usingendor something?Here is the full Grammar file (in case it is helpful; yes, I know it is long):
Beta Was this translation helpful? Give feedback.
All reactions