looking for a tool that parses c/c++ for preprocessor #define andgenerate a kind of dictionary "macr

Discussion in 'C++' started by Moderator, May 31, 2011.

  1. Moderator

    Moderator Guest

    Looking for a tool that parses c/c++ for preprocessor #define and
    generate a kind of dictionary "macroname" "value"

    Any idea?

    Thanks

    Aron
     
    Moderator, May 31, 2011
    #1
    1. Advertising

  2. Moderator

    Rich Webb Guest

    Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value"

    On Tue, 31 May 2011 06:57:35 -0700 (PDT), Moderator <>
    wrote:

    >Looking for a tool that parses c/c++ for preprocessor #define and
    >generate a kind of dictionary "macroname" "value"
    >
    >Any idea?


    Doxygen? It does rather more than that, of course.

    <http://www.stack.nl/~dimitri/doxygen/>

    --
    Rich Webb Norfolk, VA
     
    Rich Webb, May 31, 2011
    #2
    1. Advertising

  3. Moderator

    Nobody Guest

    Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value"

    On Tue, 31 May 2011 06:57:35 -0700, Moderator wrote:

    > Looking for a tool that parses c/c++ for preprocessor #define and
    > generate a kind of dictionary "macroname" "value"


    gcc -E -dM file.c | sed 's/^#define \([^ ]*\) \(.*\)$/"\1" "\2"/'
     
    Nobody, May 31, 2011
    #3
  4. Moderator

    Jeff Flinn Guest

    Re: looking for a tool that parses c/c++ for preprocessor #defineand generate a kind of dictionary "macroname" "value"

    Moderator wrote:
    > Looking for a tool that parses c/c++ for preprocessor #define and
    > generate a kind of dictionary "macroname" "value"
    >
    > Any idea?



    boost.wave see: http://www.boost.org/doc/libs/1_46_1/libs/wave/index.html

    Jeff
     
    Jeff Flinn, May 31, 2011
    #4
  5. Moderator

    Moderator Guest

    On May 31, 5:12 pm, Jeff Flinn <> wrote:
    > Moderator wrote:
    > > Looking for a tool that parses c/c++ for preprocessor #define and
    > > generate a kind of dictionary "macroname" "value"

    >
    > > Any idea?

    >
    > boost.wave see:http://www.boost.org/doc/libs/1_46_1/libs/wave/index.html
    >
    > Jeff


    Thanks to all for the valuable answers!

    Aron
     
    Moderator, May 31, 2011
    #5
    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. KathyB
    Replies:
    0
    Views:
    1,023
    KathyB
    Jun 25, 2003
  2. XML Parses

    , Oct 26, 2005, in forum: XML
    Replies:
    2
    Views:
    650
    Peter Flynn
    Oct 27, 2005
  3. Cronus
    Replies:
    1
    Views:
    676
    Paul Mensonides
    Jul 15, 2004
  4. =?Utf-8?B?RGF2aWQgQ2FtZXJvbg==?=

    Latest patch parses 1.1 pages with 2.0

    =?Utf-8?B?RGF2aWQgQ2FtZXJvbg==?=, Aug 8, 2007, in forum: ASP .Net
    Replies:
    16
    Views:
    1,207
    Juan T. Llibre
    Aug 14, 2007
  5. Moderator
    Replies:
    4
    Views:
    886
    Moderator
    May 31, 2011
Loading...

Share This Page