From 8123ac83f5641195fb565bc820bfc3076fc15dbd Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 14 Apr 1987 16:02:37 +0000 Subject: [PATCH] Updated "onerror" docs to current situation --- doc/LLgen/LLgen.n | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/LLgen/LLgen.n b/doc/LLgen/LLgen.n index a3da0f271..c1550d8a4 100644 --- a/doc/LLgen/LLgen.n +++ b/doc/LLgen/LLgen.n @@ -653,13 +653,17 @@ token. The user may also supply his own error recovery routines, or handle errors differently. For this purpose, the name of a routine to be called when an error occurs may be declared using the keyword \fB%onerror\fR. -This routine takes one parameter, which is either the token number of the +This routine takes two parameters. +The first one is either the token number of the token expected, or 0. In the last case, the error occurred at a choice. In both cases, the routine must ensure that the next call to the lexical analyser returns the token that replaces the current one. Of course, that could well be the current one, in which case .I LLparse recovers from the error. +The second parameter contains a list of tokens that are not skipped at the +error point. The list is in the form of a null-terminated array of integers, +whose address is passed. .PP The user must supply a lexical analyzer to read the input stream and break it up into tokens, which are passed to -- 2.34.1