[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: User Actions and --yacc
From: |
Akim Demaille |
Subject: |
FYI: User Actions and --yacc |
Date: |
15 Dec 2001 12:02:11 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/reader.c (copy_action): When --yacc, don't append a `;'
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.
Index: NEWS
===================================================================
RCS file: /cvsroot/bison/bison/NEWS,v
retrieving revision 1.21.2.36
diff -u -u -r1.21.2.36 NEWS
--- NEWS 13 Dec 2001 12:07:47 -0000 1.21.2.36
+++ NEWS 15 Dec 2001 11:07:09 -0000
@@ -3,6 +3,11 @@
Changes in version 1.30h:
+* User Actions
+ Bison has always permitted actions such as { $$ = $1 }: it adds the
+ ending semicolon. Now if in Yacc compatibility mode, the semicolon
+ is no longer output: one has to write { $$ = $1; }.
+
Changes in version 1.30g:
* Bug fixes
Index: THANKS
===================================================================
RCS file: /cvsroot/bison/bison/THANKS,v
retrieving revision 1.10.2.15
diff -u -u -r1.10.2.15 THANKS
--- THANKS 5 Dec 2001 10:58:44 -0000 1.10.2.15
+++ THANKS 15 Dec 2001 11:07:09 -0000
@@ -2,6 +2,7 @@
it is today without the invaluable help of these people:
Airy Andre address@hidden
+Aharon Robbins address@hidden
Akim Demaille address@hidden
Albert Chin-A-Young address@hidden
Alexander Belopolsky address@hidden
@@ -28,6 +29,7 @@
Robert Anisko address@hidden
Shura address@hidden
Tom Lane address@hidden
+Tom Tromey address@hidden
Wolfram Wagner address@hidden
Wwp address@hidden
Index: src/reader.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.c,v
retrieving revision 1.72.2.23
diff -u -u -r1.72.2.23 reader.c
--- src/reader.c 5 Dec 2001 09:16:07 -0000 1.72.2.23
+++ src/reader.c 15 Dec 2001 11:07:10 -0000
@@ -1125,7 +1125,13 @@
}
}
- obstack_sgrow (&action_obstack, ";\n break;}");
+ /* As a Bison extension, add the ending semicolon. Since some Yacc
+ don't do that, help people using bison as a Yacc finding their
+ missing semicolons. */
+ if (yacc_flag)
+ obstack_sgrow (&action_obstack, "}\n break;");
+ else
+ obstack_sgrow (&action_obstack, ";\n break;}");
}
/*-------------------------------------------------------------------.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: User Actions and --yacc,
Akim Demaille <=