aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-12-17 18:34:47 -0800
committerbnewbold <bnewbold@robocracy.org>2016-12-17 18:34:47 -0800
commit9f82aceb9fbdb42f332d68f4a423123bd0788b2c (patch)
treec082b9795be8e9e9d286c8f8f1345d22f3ec1b59 /src/bin
parentf6364ebcac0d0a88a3cc6812fd2120c97b42cc26 (diff)
downloadmodelthing-9f82aceb9fbdb42f332d68f4a423123bd0788b2c.tar.gz
modelthing-9f82aceb9fbdb42f332d68f4a423123bd0788b2c.zip
refactor modelica parser into separate crate
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/mt-tool.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/mt-tool.rs b/src/bin/mt-tool.rs
index 8ef2464..95a8938 100644
--- a/src/bin/mt-tool.rs
+++ b/src/bin/mt-tool.rs
@@ -2,10 +2,11 @@
extern crate modelthing;
extern crate rustc_serialize;
extern crate getopts;
+extern crate modelica_parser;
-use modelthing::modelica_parser;
use modelthing::transpile_scheme::TranspileScheme;
use modelthing::transpile_js::TranspileJS;
+use modelthing::modelica_model::ModelicaModelExt;
use getopts::Options;
use std::env;
use std::io::Read;
@@ -25,13 +26,13 @@ fn parse_modelica_files(paths: Vec<String>) {
}
let time_stamp = Instant::now();
- let result = modelica_parser::parse_model(&s);
+ let result = modelica_parser::parser::parse_model(&s);
let elapsed = time_stamp.elapsed();
let elapsed = elapsed.as_secs() as f64 + elapsed.subsec_nanos() as f64 / 1000_000_000.0;
match result {
Ok(_) => println!("Input `{}` ({}s): OK", input, elapsed),
- Err(err) => println!("Input `{}` ({}sec): ERROR\n{}", input, elapsed, modelthing::pp_parseerror(&s, err)),
+ Err(err) => println!("Input `{}` ({}sec): ERROR\n{}", input, elapsed, modelica_parser::pp_parseerror(&s, err)),
}
}
}