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 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel