https://github.com/shepmaster/clojure-ruby
An extremely bare-bones Ruby interpreter
https://github.com/shepmaster/clojure-ruby
Last synced: 10 months ago
JSON representation
An extremely bare-bones Ruby interpreter
- Host: GitHub
- URL: https://github.com/shepmaster/clojure-ruby
- Owner: shepmaster
- License: epl-1.0
- Created: 2014-03-26T20:38:46.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-15T16:26:05.000Z (about 12 years ago)
- Last Synced: 2025-02-10T13:12:14.235Z (over 1 year ago)
- Language: Clojure
- Size: 375 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clojure-ruby
A Clojure program to interpret a **very** narrow subset of Ruby.
Written for the [Reddit daily programmer][rdp] challenge
[rdp]: http://www.reddit.com/r/dailyprogrammer/comments/210j6i/21314_challenge_153_hard_interpreting_interpreters/#
## Usage
```
lein run path-to-ruby-code.rb
```
Remember that it's unlikely that any arbitrary Ruby code will work. An
`example.rb` file is included that should work, but you should try the
Brainfuck interpreter from my other project, [ruby-brainfuck][rbbf].
There should be exceptions thrown for bad input, but they aren't very
easy to read!
[rbbf]: https://github.com/shepmaster/ruby-brainfuck
## Thanks
Many thanks to the [instaparse][instaparse] library, which took care
of all the heavy lifting of parsing!
[instaparse]: https://github.com/Engelberg/instaparse
## License
Copyright © 2014 Jake Goulding
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.