// // spec.rs // Copyright (C) 2023 Maxime “pep” Buquet // Distributed under terms of the GPLv3+ license. // use std::env::args; use std::fs::File; use std::io::{self, Read}; use std::process::exit; use scansion_dsl::parse_spec; fn main() -> io::Result<()> { let args: Vec = args().collect(); if args.len() != 2 { println!("Usage: {} ", args[0]); exit(1); } let mut file = File::open(&args[1])?; let mut contents = String::new(); file.read_to_string(&mut contents)?; println!("{:?}", parse_spec(&contents)); Ok(()) }