You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Felix Soederhuyzen c48b36e5bb switch instead of if and dont you forget it 5 months ago
.gitignore init 5 months ago
README.md init 5 months ago
bf.c switch instead of if and dont you forget it 5 months ago

README.md

brainfuck

“Compiler” for the esoteric programming language brainfuck.
Transpiles brainfuck code to C in memory and then compiles it with tcc.

Setup

  • Download suitable tcc binaries
  • Extract archive into <tcc> (where <tcc> is any directory in PATH)

Usage

WARNING: This has been tested on windows x64 only, thus commands are intended for use in windows x64 only.

  • Build bf.exe
$ tcc -I"<tcc>\libtcc" -L"<tcc>" -ltcc bf.c
  • Build output.exe
helloworld.bf
 ++++++++++
 [
  >+++++++>++++++++++>+++>+<<<<-
 ]                       Schleife zur Vorbereitung der Textausgabe
 >++.                    Ausgabe von 'H'
 >+.                     Ausgabe von 'e'
 +++++++.                'l'
 .                       'l'
 +++.                    'o'
 >++.                    Leerzeichen
 <<+++++++++++++++.      'W'
 >.                      'o'
 +++.                    'r'
 ------.                 'l'
 --------.               'd'
 >+.                     '!'
 >.                      Zeilenvorschub
 +++.                    Wagenrücklauf
$ cat helloworld.bf | bf.exe
  • Run output.exe
$ output.exe
Hello World!