github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

celtic / rubyex

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 7
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

a Ruby VM/interpreter — Read more

  cancel

http://sairyx.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

match will find it anywhere in the string, even 
celtic (author)
Fri Dec 26 17:33:37 -0800 2008
commit  f4b12ae2fee03efc064c34460df5c0195d4fbf2e
tree    bdaa515edb738c420a7f77e94ef3754b891fc4b2
parent  c98a260b243fe45c118bad89014e5fb1e21731db
rubyex /
name age
history
message
file README.textile Loading commit data...
file TODO
directory include/
directory module/
directory parser/
directory ruby/
directory tests/
directory vm/
README.textile

RubyEx

What, why, how?

RubyEx is my attempt at creating a Ruby parser, byte-code generator and VM for that byte-code.

I’ve never written a parser, byte-code or VM before, and hence the entire codebase is often completely refactored at once in some commits.

I am an avid Rubyist, and my only motivating factor to write this is since I thought it’d be a good bit of fun.

Originally my plan was to write an interpreter for the byte-code to run as a kernel module (speed?!) – I may still try to do it, but that’s risky like nothing else and a complex beast to run in kernel space that we’d all rather not. So, RubyEx turned out instead just to be my parser and VM.

The parser is written using flex/bison, and generates byte-code from an object-oriented AST. The AST can also produce messy Ruby instead, and the current design means it wouldn’t be too hard to add other forms of output for the AST.

The VM is written in C++, and is a learning experience for me as I learn just how much Ruby gives us, by having to implement it myself.

Now?

At the moment, a fairly large subset of the Ruby core is implemented, to name a few major points:

  • Defining classes and methods,
  • blocks,
  • eval,
  • exceptions,
  • string interpolation, and
  • Ruby’s class hierarchy and introspective abilities.

A simple irb program (see ruby/test_irb.rb) can run in both MRI and RX equally. The main work now is on writing the standard library that surrounds Ruby. It would also be nice to support linkage with Ruby’s C library extensions.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server