diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ab27f6 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# BFC - Brainf*ck compiler + +A Brainf*ck compiler for Linux. + +`bfc` translates Brainfuck into C and immediately feeds it into GCC, producing small standalone ELF executables. No interpreters, no virtual machines, no runtime dependencies. + +## Build the compiler + +Just one command: + +`make` + +## Build a brainfuck program + +Just one more command: + +`cat file.bf | ./build/bfc > output` + +Then running the program is as simple as: + +`./output` + + +## How it works + +Brainf*ck source -> Lexer -> Parser -> AST -> C codegen -> GCC -> ELF executable + +A simple Hello World! program is about 9.3kb big. + +## Limitations + +* Linux only +* Soft-requires GCC (could be substituted for something else) +* Finite memory tape (30kb) + +## Why? + +Because interpreters suck. + +Also because turning Brainf*ck into an ELF executable is just objectively fun. + +## License + +MIT |
