[Rd] Roxygen

Manuel J. A. Eugster Manuel.Eugster at stat.uni-muenchen.de
Tue Mar 18 15:48:57 CET 2008


Hey Peter,

 > If I understand the proposal correctly, there should be a lexer
 > (written in R) that exposes an API; that API would be used by
 > segregated mini-parsers (Roclets) which do the dirty work of Roxygen
 > -> {html, LaTeX, DocBook, ...} translation.

you do not have to write the lexer/parser completely in R, you can
use C/C++ and call the functions from R.

In my thoughts, I do not see the Roclets as mini-parsers, but as small 
R programs working on the parse tree/list returned by one big
parser/lexer. They use the information in the parse tree and create
Rd-files, NAMESPACE file, caller/call graphs, .... But I do not know
if this is the best way and your API-idea sounds good too.


 > The lexer should ship with a proof-of-concept Roclet.

Hm, not only a proof-of-concept Roclet, but a small set of meaningful
ones. An important one is the Roclet for creating the Rd-files.

If you have created a meaningful internal structure of the parsed
code, the Roclets are not too hard to create. I think. :-)


 > Have I missed anything?

First point will be the creation of a list of document and development 
assistance tags which are useful in combination with R. It is
desirable that these tags and their syntax and semantics be compatible
with those used by Doxygen and Javadoc, but extended with tags
important for R specific things.


Hope I could help you,
Manuel Eugster.



More information about the R-devel mailing list