skx / bfcc Goto Github PK
View Code? Open in Web Editor NEWBrainFuck Compiler Challenge
Home Page: https://blog.steve.fi/writing_a_brainfuck_compiler_.html
License: GNU General Public License v2.0
BrainFuck Compiler Challenge
Home Page: https://blog.steve.fi/writing_a_brainfuck_compiler_.html
License: GNU General Public License v2.0
I read this earlier today:
There were some neat ideas about optimization, specifically trying to create opcodes/IR for "[-]
", etc. Rather than just interpreting token by token.
This might be worth exploring, though remember I will need to update three places:
At the moment bogus input will cause problems. We kinda assume things are well-formed, because we're very naive.
If we wanted to be robust we should implement a lexer/parser, and work on tokens. We could then add error-handling, proper test-cases, etc, etc.
Not a huge priority, but I guess I could take a look at it in the near future.
Add a -breakpoint
/-debug
flag, which will cause int 03
to be generated in the compiled program when present.
See my math-compiler for discussion:
https://github.com/skx/math-compiler#debugging-the-generated-programs
Since we have plugabble back-ends it might be nice to have a simple interpreter implemented as one.
It kinda defeats the point of us being a compiler but it also demonstrates the speedup gained by actually compiling.
In the past we generated C source file, and compiled via gcc.
Then we swithced to generating assembly language source, compiling via nasm.
We should allow both. Add a "backend" and let the user choose which to run.
Just means updating the assembly language.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.