On 11/3/05, Christian Neukirchen <chneukirchen / gmail.com> wrote:
> I don't think the real problem is the real grammar, that part of
> parse.y looks like the easier one (and rather readable) to me.  The
> problem is the lexer-parser communication, think heredocs, %q[] etc.

This is true, but it shouldn't be an obstacle to doing a parser. There
is a ruby lexer which handles these issues and all other lexer-parser
communication issues internally, and returns you a nice clean stream
of tokens without any particular help from a parser: it's my own
project, RubyLexer.

It looks to me like it ought to be pretty easy to write a racc-based
ruby parser using RubyLexer's output. If someone wants to do the racc
parts of this, it would be great; but I can't do it myself as I'm
allergic to yacc and related tools... It should be a straightforward
port from the current yacc grammar.