From bauerda at ieee.org  Tue Jul  6 20:25:07 2004
From: bauerda at ieee.org (bauerda@ieee.org)
Date: Tue Jul  6 23:31:42 2004
Subject: [Rd] Wrong object type produced - LANGSXP should be LISTSXP
	(PR#7055)
Message-ID: <20040706182507.2731B108D8@slim.kubism.ku.dk>

Full_Name: David Bauer
Version: 1.9
OS: Linux
Submission from: (NULL) (160.91.245.8)


In the file gram.y, the xxsubscript function generates a LANGSXP with another
LANGSXP as its CDR.  I believe that this is a mistake and that the second
LANGSXP should be a LISTSXP.  The inputs a1, a3 are parameters to the subscript
function (a2), and as such they should be in a dotted-pair list.

David Bauer


--- gram.y.orig      2003-11-15 05:40:35.000000000 -0500
+++ gram.y        2004-07-06 13:45:10.000000000 -0400
@@ -731,11 +731,11 @@
                                                                               

 static SEXP xxsubscript(SEXP a1, SEXP a2, SEXP a3)
 {
     SEXP ans;
     if (GenerateCode)
-       PROTECT(ans = LCONS(a2, LCONS(a1, CDR(a3))));
+       PROTECT(ans = LCONS(a2, CONS(a1, CDR(a3))));
     else
        PROTECT(ans = R_NilValue);
     UNPROTECT_PTR(a3);
     UNPROTECT_PTR(a1);
     return ans;


[Rd] Wrong object type produced - LANGSXP should be LISTSXP (PR#7055)
bauerda@ieee.org