From 1bf1aa2e333e0b006c561500e917c4e4322252db Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 22 May 2015 18:43:59 +0200 Subject: Readme --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index c9eab20..0000ddd 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # CleanBrainfuck -Brainfuck interpreter in Clean +[Brainfuck](http://en.wikipedia.org/wiki/Brainfuck) interpreter in [Clean](http://wiki.clean.cs.ru.nl/Clean) + +`Brainfuck.dcl` and `Brainfuck.icl` give you everything you need to use the module. In `ExecBrainfuck.icl`, a basic usage example is given. + +## Compiling & running the example + +You're assumed to have a brainfuck program `program.bf` in the same directory. For an example, see [Wikipedia](http://en.wikipedia.org/wiki/Brainfuck). This program outputs `Hello world!\n`: + + ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. + +Compiling: + + clm ExecBrainfuck -o ExecBrainfuck + +Running: + + ./ExecBrainfuck < program.bf + +The example program expects the brainfuck program to be the first line on stdin. Any further lines are seen as input to the brainfuck program. -- cgit v1.2.3