[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04-fyi-fix-greedy-braces.patch
From: |
Akim Demaille |
Subject: |
04-fyi-fix-greedy-braces.patch |
Date: |
Sun, 06 Jan 2002 21:50:58 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: src/reader.c
--- src/reader.c Fri, 28 Dec 2001 18:20:17 +0100 akim
+++ src/reader.c Sun, 06 Jan 2002 21:27:35 +0100 akim
@@ -1154,10 +1154,7 @@
/* 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: tests/regression.at
--- tests/regression.at Sat, 29 Dec 2001 10:06:57 +0100 akim
+++ tests/regression.at Sun, 06 Jan 2002 21:33:36 +0100 akim
@@ -18,6 +18,29 @@
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: tests/torture.at
--- tests/torture.at Sun, 06 Jan 2002 21:12:55 +0100 akim
+++ tests/torture.at Sun, 06 Jan 2002 21:29:51 +0100 akim
@@ -1208,7 +1208,7 @@ exp: WAIT_FOR_EOF exp | ;
case HLE: mout(MLE);break;
case HGT: mout(MGT);break;
case HGE: mout(MGE);break;
- }; $$=NULL;}
+ }$$=NULL;}
| EXPRESSION_SIMP
HREFRELOPERATOR
EXPRESSION_SIMP
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 04-fyi-fix-greedy-braces.patch,
Akim Demaille <=