[R] Continuation and parse
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jun 28 14:44:49 CEST 2006
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, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list