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...

That's not my intent. I very much prefer PEGs over CFGs b/c I find formalism and parser implementation to be cleaner and more manageable (compared to GLR etc parsers). But I also think it important to understand the basic trade-offs and assumptions. That way we can find a way to improve the state of the art. Like Bryan, I believe that analysis similar to CFGs should be able to help us. I'm more than happy to work with a student on this...

Robert

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to