Skip to content
/ gbfm Public

Golang Brainfuck machine (GBFM), this is a naive implementation of interpreter and transpiler Brainfuck to JavaScript

License

Notifications You must be signed in to change notification settings

vladk1m0/gbfm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang brainfuck machine (GBFM)

Brainfuck is an esoteric programming language with 8 very simple instructions.

The purpose of GBFM is to interpret the brainfuck code or transpile it into other target programming languages.

Limitations:

  • 😉 now only Javascript target language is supported!
  • 😏 Javascript transpiled program don't support ',' (read char from stdin) brainfuck operator.

How to use

  1. Run GBFM in interpretation mode use cmd:

    ./gbfm.sh run ./test_data/hello_world.bf
  2. Run GBFM in transpiler mode use cmd:

    ./gbfm.sh translate ./test_data/hello_world.bf

    Generate ./test_data/hello_world.bf.js in result To run *.bf.js file use nodejs

    node ./test_data/hello_world.bf.js

Testing

Prerequisites for tests running:

  • local nodejs installation!

To run all tests use cmd:

go test -v ./...

Licence

Code is released under the MIT license.

Contribute

Pull requests are very welcome!

About

Golang Brainfuck machine (GBFM), this is a naive implementation of interpreter and transpiler Brainfuck to JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages