bison-patches
[Top][All Lists]
Advanced

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

Re: failure to call copy_character


From: Akim Demaille
Subject: Re: failure to call copy_character
Date: 13 May 2002 10:50:36 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| 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;

These two are quite useless, but it is safer, so do as you want wrt
this one.

| @@ -1316,12 +1316,12 @@
|             fatal (_("unmatched %s"), "`{'");
|  
|           default:
| -           obstack_1grow (&action_obstack, c);
| +           copy_character (&action_obstack, c);

Fine!

|           }
|  
|        /* Above loop exits when C is '}'.  */
|        if (--count)
| -       obstack_1grow (&action_obstack, c);
| +       copy_character (&action_obstack, c);

useless too.

Please, install.



reply via email to

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