By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,116 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,116 IT Pros & Developers. It's quick & easy.

Parsing c++ code

P: n/a
hi
I am looking for a simple C++ parser.
the parser that only can give me little information about C++ code.
Like.
Function name, returns, hasparameters, modifier.
similarly for classes
class name, has public,private, protected functions,
has bublic,private and protected functiions

and thats it, is there any simple parser that can do that and i dont
have to look deep into it
thank you

Aug 4 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Am Thu, 04 Aug 2005 07:35:28 -0700 schrieb humpty:
hi
I am looking for a simple C++ parser.
the parser that only can give me little information about C++ code.


Try doxygen. It works well, even if the code contains no doxygen comment.

Aug 5 '05 #2

P: n/a
Stefan Klemm wrote:
Am Thu, 04 Aug 2005 07:35:28 -0700 schrieb humpty:
hi
I am looking for a simple C++ parser.
the parser that only can give me little information about C++ code.

Try doxygen. It works well, even if the code contains no doxygen comment.


A configurable C++ parser-only would be a nice thing. For example, one
could use it to "grep" for old-style casts, something that cannot be
done with regular expressions. Other uses come to mind as well.

/David
Aug 7 '05 #3

P: n/a

"David Rasmussen" <da*************@gmx.net> wrote in message
news:42*********************@dtext02.news.tele.dk. ..
Stefan Klemm wrote:
Am Thu, 04 Aug 2005 07:35:28 -0700 schrieb humpty:
hi
I am looking for a simple C++ parser.
the parser that only can give me little information about C++ code.

A configurable C++ parser-only would be a nice thing. For example, one
could use it to "grep" for old-style casts, something that cannot be
done with regular expressions. Other uses come to mind as well.


You can't do that with a "simple" C++ parser. You need
a full C++ parser so the very details you want to find
are captured correctly.

See http://www.semdesigns.com/Products/F...pFrontEnd.html
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
Aug 20 '05 #4

P: n/a
Ira Baxter wrote:

You can't do that with a "simple" C++ parser.
Depends on the relative term "simple", doesn't it?
You need
a full C++ parser so the very details you want to find
are captured correctly.

True, but this is still much simpler than a full compiler with various
intermediate representations for optimization etc. and one or more
backends for various targets.
See http://www.semdesigns.com/Products/F...pFrontEnd.html


I would like an open souce alternative.

/David
Aug 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.