C++ language parser?

Discussion in 'C++' started by Markus Dehmann, Jul 8, 2004.

  1. Sorry, this is slightly offtopic, but: Given a C++ header file, how
    can I get information about all the member functions of the contained
    classes, with information about the return types and parameters? In
    other words, I need a (simple) C++ language parser. There are many
    tools out there that parse C++ code, e.g. g++, swig, ebrowse, etags?,
    eclipse-cdt, ... Has anyone experience with using the parser component
    of one of these, or are there other C++ language parsers available?

    Thanks
    Markus
     
    Markus Dehmann, Jul 8, 2004
    #1
    1. Advertising

  2. On 8 Jul 2004 14:01:54 -0700, Markus Dehmann <> wrote:

    > Sorry, this is slightly offtopic, but: Given a C++ header file, how
    > can I get information about all the member functions of the contained
    > classes, with information about the return types and parameters? In
    > other words, I need a (simple) C++ language parser. There are many
    > tools out there that parse C++ code, e.g. g++, swig, ebrowse, etags?,
    > eclipse-cdt, ... Has anyone experience with using the parser component
    > of one of these, or are there other C++ language parsers available?
    >
    > Thanks
    > Markus


    No experience but these FAQs might help

    http://www.faqs.org/faqs/by-newsgroup/comp/comp.compilers.html

    john
     
    John Harrison, Jul 9, 2004
    #2
    1. Advertising

  3. If you want to write a parser, use Spitit++ (www.spirit.sf.net) it's
    the best C++ template based parser generator. It has a sample of
    parsing complete C-syntax.


    --
    -Gernot
    int main(int argc, char** argv) {printf
    ("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

    ________________________________________
    Looking for a good game? Do it yourself!
    GLBasic - you can do
    www.GLBasic.com
     
    Gernot Frisch, Jul 9, 2004
    #3
  4. Markus Dehmann

    Ira Baxter Guest

    "Markus Dehmann" <> wrote in message
    news:...
    > Sorry, this is slightly offtopic, but: Given a C++ header file, how
    > can I get information about all the member functions of the contained
    > classes, with information about the return types and parameters? In
    > other words, I need a (simple) C++ language parser. There are many
    > tools out there that parse C++ code, e.g. g++, swig, ebrowse, etags?,
    > eclipse-cdt, ... Has anyone experience with using the parser component
    > of one of these, or are there other C++ language parsers available?


    If you want to parse real C++ code, there isn't any such thing
    as a "simple C++" language parser. If you additionally want
    the type information, you need a full C++ front end.

    GCC is clearly one option available. It isn't specifically designed
    to extract such information for "public use".

    Our DMS Software Reengineering Toolkit is another (commercial)
    option. It does have a full C++ front end, and all the information
    you want is explicitly available through its C++ symbol table
    APIs.

    See http://www.semdesigns.com/Products/FrontEnds/CppFrontEnd.html


    --
    Ira D. Baxter, Ph.D., CTO 512-250-1018
    Semantic Designs, Inc. www.semdesigns.com
     
    Ira Baxter, Jul 10, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Oninger
    Replies:
    0
    Views:
    762
    Bernd Oninger
    Jun 9, 2004
  2. ZOCOR

    XML Parser VS HTML Parser

    ZOCOR, Oct 3, 2004, in forum: Java
    Replies:
    11
    Views:
    817
    Paul King
    Oct 5, 2004
  3. Bernd Oninger
    Replies:
    0
    Views:
    812
    Bernd Oninger
    Jun 9, 2004
  4. Joel Hedlund
    Replies:
    2
    Views:
    511
    Joel Hedlund
    Nov 11, 2006
  5. Joel Hedlund
    Replies:
    0
    Views:
    307
    Joel Hedlund
    Nov 11, 2006
Loading...

Share This Page