Comments & Code together?

mwh@gradin.cis.upenn.edu (Michael Hicks)
8 Jun 1996 22:15:40 -0400

          From comp.compilers

Related articles
Comments & Code together? mwh@gradin.cis.upenn.edu (1996-06-08)
Re: Comments & Code together? darius@phidani.be (Darius Blasbans) (1996-06-13)
Re: Comments & Code together? amb@gedanken.demon.co.uk (Andrew M. Bishop) (1996-06-13)
| List of all articles for this month |

From: mwh@gradin.cis.upenn.edu (Michael Hicks)
Newsgroups: comp.compilers
Date: 8 Jun 1996 22:15:40 -0400
Organization: University of Pennsylvania
Keywords: parse, C, question, comment

I am working on a program that will insert hypertext into .c files
so that function calls will be "linked" to their definitions. To use one
of the yacc C grammars floating around requires that the .c file be
preprocessed first, thus eliminating all comments, #define's, etc., which
is undesirable. Are there any C grammars out there that allow for
preprocessing AND compilation to go on simultaneously? If not, does
anyone have any suggestions as to how I could preprocess the file, parse
it to insert hypertext links, and then reintroduce the missing comments,
#define's, etc.?


Thanks,
Mike


--
Michael Hicks
Ph.D. student, the University of Pennsylvania
mwh@gradient.cis.upenn.edu
[The usual approach is to hang the comments on a nearby token, or perhaps on
a nearby node in the parse tree. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.