Crates.io | bfmod |
lib.rs | bfmod |
version | 0.1.0 |
source | src |
created_at | 2021-10-01 17:23:08.12734 |
updated_at | 2021-10-01 17:23:08.12734 |
description | Brainfuck lexer and compiler library for Rust. |
homepage | https://gitlab.com/aiocat/bfmod |
repository | https://gitlab.com/aiocat/bfmod |
max_upload_size | |
id | 459195 |
size | 12,507 |
Brainfuck lexer and compiler library for Rust.
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)
}
}
}
If you found a bug or an error, please create a new issue at gitlab repository.
If you want to contribute this project:
This project is distributed under MIT license.
Under development.