Implement compiler for Core to G-Code (up to Mark 4 in SPJ book)