From cd0d8bb37f5335fe04e082c6c1ad333fd621d9f8 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 5 Nov 2018 12:05:10 +0100 Subject: Add deps badge + update dependencies --- Cargo.lock | 188 +++---- Cargo.toml | 8 +- README.md | 2 + derivation.nix | 2 +- src/main.rs | 3 +- src/parsing/equalizer_apo.rs | 1159 ------------------------------------------ src/parsing/mod.rs | 7 +- 7 files changed, 84 insertions(+), 1285 deletions(-) delete mode 100644 src/parsing/equalizer_apo.rs diff --git a/Cargo.lock b/Cargo.lock index 4d6b4de..e4783d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,6 @@ dependencies = [ "winapi 0.3.6 (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 = "ascii-canvas" version = "1.0.0" @@ -27,16 +22,6 @@ dependencies = [ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "atty" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "atty" version = "0.2.11" @@ -70,15 +55,15 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-vec" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -88,16 +73,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "block-buffer" -version = "0.3.3" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "byte-tools" -version = "0.2.0" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "byteorder" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -126,7 +126,7 @@ dependencies = [ [[package]] name = "clap-log-flag" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -171,22 +171,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "digest" -version = "0.7.6" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "docopt" -version = "0.8.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -196,8 +196,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ena" -version = "0.5.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "env_logger" @@ -257,7 +260,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "generic-array" -version = "0.9.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -295,45 +298,23 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ena 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-snap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-util 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lalrpop-util 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lalrpop-snap" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-util 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -341,7 +322,7 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -391,6 +372,11 @@ dependencies = [ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "opaque-debug" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ordermap" version = "0.3.5" @@ -517,18 +503,6 @@ dependencies = [ "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "regex" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex" version = "1.0.5" @@ -541,19 +515,6 @@ dependencies = [ "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "regex-syntax" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex-syntax" version = "0.6.2" @@ -602,12 +563,12 @@ name = "set_eq" version = "0.1.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap-log-flag 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap-log-flag 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "clap-verbosity-flag 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "dbus 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lalrpop-util 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lalrpop 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lalrpop-util 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -616,13 +577,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (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.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -661,11 +622,6 @@ name = "string_cache_shared" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "strsim" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "strsim" version = "0.7.0" @@ -861,29 +817,29 @@ dependencies = [ [metadata] "checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b385d69402821a1c254533a011a312531cbcc0e3e24f19bbb4747a5a2daf37e2" -"checksum atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0fd4c0631f06448cc45a6bbb3b710ebb7ff8ccb96a0800c994afe23a70d5df2" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" -"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" -"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" +"checksum bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1efcc46c18245a69c38fcc5cc650f16d3a59d034f3106e9ed63748f695730a" +"checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" -"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" +"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" +"checksum block-padding 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc4358306e344bf9775d0197fd00d2603e5afb0771bb353538630f022068ea3" +"checksum byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" -"checksum clap-log-flag 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b05213138aad9c0f820773c51e829eae4189986435aa5c115a6465b385892a5" +"checksum clap-log-flag 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "935e3497eaa984678428ec289f9991c1857b3380c37cf9c3f5b5fbea7188cfba" "checksum clap-verbosity-flag 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda14f5323b2b747f52908c5b7b8af7790784088bc7c2957a11695e39ad476dc" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum dbus 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e34c238dfb3f5881d46ad301403cd8f8ecf946e2a4e89bdd1166728b68b5008" "checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a" -"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" -"checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" +"checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" +"checksum docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db2906c2579b5b7207fc1e328796a9a8835dc44e22dbe8e460b1d636f9a7b225" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cabe5a5078ac8c506d3e4430763b1ba9b609b1286913e7d08e581d1c2de9b7e5" +"checksum ena 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "25b4e5febb25f08c49f1b07dc33a182729a6b21edfb562b5aef95f78e0dbe5bb" "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" "checksum failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7efb22686e4a466b1ec1a15c2898f91fa9cb340452496dca654032de20ff95b9" "checksum failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "946d0e98a50d9831f5d589038d2ca7f8f455b1c21028c0db0e84116a12696426" @@ -891,20 +847,20 @@ dependencies = [ "checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" +"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lalrpop 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba451f7bd819b7afc99d4cf4bdcd5a4861e64955ba9680ac70df3a50625ad6cf" -"checksum lalrpop-snap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "60013fd6be14317d43f47658b1440956a9ca48a9ed0257e0e0a59aac13e43a1f" -"checksum lalrpop-util 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "60c6c48ba857cd700673ce88907cadcdd7e2cd7783ed02378537c5ffd4f6460c" +"checksum lalrpop 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c226388f060de3853c2e4e78ee68fa9038cfc65fcc8f025ce3ef92476cc8772" +"checksum lalrpop-util 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c4eb3e3b8cd41d58f0f5aff3b10c3d394c0d0f09bea59c571f1a8371cf2cf28" "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8720f9274907052cb50313f91201597868da9d625f8dd125f2aca5bddb7e83a1" "checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" "checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4" +"checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" "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.23 (registry+https://github.com/rust-lang/crates.io-index)" = "03dc191feb9b08b0dc1330d6549b795b9d81aec19efe6b4a45aec8d4caee0c4b" @@ -922,22 +878,18 @@ dependencies = [ "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" "checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" -"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" "checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe" "checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" -"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" +"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423" "checksum string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "35293b05cf1494e8ddd042a7df6756bf18d07f42d234f32e71dce8a7aabb0191" "checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum structopt 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ca85f2c9a5a1e2d5ac686fc0be48e40f8ad803f5bbe31f692ff71eb2dd8aad45" "checksum structopt-derive 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "1383e5db585da799a5c4acc496c5c868e18bf82e658c00c75cc91038fa26b55f" diff --git a/Cargo.toml b/Cargo.toml index d9d30c9..4bfe268 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,23 +13,23 @@ pa-eq = ["dbus"] pa-effects = ["serde_json"] [build-dependencies] -lalrpop = "0.15.2" +lalrpop = "0.16" clap = "2.32.0" clap-verbosity-flag = "0.2" -clap-log-flag = "0.1" +clap-log-flag = "0.2" structopt = "0.2" [dependencies] #clap = { git = "https://github.com/kbknapp/clap-rs", branch = "v3-master" } clap = "2.32.0" clap-verbosity-flag = "0.2" -clap-log-flag = "0.1" +clap-log-flag = "0.2" structopt = "0.2" log = "0.4.4" failure = "0.1.2" -lalrpop-util = "0.15.2" +lalrpop-util = "0.16" regex = "1.0.4" dbus = { version = "0.6.2", optional = true } diff --git a/README.md b/README.md index 7902bae..2775023 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # set_eq: A command-line tool to manipulate PulseAudio's equalizers +[![dependency status](https://deps.rs/repo/github/minijackson/set_eq/status.svg)](https://deps.rs/repo/github/minijackson/set_eq) + This tool will allow you to use a configuration file to send to your favorite PulseAudio's equalizer. diff --git a/derivation.nix b/derivation.nix index 33e57d6..c46237f 100644 --- a/derivation.nix +++ b/derivation.nix @@ -7,7 +7,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ dbus pkgconfig ]; src = ./.; - cargoSha256 = "130mvc2hbvfl0ia0mj5v33abrwnr9hhqrqrfxjwgxk2n1q9z1ay7"; + cargoSha256 = "08s7s63rhjgirznphi6yks2a2zlsj5f4hlz8xqmla6gvc9yr58hc"; preFixup = '' mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions} diff --git a/src/main.rs b/src/main.rs index fa67cb8..669ec4b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ extern crate clap_verbosity_flag; #[macro_use] extern crate structopt; +#[macro_use] extern crate lalrpop_util; #[cfg(feature = "pa-eq")] @@ -73,7 +74,7 @@ fn main() { fn start() -> Result<(), Error> { let args = Cli::from_args(); - args.log.log_all(args.verbose.log_level())?; + args.log.log_all(Some(args.verbose.log_level()))?; use Command::*; diff --git a/src/parsing/equalizer_apo.rs b/src/parsing/equalizer_apo.rs deleted file mode 100644 index b0aa8f8..0000000 --- a/src/parsing/equalizer_apo.rs +++ /dev/null @@ -1,1159 +0,0 @@ -// auto-generated: "lalrpop 0.15.2" -// sha256: 3981cad2c0ee5c1d80c3b7278bb1bc9926ee7b273c2b68423accdd84e43c494 -use ::Filter; -use std::str::FromStr; -#[allow(unused_extern_crates)] -extern crate lalrpop_util as __lalrpop_util; - -#[cfg_attr(rustfmt, rustfmt_skip)] -mod __parse__Main { - #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens)] - - use ::Filter; - use std::str::FromStr; - #[allow(unused_extern_crates)] - extern crate lalrpop_util as __lalrpop_util; - use super::__intern_token::Token; - #[allow(dead_code)] - pub enum __Symbol<'input> - { - Variant0(&'input str), - Variant1((u32, f64)), - Variant2(::std::vec::Vec<(u32, f64)>), - Variant3(f64), - Variant4((Vec, Vec)), - Variant5(u32), - Variant6(Filter), - Variant7(i32), - } - const __ACTION: &'static [i8] = &[ - // State 0 - 0, 0, 4, 0, 0, 0, 0, - // State 1 - 0, 0, 0, 0, 0, 0, 0, - // State 2 - 0, 6, 0, 0, 0, 0, 0, - // State 3 - 0, 0, 0, 0, 12, 13, 14, - // State 4 - 0, 0, 0, 0, 0, 0, 0, - // State 5 - 0, 0, 0, 0, 0, 0, 14, - // State 6 - 0, -12, 0, 0, 0, 0, 0, - // State 7 - 0, 0, 0, 17, 0, 0, 0, - // State 8 - -9, 0, 0, -9, 0, 0, 0, - // State 9 - -7, 0, 0, -7, 0, 0, 0, - // State 10 - -8, 0, 0, -8, 0, 0, 0, - // State 11 - -13, 0, 0, -13, 0, 0, 0, - // State 12 - -14, 0, 0, -14, 0, 0, 0, - // State 13 - -10, 0, 0, -10, -10, -10, -10, - // State 14 - 0, 0, 0, 0, 0, 0, 14, - // State 15 - 0, 0, 0, 0, 12, 13, 14, - // State 16 - 0, -5, 0, 0, 0, 0, 0, - // State 17 - 0, 0, 0, 0, 12, 13, 14, - // State 18 - 21, 0, 0, 0, 0, 0, 0, - // State 19 - 22, 0, 0, 0, 0, 0, 0, - // State 20 - 0, 0, 0, 0, 0, 0, -2, - // State 21 - 0, 0, 0, 0, 0, 0, -3, - ]; - const __EOF_ACTION: &'static [i8] = &[ - // State 0 - 0, - // State 1 - -15, - // State 2 - 0, - // State 3 - 0, - // State 4 - -11, - // State 5 - 0, - // State 6 - 0, - // State 7 - 0, - // State 8 - -9, - // State 9 - -7, - // State 10 - -8, - // State 11 - -13, - // State 12 - -14, - // State 13 - -10, - // State 14 - 0, - // State 15 - 0, - // State 16 - 0, - // State 17 - 0, - // State 18 - 0, - // State 19 - -6, - // State 20 - 0, - // State 21 - 0, - ]; - const __GOTO: &'static [i8] = &[ - // State 0 - 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, - // State 1 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 2 - 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, - // State 3 - 0, 0, 0, 7, 0, 8, 9, 0, 0, 10, 11, 0, - // State 4 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 5 - 0, 15, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - // State 6 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 7 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 8 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 9 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 10 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 11 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 12 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 13 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 14 - 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, - // State 15 - 0, 0, 0, 0, 0, 19, 9, 0, 0, 10, 11, 0, - // State 16 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 17 - 0, 0, 0, 0, 0, 20, 9, 0, 0, 10, 11, 0, - // State 18 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 20 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 21 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ]; - fn __expected_tokens(__state: usize) -> Vec<::std::string::String> { - const __TERMINAL: &'static [&'static str] = &[ - r###"";""###, - r###""GraphicEQ:""###, - r###""Preamp:""###, - r###""dB""###, - r###"r#"-?[0-9]*\\.[0-9]+"#"###, - r###"r#"-[0-9]+"#"###, - r###"r#"[0-9]+"#"###, - ]; - __ACTION[(__state * 7)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { - if state == 0 { - None - } else { - Some(terminal.to_string()) - } - }).collect() - } - pub struct MainParser { - builder: super::__intern_token::__MatcherBuilder, - _priv: (), - } - - impl MainParser { - pub fn new() -> MainParser { - let __builder = super::__intern_token::__MatcherBuilder::new(); - MainParser { - builder: __builder, - _priv: (), - } - } - - #[allow(dead_code)] - pub fn parse< - 'input, - >( - &self, - input: &'input str, - ) -> Result, &'static str>> - { - let mut __tokens = self.builder.matcher(input); - let mut __states = vec![0_i8]; - let mut __symbols = vec![]; - let mut __integer; - let mut __lookahead; - let __last_location = &mut Default::default(); - '__shift: loop { - __lookahead = match __tokens.next() { - Some(Ok(v)) => v, - None => break '__shift, - Some(Err(e)) => return Err(e), - }; - *__last_location = __lookahead.2.clone(); - __integer = match __lookahead.1 { - Token(3, _) if true => 0, - Token(4, _) if true => 1, - Token(5, _) if true => 2, - Token(6, _) if true => 3, - Token(0, _) if true => 4, - Token(1, _) if true => 5, - Token(2, _) if true => 6, - _ => { - let __state = *__states.last().unwrap() as usize; - let __error = __lalrpop_util::ParseError::UnrecognizedToken { - token: Some(__lookahead), - expected: __expected_tokens(__state), - }; - return Err(__error); - } - }; - '__inner: loop { - let __state = *__states.last().unwrap() as usize; - let __action = __ACTION[__state * 7 + __integer]; - if __action > 0 { - let __symbol = match __integer { - 0 => match __lookahead.1 { - Token(3, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 1 => match __lookahead.1 { - Token(4, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 2 => match __lookahead.1 { - Token(5, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 3 => match __lookahead.1 { - Token(6, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 4 => match __lookahead.1 { - Token(0, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 5 => match __lookahead.1 { - Token(1, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - 6 => match __lookahead.1 { - Token(2, __tok0) => __Symbol::Variant0((__tok0)), - _ => unreachable!(), - }, - _ => unreachable!(), - }; - __states.push(__action - 1); - __symbols.push((__lookahead.0, __symbol, __lookahead.2)); - continue '__shift; - } else if __action < 0 { - if let Some(r) = __reduce(input, __action, Some(&__lookahead.0), &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) { - if r.is_err() { - return r; - } - return Err(__lalrpop_util::ParseError::ExtraToken { token: __lookahead }); - } - } else { - let mut __err_lookahead = Some(__lookahead); - let mut __err_integer: Option = Some(__integer); - let __state = *__states.last().unwrap() as usize; - let __error = __lalrpop_util::ParseError::UnrecognizedToken { - token: __err_lookahead, - expected: __expected_tokens(__state), - }; - return Err(__error) - } - } - } - loop { - let __state = *__states.last().unwrap() as usize; - let __action = __EOF_ACTION[__state]; - if __action < 0 { - if let Some(r) = __reduce(input, __action, None, &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) { - return r; - } - } else { - let mut __err_lookahead = None; - let mut __err_integer: Option = None; - let __state = *__states.last().unwrap() as usize; - let __error = __lalrpop_util::ParseError::UnrecognizedToken { - token: __err_lookahead, - expected: __expected_tokens(__state), - }; - return Err(__error) - } - } - } - } - pub(crate) fn __reduce< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> Option, &'static str>>> - { - let (__pop_states, __symbol, __nonterminal) = match -__action { - 1 => { - __reduce1(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 2 => { - __reduce2(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 3 => { - __reduce3(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 4 => { - __reduce4(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 5 => { - __reduce5(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 6 => { - __reduce6(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 7 => { - __reduce7(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 8 => { - __reduce8(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 9 => { - __reduce9(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 10 => { - __reduce10(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 11 => { - __reduce11(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 12 => { - __reduce12(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 13 => { - __reduce13(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 14 => { - __reduce14(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<()>) - } - 15 => { - // __Main = Main => ActionFn(0); - let __sym0 = __pop_Variant6(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action0::<>(input, __sym0); - return Some(Ok(__nt)); - } - _ => panic!("invalid action code {}", __action) - }; - let __states_len = __states.len(); - __states.truncate(__states_len - __pop_states); - __symbols.push(__symbol); - let __state = *__states.last().unwrap() as usize; - let __next_state = __GOTO[__state * 12 + __nonterminal] - 1; - __states.push(__next_state); - None - } - fn __pop_Variant4< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, (Vec, Vec), usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant4(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant1< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, (u32, f64), usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant1(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant6< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, Filter, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant6(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant3< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, f64, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant3(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant7< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, i32, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant7(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant5< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, u32, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant5(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant2< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ::std::vec::Vec<(u32, f64)>, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant2(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant0< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, &'input str, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant0(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - pub(crate) fn __reduce1< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // (<(Integer Float)> ";") = Integer, Float, ";" => ActionFn(15); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant5(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2); - let __symbol = (__start, __Symbol::Variant1(__nt), __end); - (3, __symbol, 0) - } - pub(crate) fn __reduce2< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // (<(Integer Float)> ";")+ = Integer, Float, ";" => ActionFn(17); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant5(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action17::<>(input, __sym0, __sym1, __sym2); - let __symbol = (__start, __Symbol::Variant2(__nt), __end); - (3, __symbol, 1) - } - pub(crate) fn __reduce3< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // (<(Integer Float)> ";")+ = (<(Integer Float)> ";")+, Integer, Float, ";" => ActionFn(18); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant3(__symbols); - let __sym1 = __pop_Variant5(__symbols); - let __sym0 = __pop_Variant2(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym3.2.clone(); - let __nt = super::__action18::<>(input, __sym0, __sym1, __sym2, __sym3); - let __symbol = (__start, __Symbol::Variant2(__nt), __end); - (4, __symbol, 1) - } - pub(crate) fn __reduce4< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // (Integer Float) = Integer, Float => ActionFn(14); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant5(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action14::<>(input, __sym0, __sym1); - let __symbol = (__start, __Symbol::Variant1(__nt), __end); - (2, __symbol, 2) - } - pub(crate) fn __reduce5< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Decibel = Float, "dB" => ActionFn(4); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant3(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action4::<>(input, __sym0, __sym1); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (2, __symbol, 3) - } - pub(crate) fn __reduce6< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Eq = "GraphicEQ:", (<(Integer Float)> ";")+, Integer, Float => ActionFn(16); - let __sym3 = __pop_Variant3(__symbols); - let __sym2 = __pop_Variant5(__symbols); - let __sym1 = __pop_Variant2(__symbols); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym3.2.clone(); - let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2, __sym3); - let __symbol = (__start, __Symbol::Variant4(__nt), __end); - (4, __symbol, 4) - } - pub(crate) fn __reduce7< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Float = RawFloat => ActionFn(5); - let __sym0 = __pop_Variant3(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action5::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (1, __symbol, 5) - } - pub(crate) fn __reduce8< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Float = SignedInteger => ActionFn(6); - let __sym0 = __pop_Variant7(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action6::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (1, __symbol, 5) - } - pub(crate) fn __reduce9< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Float = Integer => ActionFn(7); - let __sym0 = __pop_Variant5(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action7::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (1, __symbol, 5) - } - pub(crate) fn __reduce10< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Integer = r#"[0-9]+"# => ActionFn(10); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action10::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant5(__nt), __end); - (1, __symbol, 6) - } - pub(crate) fn __reduce11< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Main = Preamp, Eq => ActionFn(1); - let __sym1 = __pop_Variant4(__symbols); - let __sym0 = __pop_Variant3(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action1::<>(input, __sym0, __sym1); - let __symbol = (__start, __Symbol::Variant6(__nt), __end); - (2, __symbol, 7) - } - pub(crate) fn __reduce12< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // Preamp = "Preamp:", Decibel => ActionFn(2); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action2::<>(input, __sym0, __sym1); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (2, __symbol, 8) - } - pub(crate) fn __reduce13< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // RawFloat = r#"-?[0-9]*\\.[0-9]+"# => ActionFn(8); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action8::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant3(__nt), __end); - (1, __symbol, 9) - } - pub(crate) fn __reduce14< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<()>, - ) -> (usize, (usize,__Symbol<'input>,usize), usize) - { - // SignedInteger = r#"-[0-9]+"# => ActionFn(9); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action9::<>(input, __sym0); - let __symbol = (__start, __Symbol::Variant7(__nt), __end); - (1, __symbol, 10) - } -} -pub use self::__parse__Main::MainParser; -#[cfg_attr(rustfmt, rustfmt_skip)] -mod __intern_token { - #![allow(unused_imports)] - use ::Filter; - use std::str::FromStr; - #[allow(unused_extern_crates)] - extern crate lalrpop_util as __lalrpop_util; - extern crate regex as __regex; - use std::fmt as __fmt; - - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub struct Token<'input>(pub usize, pub &'input str); - impl<'a> __fmt::Display for Token<'a> { - fn fmt(&self, formatter: &mut __fmt::Formatter) -> Result<(), __fmt::Error> { - __fmt::Display::fmt(self.1, formatter) - } - } - - pub struct __MatcherBuilder { - regex_set: __regex::RegexSet, - regex_vec: Vec<__regex::Regex>, - } - - impl __MatcherBuilder { - pub fn new() -> __MatcherBuilder { - let __strs: &[&str] = &[ - "^((?u:\\-)?(?u:[0-9])*(?u:\\.)(?u:[0-9])+)", - "^((?u:\\-)(?u:[0-9])+)", - "^((?u:[0-9])+)", - "^((?u:;))", - "^((?u:GraphicEQ:))", - "^((?u:Preamp:))", - "^((?u:dB))", - ]; - let __regex_set = __regex::RegexSet::new(__strs).unwrap(); - let __regex_vec = vec![ - __regex::Regex::new("^((?u:\\-)?(?u:[0-9])*(?u:\\.)(?u:[0-9])+)").unwrap(), - __regex::Regex::new("^((?u:\\-)(?u:[0-9])+)").unwrap(), - __regex::Regex::new("^((?u:[0-9])+)").unwrap(), - __regex::Regex::new("^((?u:;))").unwrap(), - __regex::Regex::new("^((?u:GraphicEQ:))").unwrap(), - __regex::Regex::new("^((?u:Preamp:))").unwrap(), - __regex::Regex::new("^((?u:dB))").unwrap(), - ]; - __MatcherBuilder { regex_set: __regex_set, regex_vec: __regex_vec } - } - pub fn matcher<'input, 'builder>(&'builder self, s: &'input str) -> __Matcher<'input, 'builder> { - __Matcher { - text: s, - consumed: 0, - regex_set: &self.regex_set, - regex_vec: &self.regex_vec, - } - } - } - - pub struct __Matcher<'input, 'builder> { - text: &'input str, - consumed: usize, - regex_set: &'builder __regex::RegexSet, - regex_vec: &'builder Vec<__regex::Regex>, - } - - impl<'input, 'builder> Iterator for __Matcher<'input, 'builder> { - type Item = Result<(usize, Token<'input>, usize), __lalrpop_util::ParseError,&'static str>>; - - fn next(&mut self) -> Option { - let __text = self.text.trim_left(); - let __whitespace = self.text.len() - __text.len(); - let __start_offset = self.consumed + __whitespace; - if __text.is_empty() { - self.text = __text; - self.consumed = __start_offset; - None - } else { - let __matches = self.regex_set.matches(__text); - if !__matches.matched_any() { - Some(Err(__lalrpop_util::ParseError::InvalidToken { - location: __start_offset, - })) - } else { - let mut __longest_match = 0; - let mut __index = 0; - for __i in 0 .. 7 { - if __matches.matched(__i) { - let __match = self.regex_vec[__i].find(__text).unwrap(); - let __len = __match.end(); - if __len >= __longest_match { - __longest_match = __len; - __index = __i; - } - } - } - let __result = &__text[..__longest_match]; - let __remaining = &__text[__longest_match..]; - let __end_offset = __start_offset + __longest_match; - self.text = __remaining; - self.consumed = __end_offset; - Some(Ok((__start_offset, Token(__index, __result), __end_offset))) - } - } - } - } -} -pub use self::__intern_token::Token; - -#[allow(unused_variables)] -fn __action0< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, Filter, usize), -) -> Filter -{ - (__0) -} - -#[allow(unused_variables)] -fn __action1< - 'input, ->( - input: &'input str, - (_, preamp, _): (usize, f64, usize), - (_, eq, _): (usize, (Vec, Vec), usize), -) -> Filter -{ - Filter { preamp, frequencies: eq.0, coefficients: eq.1 } -} - -#[allow(unused_variables)] -fn __action2< - 'input, ->( - input: &'input str, - (_, _, _): (usize, &'input str, usize), - (_, __0, _): (usize, f64, usize), -) -> f64 -{ - (__0) -} - -#[allow(unused_variables)] -fn __action3< - 'input, ->( - input: &'input str, - (_, _, _): (usize, &'input str, usize), - (_, values, _): (usize, ::std::vec::Vec<(u32, f64)>, usize), - (_, end, _): (usize, (u32, f64), usize), -) -> (Vec, Vec) -{ - { - let mut values = values; - values.push(end); - values.into_iter().unzip() - } -} - -#[allow(unused_variables)] -fn __action4< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, f64, usize), - (_, _, _): (usize, &'input str, usize), -) -> f64 -{ - (__0) -} - -#[allow(unused_variables)] -fn __action5< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, f64, usize), -) -> f64 -{ - (__0) -} - -#[allow(unused_variables)] -fn __action6< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, i32, usize), -) -> f64 -{ - __0 as f64 -} - -#[allow(unused_variables)] -fn __action7< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, u32, usize), -) -> f64 -{ - __0 as f64 -} - -#[allow(unused_variables)] -fn __action8< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, &'input str, usize), -) -> f64 -{ - f64::from_str(__0).unwrap() -} - -#[allow(unused_variables)] -fn __action9< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, &'input str, usize), -) -> i32 -{ - i32::from_str(__0).unwrap() -} - -#[allow(unused_variables)] -fn __action10< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, &'input str, usize), -) -> u32 -{ - u32::from_str(__0).unwrap() -} - -#[allow(unused_variables)] -fn __action11< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, (u32, f64), usize), -) -> ::std::vec::Vec<(u32, f64)> -{ - vec![__0] -} - -#[allow(unused_variables)] -fn __action12< - 'input, ->( - input: &'input str, - (_, v, _): (usize, ::std::vec::Vec<(u32, f64)>, usize), - (_, e, _): (usize, (u32, f64), usize), -) -> ::std::vec::Vec<(u32, f64)> -{ - { let mut v = v; v.push(e); v } -} - -#[allow(unused_variables)] -fn __action13< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, (u32, f64), usize), - (_, _, _): (usize, &'input str, usize), -) -> (u32, f64) -{ - (__0) -} - -#[allow(unused_variables)] -fn __action14< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, u32, usize), - (_, __1, _): (usize, f64, usize), -) -> (u32, f64) -{ - (__0, __1) -} - -#[allow(unused_variables)] -fn __action15< - 'input, ->( - input: &'input str, - __0: (usize, u32, usize), - __1: (usize, f64, usize), - __2: (usize, &'input str, usize), -) -> (u32, f64) -{ - let __start0 = __0.0.clone(); - let __end0 = __1.2.clone(); - let __temp0 = __action14( - input, - __0, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action13( - input, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -fn __action16< - 'input, ->( - input: &'input str, - __0: (usize, &'input str, usize), - __1: (usize, ::std::vec::Vec<(u32, f64)>, usize), - __2: (usize, u32, usize), - __3: (usize, f64, usize), -) -> (Vec, Vec) -{ - let __start0 = __2.0.clone(); - let __end0 = __3.2.clone(); - let __temp0 = __action14( - input, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action3( - input, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -fn __action17< - 'input, ->( - input: &'input str, - __0: (usize, u32, usize), - __1: (usize, f64, usize), - __2: (usize, &'input str, usize), -) -> ::std::vec::Vec<(u32, f64)> -{ - let __start0 = __0.0.clone(); - let __end0 = __2.2.clone(); - let __temp0 = __action15( - input, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action11( - input, - __temp0, - ) -} - -#[allow(unused_variables)] -fn __action18< - 'input, ->( - input: &'input str, - __0: (usize, ::std::vec::Vec<(u32, f64)>, usize), - __1: (usize, u32, usize), - __2: (usize, f64, usize), - __3: (usize, &'input str, usize), -) -> ::std::vec::Vec<(u32, f64)> -{ - let __start0 = __1.0.clone(); - let __end0 = __3.2.clone(); - let __temp0 = __action15( - input, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action12( - input, - __0, - __temp0, - ) -} - -pub trait __ToTriple<'input, > { - type Error; - fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize),Self::Error>; -} - -impl<'input, > __ToTriple<'input, > for (usize, Token<'input>, usize) { - type Error = &'static str; - fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize),&'static str> { - Ok(value) - } -} -impl<'input, > __ToTriple<'input, > for Result<(usize, Token<'input>, usize),&'static str> { - type Error = &'static str; - fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize),&'static str> { - value - } -} diff --git a/src/parsing/mod.rs b/src/parsing/mod.rs index 4454b04..99f7caa 100644 --- a/src/parsing/mod.rs +++ b/src/parsing/mod.rs @@ -1,5 +1,8 @@ -#[allow(clippy)] -pub mod equalizer_apo; +lalrpop_mod!( + #[allow(clippy)] + equalizer_apo, + "/parsing/equalizer_apo.rs" +); pub use self::equalizer_apo::MainParser as EqualizerApoParser; -- cgit v1.2.3