# Rubylexer 0.7.3 Released

**URL:** <https://www.ruby-forum.com/t/rubylexer-0-7-3-released/166982>\
**Category:** Ruby\
**Created:** [May 1, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/rubylexer-0-7-3-released/166982 "2009-05-01T18:18:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandemic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8491ac/32.png) [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Post date:** [May 1, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/rubylexer-0-7-3-released/166982/1 "2009-05-01T18:18:47Z")

</div>

Rubylexer version 0.7.3 has been released!

- [http://rubylexer.rubyforge.org/](http://rubylexer.rubyforge.org/)
- [http://rubyforge.org/projects/rubylexer/](http://rubyforge.org/projects/rubylexer/)

RubyLexer is a lexer library for Ruby, written in Ruby. Rubylexer is  
meant  
as a lexer for Ruby that’s complete and correct; all legal Ruby  
code should be lexed correctly by RubyLexer as well. Just enough parsing  
capability is included to give RubyLexer enough context to tokenize  
correctly  
in all cases. (This turned out to be more parsing than I had thought or  
wanted to take on at first.) RubyLexer handles the hard things like  
complicated strings, the ambiguous nature of some punctuation characters  
and  
keywords in ruby, and distinguishing methods and local variables.

Changes:

### 0.7.3/4-19-2009

- 9 Bugfixes:

- 9 Minor Enhancements:

- [http://rubylexer.rubyforge.org/](http://rubylexer.rubyforge.org/)

- [http://rubyforge.org/projects/rubylexer/](http://rubyforge.org/projects/rubylexer/)

---

<div class="post-metadata">

**Author:** ![pandemic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8491ac/32.png) [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Post date:** [May 2, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/rubylexer-0-7-3-released/166982/2 "2009-05-02T23:04:38Z")

</div>

> RubyLexer is a lexer library for Ruby, written in Ruby. Rubylexer is  
> meant as a lexer for Ruby that’s complete and correct; all legal Ruby  
> code should be lexed correctly by RubyLexer as well.

Would this allow one to create a “mini-irb”, i.e. something that can  
interprete ruby code like irb does, but without the need to reuse that  
undercommented irb code?

---

<div class="post-metadata">

**Author:** ![pandemic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8491ac/32.png) [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Post date:** [May 3, 2009, 6:36am UTC](https://www.ruby-forum.com/t/rubylexer-0-7-3-released/166982/3 "2009-05-03T06:36:30Z")

</div>

On 5/2/09, Marc H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > RubyLexer is a lexer library for Ruby, written in Ruby. Rubylexer is  
> > meant as a lexer for Ruby that’s complete and correct; all legal Ruby  
> > code should be lexed correctly by RubyLexer as well.
> 
> Would this allow one to create a “mini-irb”, i.e. something that can  
> interprete ruby code like irb does, but without the need to reuse that  
> undercommented irb code?

So, irb has its own little lexer it uses internally, mostly so it can  
tell whether you’ve typed a complete line of code or not. I presume  
that’s what you’re referring to…? Irb’s lexer could fairly easily be  
replaced with RubyLexer, or you could write a whole new implementation  
based on it.

I know irb’s lexer is incomplete in various ways, but it seems to be  
much better than it was  
when I started writing RubyLexer. RubyLexer isn’t totally perfect yet  
either… it certainly isn’t very readable… so now you’ve replaced  
undercommented irb code with undercommented RubyLexer code… 😉

Is this answering your question? I’m not sure.
