A function that generates a parser given a grammar. When this parser is given some string, it returns a derivation of that string using the grammar or an error if the string cannot be parsed.