Hi All,

I am trying to write a source-to-source compiler for R. I am trying to
leverage the R parser code for the purpose. I am trying to transform the
SEXP returned from the parser into an AST for our own Ruby embedded Domain
specific language.

I tried using R CMD SHBIN to compile a C function that parses arbitrary R
expressions. But I think, the generated .so file can be used from within R
and not be called from other C or Ruby programs(I get linker errors).

My Idea  is to use the SEXP processing functions/MACROS (CAR, CDR, CADR,
etc..) from within C code and transform it to our AST format. I tried
linking to libR.a and other lib*.so's when I compile the C code using gcc
but, it doesn't work.

I read that R exposes only small number of functions for library/package
writers and the compiled *.so can only from within R.

Any ideas on what is wrong, or how I can go about it?

Appreciate any help.

Thanks
RJ

	[[alternative HTML version deleted]]

