Writing a Compiler in C++
Franck Binard:
Software Correctness and Safety Laboratory
In this article, a simple generic compiler is specified. A generic compiler is a compiler which outputs source code for a set of programming languages rather than just for a particular one. Each language is specified by a grammar.
Our compiler will operate in 4 phases:
With the objectof of keeping this article short, the GenericCompiler will be not do any error recovery or code optimisation.
We define the package GenericCompiler like this:
All class diagrams, use cases can also be found here (visio format).