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.
Pedro D. (Guest)
on 2007-04-08 21: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 G.

Email              :   removed_email_address@domain.invalid
Brian C. (Guest)
on 2007-04-08 23:12
(Received via mailing list)
On Mon, Apr 09, 2007 at 02:37:46AM +0900, Pedro Del G. 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...
Mushfeq K. (Guest)
on 2007-04-09 01: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.