use std::fs; mod parser; use parser::parser::Parser; mod combinators; mod parser_impls; use parser_impls::ints::{Int}; mod tests; use tests::tests::{run_tests}; use tests::example_parser_tests::{run_example_parser_test}; mod examples; use examples::example_programs::arithmetic::expression::Expr; fn main() { run_tests(); run_example_parser_test(); 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); // let mut count = 0; // let max = 100000; // loop { // if count == max {break}; // println!("{:#?}", Expr.parse(format!("221 + {} + 8 - 11077770", count).as_str())); // count += 1 // } println!("{:#?}", Expr.parse(format!("221 - {} + 8 + 11077770", 4).as_str())); }