|what parser generator? Drum.Sefex@btinternet.com (Paul Drummond) (2000-12-18)|
|Re: what parser generator? email@example.com (Hans-Bernhard Broeker) (2000-12-18)|
|Re: what parser generator? firstname.lastname@example.org (Ira D. Baxter) (2000-12-19)|
|Re: what parser generator? email@example.com (Mike Dimmick) (2000-12-19)|
|Re: what parser generator? Drum.Sefex@btinternet.com (Paul Drummond) (2000-12-20)|
|Re: what parser generator? firstname.lastname@example.org (Ira D. Baxter) (2000-12-21)|
|Re: what parser generator? email@example.com (2001-01-09)|
|From:||firstname.lastname@example.org (Ralph Corderoy)|
|Date:||9 Jan 2001 23:24:54 -0500|
|Posted-Date:||09 Jan 2001 23:24:54 EST|
Sorry if this post is a little late but no one seems to have suggested
it so far.
> I am writing a C++ DocTool for my 3yr uni project and I have been
> looking at different generators.
Does that mean you're only interested in comments that match a certain
style? For example
* blah blah, line above dropped from output.
and don't care about other comments?
Is so, how about a two pass approach following the `do something
simple well' approach.
Pull the DOC comments, not all comments, out of the source file noting
where each occurs. The line number may be sufficient.
Then have a second parse that scans the preprocessed source, i.e. no
comments or macros, and identifies the location and length of each
function, or whatever it is you're interested in.
Then simply tie each DOC comment with the following function assuming
that's the convention.
You'll have to take note of the #line statements that occur in the
preprocessed output so your idea of the current line number is based on
the unpreprocessed text, not the preprocessed text.
Hope this helps; trying to combine the two seems messy.
Return to the
Search the comp.compilers archives again.