bfmod

Crates.iobfmod
lib.rsbfmod
version0.1.0
sourcesrc
created_at2021-10-01 17:23:08.12734
updated_at2021-10-01 17:23:08.12734
descriptionBrainfuck lexer and compiler library for Rust.
homepagehttps://gitlab.com/aiocat/bfmod
repositoryhttps://gitlab.com/aiocat/bfmod
max_upload_size
id459195
size12,507
0x707 (aiocat)

documentation

README

bfmod

Brainfuck lexer and compiler library for Rust.

Links

Example Usage

use bfmod;

fn main() {
    println!("Starting to lexerize...");
    let tokens = bfmod::lexer::execute(">++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<++.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-]<+.");
    println!("Lexerizing is finished.");
    println!("Checking syntax errors.");

    match bfmod::lexer::check_brackets(&tokens) {
        Ok(()) => {
            println!("Building the source code.");
            bfmod::compiler::build(&tokens, "compiled.rs");
        },
        Err(msg) => {
            println!("Error ({})", msg)
        }
    }
}

Found a Bug / Error?

If you found a bug or an error, please create a new issue at gitlab repository.

Contributing

If you want to contribute this project:

  • Make sure you add the comments for your codes.
  • Please do not something useless.

Authors

License

This project is distributed under MIT license.

Project status

Under development.

Commit count: 7

cargo fmt