modifiy the definitions of Grammar::State