From B.Rowlingson at lancaster.ac.uk  Fri Sep  8 18:08:07 2006
From: B.Rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Fri, 08 Sep 2006 17:08:07 +0100
Subject: [Rd] Complete documentation gram.y ??
In-Reply-To: <20060908140335.76780.qmail@web32706.mail.mud.yahoo.com>
References: <20060908140335.76780.qmail@web32706.mail.mud.yahoo.com>
Message-ID: <45019567.9060709@lancaster.ac.uk>

Patricia Bautista wrote:
> Hi everybody, 
> 
> Does anybody know where I can find documentation about
> file gram.y?. What I need to do is related to the
> parse tree. I need the parse tree of a R user defined
> function for being used by a c++ function. Briefly, I
> have a C++ function that is used to generate random
> numbers from a specified objective function and I want
> to use R just to verified the sintaxis of the function
> and I want C++ for doing the evaluations of the
> mentioned function.

  A function in R can't exist unless its syntactically correct. Or is 
your function reading a text representation of an R function (from a 
file or user input as a string)? In which case it would be easier to 
check the syntax from R just by using 'eval' in a 'try' clause, and then 
pass the function object to C++ in the usual documented way (as an SEXP).


Barry




[Rd] Complete documentation gram.y ??
Barry Rowlingson