Newer
Older
use parser::{Parser};
use combinators::common::integers::{Digit, Int};
use crate::combinators::other::expressions::Expr2;
// let source = "src/examples/example_programs/arithmetic/example1.txt";
// let _file = fs::read_to_string(source).expect("File was not found or could not be read");
// let res = Expr.parse(_file.as_str());
// println!("{:#?}", res);
// ExprOpt.parse(format!("221 + {} + 8 - 11077770", count).as_str());
// loop {
// if count == max {break};
// print!("{:#?}", Expr2.parse(format!("{} + 6 + 67", count).as_str()));
// //println!("{}", format!("{}", count).parse::<i32>().unwrap());
// //println!("{:#?}", Int.parse(format!("{}", count).as_str()));
// count += 1
// }
print!("{:#?}", Expr2.parse(format!("0{} - 0009787 + 67 ", 5343).as_str()));
//println!("{:#?}", Digit_opt_more.parse(format!("9").as_str()));
// println!("{:#?}", Expr.parse(format!("221 - {} + 8 + 11077770", 4).as_str()));
// println!("{:#?}", ExprOpt.parse(format!("221 - {} + 8 + 11077770", 4).as_str()));
// let source = "src/examples/brainflakes/hello_world.bf";
// let file = fs::read_to_string(source).expect("File was not found or could not be read");
// let res = brainflakes_parser::BrainFuck.parse(file.as_str()).expect("Incorrect parse");
// println!("{}", res);