I've used antlr and javacc/freecc for a while. Now I need to write a bunch of parsers using antlr grammars but such parsers need to be written in ruby lang.
I googled but nothing found. Is there any ruby parser generator that takes antlr grammars and create a parser? If there are many, which is the best one in your opinion?
TIA Paolo
For my project I chosed treetop (citrus was not born yet).
Why not to use ANTLR Ruby: http://www.antlr.org/wiki/display/ANTLR3/Antlr3RubyTarget (http://split-s.blogspot.com/2005/12/antlr-for-ruby.html)
There is also some beta here: http://rubyforge.org/projects/antlr3/
You could also generate the parser with ANTLR for Java or C and call it from your Ruby program with JRuby or FFI.
This should also give you a performance boost which might be a big advantage if you have a lot of input to parse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With