doc: document YYEOF, YYUNDEF and YYerror

* doc/bison.texi (Special Tokens): New.
* examples/c/bistromathic/parse.y: Formatting changes.
This commit is contained in:
Akim Demaille
2020-04-29 08:23:55 +02:00
parent 547545a795
commit 99efa35369
4 changed files with 72 additions and 29 deletions

View File

@@ -267,9 +267,9 @@ yylex (const char **line, YYSTYPE *yylval, YYLTYPE *yylloc)
{
int nchars = 0;
sscanf (*line - 1, "%lf%n", &yylval->TOK_NUM, &nchars);
*line += nchars - 1;
yylloc->last_column += nchars - 1;
return TOK_NUM;
*line += nchars - 1;
yylloc->last_column += nchars - 1;
return TOK_NUM;
}
// Identifiers.