Path: | README |
Last Update: | Fri Jan 09 20:41:56 +0900 2009 |
(Japanese | English)
Here is a patch file to improve the RDoc analysis feature for Fortran 90/95 source codes. A patched package of RDoc source is also available.
Operation of the package has been verified with Ruby 1.8.5 and 1.9.0.
The latest version (Version $Name: rdoc-f95-20090109-1 $)
Archives of old versions
You have the following three ways for installation.
To use the patch file, follow the steps described below:
% tar -zxvf ruby-1.8.7-p72.tar.gz
% patch -p0 < rdoc-f95_ruby1.8.7-p72.patch
To install the patched RDoc package, follow the steps described below:
% tar -zxvf rdoc-f95.tgz
% cd rdoc-f95-XXXXXXXX
% ruby install.rb
If rdoc is already installed, the original rdoc will be overritten.
Use —help option to show options and the directory to which rdoc is installed:
% ruby install.rb --help
Add following URL to sources.list of APT (/etc/apt/sources.list). You can use "ftp" protocol instead of "http".
deb http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou etch/
Install by APT commands.
% apt-get update % apt-get install rdoc-f95
This "rdoc-f95" package disables original "rdoc" package because "rdoc-f95" moves files of "rdoc" to diverted location. If you want to use original "rdoc" package, please remove "rdoc-f95". Then files of original "rdoc" package will be returned to proper location.
Following suggested packages enable you to use "diagram" and "mathml" options (see below).
% apt-get install graphviz libmathml-ruby
Set the environment variable PATH to include the directory where the execution program is installed, and RUBYLIB to include the directory where the libraries are installed.
Move to a directory where your Fortran 90/95 files exist, and execute the following command. HTML documents will be generated in doc directory.
% rdoc -U --ignore-case --inline-source
Files ending .f90, .F90, .f95, .F95 are parsed as Fortran 90/95 programs. All Fortran 90/95 programs in subdirectories are parsed recursively.
Just as in the original RDoc, files ending with .rb and .rbw are parsed as Ruby programs and files ending with .c, .cc, .cpp, .CC, .cxx are parsed as C programs.
With the option —op, the directory where HTML documents are generated can be changed. —title option sets title of HTML documents. When —all option is used, private subroutines, functions etc. in Fortran 90/95 programs are shown in HTML documents (for developers). If files or directories are specified as arguments (for example, "src/*.f90" or "test/"), the particular files are parsed. In the following example, files with suffix ".f90" in a directory "src/" and files in a directory "test/" are parsed.
% rdoc -U --ignore-case --inline-source \ --op rdoc --title "RDoc documentations" src/*.f90 test/
Alternatively, you can parse only a part of files by creating a ".document" file and writing names of the files and the directories to the file.
For more information, see README of original RDoc.
Refer to parsers/parse_f95.rb which explains parsed information, way of looking at documents, the format of comment blocks in Fortran 90/95 source code. If you use "—mathml" option (see below), refer to RDoc::Markup::ToXHtmlTexParser, too. For general information, see README of original RDoc .
This patch has been created for enhancing the Fortran 90/95 parser of RDoc . The Fortran 90/95 parse script parse_f95.rb is mainly modified, and other programs are also improved.
The original RDoc has been developed by Dave Thomas and is now maintained by Ryan Davis and Eric Hodel, etc. . The RDoc is available from the Ruby source code repository. See Ruby Repository Guide. For more information about RDoc, see README of original RDoc or RubyForge: rdoc Project
Differences to the original one are given below. Note that some differences were lost because this patch (2005/12/17 version) has been already included into the original RDoc package.
Addition of —ignore-case option : | In the Fortran 90/95 Standard, upper case letters are not distinguished from lower case letters, although original RDoc produces case-dependently cross-references of Class and Methods. When this options is specified, upper cases are not distinguished from lower cases. |
Cross-reference of file names : | Cross-reference of file names is available as well as modules, subroutines, and so on. |
Modification of —style option : | Original RDoc can not treat relative path stylesheet. Application of this patch modifies this function. |
Conversion of TeX formula into MathML: | TeX formula can be converted into MathML format with —mathml option,
if MathML library for Ruby version 0.6b — 0.8 is installed.
This library is available from Bottega of Hiraku (only JAPANESE). See RDoc::Markup::ToXHtmlTexParser
about format.
*** Caution *** Documents generated with "—mathml" option are not displayed correctly according to browser and/or its setting. We have been confirmed that documents generated with "—mathml" option are displayed correctly with Mozilla Firefox and Internet Explorer (+ MathPlayer). See MathML Software - Browsers for other browsers. |
Some formats of comments in HTML document are changed to improve the analysis features. See parsers/parse_f95.rb for details.
The enhanced version of the RDoc Fortran 90/95 parser has been constructed on the premise of educational and academic usages only. For these uses, usage and modification of the resources withiout notification to the authors is permitted. Licence of the enhanced version of RDoc Fortran 90/95 parser conforms to that of original RDoc. See README of original RDoc .
When you publish your scientific/technological works using the enhanced version of RDoc Fortran 90/95 parser, we will be very glad if you cite our resources in the following way:
GFD Dennou Club dcmodel project, 2008: http://www.gfd-dennou.org/library/dcmodel/, GFD Dennou Club.
To contact us, please send an email to .