A grammar consists of the symbol table ST, the production
table PT, the start symbol Start,
and the short production
table SPT. An example BNF is provided
by booleanGrammar().
The function performs the following steps:
Make the symbol table.
Make the production table.
Extract the start symbol.
Compile a short production table.
Return the grammar.
For a full documentation, see <https://CRAN.R-project.org/package=xegaBNF>