Go to the first, previous, next, last section, table of contents.

The code generator

The code generator is a program currently written in Prolog which produces C++ code from the HL7 data base. This compiler is currently under development and is still tentative. At this moment it generates code for composite data types, segments and tables. The last step of generating C++ classes for messages is not finished yet.

The Prolog program was first created in a monolithic approach and has then been split up into modules, which are far easier to maintain than the monolith. There are tables scattered throughout the modules, which enhance the data base which we have created by detailed information about many different things including composite types, required methods and their implementation etc.

In order to keep the complexity of the compiler as little as possible, the macro features of the C preprocessors are used extensively. The distinction made between abstract handling of objects (by macros) and concrete implementation (by the macro definitions) help to ease porting of the code to different platforms.


Go to the first, previous, next, last section, table of contents.