Initial implementation of compiler

This implementation is quite ugly, it should be refactored for beauty.
However it's an initial implementation that allows to write tests for the compiler.