This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]