in reply to Re: Parsing a .h header file
in thread Parsing a .h header file

All I want to do is to use a header file to generate some C++ code from it namely a class declaration and function definitions complete with arguments etc and some defunct code that I could then use to generate more code, namely, this

1) Have a header file blah.h that contains the interface

2) Generate a .cpp file from it that has the class declaration and function definitions with defunct/default code and some placeholders/tags(layman language used here owing to lack of specuialized knowldge of PERL or scripting in general) that are to be replaced in Step 3

3) Use the file from Step 2 and replace the placeholders with some information that is provided (by means of an input config file/command line/whatever other means) and must be replaced uniformally in the entire file(from Step 2)

Requirements that MUST be met from the FINAL PROCESSED OUTPUT FILE from Step 3 are:

1) The length of each line of code (that can be compiled by a standard C++ compiler) must NOT exceed 78 characters

2) Indentation and other standard formatting features must be retained and no user intervention must be needed in order to beautify or standardize the code to something that is normally acceptable as code that can be accpeted in a code repository.

3) Last, stating the obvious of course: the code SHOULD be capable of being compiled by a C++ compiler. :)

I hope I have come up with a better description of the problem at hand.

Thanks very much for the response.:) Much appreciated.