From bill at insightful.com  Thu May 22 22:05:00 2008
From: bill at insightful.com (Bill Dunlap)
Date: Thu, 22 May 2008 13:05:00 -0700 (PDT)
Subject: [Rd] bug in R 2.7.0 (PR#11497)
In-Reply-To: <48353DBE.6010004@biostat.ku.dk>
References: <20080522074029.DA2FE2834154@mail.pubhealth.ku.dk>
	<48353DBE.6010004@biostat.ku.dk>
Message-ID: <Pine.GSO.4.56.0805221257050.15333@devsun3201.insightful.com>

On Thu, 22 May 2008, Peter Dalgaard wrote:

> More succinctly, parse() from stdin() seems to be broken:
>
> > parse()
> ?a
> expression()
>
> This was not the case in January (this was the older version I had lying
> around):
>
> R version 2.6.2 alpha (2008-01-29 r44233)
> ....
> > parse()
> ?a
> expression(a)

Also, if your input starts with certain errors, parse returns
the stuff after the error:
   > parse()
   ?err//one
   expression(one)


After the attached change we get

   > parse()
   ?one
   expression(one)
   > parse(n=2)
   ?one;two;three
   expression(one, two)
   > parse()
   ?err//one
   Error in parse() : unexpected '/' in "err//"

Index: gram.y
===================================================================
--- gram.y	(revision 45762)
+++ gram.y	(working copy)
@@ -1389,8 +1389,6 @@
 	    if (c == ';' || c == '\n') break;
 	}

-	rval = R_Parse1Buffer(buffer, 1, status);
-
 	/* Was a call to R_Parse1Buffer, but we don't want to reset xxlineno and xxcolno */
 	ParseInit();
 	ParseContextInit();



[Rd] bug in R 2.7.0 (PR#11497)
Bill Dunlap