You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to @cgrand for making this library available. However, unless the algorithm is upgraded to LR(1) (if not something even more powerful), it would be better to put a clear warning at the very beginning of the README, indicating that Parsley is useless for parsing infix expressions. This would save potential users hours of frustration.
Say you are parsing an expression-based language where both of the following are valid expressions:
variable
variable * 2
After Parsley reads "variable", it needs to decide whether to reduce or to eat more input, WITHOUT looking ahead. Unfortunately, without looking ahead, it can't see the "*" which is coming up next. So this results in a shift/reduce conflict.
Allowing regular expressions as terminals is nice, but unfortunately, Parsley can't break down regexps and examine their internal structure. In practice, this means a lot of shift/reduce conflicts are hidden and pop up at runtime as "Ambiguous Match" errors. (This happens very easily when regexps which can match 0 characters are used as terminals.)
The text was updated successfully, but these errors were encountered:
Thanks to @cgrand for making this library available. However, unless the algorithm is upgraded to LR(1) (if not something even more powerful), it would be better to put a clear warning at the very beginning of the README, indicating that Parsley is useless for parsing infix expressions. This would save potential users hours of frustration.
Say you are parsing an expression-based language where both of the following are valid expressions:
After Parsley reads "variable", it needs to decide whether to reduce or to eat more input, WITHOUT looking ahead. Unfortunately, without looking ahead, it can't see the "*" which is coming up next. So this results in a shift/reduce conflict.
Allowing regular expressions as terminals is nice, but unfortunately, Parsley can't break down regexps and examine their internal structure. In practice, this means a lot of shift/reduce conflicts are hidden and pop up at runtime as "Ambiguous Match" errors. (This happens very easily when regexps which can match 0 characters are used as terminals.)
The text was updated successfully, but these errors were encountered: