minor refactoring of fomega grammar