pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/cdecl



Module Name:    pkgsrc
Committed By:   dholland
Date:           Wed Jun 16 23:08:42 UTC 2021

Modified Files:
        pkgsrc/devel/cdecl: Makefile distinfo
Added Files:
        pkgsrc/devel/cdecl/patches: patch-cdgram.y

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/devel/cdecl/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/cdecl/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/cdecl/patches/patch-cdgram.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/cdecl/Makefile
diff -u pkgsrc/devel/cdecl/Makefile:1.31 pkgsrc/devel/cdecl/Makefile:1.32
--- pkgsrc/devel/cdecl/Makefile:1.31    Wed Apr 21 08:38:49 2021
+++ pkgsrc/devel/cdecl/Makefile Wed Jun 16 23:08:42 2021
@@ -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/
 

Index: pkgsrc/devel/cdecl/distinfo
diff -u pkgsrc/devel/cdecl/distinfo:1.13 pkgsrc/devel/cdecl/distinfo:1.14
--- pkgsrc/devel/cdecl/distinfo:1.13    Tue Nov  3 03:27:18 2015
+++ pkgsrc/devel/cdecl/distinfo Wed Jun 16 23:08:42 2021
@@ -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 @@ SHA512 (cdecl-2.5.tar.gz) = 15495f5a794d
 Size (cdecl-2.5.tar.gz) = 21435 bytes
 SHA1 (patch-aa) = 6aa8aa0fbe5acfefc6e37c8fd10f318b004fe8a0
 SHA1 (patch-ab) = f12ac884f95c9b241cda749b0ea50f6d69e1c6a4
+SHA1 (patch-cdgram.y) = b58b64a83aa01f4bfb18b7c927cae9d11f52482c

Added files:

Index: pkgsrc/devel/cdecl/patches/patch-cdgram.y
diff -u /dev/null pkgsrc/devel/cdecl/patches/patch-cdgram.y:1.1
--- /dev/null   Wed Jun 16 23:08:42 2021
+++ pkgsrc/devel/cdecl/patches/patch-cdgram.y   Wed Jun 16 23:08:42 2021
@@ -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