We are a (incomplete) scheme interpreter in Ruby working off of r6rs.
Currently in the repository includes an IRC bot in
bot.rb. This is an example
implentation using the scheme parser. However it is not a requirement to use
the IRC bot to access the parser.
The parser is started and run in
lib/parser.rb, this parser should be valid
with any scheme source code, more details on this below.
Tests are stored in
test/unit/, this is our current set of unit tests against the
parser. These use
Test::Unit with some interesting assertions and generators in
The parser is a PEG grammar using the ruby gem 'treetop'.
You can try the parser out by typing
Which will load
lib/utils.rb which has some special functions for interactive use.
Try the given sequence out to get an idea.
glex '(+ 1 2)' ---> [[, , ]]
gintern '(+ 1 2)' ---> [[(+ &rest NUMBER), , ]]
geval '(+ 1 2)' ---> 3