Skip to content
IRC scheme interpreter bot written in ruby
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
doc
lib
old
scheme
test
.gitignore
BUG-HUNTING.md
README.md
Rakefile
bot.rb
repl
run.sh

README.md

Schemey

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 test/helper.rb.

Parser

The parser is a PEG grammar using the ruby gem 'treetop'.

Demo

You can try the parser out by typing rake irb 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

Something went wrong with that request. Please try again.