https://github.com/mgsium/bf-hs
An intrepeter for the esolang brainf**k written in Haskell with parsec
https://github.com/mgsium/bf-hs
brainfuck haskell parsec
Last synced: 5 days ago
JSON representation
An intrepeter for the esolang brainf**k written in Haskell with parsec
- Host: GitHub
- URL: https://github.com/mgsium/bf-hs
- Owner: mgsium
- Created: 2022-09-30T15:19:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-30T20:11:56.000Z (almost 4 years ago)
- Last Synced: 2025-10-25T23:57:33.028Z (9 months ago)
- Topics: brainfuck, haskell, parsec
- Language: Haskell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## brainf**k interpreter
Brainf**ck is an esoteric programming language written by Urban Müller in 1993.
This implementation - written using the parsec parser-combinator library - is based on the specification at https://github.com/brain-lang/brainfuck/blob/master/brainfuck.md.
#### Quick Start
After installing the [dependencies](#dependencies), the following command builds and runs the program.
```sh
$ stack run // Builds and runs the interpreter
```
The program exposes a read-evaluate-print-loop to run brainf**k programs:
```
$ stack run
BRAINFUCK> ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
Hello World!
BRAINFUCK> ...
```
---
#### Dependencies
Install `stack >= 2.7` using the instructions at https://docs.haskellstack.org/en/stable/ or https://www.haskell.org/downloads/.
Stack can be used to install `ghc >= 7.10.2`.