Part II. Code generation solutions – Code Generation in Action

Part II. Code generation solutions

The first part of this book concentrated on theory and technique; the second part applies these techniques to real-world problems. Each chapter provides a number of generator architectures and a case study that includes complete source code.

All of the chapters have a similar format. The chapter first presents the problem, and then describes several high-level generator architectures for addressing a variety of platforms and technologies. We then include a case study that shows an end-to-end example of using generation to solve the problem at hand.

Each case study uses a different type of generation to solve the problem. By mixing the generator designs, it is our intention not only to offer an overview of what generators can be used for but also to explain how each type works.

Reading all of the chapters in this part will give you a solid grounding in both the application and construction of generators.

I suggest that you avoid reading just the one chapter that is relevant to your current project because you may find that you do not agree with how we apply the generator architecture to solve the problem. Reading all of the chapters will allow you to pick the generator architecture that best suits your application.