simple implementation of a compiler in C++