Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duckinator/ooc-in-ruby
ooc interpreter in ruby. Purely for shits and giggles and possibly experimentation. Don't assume it's entirely compliant.
https://github.com/duckinator/ooc-in-ruby
Last synced: 1 day ago
JSON representation
ooc interpreter in ruby. Purely for shits and giggles and possibly experimentation. Don't assume it's entirely compliant.
- Host: GitHub
- URL: https://github.com/duckinator/ooc-in-ruby
- Owner: duckinator
- Created: 2012-06-21T21:59:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-12T01:20:43.000Z (almost 11 years ago)
- Last Synced: 2024-11-26T08:06:38.039Z (2 months ago)
- Language: C
- Homepage:
- Size: 336 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - ooc-in-ruby
README
# ooc-in-ruby: ooc interpreter written primarily in ruby
...and a lot of automagically-generated C. The hell if I'm duplicating all of _that._
The idea is to write as much of it as possible in ruby.
I gave up writing a custom parser for now, so it uses nagaqueen.
Hellooooo, 9,350 SLOC of generated C, tied together with 33 SLOC of hand-written C.Good news: this means I should be albe to get away with `./get-nagaqueen.sh && ./generate-boilerplate.rb` and coding some ruby any time nagaqueen changes.
# Building it
Here's all the files related to generating the shitton of C and compiling it all.
* `./util/get-nagaqueen.sh`: tries to find NagaQueen.c, copies it to ./nagaqueen/nagaqueen.c.
* `./util/generate-boilerplate.rb`: generates approximately 960 lines of ruby/C interop boilerplate in ./nagaqueen/boilerplate.h.
* `./util/generate-nagaqueen-boilerplate.rb`: generates approximately 590 lines of ruby/C interop boilerplate in ./lib/nagaqueen-methods.rb.
* `./build.rb`: builds this monstrous thing.
* `./test.rb`: test this monstrous thing.In most cases, all you should need is `./build.rb` and `./test.rb`.