From: Robert Feldt Date: 2002-01-03T01:05:53+09:00 Subject: [ruby-talk:30051] Re: Ruby parsers in Ruby On Thu, 3 Jan 2002, Yukihiro Matsumoto wrote: > |What is needed is the exact grammar and lexer rules. > > The "ruby" source? parse.y is compilable unambiguous grammer > description. ;-) > > Seriously, Ruby had been too "hot" to write human readable "clear > specification". Recently Ruby (at least 1.7) grammer and behaviors > are becoming relatively stable, so that such attempt may be > reasonable. > This has been a long-term goal for me but I keep postponing it since my thesis writing is currently taking up all my time. If anyone care to do this I think you can be helped by Rulator which is in the Rockit CVS at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/rockit/src/examples/ruby/ Its a hybrid RubyInRuby parser with the lexer specified with Rockit 0.4 parser generators/combinators and the parser itself being generated by Racc from the grammar in parse.y. It can be used both to build a RubyAST tree or as an event based parser. Rich Kilmer has helped out by writing tests for the lexer but more tests are needed to weed out bugs (in the parser). Any help appreciated. Regards, Robert