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

Greg Minshall minshall at umich.edu
Sun Feb 24 19:27:36 CET 2013


thanks for the reply.  i'm very sympathetic to not wanting to bundle a
full-on C++ parser.  two things i wonder:

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]]?

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! ;-)

cheers, Greg

More information about the Rcpp-devel mailing list