Datatype parser for C++ [modified]
-
Does anybody know any tool that can be used to identify data types used in files? I need to search and list out all the data types (primitive, MFC, STL data types) used as class members, function parameters, etc., in a large volume of c++ files (need to consider the header files only).
- NS - [ODBaseBtn]
modified on Friday, December 12, 2008 4:47 AM
-
Does anybody know any tool that can be used to identify data types used in files? I need to search and list out all the data types (primitive, MFC, STL data types) used as class members, function parameters, etc., in a large volume of c++ files (need to consider the header files only).
- NS - [ODBaseBtn]
modified on Friday, December 12, 2008 4:47 AM
my initial thought would be along the lines of find a parser & grammar for c++, generate a parse-tree and walk that looking for the declarations you need ... [edit] its not an easy thing you ask .. this is one way http://www.devincook.com/goldparser/[^] alternatively, I guess you can do a brute force match against an array of key-words representing what you'd like to identify, eg {"map","vector","int","string"...} there was an article about this on cp somewhere It depends on context/what/how you will use the info 'g'
-
my initial thought would be along the lines of find a parser & grammar for c++, generate a parse-tree and walk that looking for the declarations you need ... [edit] its not an easy thing you ask .. this is one way http://www.devincook.com/goldparser/[^] alternatively, I guess you can do a brute force match against an array of key-words representing what you'd like to identify, eg {"map","vector","int","string"...} there was an article about this on cp somewhere It depends on context/what/how you will use the info 'g'
Thank you... I have some time constraint too... :(
- NS - [ODBaseBtn]