]> git.saurik.com Git - bison.git/commitdiff
* src/reader.c (parse_braces): Don't fetch the next char, the
authorAkim Demaille <akim@epita.fr>
Sun, 6 Jan 2002 20:50:08 +0000 (20:50 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 6 Jan 2002 20:50:08 +0000 (20:50 +0000)
convention is to fetch on entry.
* tests/torture.at (GNU Cim Grammar): Reintroduce their weird
'switch' without a following semicolon.
* tests/regression.at (braces parsing): New.

ChangeLog
src/reader.c
tests/regression.at
tests/torture.at

index 41c5fcf74d1307e56f73029c2113cf9b0bfa3df6..c5a88c048bd7ff5da09097539003ec684b7ceaeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-01-06  Akim Demaille  <akim@epita.fr>
+
+       * src/reader.c (parse_braces): Don't fetch the next char, the
+       convention is to fetch on entry.
+       * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
+       'switch' without a following semicolon.
+       * tests/regression.at (braces parsing): New.
+
+       
 2002-01-06  Akim Demaille  <akim@epita.fr>
 
        Bison is dead wrong in its RR conflict reports.
index 9816c61d9c6bcb5e415b38c2df8d3db1af03eea5..cf3e18f370bc289c7d6c0e47569a2fd988a5ce66 100644 (file)
@@ -1154,10 +1154,7 @@ parse_braces (symbol_list *rule, int stack_offset)
 
       /* Above loop exits when C is '}'.  */
       if (--count)
-       {
-         obstack_1grow (&action_obstack, c);
-         c = getc (finput);
-       }
+       obstack_1grow (&action_obstack, c);
     }
 
   obstack_1grow (&action_obstack, '\0');
index 7617012476fc29c0dc7fcf41febf9e12529657e4..849f526c2b75d995969026e783ed0e9219493c86 100644 (file)
 
 AT_BANNER([[Regression tests.]])
 
+
+## ---------------- ##
+## Braces parsing.  ##
+## ---------------- ##
+
+
+AT_SETUP([braces parsing])
+
+AT_DATA([input.y],
+[[/* Bison used to swallow the character after `}'. */
+
+%%
+exp: { tests = {{{{{{{{{{}}}}}}}}}}; }
+%%
+]])
+
+AT_CHECK([bison -v input.y -o input.c], 0, ignore, ignore)
+
+AT_CHECK([fgrep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
+
+AT_CLEANUP
+
+
 ## ------------------ ##
 ## Duplicate string.  ##
 ## ------------------ ##
index cb25dedd6d87de0bb5002081b45823a6b8bad15d..262a11d7b9ffd0002406d4937270cc943204331e 100644 (file)
@@ -1208,7 +1208,7 @@ EXPRESSION_SIMP : EXPRESSION_SIMP
                                         case HLE: mout(MLE);break;
                                         case HGT: mout(MGT);break;
                                         case HGE: mout(MGE);break;
-                                    }$$=NULL;}
+                                    }$$=NULL;}
                 |       EXPRESSION_SIMP
                         HREFRELOPERATOR
                         EXPRESSION_SIMP