bison-patches
[Top][All Lists]
Advanced

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

failure to call copy_character


From: Florian Krohm
Subject: failure to call copy_character
Date: Sun, 12 May 2002 23:10:43 -0400 (EDT)

In function reader.c/parse_action, copy_character should
be called independent instead of obstack_1grow such that
[ and ] characters are properly converted. Currently they
are only converted when copying a string, a comment, or a
definition section.
OK to apply?

Florian


Index: reader.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.c,v
retrieving revision 1.177
diff -u -r1.177 reader.c
--- reader.c    7 May 2002 08:07:32 -0000       1.177
+++ reader.c    13 May 2002 03:02:04 -0000
@@ -1286,12 +1286,12 @@
        switch (c)
          {
          case '\n':
-           obstack_1grow (&action_obstack, c);
+           copy_character (&action_obstack, c);
            ++lineno;
            break;
 
          case '{':
-           obstack_1grow (&action_obstack, c);
+           copy_character (&action_obstack, c);
            ++count;
            break;
 
@@ -1316,12 +1316,12 @@
            fatal (_("unmatched %s"), "`{'");
 
          default:
-           obstack_1grow (&action_obstack, c);
+           copy_character (&action_obstack, c);
          }
 
       /* Above loop exits when C is '}'.  */
       if (--count)
-       obstack_1grow (&action_obstack, c);
+       copy_character (&action_obstack, c);
     }
 
   obstack_1grow (&action_obstack, '\0');



reply via email to

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