[Rd] Experimental Rd parser in trunk.

Duncan Murdoch murdoch at stats.uwo.ca
Thu Nov 13 17:02:01 CET 2008


I've just committed the parse_Rd() function to R-devel.  This is a 
parser for Rd files, described in

http://developer.r-project.org/parseRd.pdf

It is not identical to the current parser, and about a dozen of the base 
man pages currently signal syntax errors.  It also detected errors in 10 
files that were errors according to both definitions, but were missed by 
the current system, and I've already fixed those.  I plan to patch the 
rest so that they work in both systems soon.  The differences between 
the two systems are described in the document above.

I would like to hear comments about the changes -- some of them are 
still optional.  I will be continuing to work on support functions for 
the parser, e.g. the print routine is currently quite primitive.

I expect there may be incompatibilities with platforms on which I 
haven't tested.  I developed the parser on Windows, and have tested it 
on a Linux system.  There may be problems handling Rd files with unusual 
encodings (UTF-8 and Latin1 should be supported, but I don't know about 
others, and haven't even tested those yet).

Duncan Murdoch



More information about the R-devel mailing list