On Mon, Mar 01, 2004 at 05:14:47PM +0900, Charles Comstock wrote:
> Has anyone taken a look at the idea of having embedded grammars in ruby 
> like perl6 is intending to add?  For instance, the example they give:
> 
>     grammar Letter {
>         rule text     { <greet> <body> <close> }
> 
>         rule greet :w { [Hi|Hey|Yo] $to:=(\S+?) , $$}
> 
>         rule body     { <line>+ }
> 
>         rule close :w { Later dude, $from:=(.+) }
> 
>         # etc.
>     }

I believe this can be implemented easily in Ruby as it stands now,
without additional keywords. Many domain specific languages have been
defined this way.

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

<james> abuse me.  I'm so lame I sent a bug report to debian-devel-changes
	-- Seen on #Debian