Re: A Readable C Code without #DEFINEs ...
- From: Joe Kelsey <joe@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Oct 2005 09:33:00 -0000
Bahram wrote:
Folks,
I am using LEX and YACC and they produce this grossly unreadable C code that is infested with #define this and #define that.
The code is unreadable and I need to make changes to it for the particular project I am working on.
You do not ever modify the code produced by lex or yacc. Each of these languages has a system defined to allow you to insert appropriate code as necessary.
If for some reason, you feel the need to actually modify the lex or yacc code, stop immediately. Go back to your design and fix the problems in your design that prevent you from using these tools correctly.
If for some unknowable reason, you feel the need to still modify the inner workings of these tools, again stop immediately. Go back to your design and change it so that it includes the steps necessary for you to design and build tools that allow you to accomplish your goals. If your design calls for using lex and yacc, use them as tools and ignore the C code they generate. Concentrate on making the code you insert work correctly. Do not ever try to modify the code produced by lex or yacc.
/Joe
Is there a switch is C, or, if you know about a hidden switch in either lex or yacc, that would produce a final human readable code that I can make sense out of, PLEASE.
Cheers, Bahram Saghari bsaghari@xxxxxxxxxxx
-- comp.lang.c.moderated - moderation address: clcm@xxxxxxxxxxxx -- you must have an appropriate newsgroups line in your header for your mail to be seen, or the newsgroup name in square brackets in the subject line. Sorry. .
- References:
- A Readable C Code without #DEFINEs ...
- From: Bahram
- A Readable C Code without #DEFINEs ...
- Prev by Date: Re: Preprocesor problem
- Next by Date: Contest! Warnings in a five-line program.
- Previous by thread: Re: A Readable C Code without #DEFINEs ...
- Next by thread: malloc warning gcc > 4.0
- Index(es):
Relevant Pages
|