This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Hand-written rec-descent parser of GCC-4.1 is WRONG!!!.
- From: jc-nospam at jr-pizarro dot jazztel dot es
- To: gcc at gcc dot gnu dot org
- Date: Wed, 16 Mar 2005 02:41:12 +0100 (CET)
- Subject: Hand-written rec-descent parser of GCC-4.1 is WRONG!!!.
> http://gcc.gnu.org/gcc-4.1/changes.html
>
> New Languages and Language specific improvements
> C and Objective-C
>
> * The old Bison-based C and Objective-C parser has been replaced
> by a new, faster hand-written recursive-descent parser.
Hahahahaha, WRONG!!!!!!
It's one historical error of many years of stupid engineers, developers,
programmers and boss!!!!!
"Hand-written recursive-descent parser" == LL(k)
however, people does it as LL(1).
The grammar of Pascal language can be LL(1), but the grammar of
C, C++ and Objective-C together won't can be LL(1).
However, they together can be LALR(1) (or impossible in worst-case) from Yacc/Bison.
Writing Hand-written recursive-descent parser miss-cleans the source code
and goes hardfully to maintain it!!!
The best option is a clean grammar in Yacc/Bison!.