David Mercer wrote:
Robert Grimm wrote:
I agree with Terence in that ambiguity vs. ordering is a trade-off.
With CFGs you may get unnecessary ambiguity and with PEGs you may get
subtle ordering errors.
Ah, so now you're persuading me the other way. At least with ambiguity, you
can discover the problem when the grammar is compiled, but subtle ordering
errors you may or may not discover...
You can verify a PEG for ordering issues as well: remember my paper
_Modular Syntax Demands Verification_
<http://charybde.homeunix.org/~schmitz/pub/modular.pdf>. It presents a
first approach to the problem of verifying PEGs. Furthermore, the
method is presented in parallel with a CFG ambiguity detection
algorithm, and shares a lot with it.
--
Sylvain
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg