This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using gcc's lexer/parser (was: Re: 'recording' program execution.)


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]