When the parser encounters a syntax error it calls a user-defined function. It must be an Emacs Lisp function with one argument: a string containing the message to report.
By default the parser uses this function to report error messages:
Print a one-line message if
wisent-parse-verbose-flagis set. Pass string and args arguments to message.
wisent-messageuses the following function to print lexical tokens:
The general printed form of a lexical token is:
To control the verbosity of the parser you can set to non-
Or interactively use the command:
When the error reporting function is entered the variable
wisent-input contains the unexpected token as returned by the
The error reporting function can be called from a semantic action too
using the special macro
wisent-error. When called from a
semantic action entered by error recovery (see Error recovery) the
value of the variable
wisent-recovering is non-