Make the grammar more efficient

You can see the compiled grammar is tighter

Also use [xyz] instead of (?:x|y|z) in regexes