Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marcelog/shiny_chef

An implementation of the chef language in ruby, using ANTLRv3 for the grammar
https://github.com/marcelog/shiny_chef

Last synced: about 11 hours ago
JSON representation

An implementation of the chef language in ruby, using ANTLRv3 for the grammar

Awesome Lists containing this project

README

        

An implementation of the chef language in ruby using ANTLRv3 for ruby.

The syntax for the language is at http://www.dangermouse.net/esoteric/chef.html

Building
--------
Just run ./make.sh you will need antlr4ruby in your path.

Examples
--------
The examples were taken from: http://progopedia.com/version/acme-chef-1.01/

Here's the sample output for them:

$ bin/shiny_chef examples/helloworld.chef
Hello, World!

$ bin/shiny_chef examples/factorial.chef
0 ! = 1
1 ! = 1
2 ! = 2
3 ! = 6
4 ! = 24
5 ! = 120
6 ! = 720
7 ! = 5040
8 ! = 40320
9 ! = 362880
10 ! = 3628800
11 ! = 39916800
12 ! = 479001600
13 ! = 6227020800
14 ! = 87178291200
15 ! = 1307674368000
16 ! = 20922789888000

$ bin/shiny_chef examples/fibonacci.chef
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987