This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target-specific Front-Ends? (Was: front end changes for
- From: Joe Buck <jbuck at synopsys dot COM>
- To: aldyh at redhat dot com (Aldy Hernandez)
- Cc: zlaski at apple dot com (Ziemowit Laski),mark at codesourcery dot com (Mark Mitchell), jbuck at synopsys dot COM (Joe Buck),jsm28 at cam dot ac dot uk (Joseph S. Myers), gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org)
- Date: Wed, 28 Nov 2001 09:11:04 -0800 (PST)
- Subject: Re: Target-specific Front-Ends? (Was: front end changes for
Tuesday, November 27, 2001, at 06:23 , Aldy Hernandez wrote:
>
> >> I've actually thought about implementing generic front end extension
> >> support to gcc for this kind of nonsense. Sort of like a preprocessor
> >> that runs after the actual C preprocessor-- massages the output in any
> >> way it sees fit, and feeds its output to the lexical analyzer.
...
> > Well, it definitely sounds interesting! Tell me more. :) :)
Aldy again:
> simple, it just reads the output from CPP, manipulates the strings,
> and, feeds it's output to the lexer.
But we no longer use a separate preprocessing program. We now use cpplib,
integrating preprocessing with lexing for the main compiler.
I suppose that you could still insert a pass that looks like the C++
"spew" hack (implement a token queue to allow for extra lookahead
and re-labeling of tokens).