meow-compiler is a minimalistic Brainfuck-inspired compiler written in C. It translates a cat-themed Brainfuck dialect into a standalone x86_64 ELF binary for Linux.
Instead of standard Brainfuck symbols, meow-compiler uses feline keywords:
| Brainfuck | meow-compiler Keyword | What it does |
|---|---|---|
> |
meow |
Move the pointer to the right (next memory cell) |
< |
purr |
Move the pointer to the left (previous memory cell) |
+ |
hiss |
Increment the value at the current memory cell by 1 |
- |
growl |
Decrement the value at the current memory cell by 1 |
. |
chirp |
Output the value at the current memory cell (usually as a character) |
, |
mew |
Input a value and store it at the current memory cell |
[ |
scratch |
Start a loop: if the current cell is 0, jump past the matching ] (nap) |
] |
nap |
End a loop: jump back to the matching [ (scratch) if the current cell is not 0 |
- Compiles meow-compiler source code directly to an ELF executable.
- Generates standalone Linux x86_64 binaries (no interpreter needed).
- Supports loops and standard Brainfuck I/O.
- Implements memory tape using
mmap(default 30_000 bytes). - Lightweight and minimal dependencies (only standard C library).
- Linux x86_64
- GCC or any C99-compatible compiler
make./kk <source.kcc> <output_binary><source.kcc>: Your meow-c source file<output_binary>: Name of the generated ELF executable
Example:
./kk hello.kcc hello
./hello- Lexer: Converts meow-compiler keywords into internal instruction representation.
- Code Generator: Translates instructions to x86_64 machine code.
- ELF Writer: Produces a fully linked ELF64 binary executable.
- Memory Management: Uses
mmapto allocate a 30_000byte tape for Brainfuck operations.
Apache-2.0 license.