]> 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:59:30 +0000 (20:59 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 6 Jan 2002 20:59:30 +0000 (20:59 +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 a412c9759ef722edb1e25b4bed4cf8a437bb933b..170f4d3f3bcf14cdcccf31f3bdf47ff40df67bec 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 33f8e13014cef751c35993ecdbec598a20fc8c67..8f385bf156d960e42bf30768d428fea95c1b2db0 100644 (file)
@@ -1119,10 +1119,7 @@ copy_action (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);
     }
 
   /* As a Bison extension, add the ending semicolon.  Since some Yacc
index 868ac91c219e61e931a45bdfcfdf22c6e468b6dd..9777f7c27f2d4a1531e3d323e370d49aba359dbd 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 25b2634ac296dae47d4df8c68c06b5f4f671bd55..5b68e31ab75a2bab9356293e657a743b2bbe2009 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