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
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
Hi Didier,
Check out Racc. It comes with ruby in the standard library.
Cheers,
Dave
On 11/20/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...thanks for your help.
-Didier
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.
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...
Tiny clarification, the Racc *runtime* is a standard library.
James Edward Gray II
On Nov 19, 2005, at 10:37 PM, David Balmain wrote:
Hi Didier,
Check out Racc. It comes with ruby in the standard library.
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.
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