Skip to content
Prev 29578 / 63424 Next

Parsing code with newlines

This adds nothing to your previous post: please don't be annoying and post 
almost identical messages.

I strongly suspect you mean 'parse error' and 'how can I parse R code', 
but we don't know what the example was and what the error message was. 
Nor do we know what you are doing with this fragement of C code (and 
returnng an unprotected SEXP via a (void *) cast is a recipe for tears).

parse(text=) uses R_ParseVector, and that works for 'code that includes 
comments and newlines', so please check out the internal code used (in 
src/main/gram.c).

If you study the posting guide you should be able to formulate a posting 
that people can actually help you with.
On Mon, 4 Aug 2008, Peter Jaeger wrote: