optimisticside / bfc

A stable and lightning fast .bf compiler written in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bfc is a simple, high-performance compiler for .bf programs. It features an optimizer that speeds up the code by removing redundancies.

Usage

To build it, just run make test, which should create an executable file called test. You can use this program to compile .bf files. This will result in the generation of a .S file, which is an assembly file. It's highly recommended that you use the O2 option, as the others are just for debugging purposes.

./test tests/mandelbrot.bf -o output.S

Once this assembly file is created, you can use gcc to create an object file and then an executable. What I normally do is:

./test tests/mandelbrot.bf -o output.S
gcc -c output.S -o output.o
gcc output.o -o output
./output

About

A stable and lightning fast .bf compiler written in C

License:MIT License


Languages

Language:C 98.8%Language:Makefile 1.2%