3 ms·
Most other parser generator systems give you indication that what you're writing is probably wrong, by stating e.g. that a grammar is ambiguous. S := A '+' A |
by frabert 5y ago
Most other parser generator systems give you indication that what you're writing is probably wrong, by stating e.g. that a grammar is ambiguous.
S := A '+' A | A '*' A
A := ...
If you do that in most PEG systems I've tried, you're just going to get the wrong result with no indication of what might have gone wrong, unless you know where to look.
- chrisseaton 5y agoBut that's the point - other parsing systems let you design an ambiguous language and then tell you about it. PEGs don't let you design an ambiguous language in the first place. Unambiguous by construction.