diff --git a/Cargo.lock b/Cargo.lock index a0a25ad..d400682 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,156 +2,93 @@ # It is not intended for manual editing. [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "arrayref" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "arrayvec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ascii-canvas" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" -version = "0.1.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bit-set" -version = "0.5.1" +name = "backtrace" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "bit-vec" -version = "0.5.1" +name = "backtrace-sys" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bincode" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "blake2b_simd" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cactus" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cc" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "cloudabi" -version = "0.0.3" +name = "cfgrammar" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "crossbeam-utils" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "vob 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "diff" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "digest" -version = "0.8.1" +name = "chrono" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dirs" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -160,107 +97,57 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "docopt" -version = "1.1.0" +name = "error-chain" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ena" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fixedbitset" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "getrandom" -version = "0.1.14" +name = "filetime" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "hermit-abi" -version = "0.1.6" +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "getopts" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "itertools" -version = "0.8.2" +name = "getset" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "lalrpop" -version = "0.17.2" +name = "indexmap" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ascii-canvas 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "lalrpop-util" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.4.0" @@ -272,63 +159,128 @@ version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "log" -version = "0.4.8" +name = "lrlex" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lrpar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typename 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lrpar" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cactus 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfgrammar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lrtable 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "packedvec 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rmp-serde 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typename 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "vergen 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "vob 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lrtable" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfgrammar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "macro-attr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "newtype_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sparsevec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "vob 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "macro-attr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memchr" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ordermap" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "petgraph" -version = "0.4.13" +name = "newtype_derive" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "phf_generator" -version = "0.7.24" +name = "num-integer" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "phf_shared" -version = "0.7.24" +name = "num-traits" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "precomputed-hash" -version = "0.1.1" +name = "packedvec" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro-error" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro-error-attr" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "proc-macro2" @@ -346,164 +298,109 @@ dependencies = [ "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rasp" version = "0.1.0" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfgrammar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lrlex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lrpar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "snafu 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "redox_users" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex" -version = "1.3.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "rust-argon2" -version = "0.7.0" +name = "rmp" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rmp-serde" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rmp 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustc_version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustversion" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.104" @@ -522,22 +419,6 @@ dependencies = [ "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "sha2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "snafu" version = "0.6.2" @@ -558,39 +439,19 @@ dependencies = [ ] [[package]] -name = "string_cache" -version = "0.7.5" +name = "sparsevec" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "packedvec 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vob 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "string_cache_codegen" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_shared" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "strsim" -version = "0.9.3" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -604,13 +465,13 @@ dependencies = [ ] [[package]] -name = "term" -version = "0.5.2" +name = "syn-mid" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -622,13 +483,43 @@ dependencies = [ ] [[package]] -name = "typenum" -version = "1.11.2" +name = "time" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "unicode-xid" -version = "0.1.0" +name = "try_from" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "typename" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typename_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "typename_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-width" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -637,9 +528,30 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +name = "vergen" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getset 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vob" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "winapi" @@ -661,87 +573,70 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" -"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -"checksum ascii-canvas 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8eb72df928aafb99fe5d37b383f2fe25bd2a765e3e5f7c365916b6f2463a29" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" -"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" +"checksum aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" +"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" +"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum cactus 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0713c9ecac2733e4c61a93157674eee620ba377d263714a6083d7a8be13468eb" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" -"checksum diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +"checksum cfgrammar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "38ba3189f7cc6ccd37f6ce141b6c5a2670cbe8191ce12e937c24871cf26fd1be" +"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" "checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" -"checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" -"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -"checksum lalrpop 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "64dc3698e75d452867d9bd86f4a723f452ce9d01fe1d55990b79f0c790aa67db" -"checksum lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c277d18683b36349ab5cd030158b54856fca6bb2d5dc5263b06288f486958b7c" +"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" +"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +"checksum getset 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f62a139c59ae846c3964c392f12aac68f1997d1a40e9d3b40a89a4ab553e04a0" +"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" -"checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" -"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" -"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +"checksum lrlex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "480f51804dcbff3209f226f8e51b7802fd31b98c8bf5927e6c91b0e330164029" +"checksum lrpar 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e2365adfdbcd180f4ed5266f2ae622b9ba78ef96ab16234d8c2ce580267c4e1" +"checksum lrtable 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ce78b4d45f3a59856731881206e03aadd0e1493c644f0f08b769a867a6f3a36" +"checksum macro-attr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00e51c6f0e2bf862b01b3d784fc32b02feb248a69062c51fb0b6d14cd526cc2a" +"checksum memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" +"checksum newtype_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8cd24d9f185bb7223958d8c1ff7a961b74b1953fd05dba7cc568a63b3861ec" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum packedvec 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1fce532538ba443dbd7e9d0dd16e687cec205dc1c13fa4e6cb225f3405d85cdd" +"checksum proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" +"checksum proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" "checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" -"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90" -"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" +"checksum rmp 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)" = "0f10b46df14cf1ee1ac7baa4d2fbc2c52c0622a4b82fa8740e37bc452ac0184f" +"checksum rmp-serde 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c1ee98f14fe8b8e9c5ea13d25da7b2a1796169202c57a09d7288de90d56222b" +"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" +"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" -"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum snafu 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "546db9181bce2aa22ed883c33d65603b76335b4c2533a98289f54265043de7a1" "checksum snafu-derive 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bdc75da2e0323f297402fd9c8fdba709bb04e4c627cbe31d19a2c91fc8d9f0e2" -"checksum string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67" -"checksum string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6" -"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" -"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +"checksum sparsevec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a182a1fc36753f8a2e3eea04cc3cd28065d2949cbda1e3a453cd183dace42bbb" +"checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" "checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" -"checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" +"checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" +"checksum typename 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c255dd1af8cf5cfb95f062266201778080d215e86294dba14c47bf3137c55419" +"checksum typename_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c68acf2f6e8a32e2bad47e73ee177558583fb9dbb264a5c0569c7f9f80f79b0a" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum vergen 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "93fb2d57fbc535fcd45548c99b141d2d960995daaf04b864c4d9fe1ea011c819" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum vob 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5430ea8977e2f0ed62cd37239cd713415022b240095c2f9187c32823015ae52f" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml index 7227cbe..10cca2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,15 @@ build = "build.rs" [dependencies] bitflags = "1" byteorder = "1" -lalrpop-util = "0.17.2" -regex = "*" +lazy_static = "1" snafu = "0.6.2" +cfgrammar = "0.6" +lrlex = "0.6" +lrpar = "0.6" +regex = "*" + [build-dependencies] -lalrpop = "0.17.2" +cfgrammar = "0.6" +lrlex = "0.6" +lrpar = "0.6" diff --git a/build.rs b/build.rs index d35ace0..baeff5e 100644 --- a/build.rs +++ b/build.rs @@ -1,5 +1,13 @@ -use lalrpop; +use cfgrammar::yacc::YaccKind; +use lrlex::LexerBuilder; +use lrpar::{CTParserBuilder}; -fn main() { - lalrpop::process_root().unwrap(); +fn main() -> Result<(), Box> { + let lex_rule_ids_map = CTParserBuilder::new() + .yacckind(YaccKind::Grmtools) + .process_file_in_src("vm/obj/syn/parser.y")?; + LexerBuilder::new() + .rule_ids_map(lex_rule_ids_map) + .process_file_in_src("vm/obj/syn/lexer.l")?; + Ok(()) } diff --git a/src/common/span.rs b/src/common/span.rs index 9981f28..0bdd350 100644 --- a/src/common/span.rs +++ b/src/common/span.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] pub struct Pos { pub source: usize, pub line: usize, @@ -22,23 +22,20 @@ impl Pos { } } - pub fn from_char(c: char, source: usize, line: usize, col: usize, byte: usize) -> Self { - Pos::new(source, line, col, byte, c.len_utf8()) + pub fn from_char(c: char) -> Self { + Pos::new(0, 0, 0, 0, c.len_utf8()) } - pub fn adv_char(self, c: char) -> Self { - let mut next = self; - next.byte += next.len; - next.len = c.len_utf8(); - next.source += 1; - next.col += 1; - next + pub fn adv_char(&mut self, c: char) { + self.byte += self.len; + self.len = c.len_utf8(); + self.source += 1; + self.col += 1; } - pub fn adv_line(self) -> Self { - let mut next = self; - next.line += 1; - next + pub fn adv_line(&mut self) { + self.line += 1; + self.col = 0; } } @@ -56,8 +53,8 @@ impl Ord for Pos { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct Span { - start: Pos, - end: Pos, + pub start: Pos, + pub end: Pos, } impl Span { diff --git a/src/main.rs b/src/main.rs index 2139285..882d1ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ mod common; mod vm; -use std::{convert::TryFrom, env, fs, io, process}; +use std::{env, fs, io, process}; type Result = std::result::Result>; @@ -21,55 +21,14 @@ fn get_input_string() -> io::Result { } fn main() -> Result<()> { - use vm::obj::syn::parser::SectionsParser; - let contents = get_input_string()?; - let ast = match SectionsParser::new().parse(&contents) { - Ok(ast) => ast, - Err(err) => { - eprintln!("{}", err); - process::exit(1); - } - }; - let obj = vm::obj::obj::Object::try_from(&ast)?; - dump(&obj)?; - let mut vm = vm::vm::Vm::new(); - vm.load_object(obj, 1024 * 1024 * 64)?; // 64mb - let status = vm.run()?; - println!("{}", status); - Ok(()) -} - - -fn dump(obj: &vm::obj::obj::Object) -> Result<()> { - use vm::obj::obj::Section; - use vm::visit::VisitInst; - let mut stdout = io::stdout(); - for section in &obj.sections { - match section { - Section::Data { start, contents, .. } => { - const WIDTH: usize = 4; - println!("data section at 0x{:08x}", start); - for (i, b) in contents.iter().enumerate() { - if i % WIDTH == 0 { - print!("{:08x} | ", ((*start as usize) + i)); - } - print!("{:02x} ", b); - if i % WIDTH == (WIDTH - 1) { - println!(); - } - } - println!(); - } - Section::Code { start, contents, .. } => { - println!("code section at 0x{:08x}", start); - let mut disasm = vm::disassemble::Disassemble::new(&mut stdout, contents, *start); - while !disasm.is_done() { - disasm.visit_inst()?; - } - println!(); - } - Section::Meta { .. } => continue, - }; + use vm::obj::syn::{lexer, parser}; + let text = get_input_string()?; + let lexerdef = lexer::lexerdef(); + let lexer = lexerdef.lexer(&text); + let (res, errors) = parser::parse(&lexer); + for err in errors { + println!("{}", err.pp(&lexer, &parser::token_epp)); } + println!("{:?}", res); Ok(()) } diff --git a/src/vm/common.rs b/src/vm/common.rs new file mode 100644 index 0000000..0b102aa --- /dev/null +++ b/src/vm/common.rs @@ -0,0 +1,73 @@ +use std::{ + cmp::Ordering, + fmt::{self, Formatter, LowerHex}, + ops::{Add, AddAssign}, +}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub struct Addr(pub u64); + +impl LowerHex for Addr { + fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { + let Addr(v) = self; + LowerHex::fmt(v, fmt) + } +} + +impl Add for Addr +where + T: Add, + u64: Add, +{ + type Output = Addr; + + fn add(self, rhs: T) -> Self::Output { + Addr(self.0 + rhs) + } +} + +macro_rules! impl_add_assign { + ($ty:ty) => { + impl AddAssign<$ty> for Addr { + fn add_assign(&mut self, rhs: $ty) { + self.0 = self.0 + (rhs as u64); + } + } + } +} + +impl_add_assign!(usize); +impl_add_assign!(u64); + +macro_rules! impl_cmp { + ($ty:ty) => { + impl PartialEq<$ty> for Addr { + fn eq(&self, other: &$ty) -> bool { + self.0 == (*other as u64) + } + } + + impl PartialOrd<$ty> for Addr { + fn partial_cmp(&self, other: &$ty) -> Option { + let other = *other as u64; + self.0.partial_cmp(&other) + } + } + } +} + +impl_cmp!(usize); +impl_cmp!(u64); + +macro_rules! impl_from { + ($ty:ty) => { + impl From<$ty> for Addr { + fn from(other: $ty) -> Self { + Addr(other as u64) + } + } + } +} + +impl_from!(usize); +impl_from!(u64); diff --git a/src/vm/error.rs b/src/vm/error.rs index 8e8e5c4..0799e19 100644 --- a/src/vm/error.rs +++ b/src/vm/error.rs @@ -1,4 +1,4 @@ -use crate::vm::{inst::InstOp, reg::Reg, vm::*}; +use crate::vm::{inst::InstOp, reg::Reg, common::*,}; use snafu::Snafu; #[derive(Snafu, Debug, Clone)] @@ -9,6 +9,10 @@ pub enum VmError { MemOutOfBounds { addr: Addr }, #[snafu(display("illegal instruction opcode: 0x{:04x}", op))] IllegalOp { op: InstOp }, + #[snafu(display("illegal destination specification: 0b{:08b}", spec))] + IllegalDestSpec { spec: u8 }, + #[snafu(display("illegal source specification: 0b{:08b}", spec))] + IllegalSourceSpec { spec: u8 }, } pub type Result = std::result::Result; diff --git a/src/vm/inst.rs b/src/vm/inst.rs index a3012d4..7b11653 100644 --- a/src/vm/inst.rs +++ b/src/vm/inst.rs @@ -1,3 +1,5 @@ +use crate::vm::{common::Addr, reg::Reg}; + macro_rules! instructions { { $($variant:ident = $value:expr),* $(,)? @@ -20,43 +22,115 @@ macro_rules! instructions { pub type InstOp = u16; instructions! { - ADD = 0x0000, - MUL = 0x0001, - DIV = 0x0002, - MOD = 0x0003, - INEG = 0x0004, - AND = 0x0005, - OR = 0x0006, - INV = 0x0007, - NOT = 0x0008, - XOR = 0x0009, - SHL = 0x000a, - SHR = 0x000b, - CMPEQ = 0x1000, - CMPLT = 0x1001, - JMP = 0x1100, - JZ = 0x1101, - JNZ = 0x1102, - LOAD = 0x2000, - REGCOPY = 0x2001, - STOREIMM64 = 0x2100, - STOREIMM32 = 0x2101, - MEMCOPY = 0x2200, - STORE = 0x2201, - HALT = 0xF000, - NOP = 0xF001, + ADD = 0x0000, + SUB = 0x0001, + MUL = 0x0002, + DIV = 0x0003, + MOD = 0x0004, + AND = 0x0005, + OR = 0x0006, + XOR = 0x0007, + SHL = 0x0008, + SHR = 0x0009, + INEG = 0x000a, + INV = 0x000b, + NOT = 0x000c, + CMPEQ = 0x1000, + CMPLT = 0x1001, + JMP = 0x1002, + JZ = 0x1003, + JNZ = 0x1004, + MOV = 0x2000, + HALT = 0xF000, + NOP = 0xF001, + DUMP = 0xF002, } -pub fn inst_len(op: InstOp) -> usize { - match op { - // 2 bytes - HALT | NOP => 2, - // 4 bytes - ADD | MUL | DIV | INEG | INV | NOT | MOD | AND | OR | XOR | SHL | SHR | CMPEQ | CMPLT - | JMP | JZ | JNZ | LOAD | REGCOPY | MEMCOPY | STORE => 4, - // Immediates - 4+ bytes - STOREIMM64 => 16, - STOREIMM32 => 8, - _ => panic!("unknown instruction op 0x{:04x}", op), +pub enum Inst { + Add(Dest, Source), + Sub(Dest, Source), + Mul(Dest, Source), + Div(Dest, Source), + Mod(Dest, Source), + And(Dest, Source), + Or(Dest, Source), + Xor(Dest, Source), + Shl(Dest, Source), + Shr(Dest, Source), + INeg(Dest, Source), + Inv(Dest, Source), + Not(Dest, Source), + CmpEq(Source, Source), + CmpLt(Source, Source), + Jmp(Source), + Jz(Source), + Jnz(Source), + Mov(Dest, Source), + Halt, + Nop, + Dump, +} + +impl Inst { + pub fn op(&self) -> InstOp { + match self { + Inst::Add(_, _) => ADD, + Inst::Sub(_, _) => SUB, + Inst::Mul(_, _) => MUL, + Inst::Div(_, _) => DIV, + Inst::Mod(_, _) => MOD, + Inst::And(_, _) => AND, + Inst::Or(_, _) => OR, + Inst::Xor(_, _) => XOR, + Inst::Shl(_, _) => SHL, + Inst::Shr(_, _) => SHL, + Inst::INeg(_, _) => INEG, + Inst::Inv(_, _) => INV, + Inst::Not(_, _) => NOT, + Inst::CmpEq(_, _) => CMPEQ, + Inst::CmpLt(_, _) => CMPLT, + Inst::Jmp(_) => JMP, + Inst::Jz(_) => JZ, + Inst::Jnz(_) => JNZ, + Inst::Mov(_, _) => MOV, + Inst::Halt => HALT, + Inst::Nop => NOP, + Inst::Dump => DUMP, + } } } + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Source { + Addr64(Addr), + Addr32(Addr), + Addr16(Addr), + Addr8(Addr), + Reg(Reg), + Imm(u64), +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Dest { + Addr64(Addr), + Addr32(Addr), + Addr16(Addr), + Addr8(Addr), + Reg(Reg), +} + +pub const DEST_ADDR64: u8 = 0b0000; +pub const DEST_ADDR32: u8 = 0b0001; +pub const DEST_ADDR16: u8 = 0b0010; +pub const DEST_ADDR8: u8 = 0b0011; +pub const DEST_REG: u8 = 0b0100; + +pub const SOURCE_ADDR64: u8 = 0b0000; +pub const SOURCE_ADDR32: u8 = 0b0001; +pub const SOURCE_ADDR16: u8 = 0b0010; +pub const SOURCE_ADDR8: u8 = 0b0011; +pub const SOURCE_REG: u8 = 0b0100; +pub const SOURCE_IMM64: u8 = 0b0101; +pub const SOURCE_IMM32: u8 = 0b0110; +pub const SOURCE_IMM16: u8 = 0b0111; +pub const SOURCE_IMM8: u8 = 0b1000; diff --git a/src/vm/mem.rs b/src/vm/mem.rs index 5f3c0ab..ea623e3 100644 --- a/src/vm/mem.rs +++ b/src/vm/mem.rs @@ -1,81 +1,219 @@ -use crate::vm::{error::*, reg::*}; -use byteorder::{ReadBytesExt, LE}; -use std::{ - io::Cursor, - ops::{Deref, DerefMut}, -}; +use crate::vm::{common::*, error::*, inst::*, reg::*}; +use std::{convert::TryInto, ops::Index, mem}; -const R1_MASK: u16 = 0b1111_1100_0000_0000; -const R2_MASK: u16 = 0b0000_0011_1111_0000; - -#[derive(Debug, Clone)] -pub struct MemCursor<'mem> { - cursor: Cursor<&'mem [u8]>, +pub struct MemCursor { + pos: Addr, + mem: T, } -impl<'mem> MemCursor<'mem> { - pub fn new(mem: &'mem [u8]) -> Self { - MemCursor { - cursor: Cursor::new(mem), - } +impl MemCursor + where T: AsRef<[u8]> +{ + pub fn new(mem: T) -> Self { + MemCursor { pos: Addr(0), mem } } - pub fn cursor(&self) -> &Cursor<&'mem [u8]> { - &self.cursor + pub fn position(&self) -> Addr { + self.pos } - pub fn cursor_mut(&mut self) -> &mut Cursor<&'mem [u8]> { - &mut self.cursor + pub fn set_position>(&mut self, position: P) { + self.pos = position.into(); + } + + pub fn next_u8_unchecked(&mut self) -> u8 { + let val = self[self.pos]; + self.pos += 1u64; + val } pub fn next_u8(&mut self) -> Result { - self.read_u8().map_err(|_| VmError::MemOutOfBounds { - addr: self.position(), - }) + self.check_addr(self.pos) + .map(|_| self.next_u8_unchecked()) + } + + pub fn next_u16_unchecked(&mut self) -> u16 { + let (int_bytes, _) = self.mem.as_ref() + .split_at(mem::size_of::()); + let val = u16::from_le_bytes(int_bytes.try_into().unwrap()); + self.pos += 2u64; + val } pub fn next_u16(&mut self) -> Result { - self.read_u16::().map_err(|_| VmError::MemOutOfBounds { - addr: self.position(), - }) + self.check_addr(self.pos) + .map(|_| self.next_u16_unchecked()) + } + + pub fn next_u32_unchecked(&mut self) -> u32 { + let (int_bytes, _) = self.mem.as_ref() + .split_at(mem::size_of::()); + let val = u32::from_le_bytes(int_bytes.try_into().unwrap()); + self.pos += 4u64; + val } pub fn next_u32(&mut self) -> Result { - self.read_u32::().map_err(|_| VmError::MemOutOfBounds { - addr: self.position(), - }) + self.check_addr(self.pos) + .map(|_| self.next_u32_unchecked()) + } + + pub fn next_u64_unchecked(&mut self) -> u64 { + let (int_bytes, _) = self.mem.as_ref() + .split_at(mem::size_of::()); + let val = u64::from_le_bytes(int_bytes.try_into().unwrap()); + self.pos += 8u64; + val } pub fn next_u64(&mut self) -> Result { - self.read_u64::().map_err(|_| VmError::MemOutOfBounds { - addr: self.position(), - }) + self.check_addr(self.pos) + .map(|_| self.next_u64_unchecked()) } - pub fn next_regs(&mut self) -> Result<(Reg, Reg)> { - let next16 = self.next_u16()?; - let r1 = ((R1_MASK & next16) >> 10) as Reg; - let r2 = ((R2_MASK & next16) >> 4) as Reg; - Ok((r1, r2)) + pub fn next_addr(&mut self) -> Result { + self.check_addr(self.pos) + .map(|_| self.next_addr_unchecked()) } - pub fn next_reg(&mut self) -> Result { - let next16 = self.next_u16()?; - let r1 = ((R1_MASK & next16) >> 10) as Reg; - Ok(r1) + pub fn next_addr_unchecked(&mut self) -> Addr { + Addr(self.next_u64_unchecked()) + } + + pub fn next_inst(&mut self) -> Result { + let op = self.next_u16()?; + + macro_rules! dest_source { + ($variant:ident) => {{ + let (d, s) = self.next_dest_source()?; + Ok(Inst::$variant(d, s)) + }}; + } + macro_rules! source_source { + ($variant:ident) => {{ + let (s1, s2) = self.next_source_source()?; + Ok(Inst::$variant(s1, s2)) + }}; + } + macro_rules! source { + ($variant:ident) => {{ + let spec = (self.next_u8()? & 0xF0) >> 4; + let source = self.next_source(spec)?; + Ok(Inst::$variant(source)) + }}; + } + match op { + ADD => dest_source!(Add), + SUB => dest_source!(Sub), + MUL => dest_source!(Mul), + DIV => dest_source!(Div), + MOD => dest_source!(Mod), + AND => dest_source!(And), + OR => dest_source!(Or), + XOR => dest_source!(Xor), + SHL => dest_source!(Shl), + SHR => dest_source!(Shr), + INEG => dest_source!(INeg), + INV => dest_source!(Inv), + NOT => dest_source!(Not), + CMPEQ => source_source!(CmpEq), + CMPLT => source_source!(CmpLt), + JMP => source!(Jmp), + JZ => source!(Jz), + JNZ => source!(Jnz), + MOV => dest_source!(Mov), + HALT => Ok(Inst::Halt), + NOP => Ok(Inst::Nop), + DUMP => Ok(Inst::Dump), + _ => Err(VmError::IllegalOp { op }), + } + } + + fn next_source_source(&mut self) -> Result<(Source, Source)> { + let spec = self.next_u8()?; + let s1_spec = (spec & 0xF0) >> 4; + let s2_spec = spec & 0x0F; + let s1 = self.next_source(s1_spec)?; + let s2 = self.next_source(s2_spec)?; + Ok((s1, s2)) + } + + fn next_dest_source(&mut self) -> Result<(Dest, Source)> { + let spec = self.next_u8()?; + let dest_spec = (spec & 0xF0) >> 4; + let source_spec = spec & 0x0F; + let dest = self.next_dest(dest_spec)?; + let source = self.next_source(source_spec)?; + Ok((dest, source)) + } + + fn next_dest(&mut self, spec: u8) -> Result { + match spec { + DEST_ADDR64 => Ok(Dest::Addr64(self.next_addr()?)), + DEST_ADDR32 => Ok(Dest::Addr32(self.next_addr()?)), + DEST_ADDR16 => Ok(Dest::Addr16(self.next_addr()?)), + DEST_ADDR8 => Ok(Dest::Addr8(self.next_addr()?)), + DEST_REG => Ok(Dest::Reg(self.next_reg()?)), + _ => Err(VmError::IllegalDestSpec { spec }), + } + } + + fn next_source(&mut self, spec: u8) -> Result { + match spec { + SOURCE_ADDR64 => Ok(Source::Addr64(self.next_addr()?)), + SOURCE_ADDR32 => Ok(Source::Addr32(self.next_addr()?)), + SOURCE_ADDR16 => Ok(Source::Addr16(self.next_addr()?)), + SOURCE_ADDR8 => Ok(Source::Addr8(self.next_addr()?)), + SOURCE_REG => Ok(Source::Reg(self.next_reg()?)), + SOURCE_IMM64 => Ok(Source::Imm(self.next_u64()?)), + SOURCE_IMM32 => Ok(Source::Imm(self.next_u32()? as u64)), + SOURCE_IMM16 => Ok(Source::Imm(self.next_u16()? as u64)), + SOURCE_IMM8 => Ok(Source::Imm(self.next_u8()? as u64)), + _ => Err(VmError::IllegalSourceSpec { spec }), + } + } + + fn next_reg(&mut self) -> Result { + let reg = self.next_u8()?; + if (reg as usize) >= NUM_REGS { + Err(VmError::IllegalReg { reg }) + } else { + Ok(reg) + } + } + + fn check_addr(&self, addr: Addr) -> Result<()> { + if addr > self.mem.as_ref().len() { + Err(VmError::MemOutOfBounds { addr }) + } else { + Ok(()) + } } } -impl<'mem> Deref for MemCursor<'mem> { - type Target = Cursor<&'mem [u8]>; +//////////////////////////////////////////////////////////////////////////////// +// Index impl +//////////////////////////////////////////////////////////////////////////////// +impl> Index for MemCursor { + type Output = u8; - fn deref(&self) -> &Self::Target { - self.cursor() + fn index(&self, addr: usize) -> &Self::Output { + self.mem.as_ref().index(addr) } } -impl<'mem> DerefMut for MemCursor<'mem> { - fn deref_mut(&mut self) -> &mut Self::Target { - self.cursor_mut() +impl> Index for MemCursor { + type Output = u8; + + fn index(&self, addr: u64) -> &Self::Output { + self.index(addr as usize) + } +} + +impl> Index for MemCursor { + type Output = u8; + + fn index(&self, addr: Addr) -> &Self::Output { + self.index(addr.0) } } diff --git a/src/vm/mod.rs b/src/vm/mod.rs index 80ef693..653fd3e 100644 --- a/src/vm/mod.rs +++ b/src/vm/mod.rs @@ -1,10 +1,8 @@ -pub mod disassemble; +pub mod common; pub mod error; pub mod flags; pub mod inst; pub mod mem; pub mod obj; pub mod reg; -mod tick; -pub mod visit; -pub mod vm; +pub mod state; diff --git a/src/vm/obj/error.rs b/src/vm/obj/error.rs index e69de29..ed45922 100644 --- a/src/vm/obj/error.rs +++ b/src/vm/obj/error.rs @@ -0,0 +1,45 @@ +use snafu::Snafu; +use std::{fmt::Debug, io}; + +#[derive(Debug, Snafu)] +pub enum ParseError { + #[snafu(display("IO error: {}", source))] + Io { source: io::Error }, + + #[snafu(display("wrong magic number"))] + WrongMagic, + + #[snafu(display("unknown section kind: 0x{:02x}", kind))] + UnknownSectionKind { kind: u8 }, + + #[snafu(display("invalid UTF-8 string: {}", source))] + InvalidUtf8String { source: std::string::FromUtf8Error }, + + #[snafu(display("duplicate symbol name: {}", name))] + DuplicateName { name: String }, + + #[snafu(display("duplicate exported symbol name: {}", name))] + DuplicateExportName { name: String }, +} + +macro_rules! into_parse_error { + ( + $($type:ty : $variant:ident),* $(,)? + ) => { + $( + impl From<$type> for ParseError { + fn from(other: $type) -> Self { + ParseError::$variant { source: other } + } + } + )* + } +} + +into_parse_error! { + io::Error: Io, + std::string::FromUtf8Error: InvalidUtf8String, +} + +pub type Result = std::result::Result; + diff --git a/src/vm/obj/mod.rs b/src/vm/obj/mod.rs index ffb1f35..4f04478 100644 --- a/src/vm/obj/mod.rs +++ b/src/vm/obj/mod.rs @@ -1,3 +1,3 @@ -pub mod assemble; +pub mod error; pub mod obj; pub mod syn; diff --git a/src/vm/obj/obj.rs b/src/vm/obj/obj.rs index 598dd86..05a8ba8 100644 --- a/src/vm/obj/obj.rs +++ b/src/vm/obj/obj.rs @@ -1,4 +1,4 @@ -use crate::vm::obj::syn::error::{ParseError, Result}; +use crate::vm::obj::error::{ParseError, Result}; use byteorder::{ReadBytesExt, LE}; use std::{ collections::HashMap, diff --git a/src/vm/obj/syn/ast.rs b/src/vm/obj/syn/ast.rs index 0cf8f4d..cef91f7 100644 --- a/src/vm/obj/syn/ast.rs +++ b/src/vm/obj/syn/ast.rs @@ -1,165 +1,82 @@ -use crate::vm::{inst::*, reg::Reg}; +use crate::vm::reg::Reg; -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum SectionBlock { - Data { - org: SectionOrg, - body: Vec, - }, - Code { - org: SectionOrg, - body: Vec, - }, - Meta { - entries: Vec<(String, ImmValue)>, - }, +#[derive(Debug, Clone)] +pub enum SectionDef { + Meta(MetaSection), + Data(DataSection), } -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone)] +pub struct MetaSection { + pub values: Vec, +} + +#[derive(Debug, Clone)] +pub struct MetaLine { + pub name: String, + pub value: Value, +} + +#[derive(Debug, Clone)] +pub struct DataSection { + pub name: String, + pub org: Option, + pub lines: Vec, +} + +#[derive(Debug, Clone)] pub enum SectionOrg { Start(u64), - Range(u64, u64), + StartEnd(u64, u64), } -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum Line { +#[derive(Debug, Clone)] +pub enum DataLine { + ValueDef(ValueDef), Inst(Inst), - LabelDef(String), - ValueDecl(ValueDecl), Export(String), -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum ImmValue { - Number(u64), Label(String), } -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum ValueDecl { - U64(u64), - U32(u64), - U16(u64), - U8(u64), +#[derive(Debug, Clone)] +pub enum ValueDef { + Int(u64), String(String), ZString(String), } -impl ValueDecl { - pub fn len(&self) -> usize { - match self { - ValueDecl::U64(_) => 8, - ValueDecl::U32(_) => 4, - ValueDecl::U16(_) => 2, - ValueDecl::U8(_) => 1, - ValueDecl::String(s) => s.as_bytes().len() + 8, - ValueDecl::ZString(s) => s.as_bytes().len() + 1, - } - } - - pub fn to_bytes(&self) -> Vec { - let len = self.len(); - let bytes = match self { - ValueDecl::U64(v) => v.to_le_bytes().to_vec(), - ValueDecl::U32(v) => v.to_le_bytes()[0..4].to_vec(), - ValueDecl::U16(v) => v.to_le_bytes()[0..2].to_vec(), - ValueDecl::U8(v) => vec![(v & 0xff) as u8], - ValueDecl::String(s) => { - let mut bytes = Vec::with_capacity(self.len()); - bytes.extend(&(s.len() as u64).to_le_bytes()); - bytes.extend(s.as_bytes()); - bytes - } - ValueDecl::ZString(s) => { - let mut bytes = Vec::with_capacity(self.len()); - bytes.extend(s.as_bytes()); - bytes.push(0); - bytes - } - }; - assert_eq!(bytes.len(), len); - bytes - } +#[derive(Debug, Clone)] +pub enum Value { + Int(u64), + Reg(Reg), + Name(String), + Here, + //Array(Vec), + //Deref(Value, Size } -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone)] pub enum Inst { - Add(Reg, Reg), - Mul(Reg, Reg), - Div(Reg, Reg), - Mod(Reg, Reg), - INeg(Reg), - And(Reg, Reg), - Or(Reg, Reg), - Inv(Reg), - Not(Reg), - Xor(Reg, Reg), - Shl(Reg, Reg), - Shr(Reg, Reg), - - CmpEq(Reg, Reg), - CmpLt(Reg, Reg), - Jmp(Reg), - Jz(Reg), - Jnz(Reg), - - Load(Reg, Reg), - Store(Reg, Reg), - StoreImm(Reg, ImmValue), - StoreImm32(Reg, ImmValue), - StoreImm64(Reg, ImmValue), - MemCopy(Reg, Reg), - RegCopy(Reg, Reg), - - Nop, + Add(Value, Value), + Sub(Value, Value), + Mul(Value, Value), + Div(Value, Value), + Mod(Value, Value), + And(Value, Value), + Or(Value, Value), + Xor(Value, Value), + Shl(Value, Value), + Shr(Value, Value), + INeg(Value, Value), + Inv(Value, Value), + Not(Value, Value), + CmpEq(Value, Value), + CmpLt(Value, Value), + Jmp(Value), + Jz(Value), + Jnz(Value), + Mov(Value, Value), Halt, -} - -impl Inst { - pub fn op(&self) -> InstOp { - match self { - Inst::Add(_, _) => ADD, - Inst::Mul(_, _) => MUL, - Inst::Div(_, _) => DIV, - Inst::Mod(_, _) => MOD, - Inst::INeg(_) => INEG, - Inst::And(_, _) => AND, - Inst::Or(_, _) => OR, - Inst::Inv(_) => INV, - Inst::Not(_) => NOT, - Inst::Xor(_, _) => XOR, - Inst::Shl(_, _) => SHL, - Inst::Shr(_, _) => SHR, - - Inst::CmpEq(_, _) => CMPEQ, - Inst::CmpLt(_, _) => CMPLT, - Inst::Jmp(_) => JMP, - Inst::Jz(_) => JZ, - Inst::Jnz(_) => JNZ, - - Inst::Load(_, _) => LOAD, - Inst::Store(_, _) => STORE, - Inst::StoreImm(_, imm) => { - if let ImmValue::Number(imm) = imm { - if *imm > (u32::max_value() as u64) { - STOREIMM64 - } else { - STOREIMM32 - } - } else { - STOREIMM64 - } - } - Inst::StoreImm32(_, _) => STOREIMM32, - Inst::StoreImm64(_, _) => STOREIMM64, - Inst::MemCopy(_, _) => MEMCOPY, - Inst::RegCopy(_, _) => REGCOPY, - - Inst::Nop => NOP, - Inst::Halt => HALT, - } - } - pub fn len(&self) -> usize { - inst_len(self.op()) - } + Nop, + Dump, } diff --git a/src/vm/obj/syn/error.rs b/src/vm/obj/syn/error.rs index 229bcbc..0c53f62 100644 --- a/src/vm/obj/syn/error.rs +++ b/src/vm/obj/syn/error.rs @@ -1,44 +1,16 @@ use snafu::Snafu; -use std::{fmt::Debug, io}; +//use std::{fmt::Debug, io}; #[derive(Debug, Snafu)] -pub enum ParseError { - #[snafu(display("IO error: {}", source))] - Io { source: io::Error }, +pub enum SyntaxError { + //#[snafu(display("IO error: {}", source))] + //Io { source: io::Error }, - #[snafu(display("wrong magic number"))] - WrongMagic, + #[snafu(display("unexpected {}", what))] + Unexpected { what: String }, - #[snafu(display("unknown section kind: 0x{:02x}", kind))] - UnknownSectionKind { kind: u8 }, - - #[snafu(display("invalid UTF-8 string: {}", source))] - InvalidUtf8String { source: std::string::FromUtf8Error }, - - #[snafu(display("duplicate symbol name: {}", name))] - DuplicateName { name: String }, - - #[snafu(display("duplicate exported symbol name: {}", name))] - DuplicateExportName { name: String }, + #[snafu(display("expected {}, but got {} instead", expected, got))] + ExpectedGot { expected: String, got: String }, } -macro_rules! into_parse_error { - ( - $($type:ty : $variant:ident),* $(,)? - ) => { - $( - impl From<$type> for ParseError { - fn from(other: $type) -> Self { - ParseError::$variant { source: other } - } - } - )* - } -} - -into_parse_error! { - io::Error: Io, - std::string::FromUtf8Error: InvalidUtf8String, -} - -pub type Result = std::result::Result; +pub type Result = std::result::Result; diff --git a/src/vm/obj/syn/lexer.l b/src/vm/obj/syn/lexer.l new file mode 100644 index 0000000..fb431c4 --- /dev/null +++ b/src/vm/obj/syn/lexer.l @@ -0,0 +1,50 @@ +%% +\$[0-9]+ "DEC_INT" +\$0[Xx][0-9a-fA-F]+ "HEX_INT" +\$0[Bb][01]+ "BIN_INT" +\.meta "DIR_META" +\.section "DIR_SECTION" +\.export "DIR_EXPORT" +\{ "LBRACE" +\} "RBRACE" +\.\. "DOTDOT" +: "COLON" +, "COMMA" +\$\$ "BUCKBUCK" +[iu](8|16|32|64) "INT_TYPE" +\.[iu](8|16|32|64) "INT_DEF" +\.string "STR_DEF" +\.zstring "ZSTR_DEF" +"([^"]|\\[\\nt0"'])*" "STRING" +add "ADD" +sub "SUB" +mul "MUL" +div "DIV" +mod "MOD" +and "AND" +or "OR" +xor "XOR" +shl "SHL" +shr "SHR" +ineg "INEG" +inv "INV" +not "NOT" +cmpeq "CMPEQ" +cmplt "CMPLT" +jmp "JMP" +jz "JZ" +jnz "JNZ" +mov "MOV" +halt "HALT" +nop "NOP" +dump "DUMP" +%ip "REG_IP" +%sp "REG_SP" +%fp "REG_FP" +%flags "REG_FLAGS" +%null "REG_NULL" +%status "REG_STATUS" +%r[0-9]{1,2} "REG_GENERAL" +[a-zA-Z_][a-zA-Z0-9_]* "NAME" +;[^\n]* ; +[ \n\t]+ ; diff --git a/src/vm/obj/syn/mod.rs b/src/vm/obj/syn/mod.rs index a6e2101..3c9eb9c 100644 --- a/src/vm/obj/syn/mod.rs +++ b/src/vm/obj/syn/mod.rs @@ -1,16 +1,16 @@ -use lalrpop_util::lalrpop_mod; - -lalrpop_mod!(pub parser, "/vm/obj/syn/parser.rs"); pub mod ast; pub mod error; -pub fn unescape_string(s: impl AsRef) -> String { - let s = s.as_ref(); - s.replace(r"\\", "\\") - .replace("\\n", "\n") - .replace("\\r", "\r") - .replace("\\t", "\t") - .replace("\\t", "\t") - .replace("\\0", "\0") - .replace("\\\"", "\"") +use lrlex::lrlex_mod; +use lrpar::lrpar_mod; + +lrlex_mod!("vm/obj/syn/lexer.l"); +lrpar_mod!("vm/obj/syn/parser.y"); + +pub mod parser { + pub use super::parser_y::*; +} + +pub mod lexer { + pub use super::lexer_l::*; } diff --git a/src/vm/obj/syn/parser.lalrpop b/src/vm/obj/syn/parser.lalrpop index 73c0c3f..45232f2 100644 --- a/src/vm/obj/syn/parser.lalrpop +++ b/src/vm/obj/syn/parser.lalrpop @@ -1,20 +1,13 @@ use std::str::FromStr; use crate::vm::{ + common::Addr, + inst::*, obj::syn::{unescape_string, ast::*}, reg::*, }; grammar; -LabelDef: String = { -