Are there any free tools to help with automatic code generation?Generating data structures by parsing plain text filesAutomatically separate class definitions from declarations?How to automatically generate a stacktrace when my program crashesC++ Code GenerationIs there a code generation tool that accepts Excel files as input?Automatically generate C++ file from header?Are there any free parser generators that generate C++ code and handle Unicode correctly?Automatically generating Java source codeIs it possible to generate a C++ class from a xsd using Qt (without the XSD tool)?is there any tool for automatic interface generation using swig?Deoptimizing a program for the pipeline in Intel Sandybridge-family CPUsAre == and != mutually dependent?
Discontinuous Tube visualization
Term for future-tense technique that isn't exactly foreshadowing
Improving an O(N^2) function (all entities iterating over all other entities)
Function over a list that depends on the index
What is a Kravchuk transform and how is it related to Fourier transforms?
Why is this guy handcuffed censored?
Why aren't there any women super Grandmasters (GMs)?
Why are flying carpets banned while flying brooms are not?
How to belay quickly ascending top-rope climbers?
Linux ext4 restore file and directory access rights after bad backup/restore
Simplest instruction set that has an c++/C compiler to write an emulator for?
How should I interpret a promising preprint that was never published in a peer-reviewed journal?
Do pedestrians imitate automotive traffic?
Could Europeans in Europe demand protection under UN Declaration on the Rights of Indigenous Peoples?
How electronics on board of JWST can survive the low operating temperature while it's difficult to survive lunar night?
Should I work for free if client's requirement changed
Which family is it?
How important are the Author's mood and feelings for writing a story?
Align the contents of a numerical matrix when you have minus signs
How to get a type of "screech" on guitar
What is the intuition for higher homotopy groups not vanishing?
Suggestions for how to track down the source of this force:source:push error?
When a ball on a rope swings in a circle, is there both centripetal force and tension force?
Was demon possession only a New Testament phenomenon?
Are there any free tools to help with automatic code generation?
Generating data structures by parsing plain text filesAutomatically separate class definitions from declarations?How to automatically generate a stacktrace when my program crashesC++ Code GenerationIs there a code generation tool that accepts Excel files as input?Automatically generate C++ file from header?Are there any free parser generators that generate C++ code and handle Unicode correctly?Automatically generating Java source codeIs it possible to generate a C++ class from a xsd using Qt (without the XSD tool)?is there any tool for automatic interface generation using swig?Deoptimizing a program for the pipeline in Intel Sandybridge-family CPUsAre == and != mutually dependent?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
A few semesters back I had a class where we wrote a very rudimentary scheme parser and eventually an interpreter. After the class, I converted my parser into a C++ parser that did a reasonably good job of parsing C++ as long as I didn't do anything fancy with the preprocessor or macros. I could use it to read over my classes and functions and do neat things like automatically generate class readers or writers or set up function callbacks from a text file.
However, my program is pretty limited. I'm sure I could spend some time to make it more robust and do more neat things, but I don't want to spend the time and effort if there are already more robust tools available that do the same thing. I figure there has to be something like this out there since parsers are an essential part of compilers, but I haven't seen tools specifically for automatic code generation that make it easy to go through and play with data structures that represent classes, functions and variables for C++ specifically. Are there tools that do this?
Edit:
Hopefully this will clarify a little bit of what I'm looking for. The program I have runs as a prebuild step in visual studio. It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code. Currently I just use it to make it easy to read and write my data structures to a plain text file, but I could do other things as well. The file readers and writers are output into plain .cpp and .h files which I include in the rest of my project just as I would any other file. What I'm looking for are tools that do similar things so I can decide if I should continue to use my own or switch to a some better solution. I'm not looking for anything that generates machine code or edits code that I've written.
c++ code-generation
|
show 2 more comments
A few semesters back I had a class where we wrote a very rudimentary scheme parser and eventually an interpreter. After the class, I converted my parser into a C++ parser that did a reasonably good job of parsing C++ as long as I didn't do anything fancy with the preprocessor or macros. I could use it to read over my classes and functions and do neat things like automatically generate class readers or writers or set up function callbacks from a text file.
However, my program is pretty limited. I'm sure I could spend some time to make it more robust and do more neat things, but I don't want to spend the time and effort if there are already more robust tools available that do the same thing. I figure there has to be something like this out there since parsers are an essential part of compilers, but I haven't seen tools specifically for automatic code generation that make it easy to go through and play with data structures that represent classes, functions and variables for C++ specifically. Are there tools that do this?
Edit:
Hopefully this will clarify a little bit of what I'm looking for. The program I have runs as a prebuild step in visual studio. It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code. Currently I just use it to make it easy to read and write my data structures to a plain text file, but I could do other things as well. The file readers and writers are output into plain .cpp and .h files which I include in the rest of my project just as I would any other file. What I'm looking for are tools that do similar things so I can decide if I should continue to use my own or switch to a some better solution. I'm not looking for anything that generates machine code or edits code that I've written.
c++ code-generation
1
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
2
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26
|
show 2 more comments
A few semesters back I had a class where we wrote a very rudimentary scheme parser and eventually an interpreter. After the class, I converted my parser into a C++ parser that did a reasonably good job of parsing C++ as long as I didn't do anything fancy with the preprocessor or macros. I could use it to read over my classes and functions and do neat things like automatically generate class readers or writers or set up function callbacks from a text file.
However, my program is pretty limited. I'm sure I could spend some time to make it more robust and do more neat things, but I don't want to spend the time and effort if there are already more robust tools available that do the same thing. I figure there has to be something like this out there since parsers are an essential part of compilers, but I haven't seen tools specifically for automatic code generation that make it easy to go through and play with data structures that represent classes, functions and variables for C++ specifically. Are there tools that do this?
Edit:
Hopefully this will clarify a little bit of what I'm looking for. The program I have runs as a prebuild step in visual studio. It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code. Currently I just use it to make it easy to read and write my data structures to a plain text file, but I could do other things as well. The file readers and writers are output into plain .cpp and .h files which I include in the rest of my project just as I would any other file. What I'm looking for are tools that do similar things so I can decide if I should continue to use my own or switch to a some better solution. I'm not looking for anything that generates machine code or edits code that I've written.
c++ code-generation
A few semesters back I had a class where we wrote a very rudimentary scheme parser and eventually an interpreter. After the class, I converted my parser into a C++ parser that did a reasonably good job of parsing C++ as long as I didn't do anything fancy with the preprocessor or macros. I could use it to read over my classes and functions and do neat things like automatically generate class readers or writers or set up function callbacks from a text file.
However, my program is pretty limited. I'm sure I could spend some time to make it more robust and do more neat things, but I don't want to spend the time and effort if there are already more robust tools available that do the same thing. I figure there has to be something like this out there since parsers are an essential part of compilers, but I haven't seen tools specifically for automatic code generation that make it easy to go through and play with data structures that represent classes, functions and variables for C++ specifically. Are there tools that do this?
Edit:
Hopefully this will clarify a little bit of what I'm looking for. The program I have runs as a prebuild step in visual studio. It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code. Currently I just use it to make it easy to read and write my data structures to a plain text file, but I could do other things as well. The file readers and writers are output into plain .cpp and .h files which I include in the rest of my project just as I would any other file. What I'm looking for are tools that do similar things so I can decide if I should continue to use my own or switch to a some better solution. I'm not looking for anything that generates machine code or edits code that I've written.
c++ code-generation
c++ code-generation
edited Sep 21 '09 at 19:45
Alex
asked Sep 21 '09 at 19:23
AlexAlex
8,04612 gold badges50 silver badges83 bronze badges
8,04612 gold badges50 silver badges83 bronze badges
1
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
2
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26
|
show 2 more comments
1
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
2
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26
1
1
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
2
2
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26
|
show 2 more comments
8 Answers
8
active
oldest
votes
A complete parser-building tool like ANTLR or YACC is necessary if you want to parse C++ from scratch, but it's overkill for your purposes.
It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code.
Two main options:
GCC-XML can generate a list of classes, members, and functions. The distribution version on their web site is quite old; try the CVS version instead. I don't know about the availability of a Windows port.
Doxygen is designed for producing documentation, but it can also produce an XML output, which you should be able to use to do what you want.
Currently I just use it to make it easy to read and write my data structures to a plain text file...
This is known as serialization. Try Boost.Serialization or maybe libs11n or Google Protocol Buffers. Stack Overflow has further discussion.
...but I could do other things as well.
Other cool applications of this kind of automatic code generation include reflection (inspecting your objects' members at runtime, using duck typing with C++, etc.) and generating wrappers for calling C++ from scripting languages. For a C++ reflection library, see Reflex. For an example of generating wrappers for scripting languages, see Boost.Python or SWIG.
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
add a comment |
The C++ FAQ Lite has references to YACC grammars for C++. YACC is an old-school parser that was used to generate parser output, clumsy and difficult to learn but very powerful. Nowadays, you'd use Gnu Bison instead of YACC.
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
add a comment |
Don't forget about Cog. It requires you to know Python. In essence it embeds the output of Python scripts into your code. It's absurdly easy to use, but it takes a totally different approach from things like ANTLR and its purpose is somewhat different.
add a comment |
Maybe Boost::Serialize or ANTLR?
add a comment |
I answered a similar question (re splitting source files into separate header and cpp files) by suggesting the use of lzz.
lzz has a very powerful C++ parser that builds a representation for everything except the bodies of functions. As long as you don't need the contents of the function bodies you you could modify 'lzz' so that it performs the generation step you want.
add a comment |
If you want tools that can parse production C++ code, and carry out arbitrary analyses and transformations, see our DMS Software Reengineering Toolkit and its C++ front end.
It would be straightforward to use the information DMS can provide about C++ code, its structures, types, instances, to generate such access functions. If you wanted to generate access functions in another language, DMS provides means to code transformations from the input language (in this case, C++) to that target language.
add a comment |
Mozilla developed Pork for this kind of thing. I can't say it's easy to use (or even to build), but it is in production.
add a comment |
I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1456342%2fare-there-any-free-tools-to-help-with-automatic-code-generation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
A complete parser-building tool like ANTLR or YACC is necessary if you want to parse C++ from scratch, but it's overkill for your purposes.
It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code.
Two main options:
GCC-XML can generate a list of classes, members, and functions. The distribution version on their web site is quite old; try the CVS version instead. I don't know about the availability of a Windows port.
Doxygen is designed for producing documentation, but it can also produce an XML output, which you should be able to use to do what you want.
Currently I just use it to make it easy to read and write my data structures to a plain text file...
This is known as serialization. Try Boost.Serialization or maybe libs11n or Google Protocol Buffers. Stack Overflow has further discussion.
...but I could do other things as well.
Other cool applications of this kind of automatic code generation include reflection (inspecting your objects' members at runtime, using duck typing with C++, etc.) and generating wrappers for calling C++ from scripting languages. For a C++ reflection library, see Reflex. For an example of generating wrappers for scripting languages, see Boost.Python or SWIG.
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
add a comment |
A complete parser-building tool like ANTLR or YACC is necessary if you want to parse C++ from scratch, but it's overkill for your purposes.
It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code.
Two main options:
GCC-XML can generate a list of classes, members, and functions. The distribution version on their web site is quite old; try the CVS version instead. I don't know about the availability of a Windows port.
Doxygen is designed for producing documentation, but it can also produce an XML output, which you should be able to use to do what you want.
Currently I just use it to make it easy to read and write my data structures to a plain text file...
This is known as serialization. Try Boost.Serialization or maybe libs11n or Google Protocol Buffers. Stack Overflow has further discussion.
...but I could do other things as well.
Other cool applications of this kind of automatic code generation include reflection (inspecting your objects' members at runtime, using duck typing with C++, etc.) and generating wrappers for calling C++ from scripting languages. For a C++ reflection library, see Reflex. For an example of generating wrappers for scripting languages, see Boost.Python or SWIG.
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
add a comment |
A complete parser-building tool like ANTLR or YACC is necessary if you want to parse C++ from scratch, but it's overkill for your purposes.
It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code.
Two main options:
GCC-XML can generate a list of classes, members, and functions. The distribution version on their web site is quite old; try the CVS version instead. I don't know about the availability of a Windows port.
Doxygen is designed for producing documentation, but it can also produce an XML output, which you should be able to use to do what you want.
Currently I just use it to make it easy to read and write my data structures to a plain text file...
This is known as serialization. Try Boost.Serialization or maybe libs11n or Google Protocol Buffers. Stack Overflow has further discussion.
...but I could do other things as well.
Other cool applications of this kind of automatic code generation include reflection (inspecting your objects' members at runtime, using duck typing with C++, etc.) and generating wrappers for calling C++ from scripting languages. For a C++ reflection library, see Reflex. For an example of generating wrappers for scripting languages, see Boost.Python or SWIG.
A complete parser-building tool like ANTLR or YACC is necessary if you want to parse C++ from scratch, but it's overkill for your purposes.
It reads over my source files, makes a list of classes, their members, their functions, etc. which is then used to generate new code.
Two main options:
GCC-XML can generate a list of classes, members, and functions. The distribution version on their web site is quite old; try the CVS version instead. I don't know about the availability of a Windows port.
Doxygen is designed for producing documentation, but it can also produce an XML output, which you should be able to use to do what you want.
Currently I just use it to make it easy to read and write my data structures to a plain text file...
This is known as serialization. Try Boost.Serialization or maybe libs11n or Google Protocol Buffers. Stack Overflow has further discussion.
...but I could do other things as well.
Other cool applications of this kind of automatic code generation include reflection (inspecting your objects' members at runtime, using duck typing with C++, etc.) and generating wrappers for calling C++ from scripting languages. For a C++ reflection library, see Reflex. For an example of generating wrappers for scripting languages, see Boost.Python or SWIG.
edited Mar 26 at 11:45
albert
3,3833 gold badges11 silver badges25 bronze badges
3,3833 gold badges11 silver badges25 bronze badges
answered Sep 21 '09 at 20:12
Josh KelleyJosh Kelley
43k15 gold badges109 silver badges196 bronze badges
43k15 gold badges109 silver badges196 bronze badges
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
add a comment |
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
1
1
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
Thank you. I have been banging my head for 10 minutes trying to remember what GCC-XML was called!
– Duck
Sep 21 '09 at 20:14
add a comment |
The C++ FAQ Lite has references to YACC grammars for C++. YACC is an old-school parser that was used to generate parser output, clumsy and difficult to learn but very powerful. Nowadays, you'd use Gnu Bison instead of YACC.
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
add a comment |
The C++ FAQ Lite has references to YACC grammars for C++. YACC is an old-school parser that was used to generate parser output, clumsy and difficult to learn but very powerful. Nowadays, you'd use Gnu Bison instead of YACC.
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
add a comment |
The C++ FAQ Lite has references to YACC grammars for C++. YACC is an old-school parser that was used to generate parser output, clumsy and difficult to learn but very powerful. Nowadays, you'd use Gnu Bison instead of YACC.
The C++ FAQ Lite has references to YACC grammars for C++. YACC is an old-school parser that was used to generate parser output, clumsy and difficult to learn but very powerful. Nowadays, you'd use Gnu Bison instead of YACC.
answered Sep 21 '09 at 20:04
David ThornleyDavid Thornley
51k8 gold badges83 silver badges143 bronze badges
51k8 gold badges83 silver badges143 bronze badges
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
add a comment |
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
The GNU guys gave up using Bison to parse C and C++.
– Ira Baxter
Sep 30 '09 at 9:02
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
Probably a good idea. Exactly why C syntax is the way it is I may never know.
– David Thornley
Sep 30 '09 at 20:01
add a comment |
Don't forget about Cog. It requires you to know Python. In essence it embeds the output of Python scripts into your code. It's absurdly easy to use, but it takes a totally different approach from things like ANTLR and its purpose is somewhat different.
add a comment |
Don't forget about Cog. It requires you to know Python. In essence it embeds the output of Python scripts into your code. It's absurdly easy to use, but it takes a totally different approach from things like ANTLR and its purpose is somewhat different.
add a comment |
Don't forget about Cog. It requires you to know Python. In essence it embeds the output of Python scripts into your code. It's absurdly easy to use, but it takes a totally different approach from things like ANTLR and its purpose is somewhat different.
Don't forget about Cog. It requires you to know Python. In essence it embeds the output of Python scripts into your code. It's absurdly easy to use, but it takes a totally different approach from things like ANTLR and its purpose is somewhat different.
answered Sep 21 '09 at 20:22
BrianBrian
18.8k13 gold badges66 silver badges152 bronze badges
18.8k13 gold badges66 silver badges152 bronze badges
add a comment |
add a comment |
Maybe Boost::Serialize or ANTLR?
add a comment |
Maybe Boost::Serialize or ANTLR?
add a comment |
Maybe Boost::Serialize or ANTLR?
Maybe Boost::Serialize or ANTLR?
answered Sep 21 '09 at 19:51
JohnicholasJohnicholas
262 bronze badges
262 bronze badges
add a comment |
add a comment |
I answered a similar question (re splitting source files into separate header and cpp files) by suggesting the use of lzz.
lzz has a very powerful C++ parser that builds a representation for everything except the bodies of functions. As long as you don't need the contents of the function bodies you you could modify 'lzz' so that it performs the generation step you want.
add a comment |
I answered a similar question (re splitting source files into separate header and cpp files) by suggesting the use of lzz.
lzz has a very powerful C++ parser that builds a representation for everything except the bodies of functions. As long as you don't need the contents of the function bodies you you could modify 'lzz' so that it performs the generation step you want.
add a comment |
I answered a similar question (re splitting source files into separate header and cpp files) by suggesting the use of lzz.
lzz has a very powerful C++ parser that builds a representation for everything except the bodies of functions. As long as you don't need the contents of the function bodies you you could modify 'lzz' so that it performs the generation step you want.
I answered a similar question (re splitting source files into separate header and cpp files) by suggesting the use of lzz.
lzz has a very powerful C++ parser that builds a representation for everything except the bodies of functions. As long as you don't need the contents of the function bodies you you could modify 'lzz' so that it performs the generation step you want.
edited May 23 '17 at 12:26
Community♦
11 silver badge
11 silver badge
answered Sep 23 '09 at 8:10
Richard CordenRichard Corden
18.5k6 gold badges52 silver badges82 bronze badges
18.5k6 gold badges52 silver badges82 bronze badges
add a comment |
add a comment |
If you want tools that can parse production C++ code, and carry out arbitrary analyses and transformations, see our DMS Software Reengineering Toolkit and its C++ front end.
It would be straightforward to use the information DMS can provide about C++ code, its structures, types, instances, to generate such access functions. If you wanted to generate access functions in another language, DMS provides means to code transformations from the input language (in this case, C++) to that target language.
add a comment |
If you want tools that can parse production C++ code, and carry out arbitrary analyses and transformations, see our DMS Software Reengineering Toolkit and its C++ front end.
It would be straightforward to use the information DMS can provide about C++ code, its structures, types, instances, to generate such access functions. If you wanted to generate access functions in another language, DMS provides means to code transformations from the input language (in this case, C++) to that target language.
add a comment |
If you want tools that can parse production C++ code, and carry out arbitrary analyses and transformations, see our DMS Software Reengineering Toolkit and its C++ front end.
It would be straightforward to use the information DMS can provide about C++ code, its structures, types, instances, to generate such access functions. If you wanted to generate access functions in another language, DMS provides means to code transformations from the input language (in this case, C++) to that target language.
If you want tools that can parse production C++ code, and carry out arbitrary analyses and transformations, see our DMS Software Reengineering Toolkit and its C++ front end.
It would be straightforward to use the information DMS can provide about C++ code, its structures, types, instances, to generate such access functions. If you wanted to generate access functions in another language, DMS provides means to code transformations from the input language (in this case, C++) to that target language.
edited Sep 11 '18 at 23:52
answered Sep 30 '09 at 4:25
Ira BaxterIra Baxter
82.1k11 gold badges137 silver badges278 bronze badges
82.1k11 gold badges137 silver badges278 bronze badges
add a comment |
add a comment |
Mozilla developed Pork for this kind of thing. I can't say it's easy to use (or even to build), but it is in production.
add a comment |
Mozilla developed Pork for this kind of thing. I can't say it's easy to use (or even to build), but it is in production.
add a comment |
Mozilla developed Pork for this kind of thing. I can't say it's easy to use (or even to build), but it is in production.
Mozilla developed Pork for this kind of thing. I can't say it's easy to use (or even to build), but it is in production.
answered Sep 21 '09 at 23:13
Max LybbertMax Lybbert
17.2k3 gold badges37 silver badges66 bronze badges
17.2k3 gold badges37 silver badges66 bronze badges
add a comment |
add a comment |
I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.
add a comment |
I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.
add a comment |
I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.
I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.
answered Dec 9 '11 at 16:06
sergiolsergiol
2,7472 gold badges28 silver badges66 bronze badges
2,7472 gold badges28 silver badges66 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1456342%2fare-there-any-free-tools-to-help-with-automatic-code-generation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I suppose it depends on the level. You could say a compiler performs automatic machine code generation. :-)
– xpda
Sep 21 '09 at 19:28
2
To expand on xpda's comment, what exactly do you want to generate? UI code (platform?), ORM bindings, database schemas, business logic validation, etc.
– Eric J.
Sep 21 '09 at 19:32
Sounds like he wants a parser or even compiler generator that gives him a framework to change the behaviour of C++.
– Matt Mitchell
Sep 21 '09 at 19:37
Like I mentioned above, I want to be able to autogenerate code for things like file reading and writing. If you want a clearer example, I've asked a related question before when I was building what I have now: stackoverflow.com/questions/799558/…
– Alex
Sep 21 '09 at 19:38
You mean you want code that generates a library for you?
– Matt Mitchell
Sep 21 '09 at 20:26