summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2012-01-25 16:57:58 +0100
committerAkim Demaille <demaille@gostai.com>2012-01-26 21:18:24 +0100
commitd115aad9112fb4e2fe1b268c9db7390732d39539 (patch)
tree600dfbb8d2095f95c044f6f2551085bc9e3fa397 /TODO
parent2c7f50be6247b4a03bdb27936ea6185cb6a7443c (diff)
downloadbison-d115aad9112fb4e2fe1b268c9db7390732d39539.tar.gz
yacc: fix YYBACKUP.
Reported by David Kastrup: https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html. * data/yacc.c (YYBACKUP): Accept rhs size. Restore the proper state value. * TODO (YYBACKUP): Make it... * tests/actions.at: a new test case. * NEWS, THANKS: Update.
Diffstat (limited to 'TODO')
-rw-r--r--TODO44
1 files changed, 0 insertions, 44 deletions
diff --git a/TODO b/TODO
index 404317f9..588bf468 100644
--- a/TODO
+++ b/TODO
@@ -118,50 +118,6 @@ so both 256 and 257 are "mysterious".
** YYFAIL
It is seems to be *really* obsolete now, shall we remove it?
-** YYBACKUP
-There is no test about it, no examples in the doc, and I'm not sure
-what it should look like. For instance what follows crashes.
-
- %error-verbose
- %debug
- %pure-parser
- %code {
- # include <stdio.h>
- # include <stdlib.h>
- # include <assert.h>
-
- static void yyerror (const char *msg);
- static int yylex (YYSTYPE *yylval);
- }
- %%
- exp:
- 'a' { printf ("a: %d\n", $1); }
- | 'b' { YYBACKUP('a', 123); }
- ;
- %%
- static int
- yylex (YYSTYPE *yylval)
- {
- static char const input[] = "b";
- static size_t toknum;
- assert (toknum < sizeof input);
- *yylval = (toknum + 1) * 10;
- return input[toknum++];
- }
-
- static void
- yyerror (const char *msg)
- {
- fprintf (stderr, "%s\n", msg);
- }
-
- int
- main (void)
- {
- yydebug = !!getenv("YYDEBUG");
- return yyparse ();
- }
-
** yychar == yyempty_
The code in yyerrlab reads: