mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
Use copy_character not obstack_1grow in parse_action.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
|
||||||
|
|
||||||
|
* src/reader.c (parse_action): Use copy_character instead of
|
||||||
|
obstack_1grow.
|
||||||
|
|
||||||
2002-05-13 Akim Demaille <akim@epita.fr>
|
2002-05-13 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* tests/regression.at (Token definitions): Prototype yylex and
|
* tests/regression.at (Token definitions): Prototype yylex and
|
||||||
|
|||||||
@@ -1286,12 +1286,12 @@ parse_action (symbol_list *rule, int rule_length)
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '\n':
|
case '\n':
|
||||||
obstack_1grow (&action_obstack, c);
|
copy_character (&action_obstack, c);
|
||||||
++lineno;
|
++lineno;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '{':
|
case '{':
|
||||||
obstack_1grow (&action_obstack, c);
|
copy_character (&action_obstack, c);
|
||||||
++count;
|
++count;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1316,12 +1316,12 @@ parse_action (symbol_list *rule, int rule_length)
|
|||||||
fatal (_("unmatched %s"), "`{'");
|
fatal (_("unmatched %s"), "`{'");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
obstack_1grow (&action_obstack, c);
|
copy_character (&action_obstack, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Above loop exits when C is '}'. */
|
/* Above loop exits when C is '}'. */
|
||||||
if (--count)
|
if (--count)
|
||||||
obstack_1grow (&action_obstack, c);
|
copy_character (&action_obstack, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
obstack_1grow (&action_obstack, '\0');
|
obstack_1grow (&action_obstack, '\0');
|
||||||
|
|||||||
Reference in New Issue
Block a user