what parser generator?

Paul Drummond <Drum.Sefex@btinternet.com>
18 Dec 2000 00:48:31 -0500

          From comp.compilers

Related articles
what parser generator? Drum.Sefex@btinternet.com (Paul Drummond) (2000-12-18)
Re: what parser generator? broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2000-12-18)
Re: what parser generator? idbaxter@semdesigns.com (Ira D. Baxter) (2000-12-19)
Re: what parser generator? mike@dimmick.demon.co.uk (Mike Dimmick) (2000-12-19)
Re: what parser generator? Drum.Sefex@btinternet.com (Paul Drummond) (2000-12-20)
Re: what parser generator? idbaxter@semdesigns.com (Ira D. Baxter) (2000-12-21)
Re: what parser generator? ralph@inputplus.demon.co.uk (2001-01-09)
| List of all articles for this month |
From: Paul Drummond <Drum.Sefex@btinternet.com>
Newsgroups: comp.compilers
Date: 18 Dec 2000 00:48:31 -0500
Organization: None
Keywords: parse, question
Posted-Date: 18 Dec 2000 00:48:31 EST

I am writing a C++ DocTool for my 3yr uni project and I have been looking
at different generators.


COCO/R was the first choice because we are learning it at uni, but my
lecturer says it would be very difficult to extract comments using this.
Does anyone dissagree with this?


He suggested ANTLR, but it is supposed to be difficult and it uses Java,
which puts me of for some reason! If it uses Java as the implementation
language then surely the C++ output isn't as good as the original Java
output that it was designed for.


The alternative is to write my own parser. I don't think it would be
IMPOSSIBLE because I never enter function bodies, so i don't need to look
for expressions, loops or anything. All I do is find classes and function
headers, then extract the surrounding comments!


Please can someone give me some pointers, because I got no idea what to do!!
[ANTLR spoke C+ the last time I looked at it. Be warned that no matter how
you do it, correctly parsing C++ is painful since the language is
irregular and ambiguous, but for something like this, you'd probably
be better off with a partial parse and some heuristics. -John]



Post a followup to this message

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