From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aldy Hernandez To: Joe Buck Cc: Ziemowit Laski , Mark Mitchell , "Joseph S. Myers" , "gcc@gcc.gnu.org" Subject: Re: Target-specific Front-Ends? (Was: front end changes for Date: Wed, 28 Nov 2001 09:16:00 -0000 Message-ID: <1006967921.5637.77.camel@litecycle.cc.andrews.edu> References: <200111281711.JAA03791@atrus.synopsys.com> X-SW-Source: 2001-11/msg01486.html Message-ID: <20011128091600.HkUmb-Eu4YsnzzXipqkoykSx7Ej5nKrDtoBY8esAVzM@z> 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.