Skip to content

zshiba/bfi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFI

BFI is a Brainfuck interpreter written in Java.

Getting Started

  1. Download the zip of this repository, and then unzip it. Or, clone the repository with the git command.
$ git clone https://github.com/zshiba/bfi.git
  1. Move to the bfi directory.
  2. Compile the source.
$ javac -d . ./src/BFI.java
  1. Run the interpreter. BFI supports input from stdin and file.
$ # input from stdin. This prints 0. (See also the Limitation section below.)
$ java BFI
++++++++++++++++++++++++++++++++++++++++++++++++.
0
$ # input from stdin. This prints 0.
$ cat ./test/single_line.bf | java BFI 
0
$ # input from a file. This prints 0.
$ java BFI ./test/single_line.bf
0
  1. Run other tests. First, move to the bfi/test directory. Then, run the shell script.
$ # run tests
$ ./run_tests.sh

Note: Currently, the file bfi/test/hello_world.bf is used as a place holder. Before using run_tests.sh, copy the hello world program from Brainfuck Hello_World! and paste it in the file.

Limitation

To indicate the end of the command source with stdin, it is necessary to enter a newline character (hit the enter key) at the end of the command source and then send a EOF control (Ctrl+D).

Development Environment

Mac, JDK 1.8

License

MIT

About

Brainfuck interpreter written in Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors