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: Aldy Hernandez <aldyh at redhat dot com>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: Ziemowit Laski <zlaski at apple dot com>, Mark Mitchell <mark at codesourcery dot com>, "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 28 Nov 2001 11:18:41 -0600
- Subject: Re: Target-specific Front-Ends? (Was: front end changes for
- References: <200111281711.JAA03791@atrus.synopsys.com>
On Wed, 2001-11-28 at 11:11, Joe Buck wrote:
> 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.
doesn't matter. just put the FE extension somewhere after cpplib and
before the lexical analyzer.
>
> 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).
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.