A C++ port of the front end presented in the Purple drangon book