pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/cdecl Add my patch for PR 51100 (from 2016) to d...
details: https://anonhg.NetBSD.org/pkgsrc/rev/86baa6e0779f
branches: trunk
changeset: 454743:86baa6e0779f
user: dholland <dholland%pkgsrc.org@localhost>
date: Wed Jun 16 23:08:42 2021 +0000
description:
Add my patch for PR 51100 (from 2016) to devel/cdecl.
This fixes a shift-reduce conflict in the parser that causes e.g.
"static const int" to be rejected as a syntax error.
This patch should have been handled by upstream, but there doesn't seem
to be an upstream.
diffstat:
devel/cdecl/Makefile | 4 +-
devel/cdecl/distinfo | 3 +-
devel/cdecl/patches/patch-cdgram.y | 54 ++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 3 deletions(-)
diffs (85 lines):
diff -r 6b876963c43f -r 86baa6e0779f devel/cdecl/Makefile
--- a/devel/cdecl/Makefile Wed Jun 16 22:21:12 2021 +0000
+++ b/devel/cdecl/Makefile Wed Jun 16 23:08:42 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2021/04/21 08:38:49 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2021/06/16 23:08:42 dholland Exp $
DISTNAME= cdecl-2.5
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= # ftp://ftp.netsw.org/softeng/lang/c/tools/cdecl/
diff -r 6b876963c43f -r 86baa6e0779f devel/cdecl/distinfo
--- a/devel/cdecl/distinfo Wed Jun 16 22:21:12 2021 +0000
+++ b/devel/cdecl/distinfo Wed Jun 16 23:08:42 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 03:27:18 agc Exp $
+$NetBSD: distinfo,v 1.14 2021/06/16 23:08:42 dholland Exp $
SHA1 (cdecl-2.5.tar.gz) = b955a0b95b635090360b19de888cb29d5c005296
RMD160 (cdecl-2.5.tar.gz) = 351c36dcc7f18e4d143f2559460025d2de9a83c4
@@ -6,3 +6,4 @@
Size (cdecl-2.5.tar.gz) = 21435 bytes
SHA1 (patch-aa) = 6aa8aa0fbe5acfefc6e37c8fd10f318b004fe8a0
SHA1 (patch-ab) = f12ac884f95c9b241cda749b0ea50f6d69e1c6a4
+SHA1 (patch-cdgram.y) = b58b64a83aa01f4bfb18b7c927cae9d11f52482c
diff -r 6b876963c43f -r 86baa6e0779f devel/cdecl/patches/patch-cdgram.y
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cdecl/patches/patch-cdgram.y Wed Jun 16 23:08:42 2021 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-cdgram.y,v 1.1 2021/06/16 23:08:42 dholland Exp $
+
+Fix shift/reduce conflict that makes "explain static volatile int foo"
+not parse. See PR 51100.
+
+Should really be handled by upstream, but there does not seem to be an
+upstream.
+
+--- cdgram.y~ 1996-01-12 06:06:58.000000000 +0000
++++ cdgram.y
+@@ -84,10 +84,20 @@ stmt : HELP NL
+ docast(NullCP, $2.left, $2.right, $2.type);
+ }
+
+- | EXPLAIN opt_storage opt_constvol_list type cdecl NL
++ | EXPLAIN opt_constvol_list type cdecl NL
+ {
+- Debug((stderr, "stmt: EXPLAIN opt_storage opt_constvol_list type cdecl\n"));
+- Debug((stderr, "\topt_storage='%s'\n", $2));
++ Debug((stderr, "stmt: EXPLAIN opt_constvol_list type cdecl\n"));
++ Debug((stderr, "\topt_constvol_list='%s'\n", $2));
++ Debug((stderr, "\ttype='%s'\n", $3));
++ Debug((stderr, "\tcdecl='%s'\n", $4));
++ Debug((stderr, "\tprev = '%s'\n", visible(prev)));
++ dodexplain(ds(""), $2, $3, $4);
++ }
++
++ | EXPLAIN storage opt_constvol_list type cdecl NL
++ {
++ Debug((stderr, "stmt: EXPLAIN storage opt_constvol_list type cdecl\n"));
++ Debug((stderr, "\tstorage='%s'\n", $2));
+ Debug((stderr, "\topt_constvol_list='%s'\n", $3));
+ Debug((stderr, "\ttype='%s'\n", $4));
+ Debug((stderr, "\tcdecl='%s'\n", $5));
+@@ -105,14 +115,13 @@ stmt : HELP NL
+ dodexplain($2, $3, NullCP, $4);
+ }
+
+- | EXPLAIN opt_storage constvol_list cdecl NL
++ | EXPLAIN constvol_list cdecl NL
+ {
+- Debug((stderr, "stmt: EXPLAIN opt_storage constvol_list cdecl\n"));
+- Debug((stderr, "\topt_storage='%s'\n", $2));
+- Debug((stderr, "\tconstvol_list='%s'\n", $3));
+- Debug((stderr, "\tcdecl='%s'\n", $4));
++ Debug((stderr, "stmt: EXPLAIN constvol_list cdecl\n"));
++ Debug((stderr, "\tconstvol_list='%s'\n", $2));
++ Debug((stderr, "\tcdecl='%s'\n", $3));
+ Debug((stderr, "\tprev = '%s'\n", visible(prev)));
+- dodexplain($2, $3, NullCP, $4);
++ dodexplain(ds(""), $2, NullCP, $3);
+ }
+
+ | EXPLAIN '(' opt_constvol_list type cast ')' optNAME NL
Home |
Main Index |
Thread Index |
Old Index