diff --git a/luacompiler/Cargo.toml b/luacompiler/Cargo.toml index 7cddb48..8760129 100644 --- a/luacompiler/Cargo.toml +++ b/luacompiler/Cargo.toml @@ -13,10 +13,9 @@ name = "luacompiler" path = "src/lib/mod.rs" [dependencies] -cfgrammar = { git="https://github.com/softdevteam/grmtools" } -lrlex = { git="https://github.com/softdevteam/grmtools" } -lrpar = { git="https://github.com/softdevteam/grmtools" } -lrtable = { git="https://github.com/softdevteam/grmtools" } +cfgrammar = "0.2" +lrlex = "0.2" +lrpar = "0.2" bincode = "1.0.1" serde = "1.0.80" serde_derive = "1.0" @@ -26,5 +25,6 @@ version = "2.32" default-features = false [build-dependencies] -lrpar = { git="https://github.com/softdevteam/grmtools" } -lrlex = { git="https://github.com/softdevteam/grmtools" } +cfgrammar = "0.2" +lrlex = "0.2" +lrpar = "0.2" diff --git a/luacompiler/build.rs b/luacompiler/build.rs index f06619c..d1e3b76 100644 --- a/luacompiler/build.rs +++ b/luacompiler/build.rs @@ -1,16 +1,17 @@ +extern crate cfgrammar; extern crate lrlex; extern crate lrpar; +use cfgrammar::yacc::{YaccKind, YaccOriginalActionKind}; use lrlex::LexerBuilder; -use lrpar::ActionKind; use lrpar::CTParserBuilder; fn main() -> Result<(), Box> { - let mut ct = CTParserBuilder::::new_with_storaget() + let lex_rule_ids_map = CTParserBuilder::::new_with_storaget() .error_on_conflicts(false) - .action_kind(ActionKind::GenericParseTree); - let lex_rule_ids_map = ct.process_file_in_src("lua5_3/lua5_3.y")?; - LexerBuilder::new() + .yacckind(YaccKind::Original(YaccOriginalActionKind::GenericParseTree)) + .process_file_in_src("lua5_3/lua5_3.y")?; + LexerBuilder::::new() .rule_ids_map(lex_rule_ids_map) .process_file_in_src("lua5_3/lua5_3.l")?; Ok(()) diff --git a/luacompiler/src/lib/mod.rs b/luacompiler/src/lib/mod.rs index d61f1bd..d94626d 100644 --- a/luacompiler/src/lib/mod.rs +++ b/luacompiler/src/lib/mod.rs @@ -3,7 +3,6 @@ extern crate cfgrammar; extern crate lrlex; #[macro_use] extern crate lrpar; -extern crate lrtable; #[macro_use] extern crate serde_derive; extern crate bincode;