updates to grammar and code generator