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]

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


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