Forum: Ruby How to write a toy interpreter.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F09383a4b8725aa99cf892813608de76?d=identicon&s=25 Pedro Del gallego (pedro)
on 2007-04-08 19:38
(Received via mailing list)
Hi,

I was reading today this post [1], and i would like to write my own
toy interpreter. The simplest example possible (with or without ruby).

Can anyone recommend me some start points ? (URLs, tutorials, or books )


Thanks.

[1] : http://code.google.com/p/cat-language/wiki/HowTheI...

--
-------------------------------------
Pedro Del Gallego

Email              :   pedro.delgallego@gmail.com
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (Guest)
on 2007-04-08 21:12
(Received via mailing list)
On Mon, Apr 09, 2007 at 02:37:46AM +0900, Pedro Del Gallego wrote:
> I was reading today this post [1], and i would like to write my own
> toy interpreter. The simplest example possible (with or without ruby).
>
> Can anyone recommend me some start points ? (URLs, tutorials, or books )

An excellent book for everything about language parsing and code
generation
is "Compilers: Principles, Techniques and Tools"
http://en.wikipedia.org/wiki/Compilers:_Principles...
74886c14aa167f34d39145d75c0b971c?d=identicon&s=25 Mushfeq Khan (Guest)
on 2007-04-08 23:36
(Received via mailing list)
A toy interpreter is part of the test suite for Dhaka (a parser
generator -
http://dhaka.rubyforge.org). There's even a page documenting the
interesting
bits:

http://dhaka.rubyforge.org/chittagong.html

The whole interpreter is about 300 lines of code.

Mushfeq.
This topic is locked and can not be replied to.