https://github.com/zsr2531/brainfuckinterpreter
A simple brainfuck interpreter (and compiler) written in Java.
https://github.com/zsr2531/brainfuckinterpreter
Last synced: 2 months ago
JSON representation
A simple brainfuck interpreter (and compiler) written in Java.
- Host: GitHub
- URL: https://github.com/zsr2531/brainfuckinterpreter
- Owner: zsr2531
- License: mit
- Created: 2020-07-25T14:41:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-25T16:05:31.000Z (almost 6 years ago)
- Last Synced: 2025-03-25T12:06:21.825Z (about 1 year ago)
- Language: Java
- Size: 73.2 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# brainfuckInterpreter
A simple brainfuck interpreter (and compiler) written in Java.
## What is the goal of this project?
The goal was to write a very simple parser. It parser the input into an **A**bstract **S**yntax **T**ree. This tree can be used for interpretation (this project comes with one) or you could even implement a code generator for it.
## Command line parameters
- `-e`, `--evaluate`: Evaluates an expression
- `-h`, `--help`: Shows a help message
- `-v`, `--version`: Shows the version
- `--dump-parse-tree`: Pretty prints the parse tree
## Usage
- To run brainfuck code from a file: `java -jar brainfuckInterpreter.jar code.bf`
- To run brainfuck code from a command line argument: `java -jar brainfuckInterpreter.jar -e "-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------."`