From: Charles Comstock Date: 2005-05-02T05:04:28+09:00 Subject: Re: Thinking of creating a small mini-language-interpreter using Ruby Glenn Smith wrote: > Always something I've wanted to write - an interpreter of my own. Now > I'm not likely to produce the next 'Ruby', but the recent announcement > of Fu's 'TAO', and other languages, make me wonder if I could write > something similar. Just for me, so to speak. A bit of fun. > > I did look at the possibility of going down the traditional route of > [F]Lex/Yacc[Bison] and 'C', but it would be nice to write it in Ruby. > Alright, it would be one interpreted language interpreting another, > but as I said, 'a bit of fun'. That's if two small children and a > scary wife allow me the time of course!! > > I see there are ruby-lex and ruby-yacc modules on RAA - anybody used > these in anger and are they complete/good-enough? > > Has anybody done this kind of thing before? Not being a) a genius, b) > Matz, or c) the owner of a fine beard, can anybody recommend any good > URL's/tutorials/perhaps even books? > > I could grow a beard of course... > > > I wrote a small sequencing FSM language as a domain language in Ruby and then wrote a racc parser to convert from a simpler syntax to the ruby domain language. Racc takes a little bit to get used to but it works quite well and the runtime is included with every ruby install. Charlie