mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
doc: add indexes
* doc/bison.texi (Special Tokens): here.
This commit is contained in:
@@ -7546,15 +7546,18 @@ utility can be used without change as the definition of @code{yylex}.
|
|||||||
In addition to the user defined tokens, Bison generates a few special tokens
|
In addition to the user defined tokens, Bison generates a few special tokens
|
||||||
that @code{yylex} may return.
|
that @code{yylex} may return.
|
||||||
|
|
||||||
|
@findex YYEOF
|
||||||
The @code{YYEOF} token denotes the end of file, and signals to the parser
|
The @code{YYEOF} token denotes the end of file, and signals to the parser
|
||||||
that there is nothing left afterwards. @xref{Calling Convention}, for an
|
that there is nothing left afterwards. @xref{Calling Convention}, for an
|
||||||
example.
|
example.
|
||||||
|
|
||||||
|
@findex YYUNDEF
|
||||||
Returning @code{YYUNDEF} tells the parser that some lexical error was found.
|
Returning @code{YYUNDEF} tells the parser that some lexical error was found.
|
||||||
It will emit an error message about an ``invalid token'', and enter
|
It will emit an error message about an ``invalid token'', and enter
|
||||||
error-recovery (@pxref{Error Recovery}). Returning an unknown token kind
|
error-recovery (@pxref{Error Recovery}). Returning an unknown token kind
|
||||||
results in the exact same behavior.
|
results in the exact same behavior.
|
||||||
|
|
||||||
|
@findex YYerror
|
||||||
Returning @code{YYerror} requires the parser to enter error-recovery
|
Returning @code{YYerror} requires the parser to enter error-recovery
|
||||||
@emph{without} emitting an error message. This way the lexical analyzer can
|
@emph{without} emitting an error message. This way the lexical analyzer can
|
||||||
produce an accurate error messages about the invalid input (something the
|
produce an accurate error messages about the invalid input (something the
|
||||||
|
|||||||
Reference in New Issue
Block a user