From: Clifford Heath Date: 2011-05-18T11:00:28+09:00 Subject: Re: LL(k) grammar for an interesting *subset* of Ruby ? On 05/18/11 01:46, Jean-Christophe Le Lann wrote: > Google gave me this : ruby-tp-dw-gram > http://files.rubyforge.vm.bytemark.co.uk/ruby-tp-dw-gram/ruby-tp-dw-gram-0.1.tar.gz Four years old (so no 1.9 syntax), a 0.1 version number, written in Lisp, and claims *not* to parse Ruby correctly. Good luck with that! (really) >> Are you aware of any kind of LL(k) grammar for an interesting *subset* >> of Ruby ? >> Anyone tried that with Citrus or Treetop ? Nathan Sobo (author of Treetop, which I now maintain) intended to, but got side-tracked into adding incremental parser facilities into Treetop so that he could implement a syntax-directed editor for Ruby... I don't think the actual Ruby grammar ever got properly started. It's definitely possible, and now, there's a Ruby test suite to use as well. The advantage of using a PEG is that PEG grammars are composable, so you could incorporate grammar rule definition into the core language, allowing Ruby to extend itself into any language. I hoped this might eventuate, but now, I think that Javascript and V8 is the right implementation target. Clifford Heath.