Finish converting grammar to use "re" module