Hand-written rec-descent parser of GCC-4.1 is WRONG!!!.
jc-nospam@jr-pizarro.jazztel.es
jc-nospam@jr-pizarro.jazztel.es
Wed Mar 16 03:15:00 GMT 2005
> 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!.
More information about the Gcc
mailing list