brainhug 0.2.0

A simple brainf*ck translator
Documentation

brainhug

Build Status crate documentation

brainhug is a crate that is used to interpret brainf*ck code to any other language

Current languages covered are :

  • C
Why the name brainhug ?

Inspired from link

Usage

Add this to your Cargo.toml:

[dependencies]
brainhug = "0.2.0"

and this to your crate root:

extern crate brainhug;
use brainhug::Lang;

Example

extern crate brainhug;
use brainhug::Lang;

fn main() {
    // will print `Hello, World!`
    let input = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";

    println!("{}", brainhug::generate(Lang::C, input));
}

License

Licensed under