Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/marcelog/shiny_chef
- Owner: marcelog
- Created: 2012-08-05T22:35:37.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-05T22:37:18.000Z (over 12 years ago)
- Last Synced: 2024-11-16T06:56:53.395Z (about 2 months ago)
- Language: Ruby
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
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