Re: Parser

"Karsten Nyblad" <>
12 Sep 2002 14:30:01 -0400

          From comp.compilers

Related articles
Parser (Aaron Becher) (2002-09-12)
Re: Parser (Christian Lindig) (2002-09-12)
Re: Parser (Karsten Nyblad) (2002-09-12)
Re: Parser (Fred J. Scipione) (2002-09-14)
Re: Parser (Grzegorz Jakacki) (2002-09-14)
Re: Parser (VBDis) (2002-09-14)
Re: Parser (Mikael 'Zayenz' Lagerkvist) (2002-09-19)
| List of all articles for this month |

From: "Karsten Nyblad" <>
Newsgroups: comp.compilers
Date: 12 Sep 2002 14:30:01 -0400
References: 02-09-078
Keywords: tools, parse
Posted-Date: 12 Sep 2002 14:30:01 EDT

"Aaron Becher" <> wrote in message news:02-09-078...
> What would be the best approach? I have a VERY large pool of source
> code that needs a certain line of code inserted at the beginning of
> every function (a macro). A few years ago, I created from scratch a
> tool that could parse our C and C++ source code and insert and/or
> maintain this line of code at the beginning of every
> function. However, it does run into problems now and then, especially
> when our coding standard is not followed.

The are a number of tools designed for extracting C function headers
and generating *.h include files. There are tools for changing
programs from old K&R function headers to C standard headers, and I
think, vice-versa. I have a hunch that these tools may prove easier
to modify than compiler front ends never intended for generating
source code. You may have to search a bit to find the tool that is
easiest to modify, because many of them date back to the days were
many compilers could not handle one of the sorts of headers. One such
tool is cextract, and you will find it in usenet group

Karsten Nyblad

Post a followup to this message

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