Skip to main content

parse3/
parse3.rs

1use dedukti_parse::{Lazy, Scoped, Strict, Symb};
2use std::fs::File;
3use std::io::{BufRead, BufReader};
4
5fn main() {
6    let args: Vec<String> = std::env::args().collect();
7    let filename = &args[1];
8
9    //let file = File::open(filename).expect("Something went wrong reading the file");
10    let line = std::fs::read_to_string(filename).expect("Something went wrong reading the file");
11
12    println!("loaded");
13
14    /*
15    let lines = BufReader::new(file).lines().map(|line| line.unwrap());
16    let iter = Lazy::<_, Atom<Symb<String>>, String>::new(lines);
17    */
18    let iter = Strict::new(&line);
19    for cmd in iter {
20        let cmd: Scoped<&str> = cmd.unwrap();
21        println!("{}", cmd);
22    }
23}