Tutorial :Do you know any ruby lexers I could use in an application? [closed]



Question:

I would need lexers for as many programming languages I could get, and I would need them to be written in ruby. Do you know any?


Solution:1

Would RACC be useful to you?

You can combine it with REX to generate your lexer.


Solution:2

RACC is not a lexer. It is a parser generator. REX is a lexer, and it is ready made, it is a ruby implementation of lex.

Theres another lexer for ruby. I think it's called ruby-lex.


Solution:3

This might not fit you, but can I suggest you to take a look at Pygments for Python? I understand it might fall outside the scope of your question but this tool has support for a ton of languages and it provides a command-line tool so you can call it from Ruby.

Albino is a small Ruby wrapper for using Pygments from Ruby: http://gist.github.com/82824


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »