The grammar is either read from the file given as argument or from standard input. The output is written to the files <Parser>.md and <Parser>.mi (Modula-2) or <Parser>.h and <Parser>.c (C). Errors detected during the analysis of the grammar are reported on standard error.
The generated parser needs a few additional modules:
First, a scanner (<Scanner>.md/<Scanner>.c, <Scanner>.mi/<Scanner>.h) containing
the function GetToken () and the global variable Attribute.
A very primitive scanner can be requested with the option -s.
Second, a main program.
Option -p will provide a simple parser driver (<Parser>Drv.mi/<Parser>Drv.c).
Third, an error handling module called Errors has to provide the
procedures ErrorMessage and ErrorMessageI. A prototype
error handler can be requested with the option -e .
if output is in C: <Parser>.h specification of the generated parser <Parser>.c body of the generated parser <Parser>Drv.c body of the parser driver Errors.h specification of error handler Errors.c body of error handler <Scanner>.h specification of scanner <Scanner>.c body of scanner if output is in Modula-2: <Parser>.md definition module of the generated parser <Parser>.mi implementation module of the generated parser <Parser>Drv.mi implementation module of the parser driver Errors.md definition module of error handler Errors.mi implementation module of error handler <Scanner>.md definition module of scanner <Scanner>.mi implementation module of scanner <Parser>.Tab table to control error recovery
J. Grosch: "Efficient and Comfortable Error Recovery in Recursive Descent Parsers", Structured Programming, 11, 129-140 (1990)