Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fausto95/brainfuck-ts

Brainfuck interpreter written in TypeScript
https://github.com/fausto95/brainfuck-ts

Last synced: 6 days ago
JSON representation

Brainfuck interpreter written in TypeScript

Awesome Lists containing this project

README

        

A Brainfuck interpreter written in TypeScript

Here's the project structure:

- [Tokenizer](./src/tokenizer.ts): Transforms the source code into an array of `chars`
- [Parser](./src/parser.ts): Transforms the tokenized source code into an AST(Abstract Syntax Tree)
- [Compiler (Interpreter)](./src/compiler.ts): Traverses the ast and does all the interpretation of the program

## How the hell brainfuck works?

To get a good understanding of how it works, I recommend watching these videos:

- [BrainFuck in 100 seconds](https://youtu.be/hdHjjBS4cs8?si=vpgj4ev7vA3TkThR)
- [How Brainfuck Works](https://youtu.be/-3C200nCwpk?si=I937lLnDiy-hB7OZ)
- [Brainfuck 42](https://www.youtube.com/watch?v=cwuPIugCHl4)