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