Code generator written in Go, based on cog.py