Forum: Ruby ruby lexer/parser package ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B389820ea2e2ee4f166930dea947a303?d=identicon&s=25 didier.prophete (Guest)
on 2005-11-20 05:25
(Received via mailing list)
a quick question: is there a lex/yacc package for ruby ? or actually
anything to implement a lexer/parser in ruby ?
for some reason I can't seem to find anything like that out there...

thanks for your help.

-Didier
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 dbalmain.ml (Guest)
on 2005-11-20 05:41
(Received via mailing list)
Hi Didier,

Check out Racc. It comes with ruby in the standard library.

Cheers,
Dave
4299e35bacef054df40583da2d51edea?d=identicon&s=25 james (Guest)
on 2005-11-20 07:13
(Received via mailing list)
On Nov 19, 2005, at 10:37 PM, David Balmain wrote:

> Hi Didier,
>
> Check out Racc. It comes with ruby in the standard library.

Tiny clarification, the Racc *runtime* is a standard library.

James Edward Gray II
C35ede9febe86d05f8b45c67191de495?d=identicon&s=25 eric.mahurin (Guest)
on 2005-11-20 07:13
(Received via mailing list)
On 11/19/05, didier.prophete@gmail.com <didier.prophete@gmail.com>
wrote:
> a quick question: is there a lex/yacc package for ruby ? or actually
> anything to implement a lexer/parser in ruby ?
> for some reason I can't seem to find anything like that out there...

Here are the general parser (and sometimes lexer) packages I found on
raa and rubyforge:

LR parsers:
http://raa.ruby-lang.org/project/racc/ (run-time extension in ruby 1.8)
http://raa.ruby-lang.org/project/rockit/ (doesn't work on 1.8?)

LL parsers:
http://raa.ruby-lang.org/project/coco-rb/
http://rubyforge.org/projects/tdp4r/
http://rubyforge.org/projects/coco-ruby/
http://rubyforge.org/projects/grammar/

Of course I'm biased toward my package (grammar) and think it is the
best out there.  You should take a look at all these if you are
interested in the topic.
B389820ea2e2ee4f166930dea947a303?d=identicon&s=25 didier.prophete (Guest)
on 2005-11-20 18:46
(Received via mailing list)
David, James, Eric,

Thanks a lot guys.
Now, I didn't see any obvious lexer package out there, but maybe I need
to spend more time looking at the examples.

-Didier
C35ede9febe86d05f8b45c67191de495?d=identicon&s=25 eric.mahurin (Guest)
on 2005-11-20 20:23
(Received via mailing list)
On 11/20/05, didier.prophete@gmail.com <didier.prophete@gmail.com>
wrote:
> David, James, Eric,
>
> Thanks a lot guys.
> Now, I didn't see any obvious lexer package out there, but maybe I need
> to spend more time looking at the examples.
>
> -Didier

For mine, a lexer and parser are made identically - one parses
characters and the other tokens.  On one extreme, you can make a
lexer-free parser and on the other you could make multi-level (more
than just lexer/parser) language transformer/compiler.
This topic is locked and can not be replied to.