From: Ryan Davis Date: 2009-11-29T21:17:32+09:00 Subject: Re: ruby language parser in ruby On Nov 29, 2009, at 03:23 , Brian Candler wrote: > I'm looking for a ruby language parser written in ruby, that I can hack > to play about with generating other ruby-like languages. > > I've found RubyParser. Are there any other options I should be looking > at? > > * I see ruby 1.9 has ripper, but it's written as a C extension. I want > something in pure ruby. well to be fair. ripper is yacc + C. ruby_parser is racc + ruby. Until someone writes a recursive descent parser, you'll never have PURE ruby (and it wouldn't be quite as maintainable). I'm actually working on that, but I don't yet know if I'll succeed. > * ParseTree is also in C I believe. and doesn't parse. It just uses ruby to parse and grabs the internal ast. > * Possibly could look at the internals of rubinius? Was using ruby_parser, but now is also C... you know... ruby in ruby. :/ I think your best bet at this time is ruby_parser.