An implementation of the chef language in ruby, using ANTLRv3 for the grammar
Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
examples
grammar
src/ShinyChef
README
make.sh

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