https://github.com/shime/uby_interpreter
Ruby-like interpreter implementation
https://github.com/shime/uby_interpreter
Last synced: about 1 year ago
JSON representation
Ruby-like interpreter implementation
- Host: GitHub
- URL: https://github.com/shime/uby_interpreter
- Owner: shime
- License: mit
- Created: 2013-05-24T13:34:48.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-31T13:44:18.000Z (about 13 years ago)
- Last Synced: 2024-10-03T22:46:26.789Z (over 1 year ago)
- Language: Ruby
- Size: 133 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# UbyInterpreter
Ruby-like interpreter implementation.
Based on a [talk](https://www.youtube.com/watch?v=r1JMxJ06I98) by [Ryan Davis](https://github.com/zenspider).
## Features
* Basic numeric types, true, false, strings, arrays, hashes and nil
* Conditional branching and looping
* Primitive and user defined functions
* Local variables and variable scoping
* Test-driven, extensible, patterns-based design
* ~130 LOC for implementation, ~70 LOC for tests
* Fits in one head
## Installation
Add this line to your application's Gemfile:
gem 'uby_interpreter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install uby_interpreter
## Usage
Comes with executable.
Run a file with
$ uby /path/to/your/file
Or simply run
$ ./bin/uby example.rb
to see what this little fellow can do!
## Running tests
$ rake
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request