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: C++ lexer (GCC 3.1.1) requires knowledge of other C dialects


Gary Funck wrote:-

> Will this new front-end still be YACC (bison) based? I've seen and heard
> about an effort to build a hand-crafted recursive descent parser.

I think that is pretty much done for C++ as a first revision (see
cp/Attic/parser.c).  It will probably have some hooks / if statements to
handle C and ObjC in the future.  I have no idea what this might do for
maintainability, but IMO we;ve stretched bison/yacc way beyond what it can
reasonably do, and it shows (diagnostics are very poor, and the parsers are
convoluted, for a start).  I see little reason why a well-designed recursive
descent parser for all front ends can't be at least as maintainable.

I could be wrong, of course.

Neil.


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