Hi Folks,

This is a totally off-topic diversion that I thought people might find 
fun.

I've been working on a small parser framework that I'm integrating into 
Obversive to provide code analysis of R scripts and stuff.  It is still 
a work in progress, but the parser currently can parse R code and 
produce an XML output file representing the Abstract Syntax Tree.

I thought it would be kind of fun to take the results and throw the XML 
into Exist (an XML database) so that you can search the structure of an 
R script.  I have a sample up at my site at:

http://www.zedshaw.com:8888/simple/xquery.xsp

Where you can search for things in a chunk of the R test suite using the 
XPath and XQuery syntax.  So, you can search for all function calls 
inside of for loops with:  //FOR//CALL, or find all calls to c() with 
//[EMAIL PROTECTED]"c"].

Have fun with it.  It's nothing serious, but I may turn it into a code 
comprehension tool later down the line.

Zed

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to