ruby lexer/parser package ?

D

didier.prophete

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
 
D

David Balmain

Hi Didier,

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

Cheers,
Dave
 
J

James Edward Gray II

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
 
E

Eric Mahurin

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.
 
D

didier.prophete

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
 
E

Eric Mahurin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top