https://github.com/fausto95/brainfuck-ts
Brainfuck interpreter written in TypeScript
https://github.com/fausto95/brainfuck-ts
Last synced: 7 months ago
JSON representation
Brainfuck interpreter written in TypeScript
- Host: GitHub
- URL: https://github.com/fausto95/brainfuck-ts
- Owner: Fausto95
- Created: 2023-11-01T09:11:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T09:47:04.000Z (over 2 years ago)
- Last Synced: 2024-12-29T12:48:07.671Z (over 1 year ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
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)