fix casting grammar in parser