From: "Florian Groß" Date: 2005-05-11T05:56:43+09:00 Subject: Re: Does any Ruby parser exist ? Lothar Scholz wrote: >>>Does any Ruby parser existother then the internal one inside the ruby >>>interpreter. I found a few projects but most of them seems to be dead. > FG> Ripper has been merged into 1.9 and is part of the windows one-click > FG> installer -- its grammar rules will thus always be up-to-date in the future. > > How compatible are these rules with 1.8 ? It uses the same rules as the platform it is build against. The one-click installer is on 1.8.2 and comes with Ripper so it works there. > FG> That aside there is also a few lexers like the IRB one and the one used > FG> by the syntax library that does Ruby code highlighting. > > They are all ugly hacks that are just doing a fraction of the ruby > grammer. Good for there special purpose but i need something > different. And none of them can give me line/column positions of an > indentifier. IRB's lexer will give you the column and line numbers. It also ought to lex quite a lot of Ruby. Of course having a complete parser at all times is hard without using Ruby's built-in grammar.