Working on moving precedence rewriting code out of grammar builder