Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
an implementation of a DSL for the FizzBuzz-Language named FizzBuzzL
Java
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.idea
lib
modules
src/de/shackspace/rel0c/fizzbuzz
test/de/shackspace/rel0c/fizzbuzz
MANIFEST.MF
README.md
build.xml
test.fizzbuzz
testng.xml

README.md

This is the FizzBuzzL Domain Specific Language (DSL) Parser / VM for FizzBuzz.

About FizzBuzzL

FizzBuzz is a simple programming problem often used for examples. The task to fulfill is to write a program that outputs the numbers in a range (usually 1 to 100 is used) replacing the numbers that are dividable by 3 with the wird "Fizz", the numbers that are dividable by 5 with the word "Buzz" and the numbers that are dividable by 3 and by 5 (and thus dividable by 15) with "FizzBuzz".

Recently a competition on the public shackspace mailinglist took place, who could implement the shortest program that would fulfill this requirement. I came up with the idea that this is so simple that there's no need for the overhead of a turing complete language and suggested the implementation of a DSL named FizzBuzzL. This will be the reference implementation of FizzBuzzL. Hope you enjoy.

The code is licensed under the Berkeley License. Please see the license.txt file that will be added to the repository later on.

Armin Bauer, 2012 / June

Language Standard

This is a grammar that will represent the language standard:

Start :== <> | Expression

Expression :== Expression Expression | ..

number :== 0 | ([1-9])

:== + | - | <>

number2 :== ([0-9]_) | <>

Example Programs

This program will print the FizzBuzz for the numbers of 1 to 100

1..100

This program will print the FizzBuzz for the numbers 1 to 50 and then 51 to 100

1..50 51..100

Something went wrong with that request. Please try again.