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;








2















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.










share|improve this question



















  • 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

















2















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.










share|improve this question



















  • 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













2












2








2


4






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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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












8 Answers
8






active

oldest

votes


















6














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.






share|improve this answer




















  • 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


















2














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.






share|improve this answer























  • 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


















2














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.






share|improve this answer






























    1














    Maybe Boost::Serialize or ANTLR?






    share|improve this answer






























      1














      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.






      share|improve this answer
































        1














        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.






        share|improve this answer
































          0














          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.






          share|improve this answer






























            0














            I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.






            share|improve this answer

























              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
              );



              );













              draft saved

              draft discarded


















              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









              6














              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.






              share|improve this answer




















              • 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















              6














              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.






              share|improve this answer




















              • 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













              6












              6








              6







              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.






              share|improve this answer















              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.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              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












              • 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













              2














              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.






              share|improve this answer























              • 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















              2














              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.






              share|improve this answer























              • 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













              2












              2








              2







              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.






              share|improve this answer













              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.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              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

















              • 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











              2














              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.






              share|improve this answer



























                2














                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.






                share|improve this answer

























                  2












                  2








                  2







                  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.






                  share|improve this answer













                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 21 '09 at 20:22









                  BrianBrian

                  18.8k13 gold badges66 silver badges152 bronze badges




                  18.8k13 gold badges66 silver badges152 bronze badges





















                      1














                      Maybe Boost::Serialize or ANTLR?






                      share|improve this answer



























                        1














                        Maybe Boost::Serialize or ANTLR?






                        share|improve this answer

























                          1












                          1








                          1







                          Maybe Boost::Serialize or ANTLR?






                          share|improve this answer













                          Maybe Boost::Serialize or ANTLR?







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 21 '09 at 19:51









                          JohnicholasJohnicholas

                          262 bronze badges




                          262 bronze badges





















                              1














                              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.






                              share|improve this answer





























                                1














                                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.






                                share|improve this answer



























                                  1












                                  1








                                  1







                                  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.






                                  share|improve this answer















                                  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.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  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





















                                      1














                                      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.






                                      share|improve this answer





























                                        1














                                        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.






                                        share|improve this answer



























                                          1












                                          1








                                          1







                                          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.






                                          share|improve this answer















                                          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.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          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





















                                              0














                                              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.






                                              share|improve this answer



























                                                0














                                                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.






                                                share|improve this answer

























                                                  0












                                                  0








                                                  0







                                                  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.






                                                  share|improve this answer













                                                  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.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  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





















                                                      0














                                                      I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.






                                                      share|improve this answer



























                                                        0














                                                        I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.






                                                        share|improve this answer

























                                                          0












                                                          0








                                                          0







                                                          I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.






                                                          share|improve this answer













                                                          I've already used professionally the Nvelocity engine combined with C# as a prevoius step to coding, with very good results.







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Dec 9 '11 at 16:06









                                                          sergiolsergiol

                                                          2,7472 gold badges28 silver badges66 bronze badges




                                                          2,7472 gold badges28 silver badges66 bronze badges



























                                                              draft saved

                                                              draft discarded
















































                                                              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.




                                                              draft saved


                                                              draft discarded














                                                              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





















































                                                              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







                                                              Popular posts from this blog

                                                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                                                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript