Brainfu*k interpreter and REPL written in Rust🦀
Find a file
2022-10-12 23:21:21 +02:00
.idea Use a moudler out and input 😆 2022-10-12 13:50:22 +02:00
assets Fix interpreter repl errors and add some tsests and create the base 2022-10-08 22:11:13 +02:00
screenshots Fix interpreter repl errors and add some tsests and create the base 2022-10-08 22:11:13 +02:00
src Suport history movment in the repl 🤓 2022-10-12 23:21:21 +02:00
test_code Fix interpreter errors yoo 🥰💙 2022-10-10 22:55:50 +02:00
.gitignore Improve gitignore file 🥰 2022-10-08 08:16:21 +02:00
Cargo.toml Suport history movment in the repl 🤓 2022-10-12 23:21:21 +02:00
LICENSE.txt Add MIT license 🖤 2022-10-08 08:20:57 +02:00
README.md Improve 💙 2022-10-12 19:29:53 +02:00

brainfuc*k interpreter

brainfuck interpreter: a simple brainfuck interpreter and REPL writen in rust 🦀

Install

  • from crates.io
    cargo install bf-interpreter
    
  • From aur:
    yay -S bf-interpreter
    

Options and arguments

bf-interpreter --help
Brainfu*k interpreter and REPL written in Rust

Usage: bf-interpreter [OPTIONS] [SOURCE]

Arguments:
  [SOURCE]
          The brainfuck source code file to run (if not will be entered in REPL mode)

Options:
  -f, --features <FEATURES>
          Possible values:
          - reverse-counter:
            If the value is you want decrement the value and the value is 0, set the value to 255, otherwise decrement the value. If the value is you want increment the value and the value is 255, set the value to 0, otherwise increment the value
          - reverse-pointer:
            If the pointer at the end of the array, set the pointer to 0, otherwise increment the pointer. If the pointer at the beginning of the array, set the pointer to the end of the array, otherwise decrement the pointer

  -a, --array-size <ARRAY_SIZE>
          The brainfuck array size
          
          [default: 30000]

  -w, --without-tiles
          Dont print the tiles (e.g. exit code, file name, etc)

  -h, --help
          Print help information (use `-h` for a summary)

  -V, --version
          Print version information

Examples

bf-interpreter test_code/hello_world.bf
Hello world!
Successfully ran brainfuck source code from file: test_code/hello_world.bf
Exiting with code: 0
bf-interpreter -w test_code/hello_world.bf
Hello world!
bf-interpreter test_code/print_hi_yooo.bf
Hi yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!Successfully ran brainfuck source code from file: test_code/print_hi_yooo.bf
Exiting with code: 0
bf-interpreter -w test_code/print_hi_yooo.bf
Hi yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
bf-interpreter test_code/like_cat.bf

output