Hi all,

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. As Terence points out, I had a (very) few in my Java grammar.

I'd love to know what the precise errors were. Would you mind sharing them with the list? Did you ever find a really bad problem where no ordering would work and you had to rewrite a larger part of the grammar?

The key difference, however, is that CFGs are only closed under composition if you use GLR parsing, while PEGs are always closed under composition. As a result, providing modularity for PEGs is simpler and faster than for CFGs. That closes the deal for me...

--
Cheers,

  Sylvain

_______________________________________________
PEG mailing list
[EMAIL PROTECTED]
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to