Simple Brainfuck to C transpiler
Project description
🧠 Brainfuck to C transpiler
from bftc import code_generator, tokenizer
with open("code.bf") as bf_source:
tokens = [tokenizer.tokenize(char) for char in bf_source.read()]
with open("code.c", "w") as c_source:
c_source.write(code_generator.generate(tokens))
Modules
tokens
— contains all tokenstokenizer
— containstokenize
function
def tokenize(char: str) -> Token: ...
transpiler
— containstranspile
function
def transpile(token: Token) -> str: ...
code_generator
— containsgenerate
function that generate valid C code from given tokens
def generate(tokens: list[Token]) -> str: ...
Install
pip install bftc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bftc-2.0.0.tar.gz
(11.2 kB
view hashes)