Compiler for the BF Programming Language
To install:
opam install .
in the root of this repository.
The entry point for the compiler is called bfc
. Run bfc --help
for a list of options.
Here are some common use cases:
let str = ">>>++---" in
let tokens = Parser.parse str in
...
let the_module = Codegen.generate tokens in
let _ = Passes.fold_loops the_module in
Llvm.dump_module the_module
Compiler.compile "in.bf" "a.out" Exe O1