Undo grammar refactoring

LPeg's `V` rules don't work outside of a grammar, so there's no point in
trying to test the grammar rules independently. A mock parser is needed
instead.