[Rcpp-devel] #ifdef'd out // [[Rcpp::export]]

Dirk Eddelbuettel edd at debian.org
Sun Feb 24 19:41:32 CET 2013


Greg,

Thanks for your continued interest in Rcpp. It is always interesting to get
feedback from someone who has a fresh look at things.

On 24 February 2013 at 13:27, Greg Minshall wrote:
| 1.  could you, on seeing the [[Rcpp::export]], parse the succeeding
| function, then output your conversion code block, then output the lines
| (that you've already partially parsed) following the [[Rcpp::export]]?

You know the song: Your itch to scratch, your opportunity to patch. 

JJ has already explained to know how to circumvent the issue you created
yourself; I would add that you could also simply rename Rcpp::export to
something not matching the regexp; this is probably a sole call to search and
replace in any decent editor.
 
| 2.  alternatively, could you parse the output of "g++ -E" (rather than
| the raw source file)?  (one downside being the code expanding from 20
| lines to 60 KLOC! ;-)

Well didn't JJ already tell you that he is not attempting to rewrite a C++
parser (or even processor) in a few hundred lines of R?

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list