This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ lexer (GCC 3.1.1) requires knowledge of other C dialects
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Gary Funck <gary at Intrepid dot Com>
- Cc: Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 31 Jul 2002 23:09:25 +0100
- Subject: Re: C++ lexer (GCC 3.1.1) requires knowledge of other C dialects
- References: <KNEFLOIOCHLFEGCDNFPHAENGCEAA.gary@intrepid.com>
Gary Funck wrote:-
> The rid_to_yy table requires an entry for each reserved word in *all* supported
> C dialects, and the table is ordered by increasing RID_* values. A few
> observations:
>
> 1) This dependency on other languages makes it more difficult to add a new
> dialect and violates modularity.
Agreed. Any patch that might improve this without sacrificing
performance is welcome. However, I suspect that you might discover why
things are done the way they are if you attempt such a patch.
We're slowly working on combining the C/C++/ObjC front ends into one
mahousive front end that handles them all. So anything other than a
clean fix of this is probably not worth it. I'm not sure such a thing
exists.
Nei.