[#863] RDtool-0.5.0 — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>

Hi,

18 messages 1999/10/23
[#864] Re: RDtool-0.5.0 — matz@... (Yukihiro Matsumoto) 1999/10/26

Hi,

[ruby-talk:00840] separator of RD block

From: Minero Aoki <aamine@...>
Date: 1999-10-03 09:31:56 UTC
List: ruby-talk #840
Hi, I propose new topic about RD today.

Now, RD is the text surrounded by /=begin\s*$/ and /=end\s*$/.
I propose to change it to

        /=begin(\s*|\s+RD\s+.*)$/i   and
        /=end\s*$/.

briefly say,

        =begin
          :
        =end

and

        =begin RD ....
          :
        =end

is treated as RD block. Any other block is just comment or any.

This change is little, but this makes it very easy to attatch data
to each RD block. And, this expantion does not affect in RD's
specification/grammer. ex. rd2html does NOT use this information.
This information is used by only RD FILE processing tool (ex. rdswap).

For example, this is typical usage of this expantion.

#!/usr/local/bin/ruby

require 'librd'

=begin RD #1
= yet another rd2html
     :
=end

class RD2HTML

=begin RD #2
== Class Methods
=== new
create new RD2HTML object.
=end

  def initialize
  end

=begin RD #3
=== reset( rdstring )
reset object by new RD document.
=end

  def reset( str )
  end
        :
        :

#1, #2, #3 ... means place of RD chunk.
rdswap can use this data to process RD files.


How is this time?  :-)
-------------------------------------------------------------------
Minero Aoki

In This Thread

Prev Next