This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Hand-written rec-descent parser of GCC-4.1 is WRONG!!!
- From: jc-nospam at jr-pizarro dot jazztel dot es
- To: zack at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 16 Mar 2005 06:20:30 +0100 (CET)
- Subject: Re: Hand-written rec-descent parser of GCC-4.1 is WRONG!!!
| > | > Do you demonstrate that "C++ is not LALR(1)"?
| > |
| > | I'll leave that to you as a homework assignment. Actually, C++ is not
| > | LALR(N) for any N.
|
| Nor is it LR(N) nor LL(N).
|
| > | Get out the C++ grammar and figure it out, it's an easy proof.
| > | Come back when you have proved it to your own satisfaction, and
| > | please refrain from giving advice in the meantime.
| >
| > It's not an easy proof.
|
| You are mistaken. The proof is trivial for C++.
|
| zw
Then the final solution with better compilation space-time and valid grammar
is to kill the evil standard C++ and to make a new standard D++ compatible
with LALR(1) or LL(1) languages.
(e.g. as Delphi or Object Pascal but using the C/C++-like style)
Good bye.