brainfuck compiler
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Omar Polo 6572a112c0 +rot13 example 1 year ago
examples +rot13 example 1 year ago
.gitignore add a gitignore 1 year ago
Makefile add a makefile and mention how to build in the readme 1 year ago
README.md tweak 1 year ago
bfc.hs use a stack of integer instead of one of instruction 1 year ago

README.md

bfc -- a brainfuck compiler

bfc is a simple brainfuck compiler. It's written in Haskell because I hate myself and outputs QBE because why not. It's released into the public domain.

Makefiles are clunky, hard to write and errors prone, but they also have their shortcomings! You can use make to build bfc:

$ make

Usage:

$ bfc sources... > program.ssa
$ qbe program.ssa > program.S
$ cc -o program program.S && ./program

bfc reads from standard input if no arguments are given.