Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glubs9/brainfucktoccompler
fun little project I did while learning c
https://github.com/glubs9/brainfucktoccompler
Last synced: about 21 hours ago
JSON representation
fun little project I did while learning c
- Host: GitHub
- URL: https://github.com/glubs9/brainfucktoccompler
- Owner: Glubs9
- Created: 2020-12-05T05:56:53.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-05T10:12:26.000Z (about 4 years ago)
- Last Synced: 2024-11-09T13:40:41.391Z (about 2 months ago)
- Language: C
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BrainfuckToCcompler
fun little project I did while learning c
(i'm just realising now that the name was supposed to be BrainfuckToCcomp**i**ler)# Motivation
I was learning c for fun and decided that this would be a good warmup project.# Disclaimer
This is the first major project I have done in c and I wasn't really trying to write good readable code with solid documentation. This is also my first time writing a compilre of any kind so even though this is basically just a text replace program it is still not fantastic (actually thinking about it now this could have been done in python in like 10 lines using text replace). sorry about the lack of comments.# How to use
To build the program download all of the files and compile compile.c. If you then run the compiled file with a brainfuck file name as the argument it will compile and output the file as a c program, named a.c. If you then compile and run a.c it will run the brainfuck program.
e.g:
\[in the folder where you downloaded the project]
gcc compile.c -o compile
./compile \[file_name]
gcc a.c -o a
./a# note
A really fun brainfuck program to test this with is the mandlebrot set printer found at https://github.com/erikdubbelboer/brainfuck-jit/blob/master/mandelbrot.bf.