Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #5909

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

From Nobody <nobody@nowhere.com>
Subject Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value"
Date 2011-05-31 15:52 +0100
Message-Id <pan.2011.05.31.14.52.01.984000@nowhere.com>
Newsgroups comp.lang.c++, comp.lang.c
References <bf3af5eb-ed30-4039-b86b-c5039d0b866c@u26g2000vby.googlegroups.com>
Organization Zen Internet

Cross-posted to 2 groups.

Show all headers | View raw


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"/'

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value" Moderator <zegaucho@gmail.com> - 2011-05-31 06:57 -0700
  Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value" Rich Webb <bbew.ar@mapson.nozirev.ten> - 2011-05-31 10:41 -0400
  Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value" Nobody <nobody@nowhere.com> - 2011-05-31 15:52 +0100
  Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value" Jeff Flinn <TriumphSprint2000@hotmail.com> - 2011-05-31 11:12 -0400
    Re: looking for a tool that parses c/c++ for preprocessor #define and generate a kind of dictionary "macroname" "value" Moderator <zegaucho@gmail.com> - 2011-05-31 09:24 -0700

csiph-web