From: "rpardee@..." Date: 2010-04-15T22:00:06+09:00 Subject: Re: OT(?): Adapting rdoc to produce documentation for something other than ruby or c--advisable? On Apr 14, 2:32 pm, Eric Hodel wrote: > > If you've got input files that aren't already handled (ruby, C, text, perl are handled built-in, fortan is available via an extension) you'll want to look at writing a parser. > > RDoc::Parser::C is a pile of regular expressions (which would probably work best to start), or if you can find (or write) a real parser for SAS macros you can use that instead. > > An RDoc::Parser will turn an input document (like your SAS file) into a tree of code built around an RDoc::TopLevel (a file) and it's various descendents (lib/rdoc/code_objects.rb has the list).  You'll need to decide on a mapping from the elements of SAS macros to classes, modules, and methods. Cool--thanks Eric. I browsed just a bit through RDoc::Parser::C & may give this a shot. Probably first I should try a 'hello world' type thing where I just try to get rdoc to emit docs for a pretend module/ method w/out any regard to the actual contents of any real file & then see how far I can get w/simple regexes. Thanks! -Roy