On Oct 18, 2006, at 6:45 AM, David Mercer wrote:
This is just my opinion, and does not require any reply, but in my
opinion, PEG’s are superior to CFG’s because PEG’s do not allow you
to define an ambiguous grammar. Practical data languages are never
ambiguous. If you ever find yourself defending PEG’s vs. other
grammar models, you can quote me on that. J
Hi David. :) Yes, but just because something is unambiguous, doesn't
mean you get what you expect. Recall the dreaded:
A -> a
A -> ab
problem where the second alt is unreachable. A CFG will deal with
this no problem. This problem occurs in real grammars I find, after
having built a Java and C grammar using ANTLR's hybrid LL(*)/PEG
strategy. It would be worse with straight PEG. My LL(*) found some
errors in Grimm's Java grammar, but in general I believe he would
disagree that it's a serious problem.
I merely point out that it is an issue in the wild; the size of the
problem is open to debate. You can quote me on that. ;)
Ter
_______________________________________________
PEG mailing list
[EMAIL PROTECTED]
https://lists.csail.mit.edu/mailman/listinfo/peg