Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/folkertvanheusden/bf-compiler

"Brainfuck" (programming language) compiler suite
https://github.com/folkertvanheusden/bf-compiler

brainfuck brainfuck-compiler brainfuck-transpiler

Last synced: 2 days ago
JSON representation

"Brainfuck" (programming language) compiler suite

Awesome Lists containing this project

README

        

brainfuck to * compiler
-----------------------

Invoke with:

python compile_brainfuck_to.py language myprogram.bf > myprogram.ext

Replace language with the target language and 'ext' by the appropriate extension.

Run:

python compile_brainfuck_to.py

to see a list of target languages.

compiling the result
--------------------

ARM / X86
---------
as --64 -g --gstabs+ -o myprogram.o myprogram.asm && ld -o myprogram myprogram.o

c++
---
g++ -Ofast -fomit-frame-pointer -march=native myprogram.cpp

Java
----
javac myprogram.java

This produces a "BrainfuckProgram.class"-file which can be executed by:

java BrainfuckProgram

PDP11
-----
pdpy11 myprogram.asm -o myprogram.raw

Pdpy11 (the assembler) can be obtained from https://github.com/pdpy11/pdpy11

Rust
----

rustc -C opt-level=3 program.rs

SPARC
-----
In Solaris:

as -Q n -b -L myprogram.s
ld a.out -o myprogram
./myprogram

(C) 2016-2024 by [email protected]