Writing a compiler in Ruby

Vidar Hokstad <vidar.hokstad@gmail.com>
Fri, 20 Jun 2008 09:08:42 -0700 (PDT)

          From comp.compilers

Related articles
Writing a compiler in Ruby vidar.hokstad@gmail.com (Vidar Hokstad) (2008-06-20)
| List of all articles for this month |
From: Vidar Hokstad <vidar.hokstad@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 20 Jun 2008 09:08:42 -0700 (PDT)
Organization: Compilers Central
Keywords: practice
Posted-Date: 21 Jun 2008 12:58:17 EDT

I've been writing a compiler in Ruby as a hobby project, and at the
moment I'm serializing the development process on my blog. I though it
might be of interest to some people here. All the posts up in this
category:


http://www.hokstad.com/tag/compiler+in+Ruby+bottom+up


It's generating x86 gas-style assembler only for now. 9 parts are up.
It's completely experimental, and I'm doing the development very much
ad-hoc in that I haven't started with a language spec of any sort
(though I have some ideas of where I'll want to go...).


I've also very deliberately started in the "wrong end" - the very
first part started with code generation, and I'm building it up from
the ground by generating code first. In fact, I haven't gotten to the
parser yet. Instead I'm piggy-backing on Ruby arrays and symbols to
write test programs for it.


Vidar


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.