"William Djaja Tjokroaminata" <billtj / z.glue.umd.edu> wrote in message
news:amv0od$7o3$1 / grapevine.wam.umd.edu...

>     (regular Ruby code)
>
>     #begin_rbs --------------------------------------
>
>     class MyClass
>         def initialize (obj)
>             if obj.nil?: puts "warning"
>         def do_something (arg)

That's nice - but it is not clear whether indentation is important in your
syntax. I guess it is, since you can have nested class definitions.
You can probably get rid of the need for indentation by having a memberclass
keyword for creating a nested class definition.

 I like things to begin and end to avoid ambiguities, but on the other hand
I find it rather annoying that 75% of Rubycode is made up of begin and end
statements. I have a similar problem with XML, HTML and sometimes LaTex.

I'm actually working on a similar construct for text entry: (simplified)

{chapter the chapter heading}
normal text inside chapter
{section a section header}
normal text inside section
{section the next section header}
normal text {bold this is bolded text}
{chapter the next chapter heading}
normat text

This format is not dependent on identation (curly braces only relevant
because I don't want to escape text).

This can be translated into XML. The tag keywords following curly brace have
been defined as either a normal tag (like bold) or a block tag, like
chapter. Normal tags begin after the keyword and end at the right curly
brace. block tags have parents e.g. section has chapter as parent and
chapter has document (not shown) as parent. block tags have both a header
text (inside the curly braces) and a body text (after the curly braces).
When a new block tag at same or higher block level is discovered, the
current tag (and open children) are closed.

I hope this can be made into a Wiki syntax format one day - such that it can
also be used for single source documentation.

Mikkel