c++ - How to write a code generator given a custom IDL? -


If you have a simple enough schema with basic Boolean String field, then write a code generator for C ++ How should you go if you have ever written, how you started the article / recommendation is welcome.

EDIT: Note that this standard CORBA is not imported.

In summary:

  1. Convert a hand,
  2. Copy that output to a string, and then
  3. Instead of normal names, make sure with loops and variables.

This is a particularly good problem that is to deal with TDD - start by formulating a framework with CPN (or) like stupid simple tests Just make sure that you can load the file and repeat your content by typing it.

Look at the solution very quickly - get simple and normal output with a test to confirm this work, then add a more sophisticated variation. Example: Handle single parameter function first.

For a general extent of complexity for the code, using only standard C ++ ostream sections is just a long set of output statements, which will allow you to mix lots of code in the text of any variable With


Comments