a Typescript Enum with one symbol for each nonterminal used in the grammar, matching the nonterminals when compared case-insensitively (so ROOT and Root and root are the same).
the grammar to use
the runtime object of the nonterminals enum. For example, if enum Nonterminals { root, a, b, c }; then Nonterminals must be explicitly passed as this runtime parameter compile(grammar, Nonterminals, Nonterminals.root); (in addition to being implicitly used for the type parameter NT)
the desired root nonterminal in the grammar
a parser for the given grammar that will start parsing at rootNonterminal.
Compile a Parser from a grammar represented as a string.