# Dhaka-2.0.0

**URL:** <https://www.ruby-forum.com/t/dhaka-2-0-0/82812>\
**Category:** Ruby\
**Created:** [January 21, 2007, 9:09am UTC](https://www.ruby-forum.com/t/dhaka-2-0-0/82812 "2007-01-21T09:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mushfeq\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@Mushfeq\_K](https://www.ruby-forum.com/u/Mushfeq_K)\
**Post date:** [January 21, 2007, 9:09am UTC](https://www.ruby-forum.com/t/dhaka-2-0-0/82812/1 "2007-01-21T09:09:30Z")

</div>

There’s a new tutorial on creating a small interpreter at  
[http://dhaka.rubyforge.org/chittagong.html](http://dhaka.rubyforge.org/chittagong.html)  
(note: this won’t make any sense if you don’t read the other, easier,  
examples). This has now become part of the test suite. I hope it  
addresses  
some of the questions that people that have had. Although the  
interpreter  
features its own exception mechanism (that has nothing to do with Ruby’s  
exceptions), it still ‘leaks’ Ruby in several places. Plugging all these  
leaks was not the goal. Remember, it’s just a sketch, to illustrate a  
broad  
swathe of functionality. And you can already write some pretty bad  
programs  
with it!

This release contains several small changes, some of which are  
unfortunately  
backwards-incompatible. Things just make more sense this way.

- Deprecated ParseSuccessResult#syntax\_tree. Use  
ParseSuccessResult#parse\_tree from now on (it’s the proper name for it).
- Tokenizer#accumulator eliminated.
- Added a Tokenizer#create\_token factory method. Use this to create  
tokens  
from now on.
- Tokenizer#tokenize now returns either a TokenizerSuccessResult or  
TokenizerErrorResult, does not throw an exception on encountering  
unexpected  
characters. (‘unexpected’ characters are actually quite expected.)
- Token now contains an attribute input\_position, the index of the  
source  
input that it was created from.
- ParseErrorResult now contains the unexpected\_token itself, not the  
unexpected\_token\_index.
- Tokenizer returns the end symbol token for empty input.

Pretty much all of these were justified by the need for more meta-data  
to  
allow for proper error reporting. This functionality has been greatly  
improved.

I’ve tried to incorporate Gregory B.'s suggestions into the newest  
RDoc  
by including some sample usages for the most important classes.

Ok, I’m going to stop making backwards-incompatible changes now.

[http://dhaka.rubyforge.org](http://dhaka.rubyforge.org)

Mushfeq.

---

<div class="post-metadata">

**Author:** ![Mushfeq\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@Mushfeq\_K](https://www.ruby-forum.com/u/Mushfeq_K)\
**Post date:** [January 21, 2007, 10:06am UTC](https://www.ruby-forum.com/t/dhaka-2-0-0/82812/2 "2007-01-21T10:06:33Z")

</div>

On 1/21/07, Mushfeq K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve tried to incorporate Gregory B.'s suggestions into the newest RDoc  
> by including some sample usages for the most important classes.

Looks good! Thanks Musfeq.
