This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: using gcc's lexer/parser (was: Re: 'recording' program execution.)
- From: Ian Lance Taylor <iant at google dot com>
- To: "Edward Peschko" <horos11 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 03 Nov 2008 09:53:52 -0800
- Subject: Re: using gcc's lexer/parser (was: Re: 'recording' program execution.)
- References: <5cfa99000811022228ob9a6fcfs9a496fe717bcc082@mail.gmail.com>
"Edward Peschko" <horos11@gmail.com> writes:
> wrt the below, I was giving it some thought, and was wondering how
> usable the gcc lexer/parser combo was by itself, how 'pluggable' it
> was - my hope was that I could take the lexer/parser and instead of
> making an executable out of the incoming code, I could transform the
> code in place, ie: add extra code of my own choosing that I would then
> compile with gcc.
>
> How feasible would that be? Where's a good place to start?
It's not really feasible. gcc's lexer and parser are not pluggable at
all. Obviously it could be done, but it's quite a lot of work.
Ian