Factor out a Grammar

Right now the grammar is rather basic, but this should make it more obvious what responsibilities are expected from the interpreter.