RSWIG
is work I did last summer to add support for
R to the SWIG software for generating bindings
from C/C++ code to other languages such as Perl, Python, and R.
Joseph Wang has since adapted this and work is ongoing to
merge the two directions.
SWIG is useful as it offers a language with which
"users" can customize the generation of the generated bindings,
and can use this same input for different target languages.
There are two obvious limitations with using SWIG
- SWIG is not a compiler and so extracts information about the
data structures and routines using a more heuristic parser.
It is extremely good, but is not exactly the same as the
compiler's view of the code.
- SWIG does not give us information about
the bodies of the routines and so doesn't allow us to analyze
the code. This is not important for those only interested
in generating bindings to R or another language.
It is an issue for those of us that want a tool for
analyzing the code itself.