bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

09-more-glr-tests.patch


From: Akim Demaille
Subject: 09-more-glr-tests.patch
Date: Tue, 12 Nov 2002 08:44:44 +0100

Index: 0.12/ChangeLog
--- 0.12/ChangeLog Sun, 10 Nov 2002 21:30:54 +0100 akim (bison/d/40_ChangeLog 
1.10 644)
+++ 0.12(w)/ChangeLog Sun, 10 Nov 2002 22:00:08 +0100 akim 
(bison/d/40_ChangeLog 1.10 644)
@@ -1,5 +1,11 @@
 2002-11-10  Akim Demaille  <address@hidden>
 
+       * data/yacc.c (yyparse): Be sure to reinitialize yychar.
+       * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
+       Use it to test the GLR parser.
+
+2002-11-10  Akim Demaille  <address@hidden>
+
        * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
        defines it.
        * data/glr.c (yystos): New.
Index: 0.12/doc/bison.texinfo
--- 0.12/doc/bison.texinfo Sun, 10 Nov 2002 14:55:11 +0100 akim 
(bison/23_bison.texi 1.3 644)
+++ 0.12(w)/doc/bison.texinfo Sun, 10 Nov 2002 21:55:15 +0100 akim 
(bison/23_bison.texi 1.3 644)
@@ -3395,8 +3395,7 @@
 
 @strong{Warning:} as of Bison 1.875, this feature is still considered as
 experimental, as there was not enough users feedback.  In particular,
-the syntax might still change, and for the time being, only the default
address@hidden(1) skeleton supports this feature.
+the syntax might still change.
 @end deffn
 
 For instance:
Index: 0.12/data/yacc.c
--- 0.12/data/yacc.c Sun, 10 Nov 2002 21:30:54 +0100 akim (bison/b/45_yacc.c 
1.3 644)
+++ 0.12(w)/data/yacc.c Sun, 10 Nov 2002 21:45:35 +0100 akim (bison/b/45_yacc.c 
1.3 644)
@@ -746,7 +746,7 @@
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yytoken = YYEMPTY;           /* Cause a token to be read.  */
+  yychar = yytoken = YYEMPTY;          /* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
Index: 0.12/tests/actions.at
--- 0.12/tests/actions.at Sun, 10 Nov 2002 21:30:54 +0100 akim 
(bison/e/2_actions.at 1.2 644)
+++ 0.12(w)/tests/actions.at Sun, 10 Nov 2002 22:05:51 +0100 akim 
(bison/e/2_actions.at 1.2 644)
@@ -157,12 +157,19 @@
 ## Printers and Destructors.  ##
 ## -------------------------- ##
 
-AT_SETUP([Printers and Destructors])
+# _AT_CHECK_PRINTER_AND_DESTRUCTOR($1, $2, $3, BISON-DIRECTIVE)
+# -------------------------------------------------------------
+m4_define([_AT_CHECK_PRINTER_AND_DESTRUCTOR],
+[m4_if([$1$2$3], $[1]$[2]$[3], [],
+       [m4_fatal([$0: Invalid arguments: address@hidden)])dnl
+
+AT_SETUP([Printers and Destructors: $4])
 
 # Make sure complex $n work.
 
 AT_DATA([[input.y]],
-[[%{
+[[$4
+%{
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
@@ -339,3 +346,16 @@
 ]])
 
 AT_CLEANUP
+])
+
+
+# AT_CHECK_PRINTER_AND_DESTRUCTOR([BISON-OPTIONS])
+# ------------------------------------------------
+# Produce `calc.y'.
+m4_define([AT_CHECK_PRINTER_AND_DESTRUCTOR],
+[_AT_CHECK_PRINTER_AND_DESTRUCTOR($[1], $[2], $[3], [$1])
+])
+
+
+AT_CHECK_PRINTER_AND_DESTRUCTOR()
+AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]