Re: [R] Continuation and parse

From: Prof Brian Ripley <>
Date: Wed 28 Jun 2006 - 22:44:49 EST

On Wed, 28 Jun 2006, Jim Lemon wrote:

> Hi gurus,
> After an unsuccessful scrabble through the documentation and Jon's
> excellent search facility, I am no wiser as to how R recognizes an
> incomplete command line and politely raises its hand for more. The help
> page for parse gives no indication that it does anything more than spit
> the dummy when fed an incomplete command line, but something in there
> must recognize such ellipsis. Any hints?

It's internal. Look in src/main/main.c, in particular the R_Repl* functions. In short, R_Parse1Buffer can return PARSE_INCOMPLETE.

This is not done by the R-level function parse(): that parses a whole buffer rather than a line at a time, and maps all non-OK results to an error.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Jun 28 22:49:49 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 29 Jun 2006 - 00:12:37 EST.

Mailing list information is available at Please read the posting guide before posting to the list.