Subj : Re: How can I get rid of #define in my generated C code ...? To : comp.programming From : Scott Moore Date : Mon Oct 10 2005 02:08 pm Bahram wrote On 10/09/05 17:00,: > Folk, > > I am using lex and yacc for a project I am working on, wondering if > there is any switch I can specify ANYWHERE, including the C compiler, > that would take the .c files that these utilities generate, and get rid > of all the #defines in the generated code. > (when I say get rid of, I don't mean to simply delete, I mean to > recognize: Oh yes, this is defined and here is what I want to do.) > > The y.tab.c and lex.yy.c files that these utilities produce are > infested with #define, a lot conditional, making them impossible to > read, and modify (e.g. yes, I need to make some changes to them) > > Any suggestions ...? > I appreciate your help in advance. > > Cheers, > Bahram > bsaghari@comcast.net > Write a perl script to change then to const declarations. .