My first attempt at compiler construction