From a5e551d021508ca524a033575f81419451281bc5 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Fri, 19 Jul 2024 12:50:22 +0200 Subject: [PATCH 01/36] Implement starlark traits for `JValue` Guarded by `starlark` feature flag. --- crates/air-lib/interpreter-value/Cargo.toml | 1 + crates/air-lib/interpreter-value/src/lib.rs | 2 + .../air-lib/interpreter-value/src/starlark.rs | 97 +++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 crates/air-lib/interpreter-value/src/starlark.rs diff --git a/crates/air-lib/interpreter-value/Cargo.toml b/crates/air-lib/interpreter-value/Cargo.toml index 1c65dda76..130b3bd00 100644 --- a/crates/air-lib/interpreter-value/Cargo.toml +++ b/crates/air-lib/interpreter-value/Cargo.toml @@ -15,6 +15,7 @@ serde = { version = "1.0.195", features = ["rc"] } serde_json = "1.0.108" indexmap = { version = "2.1.0", optional = true } +starlark = { version = "0.12.0", optional = true } [dev-dependencies] maplit = "1.0.2" diff --git a/crates/air-lib/interpreter-value/src/lib.rs b/crates/air-lib/interpreter-value/src/lib.rs index b64ac11da..20c200e2a 100644 --- a/crates/air-lib/interpreter-value/src/lib.rs +++ b/crates/air-lib/interpreter-value/src/lib.rs @@ -63,6 +63,8 @@ macro_rules! tri { } mod value; +#[cfg(feature = "starlark")] +mod starlark; pub use value::JValue; diff --git a/crates/air-lib/interpreter-value/src/starlark.rs b/crates/air-lib/interpreter-value/src/starlark.rs new file mode 100644 index 000000000..e97a40749 --- /dev/null +++ b/crates/air-lib/interpreter-value/src/starlark.rs @@ -0,0 +1,97 @@ +/* + * AquaVM Workflow Engine + * + * Copyright (C) 2024 Fluence DAO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +use starlark::typing::Ty; +use starlark::values::dict::AllocDict; +use starlark::values::type_repr::StarlarkTypeRepr; +use starlark::values::AllocFrozenValue; +use starlark::values::AllocValue; +use starlark::values::FrozenValue; +use starlark::values::Value; + +use crate::JValue; + +impl<'a> StarlarkTypeRepr for &'a JValue { + fn starlark_type_repr() -> Ty { + // Any Value. + Value::starlark_type_repr() + } +} + +impl StarlarkTypeRepr for JValue { + fn starlark_type_repr() -> Ty { + // Any Value. + Value::starlark_type_repr() + } +} + +impl<'v, 'a> AllocValue<'v> for &'a JValue { + fn alloc_value(self, heap: &'v starlark::values::Heap) -> Value<'v> { + match self { + JValue::Null => Value::new_none(), + JValue::Bool(b) => Value::new_bool(*b), + JValue::Number(n) => heap.alloc(n), + JValue::String(s) => heap.alloc(&**s), + JValue::Array(a) => heap.alloc(&**a), + JValue::Object(m) => { + // Starlark cannot handle Rc, get rid of it + let compatible_iter = m.iter().map(|(k, v)| (&**k, v)); + heap.alloc(AllocDict(compatible_iter)) + } + } + } +} + +impl<'v, 'a> AllocFrozenValue for &'a JValue { + fn alloc_frozen_value( + self, + heap: &starlark::values::FrozenHeap, + ) -> starlark::values::FrozenValue { + match self { + JValue::Null => FrozenValue::new_none(), + JValue::Bool(b) => FrozenValue::new_bool(*b), + JValue::Number(n) => heap.alloc(n), + JValue::String(s) => heap.alloc(&**s), + JValue::Array(a) => heap.alloc(&**a), + JValue::Object(m) => { + // Starlark cannot handle Rc, get rid of it + let compatible_iter = m.iter().map(|(k, v)| (&**k, v)); + heap.alloc(AllocDict(compatible_iter)) + } + } + } +} + +impl<'heap> TryInto for starlark::values::Value<'heap> { + type Error = starlark::Error; + + fn try_into(self) -> Result { + // TODO fix double allocation: + // unfortunately, Starlark `Value` is opaque and cannot be + // converted to JValue directly; but it implements serde::Serialize through + // `erased_serde` crate + // + // we might try to implement our version of `serde_json::to_value` + // + // first allocation: allocate a serde_json::Value + let value = self.to_json_value()?; + // second allocation: and then allocate JValue + Ok(value.into()) + } +} From 38cd002f18625a2e8d272fd7a0c998054b24a05e Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Fri, 19 Jul 2024 17:45:30 +0200 Subject: [PATCH 02/36] Implement interpreter invocation --- Cargo.lock | 481 +++++++++++++++++- Cargo.toml | 1 + .../air-lib/interpreter-starlark/Cargo.toml | 21 + .../air-lib/interpreter-starlark/src/lib.rs | 176 +++++++ .../interpreter-starlark/src/tetraplet.rs | 114 +++++ 5 files changed, 769 insertions(+), 24 deletions(-) create mode 100644 crates/air-lib/interpreter-starlark/Cargo.toml create mode 100644 crates/air-lib/interpreter-starlark/src/lib.rs create mode 100644 crates/air-lib/interpreter-starlark/src/tetraplet.rs diff --git a/Cargo.lock b/Cargo.lock index 15c700ddb..0dc564561 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,6 +7,10 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] [[package]] name = "addr2line" @@ -176,6 +180,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "air-interpreter-starlark" +version = "0.1.0" +dependencies = [ + "air-interpreter-value", + "allocative", + "anyhow", + "polyplets", + "serde", + "serde_json", + "starlark", +] + [[package]] name = "air-interpreter-value" version = "0.1.0" @@ -184,6 +201,7 @@ dependencies = [ "maplit", "serde", "serde_json", + "starlark", ] [[package]] @@ -201,8 +219,8 @@ version = "0.1.0" dependencies = [ "air-lambda-ast", "itertools", - "lalrpop", - "lalrpop-util", + "lalrpop 0.20.0", + "lalrpop-util 0.20.0", "regex", "serde", "thiserror", @@ -284,6 +302,36 @@ dependencies = [ name = "air-utils" version = "0.3.0" +[[package]] +name = "allocative" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "082af274fd02beef17b7f0725a49ecafe6c075ef56cac9d6363eb3916a9817ae" +dependencies = [ + "allocative_derive", + "bumpalo", + "ctor", + "hashbrown 0.14.3", + "num-bigint 0.4.4", +] + +[[package]] +name = "allocative_derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe233a377643e0fc1a56421d7c90acdec45c291b30345eb9f08e8d0ddce5a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "ambient-authority" version = "0.0.2" @@ -311,6 +359,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" +[[package]] +name = "annotate-snippets" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" +dependencies = [ + "unicode-width", +] + [[package]] name = "ansi_term" version = "0.11.0" @@ -370,9 +427,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquavm-air" @@ -466,8 +523,8 @@ dependencies = [ "codespan-reporting", "criterion 0.5.1", "itertools", - "lalrpop", - "lalrpop-util", + "lalrpop 0.20.0", + "lalrpop-util 0.20.0", "multimap 0.9.1", "non-empty-vec", "regex", @@ -783,6 +840,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" + [[package]] name = "bimap" version = "0.6.3" @@ -1340,6 +1403,23 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "cmp_any" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9b18233253483ce2f65329a24072ec414db782531bdbb7d0bbc4bd2ce6b7e21" + [[package]] name = "codespan" version = "0.11.1" @@ -1661,7 +1741,7 @@ dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset", + "memoffset 0.9.0", ] [[package]] @@ -1871,6 +1951,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "debugserver-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf6834a70ed14e8e4e41882df27190bea150f1f6ecf461f1033f8739cd8af4a" +dependencies = [ + "schemafy", + "serde", + "serde_json", +] + [[package]] name = "der" version = "0.7.8" @@ -2018,6 +2109,36 @@ dependencies = [ "winapi", ] +[[package]] +name = "display_container" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a110a75c96bedec8e65823dea00a1d710288b7a369d95fd8a0f5127639466fa" +dependencies = [ + "either", + "indenter", +] + +[[package]] +name = "dupe" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f73b0ec8a0206a0aa8cfd70f10adae48bdfe4b01663a5a5a37e2e48fa16a2705" +dependencies = [ + "dupe_derive", +] + +[[package]] +name = "dupe_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e7d0f888ea556a80f971cda6c897ce90ae0e7673fc1602eb2e9b86734e68768" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "easy-ext" version = "0.2.9" @@ -2097,6 +2218,12 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + [[package]] name = "env_logger" version = "0.7.1" @@ -2116,6 +2243,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.3.8" @@ -2126,6 +2262,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -2223,6 +2369,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fd-lock" +version = "3.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" +dependencies = [ + "cfg-if 1.0.0", + "rustix 0.38.28", + "windows-sys 0.48.0", +] + [[package]] name = "fd-lock" version = "4.0.1" @@ -2651,6 +2808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.9", + "allocator-api2", ] [[package]] @@ -2905,6 +3063,12 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + [[package]] name = "io-extras" version = "0.18.1" @@ -3064,6 +3228,28 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "lalrpop" +version = "0.19.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools", + "lalrpop-util 0.19.12", + "petgraph", + "regex", + "regex-syntax 0.6.29", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + [[package]] name = "lalrpop" version = "0.20.0" @@ -3076,7 +3262,7 @@ dependencies = [ "ena", "is-terminal", "itertools", - "lalrpop-util", + "lalrpop-util 0.20.0", "petgraph", "pico-args", "regex", @@ -3087,6 +3273,15 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "lalrpop-util" +version = "0.19.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +dependencies = [ + "regex", +] + [[package]] name = "lalrpop-util" version = "0.20.0" @@ -3234,6 +3429,42 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "logos" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf8b031682c67a8e3d5446840f9573eb7fe26efe7ec8d195c9ac4c0647c502f1" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d849148dbaf9661a6151d1ca82b13bb4c4c128146a88d05253b38d4e2f496c" +dependencies = [ + "beef", + "fnv", + "proc-macro2", + "quote", + "regex-syntax 0.6.29", + "syn 1.0.109", +] + +[[package]] +name = "lsp-types" +version = "0.94.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" +dependencies = [ + "bitflags 1.3.2", + "serde", + "serde_json", + "serde_repr", + "url", +] + [[package]] name = "mach" version = "0.3.2" @@ -3671,6 +3902,15 @@ dependencies = [ "rustix 0.38.28", ] +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -4125,6 +4365,26 @@ dependencies = [ "rustc_version 0.1.7", ] +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if 1.0.0", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -4167,10 +4427,15 @@ dependencies = [ ] [[package]] -name = "num-conv" -version = "0.1.0" +name = "num-bigint" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] [[package]] name = "num-integer" @@ -4189,7 +4454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.3.3", "num-integer", "num-traits", "serde", @@ -4718,6 +4983,16 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + [[package]] name = "rand" version = "0.7.3" @@ -5140,6 +5415,29 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rustyline" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfc8644681285d1fb67a467fb3021bfea306b99b4146b166a1fe3ada965eece" +dependencies = [ + "bitflags 1.3.2", + "cfg-if 1.0.0", + "clipboard-win", + "dirs-next", + "fd-lock 3.0.13", + "libc", + "log", + "memchr", + "nix", + "radix_trie", + "scopeguard", + "unicode-segmentation", + "unicode-width", + "utf8parse", + "winapi", +] + [[package]] name = "ryu" version = "1.0.16" @@ -5170,6 +5468,48 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "schemafy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aea5ba40287dae331f2c48b64dbc8138541f5e97ee8793caa7948c1f31d86d5" +dependencies = [ + "Inflector", + "schemafy_core", + "schemafy_lib", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "syn 1.0.109", +] + +[[package]] +name = "schemafy_core" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41781ae092f4fd52c9287efb74456aea0d3b90032d2ecad272bd14dbbcb0511b" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "schemafy_lib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e953db32579999ca98c451d80801b6f6a7ecba6127196c5387ec0774c528befa" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "schemafy_core", + "serde", + "serde_derive", + "serde_json", + "syn 1.0.109", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -5280,9 +5620,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -5325,7 +5665,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.36", + "time 0.3.30", ] [[package]] @@ -5531,12 +5871,107 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "starlark" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419b088f6fe8393b8b2525d57f32e240ff07ab49e39f0afe3c8a5372bb94a823" +dependencies = [ + "allocative", + "anyhow", + "bumpalo", + "cmp_any", + "debugserver-types", + "derivative", + "derive_more", + "display_container", + "dupe", + "either", + "erased-serde", + "hashbrown 0.14.3", + "inventory", + "itertools", + "maplit", + "memoffset 0.6.5", + "num-bigint 0.4.4", + "num-traits", + "once_cell", + "paste", + "regex", + "rustyline", + "serde", + "serde_json", + "starlark_derive", + "starlark_map", + "starlark_syntax", + "static_assertions", + "strsim", + "textwrap", + "thiserror", +] + +[[package]] +name = "starlark_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8407ca86174f600acfc8b7e0576058bb866a19521b92f9590fa2bcf1c8c807" +dependencies = [ + "dupe", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "starlark_map" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e03678553f5f0ce473a7a9064fc7bf2c1fa5013eb605c95d09896e3eacbacc5" +dependencies = [ + "allocative", + "dupe", + "equivalent", + "fxhash", + "hashbrown 0.14.3", + "serde", +] + +[[package]] +name = "starlark_syntax" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ae4c126dbc9702fae89fb2460f06b0f562e7de1351ab545591a27e9528afa2f" +dependencies = [ + "allocative", + "annotate-snippets", + "anyhow", + "derivative", + "derive_more", + "dupe", + "lalrpop 0.19.12", + "lalrpop-util 0.19.12", + "logos", + "lsp-types", + "memchr", + "num-bigint 0.4.4", + "num-traits", + "once_cell", + "starlark_map", + "thiserror", +] + [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "string_cache" version = "0.8.7" @@ -5692,7 +6127,7 @@ dependencies = [ "bitflags 2.4.1", "cap-fs-ext", "cap-std", - "fd-lock", + "fd-lock 4.0.1", "io-lifetimes 2.0.3", "rustix 0.38.28", "windows-sys 0.52.0", @@ -5807,13 +6242,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", - "num-conv", "powerfmt", "serde", "time-core", @@ -5828,11 +6262,10 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ - "num-conv", "time-core", ] @@ -6035,7 +6468,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.36", + "time 0.3.30", "tracing", "tracing-core", "tracing-serde", @@ -6712,7 +7145,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", + "memoffset 0.9.0", "paste", "rand 0.8.5", "rustix 0.38.28", diff --git a/Cargo.toml b/Cargo.toml index d7ee350b9..3010d7494 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ members = [ "crates/air-lib/interpreter-interface", "crates/air-lib/interpreter-sede", "crates/air-lib/interpreter-signatures", + "crates/air-lib/interpreter-starlark", "crates/air-lib/interpreter-value", "crates/air-lib/lambda/ast", "crates/air-lib/lambda/parser", diff --git a/crates/air-lib/interpreter-starlark/Cargo.toml b/crates/air-lib/interpreter-starlark/Cargo.toml new file mode 100644 index 000000000..a42743101 --- /dev/null +++ b/crates/air-lib/interpreter-starlark/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "air-interpreter-starlark" +description = "Interfacing for executing Starlark scripts from AquaVM" +authors = ["Fluence DAO", "Cloudless Labs"] +license = "AGPL-3.0-only" +version = "0.1.0" +edition = "2021" +documentation = "https://docs.rs/air-interpreter-starlark" +repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-starlark" +keywords = ["fluence", "air", "programming-language"] +categories = ["wasm"] + +[dependencies] +allocative = "0.3.3" +anyhow = "1.0.86" +polyplets = { version = "0.7.0", path = "../polyplets" } +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.120" +starlark = "0.12.0" + +air-interpreter-value = { version = "0.1.0", path = "../interpreter-value", features = ["starlark"] } diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs new file mode 100644 index 000000000..71dee98ba --- /dev/null +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -0,0 +1,176 @@ +/* + * AquaVM Workflow Engine + * + * Copyright (C) 2024 Fluence DAO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +mod tetraplet; + +use std::cell::RefCell; +use std::rc::Rc; + +use air_interpreter_value::JValue; +use polyplets::SecurityTetraplet; +use starlark::any::ProvidesStaticType; +use starlark::environment::Globals; +use starlark::environment::GlobalsBuilder; +use starlark::environment::LibraryExtension; +use starlark::environment::Module; +use starlark::eval::Evaluator; +use starlark::starlark_module; +use starlark::syntax::AstModule; +use starlark::syntax::Dialect; +use starlark::values::typing::StarlarkNever; +use starlark::values::Value; + +use crate::tetraplet::StarlarkSecurityTetraplet; + +const ERROR_STARLARK_OTHER: i32 = 42; + +pub fn execute( + content: &str, + args: &[(JValue, Rc)], +) -> starlark::Result { + // unfortunately, + // 1. AstModule is not clonable + // 2. AstModule is consumed on evaluation + // + // for that reason, we have to parse the script on each invocation + let ast: AstModule = AstModule::parse("dummy.star", content.to_owned(), &Dialect::Standard)?; + + // we create a `Globals`, defining the standard library functions available; + // the `standard` function uses those defined in the Starlark specification + let globals: Globals = GlobalsBuilder::extended_by(&[ + LibraryExtension::Typing, + LibraryExtension::Json, + LibraryExtension::RecordType, + ]) + // override `fail` and and add `get_value`/`get_tetraplet` + .with(aquavm_module) + .build(); + + // We create a `Module`, which stores the global variables for our calculation. + let module: Module = Module::new(); + + let mut ctx = StarlarkCtx::default(); + ctx.args = args.to_owned(); + + // We create an evaluator, which controls how evaluation occurs. + let mut eval: Evaluator = Evaluator::new(&module); + eval.extra = Some(&ctx as _); + + // And finally we evaluate the code using the evaluator. + let res: Result = eval.eval_module(ast, &globals); + match res { + Ok(val) => { + println!("val: {val}"); + ctx.clear_error(); + val.try_into() + } + Err(err) => { + use starlark::ErrorKind::*; + match err.kind() { + Fail(e) => { + // the error is set by aquavm_module's `fail` function + println!("fail: {ctx:?} / {e:#?}"); + } + Other(e) => { + eprintln!("Other: {e}"); + ctx.set_error(ERROR_STARLARK_OTHER, e.to_string()); + } + e => todo!("AquaVM uncatchable error: {:?}", e), + } + Err(err) + } + } +} + +// `ProvidesStaticType` is alternative to manually implementing AnyLifetime trait +// (in this case, it is derived automatically) +#[derive(Debug, Default, ProvidesStaticType)] +struct StarlarkCtx { + error: RefCell>, + args: Vec<(JValue, Rc)>, +} + +impl StarlarkCtx { + fn set_error(&self, code: i32, message: String) { + let mut guard = self.error.borrow_mut(); + *guard = Some((code, message)); + } + + fn clear_error(&self) { + *self.error.borrow_mut() = None; + } +} + +#[starlark_module] +fn aquavm_module(builder: &mut GlobalsBuilder) { + fn fail( + code: i32, + message: String, + eval: &mut Evaluator<'_, '_>, + ) -> starlark::Result { + let ctx = eval + .extra + .expect("misconfigured starlark evaluator: `extra` expected"); + + let ctx: &StarlarkCtx = ctx + .downcast_ref() + .expect("misconfigured starlark evaluator: `extra` of type Ctx expected"); + + let error = anyhow::anyhow!("{}: {}", code, message); + ctx.set_error(code, message); + // we use `ErrorKind::Fail` to signal about our overridden `fail` call. + // perhaps, `ErrorKind::Other` should be used instead. + Err(starlark::Error::new(starlark::ErrorKind::Fail(error))) + } + + fn get_value<'v>(index: usize, eval: &mut Evaluator<'v, '_>) -> anyhow::Result> { + let ctx = eval + .extra + .expect("misconfigured starlark evaluator: `extra` expected"); + + let ctx: &StarlarkCtx = ctx + .downcast_ref() + .expect("misconfigured starlark evaluator: `extra` of type Ctx expected"); + + let heap = eval.heap(); + match ctx.args.get(index) { + Some((ref value, _tetraplet)) => Ok(heap.alloc(value)), + None => anyhow::bail!("value index {index} not valid"), + } + } + + fn get_tetraplet<'v>(index: usize, eval: &mut Evaluator<'v, '_>) -> anyhow::Result> { + let ctx = eval + .extra + .expect("misconfigured starlark evaluator: `extra` expected"); + + let ctx: &StarlarkCtx = ctx + .downcast_ref() + .expect("misconfigured starlark evaluator: `extra` of type Ctx expected"); + + let heap = eval.heap(); + match ctx.args.get(index) { + Some((_value, ref tetraplet)) => Ok(heap.alloc(StarlarkSecurityTetraplet::new( + tetraplet, + eval.frozen_heap(), + ))), + None => anyhow::bail!("value index {index} not valid"), + } + } +} diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs new file mode 100644 index 000000000..6b838172c --- /dev/null +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -0,0 +1,114 @@ +use polyplets::SecurityTetraplet; +use starlark::typing::Ty; +use starlark::values::type_repr::StarlarkTypeRepr; +use starlark::values::{ + starlark_value, AllocValue, FrozenHeap, FrozenStringValue, Heap, StarlarkValue, Value, + ValueLike, +}; + +#[derive( + Debug, + Clone, + PartialEq, + Hash, + ::allocative::Allocative, + ::serde::Serialize, + ::starlark::any::ProvidesStaticType, +)] +pub(crate) struct StarlarkSecurityTetraplet { + /// Id of a peer where corresponding value was set. + peer_pk: FrozenStringValue, + + /// Id of a service that set corresponding value. + service_id: FrozenStringValue, + + /// Name of a function that returned corresponding value. + function_name: FrozenStringValue, + + /// Value was produced by applying this `lens` to the output from `call_service`. + lens: FrozenStringValue, +} + +impl StarlarkSecurityTetraplet { + pub(crate) fn new(source: &SecurityTetraplet, heap: &FrozenHeap) -> Self { + // TODO peer_pk, service_id and function_name may be repeated several times + // and worth to be cached. + // + // but lens is generally unique, except shortest strings that are not worth caching. + // + // N.B. Starlark has pub(crate) fn alloc_string_intern + let peer_pk = heap.alloc_str(&source.peer_pk); + let service_id = heap.alloc_str(&source.service_id); + let function_name = heap.alloc_str(&source.function_name); + let lens = heap.alloc_str(&source.lens); + + StarlarkSecurityTetraplet { + peer_pk, + service_id, + function_name, + lens, + } + } +} + +#[starlark_value(type = "SecurityTetraplet", UnpackValue, StarlarkTypeRepr)] +impl<'v> StarlarkValue<'v> for StarlarkSecurityTetraplet { + type Canonical = Self; + + #[inline] + fn equals(&self, other: Value<'v>) -> starlark::Result { + match other.downcast_ref::() { + Some(other_tetraplet) => Ok(self == other_tetraplet), + None => Ok(false), + } + } + + // field access + fn get_attr(&self, attribute: &str, _heap: &'v Heap) -> Option> { + match attribute { + // TODO check that to_value doesn't clone full string content (write or find test that checks heap size) + // TODO heap is not used, but a Value is returned: it probably means that + // the shared string is simply wrapped by a Value + "peer_pk" => Some(self.peer_pk.to_value()), + "service_id" => Some(self.service_id.to_value()), + "function_name" => Some(self.function_name.to_value()), + "lens" => Some(self.lens.to_value()), + _ => None, + } + } + + // field type + fn attr_ty(name: &str) -> Option { + match name { + "peer_pk" | "service_id" | "function_name" | "lens" => { + Some(FrozenStringValue::starlark_type_repr()) + } + _ => None, + } + } +} + +impl<'v> AllocValue<'v> for StarlarkSecurityTetraplet { + #[inline] + fn alloc_value(self, heap: &'v Heap) -> Value<'v> { + heap.alloc_simple(self) + } +} + +use std::fmt; + +impl fmt::Display for StarlarkSecurityTetraplet { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let type_name = Self::TYPE; + write!( + f, + "{}(peer_pk={:?}, service_id={:?}, function_name={:?}, lens={:?})", + type_name, + self.peer_pk.as_str(), + self.service_id.as_str(), + self.function_name.as_str(), + self.lens.as_str(), + ) + } +} From 6d209ca4b42a070e13cfceb634a4a97376698dd0 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Mon, 22 Jul 2024 12:22:09 +0200 Subject: [PATCH 03/36] TODO catchable --- crates/air-lib/interpreter-starlark/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 71dee98ba..838b156a9 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -170,6 +170,7 @@ fn aquavm_module(builder: &mut GlobalsBuilder) { tetraplet, eval.frozen_heap(), ))), + // TODO is it a catchable error? None => anyhow::bail!("value index {index} not valid"), } } From 2727fe5530431f728c56c6967a3254948e74c6ef Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 23 Jul 2024 13:49:53 +0200 Subject: [PATCH 04/36] Add Starlark tetraplet and value tests --- .../air-lib/interpreter-starlark/src/lib.rs | 37 ++++++ .../interpreter-starlark/src/tetraplet.rs | 115 ++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 838b156a9..774e9dac1 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -175,3 +175,40 @@ fn aquavm_module(builder: &mut GlobalsBuilder) { } } } + +#[cfg(test)] +mod tests { + use serde_json::json; + + use super::*; + + #[test] + fn test_value() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value: JValue = json!({ + "test": 42, + "property": null, + }) + .into(); + let script = "get_value(0)"; + + let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); + assert_eq!(res, value); + } + + #[test] + fn test_value2() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value: JValue = json!({ + "test": 42, + "property": null, + }) + .into(); + let script = r#"get_value(0)["property"]"#; + + let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); + assert_eq!(res, JValue::Null); + } +} diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index 6b838172c..e916b9084 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -112,3 +112,118 @@ impl fmt::Display for StarlarkSecurityTetraplet { ) } } + +#[cfg(test)] +mod tests { + use air_interpreter_value::JValue; + use serde_json::json; + + use crate::execute; + + use super::*; + + #[test] + fn test_tetraplet_peer_pk() { + let tetraplet = + SecurityTetraplet::new("my_peer", "service_id", "function_name", ".$.lens").into(); + let value = json!(42).into(); + let script = "get_tetraplet(0).peer_pk"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, "my_peer"); + } + + #[test] + fn test_tetraplet_service_id() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value = json!(42).into(); + let script = "get_tetraplet(0).service_id"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, "my_service"); + } + #[test] + fn test_tetraplet_function_name() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value = json!(42).into(); + let script = "get_tetraplet(0).function_name"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, "my_func"); + } + + #[test] + fn test_tetraplet_lens() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value = json!(42).into(); + let script = "get_tetraplet(0).lens"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, ".$.lens"); + } + + #[test] + fn test_tetraplet_equals_copy() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value = json!(42).into(); + let script = "get_tetraplet(0) == get_tetraplet(0)"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, true); + } + + #[test] + fn test_tetraplet_equals_self() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value = json!(42).into(); + let script = "tet = get_tetraplet(0) +tet == tet"; + + let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + assert_eq!(res, true); + } + + #[test] + fn test_tetraplet_same() { + let tetraplet1 = SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens"); + let tetraplet2: SecurityTetraplet = tetraplet1.clone(); + let value: JValue = json!(42).into(); + let script = "tet = get_tetraplet(0) +tet == tet"; + + let res = execute( + script, + &[ + (value.clone(), tetraplet1.into()), + (value.clone(), tetraplet2.into()), + ][..], + ) + .unwrap(); + assert_eq!(res, true); + } + + #[test] + fn test_tetraplet_different() { + // TODO it worth variating fields + let tetraplet1 = + SecurityTetraplet::new("my_peer1", "my_service1", "my_func1", ".$.lens1").into(); + let tetraplet2 = + SecurityTetraplet::new("my_peer2", "my_service2", "my_func2", ".$.lens2").into(); + let value: JValue = json!(42).into(); + let script = "tet1 = get_tetraplet(0) +tet2 = get_tetraplet(1) +tet1 == tet2"; + + let res = execute( + script, + &[(value.clone(), tetraplet1), (value.clone(), tetraplet2)][..], + ) + .unwrap(); + assert_eq!(res, false); + } +} From 7d788e7c5ddb9641f8e779274b1fd5a6eb3ce575 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 23 Jul 2024 23:26:51 +0200 Subject: [PATCH 05/36] Arrange Starlark error handling Make it more compatible with AquaVM approach --- Cargo.lock | 9 +- .../air-lib/interpreter-starlark/Cargo.toml | 1 + .../air-lib/interpreter-starlark/src/lib.rs | 102 ++++++++++++------ .../interpreter-starlark/src/tetraplet.rs | 18 ++-- 4 files changed, 88 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0dc564561..9a91f4dfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -191,6 +191,7 @@ dependencies = [ "serde", "serde_json", "starlark", + "thiserror", ] [[package]] @@ -6201,18 +6202,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", diff --git a/crates/air-lib/interpreter-starlark/Cargo.toml b/crates/air-lib/interpreter-starlark/Cargo.toml index a42743101..478a13d08 100644 --- a/crates/air-lib/interpreter-starlark/Cargo.toml +++ b/crates/air-lib/interpreter-starlark/Cargo.toml @@ -19,3 +19,4 @@ serde_json = "1.0.120" starlark = "0.12.0" air-interpreter-value = { version = "0.1.0", path = "../interpreter-value", features = ["starlark"] } +thiserror = "1.0.63" diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 774e9dac1..d6579959b 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -38,18 +38,52 @@ use starlark::values::Value; use crate::tetraplet::StarlarkSecurityTetraplet; -const ERROR_STARLARK_OTHER: i32 = 42; +#[derive(thiserror::Error, Debug)] +pub enum ExecutionError { + #[error("Starlark value: {0}")] + Value(String), + #[error("Starlark function: {0}")] + Function(String), + // Should be a uncatchable error as it is broken script + #[error("Starlark scope: {0}")] + Scope(String), + // Should be a uncatchable error as it is broken script + #[error("Starlark lexer: {0}")] + Lexer(String), + // Should be a uncatchable error + #[error("Starlark internal: {0}")] + Internal(String), + #[error("Starlark other: {0}")] + Other(String), +} + +impl ExecutionError { + fn from_parser_error(err: starlark::Error) -> Self { + use starlark::ErrorKind::*; + match err.kind() { + Fail(_) => unreachable!("Starlark parser is not expected to produce a Fail error"), + Value(err) => Self::Value(err.to_string()), + Function(err) => Self::Function(err.to_string()), + Scope(err) => Self::Scope(err.to_string()), + Lexer(err) => Self::Lexer(err.to_string()), + Internal(err) => Self::Internal(err.to_string()), + Other(err) => Self::Other(err.to_string()), + _ => Self::Other(err.to_string()), + } + } +} pub fn execute( content: &str, args: &[(JValue, Rc)], -) -> starlark::Result { +) -> Result, ExecutionError> { // unfortunately, // 1. AstModule is not clonable // 2. AstModule is consumed on evaluation // // for that reason, we have to parse the script on each invocation - let ast: AstModule = AstModule::parse("dummy.star", content.to_owned(), &Dialect::Standard)?; + let ast: AstModule = AstModule::parse("dummy.star", content.to_owned(), &Dialect::Standard) + .map_err(ExecutionError::from_parser_error)?; // we create a `Globals`, defining the standard library functions available; // the `standard` function uses those defined in the Starlark specification @@ -65,35 +99,40 @@ pub fn execute( // We create a `Module`, which stores the global variables for our calculation. let module: Module = Module::new(); - let mut ctx = StarlarkCtx::default(); - ctx.args = args.to_owned(); + let ctx = StarlarkCtx::new(args.to_owned()); - // We create an evaluator, which controls how evaluation occurs. - let mut eval: Evaluator = Evaluator::new(&module); - eval.extra = Some(&ctx as _); + let res: Result = { + // We create an evaluator, which controls how evaluation occurs. + let mut eval: Evaluator = Evaluator::new(&module); + eval.extra = Some(&ctx as _); - // And finally we evaluate the code using the evaluator. - let res: Result = eval.eval_module(ast, &globals); - match res { - Ok(val) => { - println!("val: {val}"); - ctx.clear_error(); - val.try_into() - } + // And finally we evaluate the code using the evaluator. + eval.eval_module(ast, &globals) + }; + + // TODO TryInto may fail if `starlark::Value` serialization to `serde_json::Value` fails + match res.and_then(TryInto::::try_into) { + Ok(val) => Ok(Ok(val)), Err(err) => { use starlark::ErrorKind::*; match err.kind() { - Fail(e) => { + Fail(_e) => { // the error is set by aquavm_module's `fail` function - println!("fail: {ctx:?} / {e:#?}"); + // n.b.: `_e` is an opaque object, for that reason we use `Ctx` to get error's code and message + Ok(Err(ctx + .error + .into_inner() + // TODO does Starlark std library ever calls fail? + .expect("Starlark Ctx error is empty"))) } - Other(e) => { - eprintln!("Other: {e}"); - ctx.set_error(ERROR_STARLARK_OTHER, e.to_string()); - } - e => todo!("AquaVM uncatchable error: {:?}", e), + Value(_) => Err(ExecutionError::Value(err.to_string())), + Function(_) => Err(ExecutionError::Function(err.to_string())), + Scope(_) => Err(ExecutionError::Scope(err.to_string())), + Lexer(_) => Err(ExecutionError::Scope(err.to_string())), + Internal(_) => Err(ExecutionError::Scope(err.to_string())), + Other(_) => Err(ExecutionError::Scope(err.to_string())), + _ => Err(ExecutionError::Scope(err.to_string())), // explicitly matches with the previous one } - Err(err) } } } @@ -107,14 +146,17 @@ struct StarlarkCtx { } impl StarlarkCtx { + fn new(args: Vec<(JValue, Rc)>) -> Self { + Self { + error: <_>::default(), + args, + } + } + fn set_error(&self, code: i32, message: String) { let mut guard = self.error.borrow_mut(); *guard = Some((code, message)); } - - fn clear_error(&self) { - *self.error.borrow_mut() = None; - } } #[starlark_module] @@ -194,7 +236,7 @@ mod tests { let script = "get_value(0)"; let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); - assert_eq!(res, value); + assert_eq!(res, Ok(value)); } #[test] @@ -209,6 +251,6 @@ mod tests { let script = r#"get_value(0)["property"]"#; let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); - assert_eq!(res, JValue::Null); + assert_eq!(res, Ok(JValue::Null)); } } diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index e916b9084..f97720eee 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -129,7 +129,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).peer_pk"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, "my_peer"); } @@ -140,7 +140,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).service_id"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, "my_service"); } #[test] @@ -150,7 +150,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).function_name"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, "my_func"); } @@ -161,7 +161,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).lens"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, ".$.lens"); } @@ -172,7 +172,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0) == get_tetraplet(0)"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, true); } @@ -184,7 +184,7 @@ mod tests { let script = "tet = get_tetraplet(0) tet == tet"; - let res = execute(script, &[(value, tetraplet)][..]).unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); assert_eq!(res, true); } @@ -201,8 +201,9 @@ tet == tet"; &[ (value.clone(), tetraplet1.into()), (value.clone(), tetraplet2.into()), - ][..], + ], ) + .unwrap() .unwrap(); assert_eq!(res, true); } @@ -221,8 +222,9 @@ tet1 == tet2"; let res = execute( script, - &[(value.clone(), tetraplet1), (value.clone(), tetraplet2)][..], + &[(value.clone(), tetraplet1), (value.clone(), tetraplet2)], ) + .unwrap() .unwrap(); assert_eq!(res, false); } From 5fb484617b7435d1151c67d30cc4d821238d0578 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 24 Jul 2024 12:17:19 +0200 Subject: [PATCH 06/36] Simplify returning error Make `Fail` one of variants of the `ExecutionResult`, not a nested result. --- crates/air-lib/interpreter-starlark/src/lib.rs | 18 +++++++++--------- .../interpreter-starlark/src/tetraplet.rs | 14 ++++++-------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index d6579959b..9a9fcd6b4 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -40,6 +40,8 @@ use crate::tetraplet::StarlarkSecurityTetraplet; #[derive(thiserror::Error, Debug)] pub enum ExecutionError { + #[error("Starlark fail: {0}, {1}")] + Fail(i32, String), #[error("Starlark value: {0}")] Value(String), #[error("Starlark function: {0}")] @@ -76,7 +78,7 @@ impl ExecutionError { pub fn execute( content: &str, args: &[(JValue, Rc)], -) -> Result, ExecutionError> { +) -> Result { // unfortunately, // 1. AstModule is not clonable // 2. AstModule is consumed on evaluation @@ -112,18 +114,16 @@ pub fn execute( // TODO TryInto may fail if `starlark::Value` serialization to `serde_json::Value` fails match res.and_then(TryInto::::try_into) { - Ok(val) => Ok(Ok(val)), + Ok(val) => Ok(val), Err(err) => { use starlark::ErrorKind::*; match err.kind() { Fail(_e) => { // the error is set by aquavm_module's `fail` function // n.b.: `_e` is an opaque object, for that reason we use `Ctx` to get error's code and message - Ok(Err(ctx - .error - .into_inner() - // TODO does Starlark std library ever calls fail? - .expect("Starlark Ctx error is empty"))) + let (code, message) = + ctx.error.into_inner().expect("Starlark Ctx error is empty"); + Err(ExecutionError::Fail(code, message)) } Value(_) => Err(ExecutionError::Value(err.to_string())), Function(_) => Err(ExecutionError::Function(err.to_string())), @@ -236,7 +236,7 @@ mod tests { let script = "get_value(0)"; let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); - assert_eq!(res, Ok(value)); + assert_eq!(res, value); } #[test] @@ -251,6 +251,6 @@ mod tests { let script = r#"get_value(0)["property"]"#; let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); - assert_eq!(res, Ok(JValue::Null)); + assert_eq!(res, JValue::Null); } } diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index f97720eee..8999c5733 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -129,7 +129,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).peer_pk"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, "my_peer"); } @@ -140,7 +140,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).service_id"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, "my_service"); } #[test] @@ -150,7 +150,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).function_name"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, "my_func"); } @@ -161,7 +161,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0).lens"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, ".$.lens"); } @@ -172,7 +172,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0) == get_tetraplet(0)"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, true); } @@ -184,7 +184,7 @@ mod tests { let script = "tet = get_tetraplet(0) tet == tet"; - let res = execute(script, &[(value, tetraplet)]).unwrap().unwrap(); + let res = execute(script, &[(value, tetraplet)]).unwrap(); assert_eq!(res, true); } @@ -203,7 +203,6 @@ tet == tet"; (value.clone(), tetraplet2.into()), ], ) - .unwrap() .unwrap(); assert_eq!(res, true); } @@ -224,7 +223,6 @@ tet1 == tet2"; script, &[(value.clone(), tetraplet1), (value.clone(), tetraplet2)], ) - .unwrap() .unwrap(); assert_eq!(res, false); } From 322101655f61cdd239761cbcf17da9ef705d02c7 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 25 Jul 2024 17:49:14 +0200 Subject: [PATCH 07/36] Add an embedded script support to AIR lexer Everything between `(#` and `#)` is considered an embedded script. The script itself is not analyzed. --- .../air-parser/src/parser/lexer/air_lexer.rs | 41 +++++++++++++++++-- .../air-parser/src/parser/lexer/errors.rs | 8 ++++ .../air-parser/src/parser/lexer/tests.rs | 21 ++++++++++ .../air-parser/src/parser/lexer/token.rs | 1 + 4 files changed, 68 insertions(+), 3 deletions(-) diff --git a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs index bd3d0bb91..035b37694 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs @@ -48,10 +48,10 @@ impl<'input> AIRLexer<'input> { } pub fn next_token(&mut self) -> Option, AirPos, LexerError>> { - while let Some((start_pos, ch)) = self.chars.next() { + while let Some((start_pos, ch)) = dbg!(self.chars.next()) { let start_pos = AirPos::from(start_pos); match ch { - '(' => return Some(Ok((start_pos, Token::OpenRoundBracket, start_pos + 1))), + '(' => return self.bracket_or_embedded_script(start_pos), ')' => return Some(Ok((start_pos, Token::CloseRoundBracket, start_pos + 1))), '[' => return Some(Ok((start_pos, Token::OpenSquareBracket, start_pos + 1))), @@ -70,6 +70,18 @@ impl<'input> AIRLexer<'input> { None } + fn bracket_or_embedded_script( + &mut self, + start_pos: AirPos, + ) -> Option, AirPos, LexerError>> { + if let Some((_, '#')) = dbg!(self.chars.peek()) { + self.chars.next(); + self.embedded_script(start_pos) + } else { + Some(Ok((start_pos, Token::OpenRoundBracket, start_pos + 1))) + } + } + fn skip_comment(&mut self) { const NEW_LINE: char = '\n'; // TODO: consider '\n\r' @@ -103,7 +115,6 @@ impl<'input> AIRLexer<'input> { start_pos..self.input.len().into(), ))) } - #[allow(clippy::unnecessary_wraps)] fn tokenize_string( &mut self, @@ -124,6 +135,30 @@ impl<'input> AIRLexer<'input> { Some(Ok((start_pos, token, start_pos + token_str_len))) } + fn embedded_script( + &mut self, + start_pos: AirPos, + ) -> Option, AirPos, LexerError>> { + while let Some((pos, ch)) = dbg!(self.chars.next()) { + // TODO consider ```...``` for the scripts + if ch == '#' { + if let Some((_, ')')) = dbg!(self.chars.peek()) { + self.chars.next(); + let string_size = AirPos::from(pos) - start_pos + 2; + return Some(Ok(( + start_pos, + Token::EmbeddedScript(&self.input[(start_pos + 2).into()..pos]), + start_pos + string_size, + ))); + } + } + } + + Some(Err(LexerError::unclosed_embedded( + start_pos..self.input.len().into(), + ))) + } + fn advance_to_token_end(&mut self, start_pos: AirPos, square_met: bool) -> AirPos { let mut end_pos = start_pos; let mut round_brackets_balance: i64 = 0; diff --git a/crates/air-lib/air-parser/src/parser/lexer/errors.rs b/crates/air-lib/air-parser/src/parser/lexer/errors.rs index 5aee225ad..a10ce2d3d 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/errors.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/errors.rs @@ -73,6 +73,9 @@ pub enum LexerError { #[error("leading dot without any symbols before - please write 0 if it's float or variable name if it's a lambda")] LeadingDot(Span), + + #[error("this embedded program has not terminating sequence")] + UnclosedEmbedded(Span), } impl LexerError { @@ -92,6 +95,7 @@ impl LexerError { Self::LastErrorPathError { span, .. } => span, Self::TooBigFloat(span) => span, Self::LeadingDot(span) => span, + Self::UnclosedEmbedded(span) => span, }; *span @@ -161,6 +165,10 @@ impl LexerError { pub fn leading_dot(range: Range) -> Self { Self::LeadingDot(range.into()) } + + pub fn unclosed_embedded(range: Range) -> Self { + Self::UnclosedEmbedded(range.into()) + } } use super::Token; diff --git a/crates/air-lib/air-parser/src/parser/lexer/tests.rs b/crates/air-lib/air-parser/src/parser/lexer/tests.rs index a61ab3a94..479896245 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/tests.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/tests.rs @@ -717,3 +717,24 @@ fn stream_map_lambda_scalar_accessor() { ))]), ); } + +#[test] +fn embedded_script_normal() { + lexer_test( + r#")"str"(# ("test")#)("#, + All(vec![ + Ok((0.into(), Token::CloseRoundBracket, 1.into())), + Ok((1.into(), Token::StringLiteral(r#"str"#), 6.into())), + Ok((6.into(), Token::EmbeddedScript(r#" ("test")"#), 19.into())), + Ok((19.into(), Token::OpenRoundBracket, 20.into())), + ]), + ); +} + +#[test] +fn embedded_script_unclosed() { + lexer_test( + r#")(#("test")()"#, + One(1, Err(LexerError::unclosed_embedded(1.into()..13.into()))), + ); +} diff --git a/crates/air-lib/air-parser/src/parser/lexer/token.rs b/crates/air-lib/air-parser/src/parser/lexer/token.rs index f8cd537e9..acf991533 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/token.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/token.rs @@ -78,6 +78,7 @@ pub enum Token<'input> { }, StringLiteral(&'input str), + EmbeddedScript(&'input str), I64(i64), F64(f64), Boolean(bool), From 224c5eeae70aa63746bff7812910ff25f247b0cc Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 25 Jul 2024 23:16:07 +0200 Subject: [PATCH 08/36] Add `embed` syntax to AIR parser --- air/src/execution_step/instructions/embed.rs | 31 + air/src/execution_step/instructions/mod.rs | 2 + .../src/ast/instruction_arguments.rs | 8 + .../src/ast/instruction_arguments/impls.rs | 7 + .../src/ast/instruction_arguments/traits.rs | 11 + .../air-parser/src/ast/instructions.rs | 9 + .../air-parser/src/ast/instructions/impls.rs | 14 + .../air-parser/src/ast/instructions/traits.rs | 13 +- .../air-lib/air-parser/src/parser/air.lalrpop | 15 + crates/air-lib/air-parser/src/parser/air.rs | 2849 ++++++++++------- .../air-parser/src/parser/lexer/air_lexer.rs | 2 + .../air-parser/src/parser/lexer/token.rs | 1 + crates/beautifier/src/beautifier.rs | 16 + 13 files changed, 1785 insertions(+), 1193 deletions(-) create mode 100644 air/src/execution_step/instructions/embed.rs diff --git a/air/src/execution_step/instructions/embed.rs b/air/src/execution_step/instructions/embed.rs new file mode 100644 index 000000000..a20911339 --- /dev/null +++ b/air/src/execution_step/instructions/embed.rs @@ -0,0 +1,31 @@ +/* + * AquaVM Workflow Engine + * + * Copyright (C) 2024 Fluence DAO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +use air_parser::ast::Embed; + +use super::ExecutableInstruction; +use super::ExecutionCtx; +use super::ExecutionResult; +use super::TraceHandler; + +impl<'i> ExecutableInstruction<'i> for Embed<'i> { + fn execute(&self, _exec_ctx: &mut ExecutionCtx<'i>, _trace_ctx: &mut TraceHandler) -> ExecutionResult<()> { + todo!() + } +} diff --git a/air/src/execution_step/instructions/mod.rs b/air/src/execution_step/instructions/mod.rs index d8bf9bb9e..7af8cd833 100644 --- a/air/src/execution_step/instructions/mod.rs +++ b/air/src/execution_step/instructions/mod.rs @@ -25,6 +25,7 @@ mod canon_map; mod canon_stream_map_scalar; mod canon_utils; mod compare_matchable; +mod embed; mod fail; mod fold; mod fold_scalar; @@ -95,6 +96,7 @@ impl<'i> ExecutableInstruction<'i> for Instruction<'i> { Instruction::Xor(xor) => execute!(self, xor, exec_ctx, trace_ctx), Instruction::Match(match_) => execute!(self, match_, exec_ctx, trace_ctx), Instruction::MisMatch(mismatch) => execute!(self, mismatch, exec_ctx, trace_ctx), + Instruction::Embed(embed) => execute!(self, embed, exec_ctx, trace_ctx), Instruction::Error => unreachable!("should not execute if parsing succeeded. QED."), } diff --git a/crates/air-lib/air-parser/src/ast/instruction_arguments.rs b/crates/air-lib/air-parser/src/ast/instruction_arguments.rs index bb3b793e2..52d558297 100644 --- a/crates/air-lib/air-parser/src/ast/instruction_arguments.rs +++ b/crates/air-lib/air-parser/src/ast/instruction_arguments.rs @@ -167,3 +167,11 @@ pub enum NewArgument<'i> { #[serde(borrow)] CanonStreamMap(CanonStreamMap<'i>), } + +#[derive(Serialize, Debug, PartialEq, Eq, Clone, Default)] +pub enum EmbedOutputValue<'i> { + #[serde(borrow)] + Scalar(Scalar<'i>), + #[default] + None, +} diff --git a/crates/air-lib/air-parser/src/ast/instruction_arguments/impls.rs b/crates/air-lib/air-parser/src/ast/instruction_arguments/impls.rs index bdcf6ea5e..852cc37cf 100644 --- a/crates/air-lib/air-parser/src/ast/instruction_arguments/impls.rs +++ b/crates/air-lib/air-parser/src/ast/instruction_arguments/impls.rs @@ -19,6 +19,7 @@ use super::ApResult; use super::CallOutputValue; +use super::EmbedOutputValue; use super::NewArgument; use super::Scalar; use super::Stream; @@ -62,3 +63,9 @@ impl<'i> CallOutputValue<'i> { Self::Stream(Stream { name, position }) } } + +impl<'i> EmbedOutputValue<'i> { + pub fn scalar(name: &'i str, position: AirPos) -> Self { + Self::Scalar(Scalar { name, position }) + } +} diff --git a/crates/air-lib/air-parser/src/ast/instruction_arguments/traits.rs b/crates/air-lib/air-parser/src/ast/instruction_arguments/traits.rs index cfa6b6f6e..88343c821 100644 --- a/crates/air-lib/air-parser/src/ast/instruction_arguments/traits.rs +++ b/crates/air-lib/air-parser/src/ast/instruction_arguments/traits.rs @@ -179,6 +179,17 @@ impl fmt::Display for FoldScalarIterable<'_> { } } +impl fmt::Display for EmbedOutputValue<'_> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use EmbedOutputValue::*; + + match self { + Scalar(scalar) => write!(f, "{scalar}"), + None => Ok(()), + } + } +} + impl From for serde_json::Value { fn from(number: Number) -> Self { (&number).into() diff --git a/crates/air-lib/air-parser/src/ast/instructions.rs b/crates/air-lib/air-parser/src/ast/instructions.rs index 9c134c704..fa3391286 100644 --- a/crates/air-lib/air-parser/src/ast/instructions.rs +++ b/crates/air-lib/air-parser/src/ast/instructions.rs @@ -50,6 +50,7 @@ pub enum Instruction<'i> { Next(Box>), Null(Null), Error, + Embed(Box>), } /// (call (peer part of a triplet: PeerPart) (function part of a triplet: FunctionPart) [arguments] output) @@ -205,3 +206,11 @@ pub struct Null; pub trait PeerIDErrorLogable { fn log_errors_with_peer_id(&self) -> bool; } + +/// (embed [arguments] (# script #) output) +#[derive(Serialize, Debug, PartialEq)] +pub struct Embed<'i> { + pub args: Rc>>, + pub script: &'i str, + pub output: EmbedOutputValue<'i>, +} diff --git a/crates/air-lib/air-parser/src/ast/instructions/impls.rs b/crates/air-lib/air-parser/src/ast/instructions/impls.rs index 8d36aaef3..79d9495b7 100644 --- a/crates/air-lib/air-parser/src/ast/instructions/impls.rs +++ b/crates/air-lib/air-parser/src/ast/instructions/impls.rs @@ -203,3 +203,17 @@ impl<'i> New<'i> { } } } + +impl<'i> Embed<'i> { + pub fn new( + args: Rc>>, + script: &'i str, + output: EmbedOutputValue<'i>, + ) -> Self { + Self { + args, + script, + output, + } + } +} diff --git a/crates/air-lib/air-parser/src/ast/instructions/traits.rs b/crates/air-lib/air-parser/src/ast/instructions/traits.rs index 869230984..0b5abe1b3 100644 --- a/crates/air-lib/air-parser/src/ast/instructions/traits.rs +++ b/crates/air-lib/air-parser/src/ast/instructions/traits.rs @@ -46,6 +46,7 @@ impl fmt::Display for Instruction<'_> { New(new) => write!(f, "{new}"), Null(null) => write!(f, "{null}"), Error => write!(f, "error"), + Embed(embed) => write!(f, "{embed}"), } } } @@ -191,6 +192,15 @@ impl fmt::Display for New<'_> { } } +impl fmt::Display for Embed<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + use itertools::Itertools; + + let args = self.args.iter().map(|arg| format!("{arg}")).join(" "); + write!(f, "embed [{}] (#{}#) {}", args, self.script, self.output) + } +} + macro_rules! peer_id_error_logable { ($($t:ty),+) => { $( @@ -234,5 +244,6 @@ no_peer_id_error_logable!( Never, Next<'_>, New<'_>, - Null + Null, + Embed<'_> ); diff --git a/crates/air-lib/air-parser/src/parser/air.lalrpop b/crates/air-lib/air-parser/src/parser/air.lalrpop index 09f191a23..8cda7a610 100644 --- a/crates/air-lib/air-parser/src/parser/air.lalrpop +++ b/crates/air-lib/air-parser/src/parser/air.lalrpop @@ -175,6 +175,15 @@ Instr: Instruction<'input> = { Instruction::MisMatch(mismatch.into()) }, + "(" embed ")" => { + let args = Rc::new(args); + let output = output.unwrap_or(EmbedOutputValue::None); + let embed = Embed::new(args, script, output); + let span = Span::new(left, right); + + Instruction::Embed(embed.into()) + }, + ! => { errors.push(<>); Instruction::Error }, } @@ -208,6 +217,10 @@ CallOutput: CallOutputValue<'input> = { => CallOutputValue::stream(stream.0, stream.1), }; +EmbedOutput: EmbedOutputValue<'input> = { + => EmbedOutputValue::scalar(scalar.0, scalar.1), +}; + FailBody: Fail<'input> = { => Fail::Scalar(Scalar::new(scalar.0, scalar.1)), => Fail::ScalarWithLambda(ScalarWithLambda::new(scalar.0, scalar.1, scalar.2)), @@ -345,6 +358,7 @@ extern { CanonStreamMapWithLambda => Token::CanonStreamMapWithLambda {name: <&'input str>, lambda:>, position: }, Literal => Token::StringLiteral(<&'input str>), + EmbeddedScript => Token::EmbeddedScript(<&'input str>), I64 => Token::I64(), F64 => Token::F64(), Boolean => Token::Boolean(), @@ -371,5 +385,6 @@ extern { null => Token::Null, match_ => Token::Match, mismatch => Token::MisMatch, + embed => Token::Embed, } } diff --git a/crates/air-lib/air-parser/src/parser/air.rs b/crates/air-lib/air-parser/src/parser/air.rs index 06cdcd4a5..782bc70b5 100644 --- a/crates/air-lib/air-parser/src/parser/air.rs +++ b/crates/air-lib/air-parser/src/parser/air.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.20.0" -// sha3: 074d8a0fdc394c3f63b6ccce743bbf683f56b3746be671af5294a676960dc2ac +// sha3: 2570f46a3405c50e2c3c3bffe2a6eb22ee625326123629245297453e9c271512 use crate::ast::*; use crate::parser::ParserError; use crate::parser::VariableValidator; @@ -41,10 +41,10 @@ mod __parse__AIR { Variant1(bool), Variant2((&'input str, AirPos)), Variant3((&'input str, LambdaAST<'input>, AirPos)), - Variant4(LambdaAST<'input>), - Variant5(f64), - Variant6(i64), - Variant7(&'input str), + Variant4(&'input str), + Variant5(LambdaAST<'input>), + Variant6(f64), + Variant7(i64), Variant8(__lalrpop_util::ErrorRecovery, ParserError>), Variant9(ImmutableValue<'input>), Variant10(alloc::vec::Vec>), @@ -57,384 +57,400 @@ mod __parse__AIR { Variant17(core::option::Option>), Variant18(CanonStream<'input>), Variant19(CanonStreamMap<'input>), - Variant20(Fail<'input>), - Variant21(FoldScalarIterable<'input>), - Variant22(ResolvableToStringVariable<'input>), - Variant23(core::option::Option>), - Variant24(NewArgument<'input>), - Variant25(Number), - Variant26(ResolvableToPeerIdVariable<'input>), - Variant27(Stream<'input>), - Variant28(StreamMap<'input>), - Variant29(StreamMapKeyClause<'input>), - Variant30(Triplet<'input>), + Variant20(EmbedOutputValue<'input>), + Variant21(core::option::Option>), + Variant22(Fail<'input>), + Variant23(FoldScalarIterable<'input>), + Variant24(ResolvableToStringVariable<'input>), + Variant25(core::option::Option>), + Variant26(NewArgument<'input>), + Variant27(Number), + Variant28(ResolvableToPeerIdVariable<'input>), + Variant29(Stream<'input>), + Variant30(StreamMap<'input>), + Variant31(StreamMapKeyClause<'input>), + Variant32(Triplet<'input>), } const __ACTION: &[i16] = &[ // State 0 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 1 - 14, 0, 47, 0, 48, 49, 0, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 49, 0, 50, 51, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 2 - 0, 0, 0, 0, 0, 0, 0, 66, 67, 0, 0, 0, 0, 68, 0, 0, 69, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 68, 69, 0, 0, 0, 0, 0, 70, 0, 0, 71, 72, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 3 - 0, 0, 0, 0, 0, 0, 0, 66, 67, 0, 0, 0, 0, 68, 0, 0, 69, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 68, 69, 0, 0, 0, 0, 0, 70, 0, 0, 71, 72, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 4 - 0, 0, 0, 0, 0, 0, 0, 0, 73, 74, 0, 0, 75, 0, 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 5 - 0, 0, 80, 0, 0, 81, 82, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 85, 86, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 77, 0, 0, 78, 0, 79, 0, 0, 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 6 - 0, 0, 89, 0, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 0, 0, 84, 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 88, 89, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 7 - 0, 0, 89, 0, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 8 - 0, 0, 0, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 109, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0,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 0, 0, 116, 0, 0, 0, 117, 0, 0, 0, 118, 119, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 14 - 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 0, 0, 0, 120, 0, 0, 0, 121, 122, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 15 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 16 - 0, 0, 89, 0, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 17 - 0, 0, 89, 0, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 129, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 18 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 19 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 20 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 21 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 22 - 0, 0, 47, 0, 48, 49, 0, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 23 - 0, 0, 0, 0, 0, 0, 0, 136, 137, 0, 0, 0, 0, 0, 0, 0, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 24 - 0, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 0, 50, 51, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 25 - 0, 0, 89, 147, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 142, 143, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 0, 0, 92, 160, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 31 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 32 - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 33 - 0, 0, 0, 0, 0, 0, 0, 136, 137, 0, 0, 0, 0, 0, 0, 0, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 34 - 0, 0, 89, 164, 90, 91, 92, 93, 94, 95, 96, 54, 55, 97, 98, 99, 100, 101, 102, 0, 0, 103, 104, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -24, 0, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 52 - 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 53 - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 0, -81, -81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -81, + 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 54 - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, 0, -80, -80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -80, + 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 55 - 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -86, -86, -86, -86, -86, -86, -86, -86, -86, 0, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 0, -86, -86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86, // State 56 - 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -85, -85, -85, -85, -85, -85, -85, -85, -85, 0, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, 0, -85, -85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -85, // State 57 - 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 58 - 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 59 - 0, -20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -20, 0, -20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 86 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 87 - -111, 0, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 0, 0, -111, -111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -111, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 88 - 0, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 89 - -112, 0, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 0, 0, -112, -112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 90 - -116, 0, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 0, 0, -116, -116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, + -116, 0, -116, -116, -116, -116, -116, -116, -116, 0, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 0, 0, -116, -116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, // State 91 - -118, 0, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 0, 0, -118, -118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, + 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 92 - -119, 0, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 0, 0, -119, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -119, + -117, 0, -117, -117, -117, -117, -117, -117, -117, 0, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 0, 0, -117, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, // State 93 - -117, 0, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 0, 0, -117, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, + -121, 0, -121, -121, -121, -121, -121, -121, -121, 0, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 0, 0, -121, -121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -121, // State 94 - -106, 0, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 0, 0, -106, -106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -106, + -123, 0, -123, -123, -123, -123, -123, -123, -123, 0, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 0, 0, -123, -123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -123, // State 95 - -107, 0, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, 0, 0, -107, -107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -107, + -124, 0, -124, -124, -124, -124, -124, -124, -124, 0, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 0, 0, -124, -124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -124, // State 96 - -103, 0, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 0, 0, -103, -103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -103, + -122, 0, -122, -122, -122, -122, -122, -122, -122, 0, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, // State 97 - -104, 0, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 0, 0, -104, -104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -104, + -111, 0, -111, -111, -111, -111, -111, -111, -111, 0, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 0, 0, -111, -111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -111, // State 98 - -105, 0, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 0, 0, -105, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -105, + -112, 0, -112, -112, -112, -112, -112, -112, -112, 0, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 0, 0, -112, -112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112, // State 99 - -108, 0, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 0, 0, -108, -108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -108, + -108, 0, -108, -108, -108, -108, -108, -108, -108, 0, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 0, 0, -108, -108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -108, // State 100 - -114, 0, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 0, 0, -114, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -114, + -109, 0, -109, -109, -109, -109, -109, -109, -109, 0, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 0, 0, -109, -109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -109, // State 101 - -115, 0, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 0, 0, -115, -115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, + -110, 0, -110, -110, -110, -110, -110, -110, -110, 0, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 0, 0, -110, -110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -110, // State 102 - -110, 0, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 0, 0, -110, -110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -110, + -113, 0, -113, -113, -113, -113, -113, -113, -113, 0, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 0, 0, -113, -113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -113, // State 103 - -109, 0, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 0, 0, -109, -109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -109, + -119, 0, -119, -119, -119, -119, -119, -119, -119, 0, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 0, 0, -119, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -119, // State 104 - -58, -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, + -120, 0, -120, -120, -120, -120, -120, -120, -120, 0, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 0, 0, -120, -120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -120, // State 105 - -78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -78, + -115, 0, -115, -115, -115, -115, -115, -115, -115, 0, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 0, 0, -115, -115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, // State 106 - -79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -79, + -114, 0, -114, -114, -114, -114, -114, -114, -114, 0, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 0, 0, -114, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -114, // State 107 - -75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -75, + -61, -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -61, // State 108 - -76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -76, + -83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -83, // State 109 - -77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -77, + -84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -84, // State 110 - 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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-101, -101, 0, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 0, 0, -101, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 116 - 0, 0, -98, 0, -98, -98, 0, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 0, 0, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 117 - 0, 0, -97, 0, -97, -97, 0, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 0, 0, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 118 - 0, 0, -99, 0, -99, -99, 0, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, 0, 0, -99, -99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -106, 0, -106, -106, 0, -106, -106, 0, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 0, 0, -106, -106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 119 - 0, 0, -100, 0, -100, -100, 0, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 0, 0, -100, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -103, 0, -103, -103, 0, -103, -103, 0, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 0, 0, -103, -103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 120 - 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -102, 0, -102, -102, 0, -102, -102, 0, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 0, 0, -102, -102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 121 - 0, 0, 0, 0, 0, -95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -104, 0, -104, -104, 0, -104, -104, 0, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 0, 0, -104, -104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 122 - 0, 0, 0, 0, 0, 0, -96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -105, 0, -105, -105, 0, -105, -105, 0, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 0, 0, -105, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 123 - -61, -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -61, + 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 124 - 0, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 125 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 126 - -113, 0, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 0, 0, -113, -113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -113, + 0, 0, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 127 - 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -27, -27, -27, -27, -27, -27, -27, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -54, + -118, 0, -118, -118, -118, -118, -118, -118, -118, 0, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 0, 0, -118, -118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, // State 133 - 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 134 - 0, 0, 0, 0, 0, 0, 0, -94, -94, 0, 0, 0, 0, 0, 0, 0, -94, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -71, -71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -71, // State 135 - 0, -93, 0, 0, 0, 0, 0, -93, -93, 0, 0, 0, 0, 0, 0, 0, -93, -93, -93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 136 - 0, -92, 0, 0, 0, 0, 0, -92, -92, 0, 0, 0, 0, 0, 0, 0, -92, -92, -92, 0, 0, 0, 0, 0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0, 0, -99, -99, 0, 0, 0, 0, 0, 0, 0, 0, -99, -99, -99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 141 - -50, -50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -50, + 0, -98, 0, 0, 0, 0, 0, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, -98, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 142 - 0, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -97, 0, 0, 0, 0, 0, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, -97, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 143 - 0, -31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -94, 0, 0, 0, 0, 0, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, -94, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 144 - 0, 0, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -95, 0, 0, 0, 0, 0, -95, -95, 0, 0, 0, 0, 0, 0, 0, 0, -95, -95, -95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 145 - 0, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -96, 0, 0, 0, 0, 0, -96, -96, 0, 0, 0, 0, 0, 0, 0, 0, -96, -96, -96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 146 - 0, -28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28, 0, -28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 147 - 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -53, -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -53, // State 148 - 0, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 149 - 0, 166, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 162 - 0, 0, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, 0, -5, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -63, -63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -63, // State 163 - 0, -29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -29, 0, -29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -60, -60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -60, // State 164 - -51, -51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -51, + -59, -59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -59, // State 165 - -52, -52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -52, + -72, -72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -72, // State 166 - -53, -53, 0,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 0, 0, 0, -65, + // State 185 + -67, -67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -67, + // State 186 + -69, -69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -69, + // State 187 + -58, -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, ]; fn __action(state: i16, integer: usize) -> i16 { - __ACTION[(state as usize) * 38 + integer] + __ACTION[(state as usize) * 40 + integer] } const __EOF_ACTION: &[i16] = &[ // State 0 @@ -514,17 +530,17 @@ mod __parse__AIR { // State 37 0, // State 38 - -120, + 0, // State 39 - -8, - // State 40 0, + // State 40 + -125, // State 41 - -72, + -8, // State 42 0, // State 43 - 0, + -77, // State 44 0, // State 45 @@ -646,13 +662,13 @@ mod __parse__AIR { // State 103 0, // State 104 - -58, + 0, // State 105 0, // State 106 0, // State 107 - 0, + -61, // State 108 0, // State 109 @@ -660,13 +676,13 @@ mod __parse__AIR { // State 110 0, // State 111 - -59, + 0, // State 112 0, // State 113 0, // State 114 - 0, + -62, // State 115 0, // State 116 @@ -684,7 +700,7 @@ mod __parse__AIR { // State 122 0, // State 123 - -61, + 0, // State 124 0, // State 125 @@ -694,19 +710,19 @@ mod __parse__AIR { // State 127 0, // State 128 - -68, - // State 129 0, + // State 129 + -64, // State 130 0, // State 131 0, // State 132 - -54, + 0, // State 133 0, // State 134 - 0, + -71, // State 135 0, // State 136 @@ -714,13 +730,13 @@ mod __parse__AIR { // State 137 0, // State 138 - 0, + -57, // State 139 0, // State 140 0, // State 141 - -50, + 0, // State 142 0, // State 143 @@ -732,7 +748,7 @@ mod __parse__AIR { // State 146 0, // State 147 - 0, + -53, // State 148 0, // State 149 @@ -746,13 +762,13 @@ mod __parse__AIR { // State 153 0, // State 154 - -60, + 0, // State 155 - -57, + 0, // State 156 - -56, + -76, // State 157 - -69, + 0, // State 158 0, // State 159 @@ -760,109 +776,127 @@ mod __parse__AIR { // State 160 0, // State 161 - -49, - // State 162 0, + // State 162 + -63, // State 163 - 0, + -60, // State 164 - -51, + -59, // State 165 - -52, + -72, // State 166 - -53, + 0, // State 167 0, // State 168 - -63, - // State 169 0, + // State 169 + -52, // State 170 - -65, + -54, // State 171 - 0, + -55, // State 172 - -67, + -56, // State 173 - -70, + -75, // State 174 - -71, - // State 175 0, + // State 175 + -66, // State 176 0, // State 177 - -62, + -68, // State 178 - -64, + 0, // State 179 - -66, + -70, // State 180 - -55, + -73, + // State 181 + -74, + // State 182 + 0, + // State 183 + 0, + // State 184 + -65, + // State 185 + -67, + // State 186 + -69, + // State 187 + -58, ]; fn __goto(state: i16, nt: usize) -> i16 { match nt { - 2 => 34, - 5 => 38, + 2 => 30, + 5 => 40, 6 => match state { - 22 => 133, - _ => 12, + 24 => 139, + _ => 13, }, - 7 => 112, + 7 => 115, 8 => match state { - 34 => 162, - _ => 144, + 30 => 158, + _ => 126, }, - 9 => 24, - 10 => 140, - 12 => 147, - 13 => 149, - 14 => 71, - 15 => 78, - 16 => 159, - 17 => match state { - 10 => 20, - 11 => 21, - 28 => 35, - 29 => 36, - 30 => 37, - 0 => 39, - 18 => 127, - 19 => 129, - 20 => 130, - 21 => 131, - 31 => 152, - 32 => 153, - 35 => 167, - 36 => 169, - 37 => 171, - _ => 19, + 9 => match state { + 4 => 73, + _ => 26, }, - 19 => 18, - 20 => match state { - 1 | 22 => 45, - _ => 87, + 10 => 146, + 12 => 150, + 13 => 152, + 14 => 155, + 16 => 74, + 17 => 81, + 18 => 167, + 19 => match state { + 11 => 22, + 12 => 23, + 31 => 37, + 32 => 38, + 33 => 39, + 0 => 41, + 20 => 133, + 21 => 135, + 22 => 136, + 23 => 137, + 34 => 160, + 35 => 161, + 37 => 174, + 38 => 176, + 39 => 178, + _ => 21, }, - 21 => 63, + 21 => 20, 22 => match state { - 2 => 64, - _ => 15, + 1 | 24 => 47, + _ => 90, + }, + 23 => 65, + 24 => match state { + 2 => 66, + _ => 16, }, - 23 => match state { - 33 => 160, - _ => 134, + 25 => match state { + 36 => 168, + _ => 140, }, - 24 => 33, - 25 => 26, - 26 => 27, - 27 => 22, - 28 => 14, - 29 => match state { - 6 => 16, - 7 => 17, - 16 => 31, - 17 => 32, - _ => 145, + 26 => 36, + 27 => 27, + 28 => 28, + 29 => 24, + 30 => 15, + 31 => match state { + 7 => 18, + 8 => 19, + 18 => 34, + 19 => 35, + _ => 127, }, _ => 0, } @@ -877,6 +911,7 @@ mod __parse__AIR { r###"CanonStreamMap"###, r###"CanonStreamMapWithLambda"###, r###"CanonStreamWithLambda"###, + r###"EmbeddedScript"###, r###"Error"###, r###"ErrorWithLambda"###, r###"F64"###, @@ -894,6 +929,7 @@ mod __parse__AIR { r###"ap"###, r###"call"###, r###"canon"###, + r###"embed"###, r###"fail"###, r###"fold"###, r###"match_"###, @@ -980,7 +1016,7 @@ mod __parse__AIR { #[inline] fn error_action(&self, state: i16) -> i16 { - __action(state, 38 - 1) + __action(state, 40 - 1) } #[inline] @@ -1060,34 +1096,36 @@ mod __parse__AIR { Token::CanonStreamMap { name: _, position: _ } if true => Some(6), Token::CanonStreamMapWithLambda { name: _, lambda: _, position: _ } if true => Some(7), Token::CanonStreamWithLambda { name: _, lambda: _, position: _ } if true => Some(8), - Token::Error if true => Some(9), - Token::ErrorWithLambda(_) if true => Some(10), - Token::F64(_) if true => Some(11), - Token::I64(_) if true => Some(12), - Token::InitPeerId if true => Some(13), - Token::LastError if true => Some(14), - Token::LastErrorWithLambda(_) if true => Some(15), - Token::StringLiteral(_) if true => Some(16), - Token::Scalar { name: _, position: _ } if true => Some(17), - Token::ScalarWithLambda { name: _, lambda: _, position: _ } if true => Some(18), - Token::Stream { name: _, position: _ } if true => Some(19), - Token::StreamMap { name: _, position: _ } if true => Some(20), - Token::TTL if true => Some(21), - Token::Timestamp if true => Some(22), - Token::Ap if true => Some(23), - Token::Call if true => Some(24), - Token::Canon if true => Some(25), - Token::Fail if true => Some(26), - Token::Fold if true => Some(27), - Token::Match if true => Some(28), - Token::MisMatch if true => Some(29), - Token::Never if true => Some(30), - Token::New if true => Some(31), - Token::Next if true => Some(32), - Token::Null if true => Some(33), - Token::Par if true => Some(34), - Token::Seq if true => Some(35), - Token::Xor if true => Some(36), + Token::EmbeddedScript(_) if true => Some(9), + Token::Error if true => Some(10), + Token::ErrorWithLambda(_) if true => Some(11), + Token::F64(_) if true => Some(12), + Token::I64(_) if true => Some(13), + Token::InitPeerId if true => Some(14), + Token::LastError if true => Some(15), + Token::LastErrorWithLambda(_) if true => Some(16), + Token::StringLiteral(_) if true => Some(17), + Token::Scalar { name: _, position: _ } if true => Some(18), + Token::ScalarWithLambda { name: _, lambda: _, position: _ } if true => Some(19), + Token::Stream { name: _, position: _ } if true => Some(20), + Token::StreamMap { name: _, position: _ } if true => Some(21), + Token::TTL if true => Some(22), + Token::Timestamp if true => Some(23), + Token::Ap if true => Some(24), + Token::Call if true => Some(25), + Token::Canon if true => Some(26), + Token::Embed if true => Some(27), + Token::Fail if true => Some(28), + Token::Fold if true => Some(29), + Token::Match if true => Some(30), + Token::MisMatch if true => Some(31), + Token::Never if true => Some(32), + Token::New if true => Some(33), + Token::Next if true => Some(34), + Token::Null if true => Some(35), + Token::Par if true => Some(36), + Token::Seq if true => Some(37), + Token::Xor if true => Some(38), _ => None, } } @@ -1102,33 +1140,33 @@ mod __parse__AIR { ) -> __Symbol<'input> { match __token_index { - 0 | 1 | 2 | 3 | 9 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 => __Symbol::Variant0(__token), + 0 | 1 | 2 | 3 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 => __Symbol::Variant0(__token), 4 => match __token { Token::Boolean(__tok0) if true => __Symbol::Variant1(__tok0), _ => unreachable!(), }, - 5 | 6 | 17 | 19 | 20 => match __token { + 5 | 6 | 18 | 20 | 21 => match __token { Token::CanonStream { name: __tok0, position: __tok1 } | Token::CanonStreamMap { name: __tok0, position: __tok1 } | Token::Scalar { name: __tok0, position: __tok1 } | Token::Stream { name: __tok0, position: __tok1 } | Token::StreamMap { name: __tok0, position: __tok1 } if true => __Symbol::Variant2((__tok0, __tok1)), _ => unreachable!(), }, - 7 | 8 | 18 => match __token { + 7 | 8 | 19 => match __token { Token::CanonStreamMapWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } | Token::CanonStreamWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } | Token::ScalarWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } if true => __Symbol::Variant3((__tok0, __tok1, __tok2)), _ => unreachable!(), }, - 10 | 15 => match __token { - Token::ErrorWithLambda(__tok0) | Token::LastErrorWithLambda(__tok0) if true => __Symbol::Variant4(__tok0), + 9 | 17 => match __token { + Token::EmbeddedScript(__tok0) | Token::StringLiteral(__tok0) if true => __Symbol::Variant4(__tok0), _ => unreachable!(), }, - 11 => match __token { - Token::F64(__tok0) if true => __Symbol::Variant5(__tok0), + 11 | 16 => match __token { + Token::ErrorWithLambda(__tok0) | Token::LastErrorWithLambda(__tok0) if true => __Symbol::Variant5(__tok0), _ => unreachable!(), }, 12 => match __token { - Token::I64(__tok0) if true => __Symbol::Variant6(__tok0), + Token::F64(__tok0) if true => __Symbol::Variant6(__tok0), _ => unreachable!(), }, - 16 => match __token { - Token::StringLiteral(__tok0) if true => __Symbol::Variant7(__tok0), + 13 => match __token { + Token::I64(__tok0) if true => __Symbol::Variant7(__tok0), _ => unreachable!(), }, _ => unreachable!(), @@ -1366,240 +1404,240 @@ mod __parse__AIR { 36 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 14, + nonterminal_produced: 15, } } 37 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 14, + states_to_pop: 0, + nonterminal_produced: 15, } } 38 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 14, + nonterminal_produced: 16, } } 39 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 14, + nonterminal_produced: 16, } } 40 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 14, + states_to_pop: 2, + nonterminal_produced: 16, } } 41 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 16, } } 42 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 16, } } 43 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 16, } } 44 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 17, } } 45 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 17, } } 46 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 15, + states_to_pop: 1, + nonterminal_produced: 17, } } 47 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 17, } } 48 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, + states_to_pop: 1, nonterminal_produced: 17, } } 49 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, + states_to_pop: 2, nonterminal_produced: 17, } } 50 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 1, + nonterminal_produced: 18, } } 51 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 6, - nonterminal_produced: 17, + nonterminal_produced: 19, } } 52 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 5, + nonterminal_produced: 19, } } 53 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, - nonterminal_produced: 17, + states_to_pop: 6, + nonterminal_produced: 19, } } 54 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 8, - nonterminal_produced: 17, + states_to_pop: 6, + nonterminal_produced: 19, } } 55 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, - nonterminal_produced: 17, + states_to_pop: 6, + nonterminal_produced: 19, } } 56 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 5, - nonterminal_produced: 17, + nonterminal_produced: 19, } } 57 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 17, + states_to_pop: 8, + nonterminal_produced: 19, } } 58 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 17, + states_to_pop: 5, + nonterminal_produced: 19, } } 59 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 5, - nonterminal_produced: 17, + nonterminal_produced: 19, } } 60 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 4, - nonterminal_produced: 17, + states_to_pop: 3, + nonterminal_produced: 19, } } 61 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 7, - nonterminal_produced: 17, + states_to_pop: 3, + nonterminal_produced: 19, } } 62 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 5, + nonterminal_produced: 19, } } 63 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 7, - nonterminal_produced: 17, + states_to_pop: 4, + nonterminal_produced: 19, } } 64 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 7, + nonterminal_produced: 19, } } 65 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 7, - nonterminal_produced: 17, + states_to_pop: 6, + nonterminal_produced: 19, } } 66 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 7, + nonterminal_produced: 19, } } 67 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 4, - nonterminal_produced: 17, + states_to_pop: 6, + nonterminal_produced: 19, } } 68 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, - nonterminal_produced: 17, + states_to_pop: 7, + nonterminal_produced: 19, } } 69 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 6, - nonterminal_produced: 17, + nonterminal_produced: 19, } } 70 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, - nonterminal_produced: 17, + states_to_pop: 4, + nonterminal_produced: 19, } } 71 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 17, + states_to_pop: 5, + nonterminal_produced: 19, } } 72 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 18, + states_to_pop: 6, + nonterminal_produced: 19, } } 73 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 0, - nonterminal_produced: 18, + states_to_pop: 6, + nonterminal_produced: 19, } } 74 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, + states_to_pop: 6, nonterminal_produced: 19, } } 75 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, + states_to_pop: 5, nonterminal_produced: 19, } } @@ -1612,25 +1650,25 @@ mod __parse__AIR { 77 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 19, + nonterminal_produced: 20, } } 78 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 19, + states_to_pop: 0, + nonterminal_produced: 20, } } 79 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 20, + nonterminal_produced: 21, } } 80 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 20, + nonterminal_produced: 21, } } 81 => { @@ -1642,13 +1680,13 @@ mod __parse__AIR { 82 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 21, } } 83 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 21, } } 84 => { @@ -1666,49 +1704,49 @@ mod __parse__AIR { 86 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 23, } } 87 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 24, } } 88 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 24, } } 89 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 24, } } 90 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 24, } } 91 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 24, } } 92 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 24, } } 93 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 24, + nonterminal_produced: 25, } } 94 => { @@ -1720,25 +1758,25 @@ mod __parse__AIR { 95 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 26, + nonterminal_produced: 25, } } 96 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 27, + nonterminal_produced: 25, } } 97 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 27, + nonterminal_produced: 25, } } 98 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 27, + nonterminal_produced: 26, } } 99 => { @@ -1750,13 +1788,13 @@ mod __parse__AIR { 100 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 27, + nonterminal_produced: 28, } } 101 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, - nonterminal_produced: 28, + states_to_pop: 1, + nonterminal_produced: 29, } } 102 => { @@ -1785,83 +1823,113 @@ mod __parse__AIR { } 106 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 29, + states_to_pop: 5, + nonterminal_produced: 30, } } 107 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 108 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 109 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 110 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 111 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 112 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 29, + states_to_pop: 1, + nonterminal_produced: 31, } } 113 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 114 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 115 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 116 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, } } 117 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 29, + states_to_pop: 2, + nonterminal_produced: 31, } } 118 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 29, + nonterminal_produced: 31, + } + } + 119 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 31, + } + } + 120 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 31, + } + } + 121 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 31, + } + } + 122 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 31, + } + } + 123 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 31, } } - 119 => __state_machine::SimulatedReduce::Accept, + 124 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {}", __reduce_index) } } @@ -2316,6 +2384,21 @@ mod __parse__AIR { __reduce118(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) } 119 => { + __reduce119(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) + } + 120 => { + __reduce120(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) + } + 121 => { + __reduce121(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) + } + 122 => { + __reduce122(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) + } + 123 => { + __reduce123(input, errors, validator, __lookahead_start, __symbols, core::marker::PhantomData::<(&(), &(), &())>) + } + 124 => { // __AIR = AIR => ActionFn(0); let __sym0 = __pop_Variant12(__symbols); let __start = __sym0.0; @@ -2428,21 +2511,32 @@ mod __parse__AIR { 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> - ) -> (AirPos, Fail<'input>, AirPos) + ) -> (AirPos, EmbedOutputValue<'input>, AirPos) { match __symbols.pop() { Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant21< + fn __pop_Variant22< + 'input, + >( + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> + ) -> (AirPos, Fail<'input>, AirPos) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant22(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant23< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, FoldScalarIterable<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant21(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant23(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -2468,91 +2562,91 @@ mod __parse__AIR { _ => __symbol_type_mismatch() } } - fn __pop_Variant4< + fn __pop_Variant5< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, LambdaAST<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant24< + fn __pop_Variant26< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, NewArgument<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant24(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant26(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant25< + fn __pop_Variant27< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, Number, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant25(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant27(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant26< + fn __pop_Variant28< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, ResolvableToPeerIdVariable<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant26(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant28(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant22< + fn __pop_Variant24< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, ResolvableToStringVariable<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant22(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant24(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant27< + fn __pop_Variant29< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, Stream<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant27(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant29(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant28< + fn __pop_Variant30< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, StreamMap<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant28(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant30(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant29< + fn __pop_Variant31< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, StreamMapKeyClause<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant29(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant31(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -2567,14 +2661,14 @@ mod __parse__AIR { _ => __symbol_type_mismatch() } } - fn __pop_Variant30< + fn __pop_Variant32< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, Triplet<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant30(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant32(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -2633,25 +2727,25 @@ mod __parse__AIR { _ => __symbol_type_mismatch() } } - fn __pop_Variant23< + fn __pop_Variant21< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> - ) -> (AirPos, core::option::Option>, AirPos) + ) -> (AirPos, core::option::Option>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant23(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant21(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant5< + fn __pop_Variant25< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> - ) -> (AirPos, f64, AirPos) + ) -> (AirPos, core::option::Option>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant25(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -2659,7 +2753,7 @@ mod __parse__AIR { 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> - ) -> (AirPos, i64, AirPos) + ) -> (AirPos, f64, AirPos) { match __symbols.pop() { Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r), @@ -2670,13 +2764,24 @@ mod __parse__AIR { 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> - ) -> (AirPos, &'input str, AirPos) + ) -> (AirPos, i64, AirPos) { match __symbols.pop() { Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } + fn __pop_Variant4< + 'input, + >( + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> + ) -> (AirPos, &'input str, AirPos) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } pub(crate) fn __reduce0< 'err, 'input, @@ -2690,11 +2795,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // () = Arg => ActionFn(106); + // () = Arg => ActionFn(108); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action106::<>(input, errors, validator, __sym0); + let __nt = super::__action108::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (1, 0) } @@ -2711,10 +2816,10 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ()* = => ActionFn(104); + // ()* = => ActionFn(106); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action104::<>(input, errors, validator, &__start, &__end); + let __nt = super::__action106::<>(input, errors, validator, &__start, &__end); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (0, 1) } @@ -2731,11 +2836,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ()* = ()+ => ActionFn(105); + // ()* = ()+ => ActionFn(107); let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action105::<>(input, errors, validator, __sym0); + let __nt = super::__action107::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 1) } @@ -2752,11 +2857,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ()+ = Arg => ActionFn(115); + // ()+ = Arg => ActionFn(119); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action115::<>(input, errors, validator, __sym0); + let __nt = super::__action119::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 2) } @@ -2773,13 +2878,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ()+ = ()+, Arg => ActionFn(116); + // ()+ = ()+, Arg => ActionFn(120); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant9(__symbols); let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action116::<>(input, errors, validator, __sym0, __sym1); + let __nt = super::__action120::<>(input, errors, validator, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (2, 2) } @@ -2796,10 +2901,10 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // @L = => ActionFn(112); + // @L = => ActionFn(116); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action112::<>(input, errors, validator, &__start, &__end); + let __nt = super::__action116::<>(input, errors, validator, &__start, &__end); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (0, 3) } @@ -2816,10 +2921,10 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // @R = => ActionFn(109); + // @R = => ActionFn(113); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action109::<>(input, errors, validator, &__start, &__end); + let __nt = super::__action113::<>(input, errors, validator, &__start, &__end); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (0, 4) } @@ -2857,11 +2962,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = InitPeerId => ActionFn(84); + // ApArgument = InitPeerId => ActionFn(86); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action84::<>(input, errors, validator, __sym0); + let __nt = super::__action86::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2878,11 +2983,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = LastError => ActionFn(85); + // ApArgument = LastError => ActionFn(87); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action85::<>(input, errors, validator, __sym0); + let __nt = super::__action87::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2899,11 +3004,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = LastErrorWithLambda => ActionFn(86); - let __sym0 = __pop_Variant4(__symbols); + // ApArgument = LastErrorWithLambda => ActionFn(88); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action86::<>(input, errors, validator, __sym0); + let __nt = super::__action88::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2920,11 +3025,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Error => ActionFn(87); + // ApArgument = Error => ActionFn(89); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action87::<>(input, errors, validator, __sym0); + let __nt = super::__action89::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2941,11 +3046,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = ErrorWithLambda => ActionFn(88); - let __sym0 = __pop_Variant4(__symbols); + // ApArgument = ErrorWithLambda => ActionFn(90); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action88::<>(input, errors, validator, __sym0); + let __nt = super::__action90::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2962,11 +3067,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Timestamp => ActionFn(89); + // ApArgument = Timestamp => ActionFn(91); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action89::<>(input, errors, validator, __sym0); + let __nt = super::__action91::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -2983,11 +3088,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = TTL => ActionFn(90); + // ApArgument = TTL => ActionFn(92); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action90::<>(input, errors, validator, __sym0); + let __nt = super::__action92::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3004,11 +3109,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Literal => ActionFn(91); - let __sym0 = __pop_Variant7(__symbols); + // ApArgument = Literal => ActionFn(93); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action91::<>(input, errors, validator, __sym0); + let __nt = super::__action93::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3025,11 +3130,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Number => ActionFn(92); - let __sym0 = __pop_Variant25(__symbols); + // ApArgument = Number => ActionFn(94); + let __sym0 = __pop_Variant27(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action92::<>(input, errors, validator, __sym0); + let __nt = super::__action94::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3046,11 +3151,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Boolean => ActionFn(93); + // ApArgument = Boolean => ActionFn(95); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action93::<>(input, errors, validator, __sym0); + let __nt = super::__action95::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3067,13 +3172,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = "[", "]" => ActionFn(94); + // ApArgument = "[", "]" => ActionFn(96); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action94::<>(input, errors, validator, __sym0, __sym1); + let __nt = super::__action96::<>(input, errors, validator, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (2, 6) } @@ -3090,11 +3195,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = Scalar => ActionFn(95); + // ApArgument = Scalar => ActionFn(97); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action95::<>(input, errors, validator, __sym0); + let __nt = super::__action97::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3111,11 +3216,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = ScalarWithLambda => ActionFn(96); + // ApArgument = ScalarWithLambda => ActionFn(98); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action96::<>(input, errors, validator, __sym0); + let __nt = super::__action98::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3132,11 +3237,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = CanonStream => ActionFn(97); + // ApArgument = CanonStream => ActionFn(99); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action97::<>(input, errors, validator, __sym0); + let __nt = super::__action99::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3153,11 +3258,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = CanonStreamWithLambda => ActionFn(98); + // ApArgument = CanonStreamWithLambda => ActionFn(100); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action98::<>(input, errors, validator, __sym0); + let __nt = super::__action100::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3174,11 +3279,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApArgument = CanonStreamMapWithLambda => ActionFn(99); + // ApArgument = CanonStreamMapWithLambda => ActionFn(101); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action99::<>(input, errors, validator, __sym0); + let __nt = super::__action101::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (1, 6) } @@ -3195,11 +3300,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApResult = Scalar => ActionFn(24); + // ApResult = Scalar => ActionFn(25); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action24::<>(input, errors, validator, __sym0); + let __nt = super::__action25::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 7) } @@ -3216,11 +3321,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ApResult = Stream => ActionFn(25); + // ApResult = Stream => ActionFn(26); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action25::<>(input, errors, validator, __sym0); + let __nt = super::__action26::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 7) } @@ -3237,11 +3342,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Arg = Value => ActionFn(66); + // Arg = Value => ActionFn(68); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action66::<>(input, errors, validator, __sym0); + let __nt = super::__action68::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (1, 8) } @@ -3258,13 +3363,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Args = "[", "]" => ActionFn(117); + // Args = "[", "]" => ActionFn(121); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action117::<>(input, errors, validator, __sym0, __sym1); + let __nt = super::__action121::<>(input, errors, validator, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 9) } @@ -3281,14 +3386,14 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Args = "[", ()+, "]" => ActionFn(118); + // Args = "[", ()+, "]" => ActionFn(122); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant10(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action118::<>(input, errors, validator, __sym0, __sym1, __sym2); + let __nt = super::__action122::<>(input, errors, validator, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 9) } @@ -3305,11 +3410,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CallOutput = Scalar => ActionFn(31); + // CallOutput = Scalar => ActionFn(32); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action31::<>(input, errors, validator, __sym0); + let __nt = super::__action32::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (1, 10) } @@ -3326,11 +3431,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CallOutput = Stream => ActionFn(32); + // CallOutput = Stream => ActionFn(33); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action32::<>(input, errors, validator, __sym0); + let __nt = super::__action33::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (1, 10) } @@ -3347,11 +3452,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CallOutput? = CallOutput => ActionFn(110); + // CallOutput? = CallOutput => ActionFn(114); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action110::<>(input, errors, validator, __sym0); + let __nt = super::__action114::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant17(__nt), __end)); (1, 11) } @@ -3368,10 +3473,10 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CallOutput? = => ActionFn(111); + // CallOutput? = => ActionFn(115); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action111::<>(input, errors, validator, &__start, &__end); + let __nt = super::__action115::<>(input, errors, validator, &__start, &__end); __symbols.push((__start, __Symbol::Variant17(__nt), __end)); (0, 11) } @@ -3388,11 +3493,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CanonStreamArgument = CanonStream => ActionFn(102); + // CanonStreamArgument = CanonStream => ActionFn(104); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action102::<>(input, errors, validator, __sym0); + let __nt = super::__action104::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (1, 12) } @@ -3409,11 +3514,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // CanonStreamMapArgument = CanonStreamMap => ActionFn(103); + // CanonStreamMapArgument = CanonStreamMap => ActionFn(105); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action103::<>(input, errors, validator, __sym0); + let __nt = super::__action105::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant19(__nt), __end)); (1, 13) } @@ -3430,11 +3535,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = Scalar => ActionFn(33); + // EmbedOutput = Scalar => ActionFn(34); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action33::<>(input, errors, validator, __sym0); + let __nt = super::__action34::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant20(__nt), __end)); (1, 14) } @@ -3451,13 +3556,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = ScalarWithLambda => ActionFn(34); - let __sym0 = __pop_Variant3(__symbols); + // EmbedOutput? = EmbedOutput => ActionFn(109); + let __sym0 = __pop_Variant20(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action34::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant20(__nt), __end)); - (1, 14) + let __nt = super::__action109::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant21(__nt), __end)); + (1, 15) } pub(crate) fn __reduce37< 'err, @@ -3472,15 +3577,12 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = I64, Literal => ActionFn(35); - assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant7(__symbols); - let __sym0 = __pop_Variant6(__symbols); - let __start = __sym0.0; - let __end = __sym1.2; - let __nt = super::__action35::<>(input, errors, validator, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant20(__nt), __end)); - (2, 14) + // EmbedOutput? = => ActionFn(110); + let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); + let __end = __start.clone(); + let __nt = super::__action110::<>(input, errors, validator, &__start, &__end); + __symbols.push((__start, __Symbol::Variant21(__nt), __end)); + (0, 15) } pub(crate) fn __reduce38< 'err, @@ -3495,13 +3597,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = CanonStreamWithLambda => ActionFn(36); - let __sym0 = __pop_Variant3(__symbols); + // FailBody = Scalar => ActionFn(35); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action36::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant20(__nt), __end)); - (1, 14) + let __nt = super::__action35::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (1, 16) } pub(crate) fn __reduce39< 'err, @@ -3516,13 +3618,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = LastError => ActionFn(140); - let __sym0 = __pop_Variant0(__symbols); + // FailBody = ScalarWithLambda => ActionFn(36); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action140::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant20(__nt), __end)); - (1, 14) + let __nt = super::__action36::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (1, 16) } pub(crate) fn __reduce40< 'err, @@ -3537,13 +3639,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FailBody = Error => ActionFn(141); - let __sym0 = __pop_Variant0(__symbols); + // FailBody = I64, Literal => ActionFn(37); + assert!(__symbols.len() >= 2); + let __sym1 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; - let __end = __sym0.2; - let __nt = super::__action141::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant20(__nt), __end)); - (1, 14) + let __end = __sym1.2; + let __nt = super::__action37::<>(input, errors, validator, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (2, 16) } pub(crate) fn __reduce41< 'err, @@ -3558,13 +3662,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = Scalar => ActionFn(39); - let __sym0 = __pop_Variant2(__symbols); + // FailBody = CanonStreamWithLambda => ActionFn(38); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action39::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (1, 15) + let __nt = super::__action38::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (1, 16) } pub(crate) fn __reduce42< 'err, @@ -3579,13 +3683,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = ScalarWithLambda => ActionFn(40); - let __sym0 = __pop_Variant3(__symbols); + // FailBody = LastError => ActionFn(145); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action40::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (1, 15) + let __nt = super::__action145::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (1, 16) } pub(crate) fn __reduce43< 'err, @@ -3600,13 +3704,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = CanonStream => ActionFn(41); - let __sym0 = __pop_Variant2(__symbols); + // FailBody = Error => ActionFn(146); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action41::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (1, 15) + let __nt = super::__action146::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant22(__nt), __end)); + (1, 16) } pub(crate) fn __reduce44< 'err, @@ -3621,13 +3725,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = CanonStreamMap => ActionFn(42); + // FoldScalarIterable = Scalar => ActionFn(41); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action42::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (1, 15) + let __nt = super::__action41::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (1, 17) } pub(crate) fn __reduce45< 'err, @@ -3642,13 +3746,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = CanonStreamMapWithLambda => ActionFn(43); + // FoldScalarIterable = ScalarWithLambda => ActionFn(42); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action43::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (1, 15) + let __nt = super::__action42::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (1, 17) } pub(crate) fn __reduce46< 'err, @@ -3663,15 +3767,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // FoldScalarIterable = "[", "]" => ActionFn(44); - assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // FoldScalarIterable = CanonStream => ActionFn(43); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; - let __end = __sym1.2; - let __nt = super::__action44::<>(input, errors, validator, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant21(__nt), __end)); - (2, 15) + let __end = __sym0.2; + let __nt = super::__action43::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (1, 17) } pub(crate) fn __reduce47< 'err, @@ -3686,13 +3788,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Function = ResolvableToStringVariable => ActionFn(46); - let __sym0 = __pop_Variant22(__symbols); + // FoldScalarIterable = CanonStreamMap => ActionFn(44); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action46::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 16) + let __nt = super::__action44::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (1, 17) } pub(crate) fn __reduce48< 'err, @@ -3707,19 +3809,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", call, Triplet, Args, CallOutput, ")" => ActionFn(161); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant16(__symbols); - let __sym3 = __pop_Variant15(__symbols); - let __sym2 = __pop_Variant30(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // FoldScalarIterable = CanonStreamMapWithLambda => ActionFn(45); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; - let __end = __sym5.2; - let __nt = super::__action161::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); - __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + let __end = __sym0.2; + let __nt = super::__action45::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (1, 17) } pub(crate) fn __reduce49< 'err, @@ -3734,20 +3830,91 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", call, Triplet, Args, ")" => ActionFn(162); - assert!(__symbols.len() >= 5); + // FoldScalarIterable = "[", "]" => ActionFn(46); + assert!(__symbols.len() >= 2); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0; + let __end = __sym1.2; + let __nt = super::__action46::<>(input, errors, validator, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant23(__nt), __end)); + (2, 17) + } + pub(crate) fn __reduce50< + 'err, + 'input, + 'v, + >( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookahead_start: Option<&AirPos>, + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)>, + _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, + ) -> (usize, usize) + { + // Function = ResolvableToStringVariable => ActionFn(48); + let __sym0 = __pop_Variant24(__symbols); + let __start = __sym0.0; + let __end = __sym0.2; + let __nt = super::__action48::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 18) + } + pub(crate) fn __reduce51< + 'err, + 'input, + 'v, + >( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookahead_start: Option<&AirPos>, + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)>, + _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, + ) -> (usize, usize) + { + // Instr = "(", call, Triplet, Args, CallOutput, ")" => ActionFn(167); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant16(__symbols); + let __sym3 = __pop_Variant15(__symbols); + let __sym2 = __pop_Variant32(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = super::__action167::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + __symbols.push((__start, __Symbol::Variant12(__nt), __end)); + (6, 19) + } + pub(crate) fn __reduce52< + 'err, + 'input, + 'v, + >( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookahead_start: Option<&AirPos>, + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)>, + _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, + ) -> (usize, usize) + { + // Instr = "(", call, Triplet, Args, ")" => ActionFn(168); + assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant15(__symbols); - let __sym2 = __pop_Variant30(__symbols); + let __sym2 = __pop_Variant32(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action162::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action168::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce50< + pub(crate) fn __reduce53< 'err, 'input, 'v, @@ -3760,21 +3927,21 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", canon, ResolvableToPeerIdVariable, StreamArgument, CanonStreamArgument, ")" => ActionFn(143); + // Instr = "(", canon, ResolvableToPeerIdVariable, StreamArgument, CanonStreamArgument, ")" => ActionFn(148); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant18(__symbols); - let __sym3 = __pop_Variant27(__symbols); - let __sym2 = __pop_Variant26(__symbols); + let __sym3 = __pop_Variant29(__symbols); + let __sym2 = __pop_Variant28(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action143::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action148::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce51< + pub(crate) fn __reduce54< 'err, 'input, 'v, @@ -3787,21 +3954,21 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", canon, ResolvableToPeerIdVariable, StreamMapArgument, CanonStreamMapArgument, ")" => ActionFn(144); + // Instr = "(", canon, ResolvableToPeerIdVariable, StreamMapArgument, CanonStreamMapArgument, ")" => ActionFn(149); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant19(__symbols); - let __sym3 = __pop_Variant28(__symbols); - let __sym2 = __pop_Variant26(__symbols); + let __sym3 = __pop_Variant30(__symbols); + let __sym2 = __pop_Variant28(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action144::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action149::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce52< + pub(crate) fn __reduce55< 'err, 'input, 'v, @@ -3814,21 +3981,21 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", canon, ResolvableToPeerIdVariable, StreamMapArgument, Scalar, ")" => ActionFn(145); + // Instr = "(", canon, ResolvableToPeerIdVariable, StreamMapArgument, Scalar, ")" => ActionFn(150); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant2(__symbols); - let __sym3 = __pop_Variant28(__symbols); - let __sym2 = __pop_Variant26(__symbols); + let __sym3 = __pop_Variant30(__symbols); + let __sym2 = __pop_Variant28(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action145::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action150::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce53< + pub(crate) fn __reduce56< 'err, 'input, 'v, @@ -3841,7 +4008,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", ap, ApArgument, ApResult, ")" => ActionFn(146); + // Instr = "(", ap, ApArgument, ApResult, ")" => ActionFn(151); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant14(__symbols); @@ -3850,11 +4017,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action146::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action151::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce54< + pub(crate) fn __reduce57< 'err, 'input, 'v, @@ -3867,23 +4034,23 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", ap, "(", StreamMapKeyClause, ApArgument, ")", StreamMap, ")" => ActionFn(147); + // Instr = "(", ap, "(", StreamMapKeyClause, ApArgument, ")", StreamMap, ")" => ActionFn(152); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant2(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant13(__symbols); - let __sym3 = __pop_Variant29(__symbols); + let __sym3 = __pop_Variant31(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action147::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action152::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (8, 17) + (8, 19) } - pub(crate) fn __reduce55< + pub(crate) fn __reduce58< 'err, 'input, 'v, @@ -3896,7 +4063,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", seq, Instr, Instr, ")" => ActionFn(148); + // Instr = "(", seq, Instr, Instr, ")" => ActionFn(153); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -3905,11 +4072,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action148::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action153::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce56< + pub(crate) fn __reduce59< 'err, 'input, 'v, @@ -3922,7 +4089,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", par, Instr, Instr, ")" => ActionFn(149); + // Instr = "(", par, Instr, Instr, ")" => ActionFn(154); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -3931,11 +4098,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action149::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action154::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce57< + pub(crate) fn __reduce60< 'err, 'input, 'v, @@ -3948,18 +4115,18 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", never, ")" => ActionFn(150); + // Instr = "(", never, ")" => ActionFn(155); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action150::<>(input, errors, validator, __sym0, __sym1, __sym2); + let __nt = super::__action155::<>(input, errors, validator, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (3, 17) + (3, 19) } - pub(crate) fn __reduce58< + pub(crate) fn __reduce61< 'err, 'input, 'v, @@ -3972,18 +4139,18 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", null, ")" => ActionFn(151); + // Instr = "(", null, ")" => ActionFn(156); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action151::<>(input, errors, validator, __sym0, __sym1, __sym2); + let __nt = super::__action156::<>(input, errors, validator, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (3, 17) + (3, 19) } - pub(crate) fn __reduce59< + pub(crate) fn __reduce62< 'err, 'input, 'v, @@ -3996,20 +4163,20 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", new, NewArgument, Instr, ")" => ActionFn(152); + // Instr = "(", new, NewArgument, Instr, ")" => ActionFn(157); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); - let __sym2 = __pop_Variant24(__symbols); + let __sym2 = __pop_Variant26(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action152::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action157::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce60< + pub(crate) fn __reduce63< 'err, 'input, 'v, @@ -4022,19 +4189,19 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fail, FailBody, ")" => ActionFn(153); + // Instr = "(", fail, FailBody, ")" => ActionFn(158); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant20(__symbols); + let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action153::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action158::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (4, 17) + (4, 19) } - pub(crate) fn __reduce61< + pub(crate) fn __reduce64< 'err, 'input, 'v, @@ -4047,22 +4214,22 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, FoldScalarIterable, Scalar, Instr, Instr, ")" => ActionFn(163); + // Instr = "(", fold, FoldScalarIterable, Scalar, Instr, Instr, ")" => ActionFn(171); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant12(__symbols); let __sym4 = __pop_Variant12(__symbols); let __sym3 = __pop_Variant2(__symbols); - let __sym2 = __pop_Variant21(__symbols); + let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action163::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action171::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (7, 17) + (7, 19) } - pub(crate) fn __reduce62< + pub(crate) fn __reduce65< 'err, 'input, 'v, @@ -4075,21 +4242,21 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, FoldScalarIterable, Scalar, Instr, ")" => ActionFn(164); + // Instr = "(", fold, FoldScalarIterable, Scalar, Instr, ")" => ActionFn(172); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); let __sym3 = __pop_Variant2(__symbols); - let __sym2 = __pop_Variant21(__symbols); + let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action164::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action172::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce63< + pub(crate) fn __reduce66< 'err, 'input, 'v, @@ -4102,7 +4269,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, Stream, Scalar, Instr, Instr, ")" => ActionFn(165); + // Instr = "(", fold, Stream, Scalar, Instr, Instr, ")" => ActionFn(173); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant12(__symbols); @@ -4113,11 +4280,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action165::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action173::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (7, 17) + (7, 19) } - pub(crate) fn __reduce64< + pub(crate) fn __reduce67< 'err, 'input, 'v, @@ -4130,7 +4297,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, Stream, Scalar, Instr, ")" => ActionFn(166); + // Instr = "(", fold, Stream, Scalar, Instr, ")" => ActionFn(174); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -4140,11 +4307,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action166::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action174::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce65< + pub(crate) fn __reduce68< 'err, 'input, 'v, @@ -4157,7 +4324,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, StreamMap, Scalar, Instr, Instr, ")" => ActionFn(167); + // Instr = "(", fold, StreamMap, Scalar, Instr, Instr, ")" => ActionFn(175); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant12(__symbols); @@ -4168,11 +4335,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action167::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action175::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (7, 17) + (7, 19) } - pub(crate) fn __reduce66< + pub(crate) fn __reduce69< 'err, 'input, 'v, @@ -4185,7 +4352,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", fold, StreamMap, Scalar, Instr, ")" => ActionFn(168); + // Instr = "(", fold, StreamMap, Scalar, Instr, ")" => ActionFn(176); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -4195,11 +4362,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action168::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action176::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce67< + pub(crate) fn __reduce70< 'err, 'input, 'v, @@ -4212,7 +4379,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", next, Scalar, ")" => ActionFn(157); + // Instr = "(", next, Scalar, ")" => ActionFn(162); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant2(__symbols); @@ -4220,11 +4387,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action157::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action162::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (4, 17) + (4, 19) } - pub(crate) fn __reduce68< + pub(crate) fn __reduce71< 'err, 'input, 'v, @@ -4237,7 +4404,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", xor, Instr, Instr, ")" => ActionFn(158); + // Instr = "(", xor, Instr, Instr, ")" => ActionFn(163); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -4246,11 +4413,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action158::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action163::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (5, 17) + (5, 19) } - pub(crate) fn __reduce69< + pub(crate) fn __reduce72< 'err, 'input, 'v, @@ -4263,7 +4430,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", match_, Value, Value, Instr, ")" => ActionFn(159); + // Instr = "(", match_, Value, Value, Instr, ")" => ActionFn(164); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -4273,11 +4440,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action159::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action164::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce70< + pub(crate) fn __reduce73< 'err, 'input, 'v, @@ -4290,7 +4457,7 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", mismatch, Value, Value, Instr, ")" => ActionFn(160); + // Instr = "(", mismatch, Value, Value, Instr, ")" => ActionFn(165); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -4300,11 +4467,11 @@ mod __parse__AIR { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action160::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action165::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (6, 17) + (6, 19) } - pub(crate) fn __reduce71< + pub(crate) fn __reduce74< 'err, 'input, 'v, @@ -4317,15 +4484,21 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = error => ActionFn(21); - let __sym0 = __pop_Variant8(__symbols); + // Instr = "(", embed, Args, EmbeddedScript, EmbedOutput, ")" => ActionFn(169); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant20(__symbols); + let __sym3 = __pop_Variant4(__symbols); + let __sym2 = __pop_Variant15(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; - let __end = __sym0.2; - let __nt = super::__action21::<>(input, errors, validator, __sym0); + let __end = __sym5.2; + let __nt = super::__action169::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (1, 17) + (6, 19) } - pub(crate) fn __reduce72< + pub(crate) fn __reduce75< 'err, 'input, 'v, @@ -4338,15 +4511,20 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr? = Instr => ActionFn(107); - let __sym0 = __pop_Variant12(__symbols); + // Instr = "(", embed, Args, EmbeddedScript, ")" => ActionFn(170); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant4(__symbols); + let __sym2 = __pop_Variant15(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; - let __end = __sym0.2; - let __nt = super::__action107::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant23(__nt), __end)); - (1, 18) + let __end = __sym4.2; + let __nt = super::__action170::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant12(__nt), __end)); + (5, 19) } - pub(crate) fn __reduce73< + pub(crate) fn __reduce76< 'err, 'input, 'v, @@ -4359,14 +4537,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr? = => ActionFn(108); - let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); - let __end = __start.clone(); - let __nt = super::__action108::<>(input, errors, validator, &__start, &__end); - __symbols.push((__start, __Symbol::Variant23(__nt), __end)); - (0, 18) + // Instr = error => ActionFn(22); + let __sym0 = __pop_Variant8(__symbols); + let __start = __sym0.0; + let __end = __sym0.2; + let __nt = super::__action22::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant12(__nt), __end)); + (1, 19) } - pub(crate) fn __reduce74< + pub(crate) fn __reduce77< 'err, 'input, 'v, @@ -4379,15 +4558,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // NewArgument = Scalar => ActionFn(59); - let __sym0 = __pop_Variant2(__symbols); + // Instr? = Instr => ActionFn(111); + let __sym0 = __pop_Variant12(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action59::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant24(__nt), __end)); - (1, 19) + let __nt = super::__action111::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant25(__nt), __end)); + (1, 20) } - pub(crate) fn __reduce75< + pub(crate) fn __reduce78< 'err, 'input, 'v, @@ -4400,15 +4579,14 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // NewArgument = Stream => ActionFn(60); - let __sym0 = __pop_Variant2(__symbols); - let __start = __sym0.0; - let __end = __sym0.2; - let __nt = super::__action60::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant24(__nt), __end)); - (1, 19) + // Instr? = => ActionFn(112); + let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); + let __end = __start.clone(); + let __nt = super::__action112::<>(input, errors, validator, &__start, &__end); + __symbols.push((__start, __Symbol::Variant25(__nt), __end)); + (0, 20) } - pub(crate) fn __reduce76< + pub(crate) fn __reduce79< 'err, 'input, 'v, @@ -4421,15 +4599,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // NewArgument = StreamMap => ActionFn(61); + // NewArgument = Scalar => ActionFn(61); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action61::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant24(__nt), __end)); - (1, 19) + __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + (1, 21) } - pub(crate) fn __reduce77< + pub(crate) fn __reduce80< 'err, 'input, 'v, @@ -4442,15 +4620,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // NewArgument = CanonStream => ActionFn(62); + // NewArgument = Stream => ActionFn(62); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action62::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant24(__nt), __end)); - (1, 19) + __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + (1, 21) } - pub(crate) fn __reduce78< + pub(crate) fn __reduce81< 'err, 'input, 'v, @@ -4463,15 +4641,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // NewArgument = CanonStreamMap => ActionFn(63); + // NewArgument = StreamMap => ActionFn(63); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action63::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant24(__nt), __end)); - (1, 19) + __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + (1, 21) } - pub(crate) fn __reduce79< + pub(crate) fn __reduce82< 'err, 'input, 'v, @@ -4484,15 +4662,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Number = I64 => ActionFn(64); - let __sym0 = __pop_Variant6(__symbols); + // NewArgument = CanonStream => ActionFn(64); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action64::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant25(__nt), __end)); - (1, 20) + __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + (1, 21) } - pub(crate) fn __reduce80< + pub(crate) fn __reduce83< 'err, 'input, 'v, @@ -4505,15 +4683,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Number = F64 => ActionFn(65); - let __sym0 = __pop_Variant5(__symbols); + // NewArgument = CanonStreamMap => ActionFn(65); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action65::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant25(__nt), __end)); - (1, 20) + __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + (1, 21) } - pub(crate) fn __reduce81< + pub(crate) fn __reduce84< 'err, 'input, 'v, @@ -4526,15 +4704,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // PeerId = ResolvableToPeerIdVariable => ActionFn(45); - let __sym0 = __pop_Variant26(__symbols); + // Number = I64 => ActionFn(66); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action45::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 21) + let __nt = super::__action66::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant27(__nt), __end)); + (1, 22) } - pub(crate) fn __reduce82< + pub(crate) fn __reduce85< 'err, 'input, 'v, @@ -4547,15 +4725,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = InitPeerId => ActionFn(48); - let __sym0 = __pop_Variant0(__symbols); + // Number = F64 => ActionFn(67); + let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action48::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); + let __nt = super::__action67::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant27(__nt), __end)); (1, 22) } - pub(crate) fn __reduce83< + pub(crate) fn __reduce86< 'err, 'input, 'v, @@ -4568,15 +4746,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = Literal => ActionFn(49); - let __sym0 = __pop_Variant7(__symbols); + // PeerId = ResolvableToPeerIdVariable => ActionFn(47); + let __sym0 = __pop_Variant28(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action49::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 22) + let __nt = super::__action47::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 23) } - pub(crate) fn __reduce84< + pub(crate) fn __reduce87< 'err, 'input, 'v, @@ -4589,15 +4767,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = Scalar => ActionFn(50); - let __sym0 = __pop_Variant2(__symbols); + // ResolvableToPeerIdVariable = InitPeerId => ActionFn(50); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action50::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 22) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce85< + pub(crate) fn __reduce88< 'err, 'input, 'v, @@ -4610,15 +4788,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = ScalarWithLambda => ActionFn(51); - let __sym0 = __pop_Variant3(__symbols); + // ResolvableToPeerIdVariable = Literal => ActionFn(51); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action51::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 22) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce86< + pub(crate) fn __reduce89< 'err, 'input, 'v, @@ -4631,15 +4809,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = CanonStreamWithLambda => ActionFn(52); - let __sym0 = __pop_Variant3(__symbols); + // ResolvableToPeerIdVariable = Scalar => ActionFn(52); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action52::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 22) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce87< + pub(crate) fn __reduce90< 'err, 'input, 'v, @@ -4652,15 +4830,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToPeerIdVariable = CanonStreamMapWithLambda => ActionFn(53); + // ResolvableToPeerIdVariable = ScalarWithLambda => ActionFn(53); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action53::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant26(__nt), __end)); - (1, 22) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce88< + pub(crate) fn __reduce91< 'err, 'input, 'v, @@ -4673,15 +4851,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToStringVariable = Literal => ActionFn(54); - let __sym0 = __pop_Variant7(__symbols); + // ResolvableToPeerIdVariable = CanonStreamWithLambda => ActionFn(54); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action54::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 23) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce89< + pub(crate) fn __reduce92< 'err, 'input, 'v, @@ -4694,15 +4872,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToStringVariable = Scalar => ActionFn(55); - let __sym0 = __pop_Variant2(__symbols); + // ResolvableToPeerIdVariable = CanonStreamMapWithLambda => ActionFn(55); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action55::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 23) + __symbols.push((__start, __Symbol::Variant28(__nt), __end)); + (1, 24) } - pub(crate) fn __reduce90< + pub(crate) fn __reduce93< 'err, 'input, 'v, @@ -4715,15 +4893,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToStringVariable = ScalarWithLambda => ActionFn(56); - let __sym0 = __pop_Variant3(__symbols); + // ResolvableToStringVariable = Literal => ActionFn(56); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action56::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 23) + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 25) } - pub(crate) fn __reduce91< + pub(crate) fn __reduce94< 'err, 'input, 'v, @@ -4736,15 +4914,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToStringVariable = CanonStreamWithLambda => ActionFn(57); - let __sym0 = __pop_Variant3(__symbols); + // ResolvableToStringVariable = Scalar => ActionFn(57); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action57::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 23) + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 25) } - pub(crate) fn __reduce92< + pub(crate) fn __reduce95< 'err, 'input, 'v, @@ -4757,15 +4935,57 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ResolvableToStringVariable = CanonStreamMapWithLambda => ActionFn(58); + // ResolvableToStringVariable = ScalarWithLambda => ActionFn(58); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action58::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 23) + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 25) + } + pub(crate) fn __reduce96< + 'err, + 'input, + 'v, + >( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookahead_start: Option<&AirPos>, + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)>, + _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, + ) -> (usize, usize) + { + // ResolvableToStringVariable = CanonStreamWithLambda => ActionFn(59); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0; + let __end = __sym0.2; + let __nt = super::__action59::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 25) + } + pub(crate) fn __reduce97< + 'err, + 'input, + 'v, + >( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookahead_start: Option<&AirPos>, + __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)>, + _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, + ) -> (usize, usize) + { + // ResolvableToStringVariable = CanonStreamMapWithLambda => ActionFn(60); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0; + let __end = __sym0.2; + let __nt = super::__action60::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 25) } - pub(crate) fn __reduce93< + pub(crate) fn __reduce98< 'err, 'input, 'v, @@ -4778,15 +4998,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // ServiceId = ResolvableToStringVariable => ActionFn(47); - let __sym0 = __pop_Variant22(__symbols); + // ServiceId = ResolvableToStringVariable => ActionFn(49); + let __sym0 = __pop_Variant24(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action47::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant22(__nt), __end)); - (1, 24) + let __nt = super::__action49::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant24(__nt), __end)); + (1, 26) } - pub(crate) fn __reduce94< + pub(crate) fn __reduce99< 'err, 'input, 'v, @@ -4799,15 +5019,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamArgument = Stream => ActionFn(100); + // StreamArgument = Stream => ActionFn(102); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action100::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant27(__nt), __end)); - (1, 25) + let __nt = super::__action102::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant29(__nt), __end)); + (1, 27) } - pub(crate) fn __reduce95< + pub(crate) fn __reduce100< 'err, 'input, 'v, @@ -4820,15 +5040,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapArgument = StreamMap => ActionFn(101); + // StreamMapArgument = StreamMap => ActionFn(103); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action101::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant28(__nt), __end)); - (1, 26) + let __nt = super::__action103::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant30(__nt), __end)); + (1, 28) } - pub(crate) fn __reduce96< + pub(crate) fn __reduce101< 'err, 'input, 'v, @@ -4841,15 +5061,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapKeyClause = Literal => ActionFn(26); - let __sym0 = __pop_Variant7(__symbols); + // StreamMapKeyClause = Literal => ActionFn(27); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action26::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant29(__nt), __end)); - (1, 27) + let __nt = super::__action27::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant31(__nt), __end)); + (1, 29) } - pub(crate) fn __reduce97< + pub(crate) fn __reduce102< 'err, 'input, 'v, @@ -4862,15 +5082,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapKeyClause = I64 => ActionFn(27); - let __sym0 = __pop_Variant6(__symbols); + // StreamMapKeyClause = I64 => ActionFn(28); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action27::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant29(__nt), __end)); - (1, 27) + let __nt = super::__action28::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant31(__nt), __end)); + (1, 29) } - pub(crate) fn __reduce98< + pub(crate) fn __reduce103< 'err, 'input, 'v, @@ -4883,15 +5103,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapKeyClause = Scalar => ActionFn(28); + // StreamMapKeyClause = Scalar => ActionFn(29); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action28::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant29(__nt), __end)); - (1, 27) + let __nt = super::__action29::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant31(__nt), __end)); + (1, 29) } - pub(crate) fn __reduce99< + pub(crate) fn __reduce104< 'err, 'input, 'v, @@ -4904,15 +5124,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapKeyClause = ScalarWithLambda => ActionFn(29); + // StreamMapKeyClause = ScalarWithLambda => ActionFn(30); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action29::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant29(__nt), __end)); - (1, 27) + let __nt = super::__action30::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant31(__nt), __end)); + (1, 29) } - pub(crate) fn __reduce100< + pub(crate) fn __reduce105< 'err, 'input, 'v, @@ -4925,15 +5145,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // StreamMapKeyClause = CanonStreamWithLambda => ActionFn(30); + // StreamMapKeyClause = CanonStreamWithLambda => ActionFn(31); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action30::<>(input, errors, validator, __sym0); - __symbols.push((__start, __Symbol::Variant29(__nt), __end)); - (1, 27) + let __nt = super::__action31::<>(input, errors, validator, __sym0); + __symbols.push((__start, __Symbol::Variant31(__nt), __end)); + (1, 29) } - pub(crate) fn __reduce101< + pub(crate) fn __reduce106< 'err, 'input, 'v, @@ -4946,20 +5166,20 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Triplet = PeerId, "(", ServiceId, Function, ")" => ActionFn(23); + // Triplet = PeerId, "(", ServiceId, Function, ")" => ActionFn(24); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant22(__symbols); - let __sym2 = __pop_Variant22(__symbols); + let __sym3 = __pop_Variant24(__symbols); + let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant26(__symbols); + let __sym0 = __pop_Variant28(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action23::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant30(__nt), __end)); - (5, 28) + let __nt = super::__action24::<>(input, errors, validator, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant32(__nt), __end)); + (5, 30) } - pub(crate) fn __reduce102< + pub(crate) fn __reduce107< 'err, 'input, 'v, @@ -4972,15 +5192,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = InitPeerId => ActionFn(67); + // Value = InitPeerId => ActionFn(69); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action67::<>(input, errors, validator, __sym0); + let __nt = super::__action69::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce103< + pub(crate) fn __reduce108< 'err, 'input, 'v, @@ -4993,15 +5213,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = LastError => ActionFn(68); + // Value = LastError => ActionFn(70); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action68::<>(input, errors, validator, __sym0); + let __nt = super::__action70::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce104< + pub(crate) fn __reduce109< 'err, 'input, 'v, @@ -5014,15 +5234,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = LastErrorWithLambda => ActionFn(69); - let __sym0 = __pop_Variant4(__symbols); + // Value = LastErrorWithLambda => ActionFn(71); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action69::<>(input, errors, validator, __sym0); + let __nt = super::__action71::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce105< + pub(crate) fn __reduce110< 'err, 'input, 'v, @@ -5035,15 +5255,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Error => ActionFn(70); + // Value = Error => ActionFn(72); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action70::<>(input, errors, validator, __sym0); + let __nt = super::__action72::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce106< + pub(crate) fn __reduce111< 'err, 'input, 'v, @@ -5056,15 +5276,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = ErrorWithLambda => ActionFn(71); - let __sym0 = __pop_Variant4(__symbols); + // Value = ErrorWithLambda => ActionFn(73); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action71::<>(input, errors, validator, __sym0); + let __nt = super::__action73::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce107< + pub(crate) fn __reduce112< 'err, 'input, 'v, @@ -5077,15 +5297,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Literal => ActionFn(72); - let __sym0 = __pop_Variant7(__symbols); + // Value = Literal => ActionFn(74); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action72::<>(input, errors, validator, __sym0); + let __nt = super::__action74::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce108< + pub(crate) fn __reduce113< 'err, 'input, 'v, @@ -5098,15 +5318,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Timestamp => ActionFn(73); + // Value = Timestamp => ActionFn(75); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action73::<>(input, errors, validator, __sym0); + let __nt = super::__action75::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce109< + pub(crate) fn __reduce114< 'err, 'input, 'v, @@ -5119,15 +5339,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = TTL => ActionFn(74); + // Value = TTL => ActionFn(76); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action74::<>(input, errors, validator, __sym0); + let __nt = super::__action76::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce110< + pub(crate) fn __reduce115< 'err, 'input, 'v, @@ -5140,15 +5360,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Number => ActionFn(75); - let __sym0 = __pop_Variant25(__symbols); + // Value = Number => ActionFn(77); + let __sym0 = __pop_Variant27(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action75::<>(input, errors, validator, __sym0); + let __nt = super::__action77::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce111< + pub(crate) fn __reduce116< 'err, 'input, 'v, @@ -5161,15 +5381,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Boolean => ActionFn(76); + // Value = Boolean => ActionFn(78); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action76::<>(input, errors, validator, __sym0); + let __nt = super::__action78::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce112< + pub(crate) fn __reduce117< 'err, 'input, 'v, @@ -5182,17 +5402,17 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = "[", "]" => ActionFn(77); + // Value = "[", "]" => ActionFn(79); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action77::<>(input, errors, validator, __sym0, __sym1); + let __nt = super::__action79::<>(input, errors, validator, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (2, 29) + (2, 31) } - pub(crate) fn __reduce113< + pub(crate) fn __reduce118< 'err, 'input, 'v, @@ -5205,15 +5425,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = Scalar => ActionFn(78); + // Value = Scalar => ActionFn(80); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action78::<>(input, errors, validator, __sym0); + let __nt = super::__action80::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce114< + pub(crate) fn __reduce119< 'err, 'input, 'v, @@ -5226,15 +5446,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = ScalarWithLambda => ActionFn(79); + // Value = ScalarWithLambda => ActionFn(81); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action79::<>(input, errors, validator, __sym0); + let __nt = super::__action81::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce115< + pub(crate) fn __reduce120< 'err, 'input, 'v, @@ -5247,15 +5467,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = CanonStream => ActionFn(80); + // Value = CanonStream => ActionFn(82); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action80::<>(input, errors, validator, __sym0); + let __nt = super::__action82::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce116< + pub(crate) fn __reduce121< 'err, 'input, 'v, @@ -5268,15 +5488,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = CanonStreamWithLambda => ActionFn(81); + // Value = CanonStreamWithLambda => ActionFn(83); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action81::<>(input, errors, validator, __sym0); + let __nt = super::__action83::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce117< + pub(crate) fn __reduce122< 'err, 'input, 'v, @@ -5289,15 +5509,15 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = CanonStreamMap => ActionFn(82); + // Value = CanonStreamMap => ActionFn(84); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action82::<>(input, errors, validator, __sym0); + let __nt = super::__action84::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } - pub(crate) fn __reduce118< + pub(crate) fn __reduce123< 'err, 'input, 'v, @@ -5310,13 +5530,13 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Value = CanonStreamMapWithLambda => ActionFn(83); + // Value = CanonStreamMapWithLambda => ActionFn(85); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action83::<>(input, errors, validator, __sym0); + let __nt = super::__action85::<>(input, errors, validator, __sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 29) + (1, 31) } } pub use self::__parse__AIR::AIRParser; @@ -5912,6 +6132,36 @@ fn __action21< 'err, 'input, 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + (_, left, _): (AirPos, AirPos, AirPos), + (_, _, _): (AirPos, Token<'input>, AirPos), + (_, _, _): (AirPos, Token<'input>, AirPos), + (_, args, _): (AirPos, Vec>, AirPos), + (_, script, _): (AirPos, &'input str, AirPos), + (_, output, _): (AirPos, core::option::Option>, AirPos), + (_, _, _): (AirPos, Token<'input>, AirPos), + (_, right, _): (AirPos, AirPos, AirPos), +) -> Instruction<'input> +{ + { + let args = Rc::new(args); + let output = output.unwrap_or(EmbedOutputValue::None); + let embed = Embed::new(args, script, output); + let span = Span::new(left, right); + + Instruction::Embed(embed.into()) + } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action22< + 'err, + 'input, + 'v, >( input: &'input str, errors: &'err mut Vec, ParserError>>, @@ -5924,7 +6174,7 @@ fn __action21< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action22< +fn __action23< 'err, 'input, 'v, @@ -5942,7 +6192,7 @@ fn __action22< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action23< +fn __action24< 'err, 'input, 'v, @@ -5966,7 +6216,7 @@ fn __action23< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action24< +fn __action25< 'err, 'input, 'v, @@ -5982,7 +6232,7 @@ fn __action24< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action25< +fn __action26< 'err, 'input, 'v, @@ -5998,7 +6248,7 @@ fn __action25< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action26< +fn __action27< 'err, 'input, 'v, @@ -6014,7 +6264,7 @@ fn __action26< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action27< +fn __action28< 'err, 'input, 'v, @@ -6030,7 +6280,7 @@ fn __action27< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action28< +fn __action29< 'err, 'input, 'v, @@ -6046,7 +6296,7 @@ fn __action28< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action29< +fn __action30< 'err, 'input, 'v, @@ -6062,7 +6312,7 @@ fn __action29< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action30< +fn __action31< 'err, 'input, 'v, @@ -6078,7 +6328,7 @@ fn __action30< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action31< +fn __action32< 'err, 'input, 'v, @@ -6094,7 +6344,7 @@ fn __action31< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action32< +fn __action33< 'err, 'input, 'v, @@ -6110,7 +6360,23 @@ fn __action32< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action33< +fn __action34< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + (_, scalar, _): (AirPos, (&'input str, AirPos), AirPos), +) -> EmbedOutputValue<'input> +{ + EmbedOutputValue::scalar(scalar.0, scalar.1) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action35< 'err, 'input, 'v, @@ -6126,7 +6392,7 @@ fn __action33< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action34< +fn __action36< 'err, 'input, 'v, @@ -6142,7 +6408,7 @@ fn __action34< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action35< +fn __action37< 'err, 'input, 'v, @@ -6162,7 +6428,7 @@ fn __action35< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action36< +fn __action38< 'err, 'input, 'v, @@ -6178,7 +6444,7 @@ fn __action36< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action37< +fn __action39< 'err, 'input, 'v, @@ -6198,7 +6464,7 @@ fn __action37< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action38< +fn __action40< 'err, 'input, 'v, @@ -6218,7 +6484,7 @@ fn __action38< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action39< +fn __action41< 'err, 'input, 'v, @@ -6234,7 +6500,7 @@ fn __action39< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action40< +fn __action42< 'err, 'input, 'v, @@ -6250,7 +6516,7 @@ fn __action40< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action41< +fn __action43< 'err, 'input, 'v, @@ -6266,7 +6532,7 @@ fn __action41< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action42< +fn __action44< 'err, 'input, 'v, @@ -6282,7 +6548,7 @@ fn __action42< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action43< +fn __action45< 'err, 'input, 'v, @@ -6298,7 +6564,7 @@ fn __action43< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action44< +fn __action46< 'err, 'input, 'v, @@ -6315,7 +6581,7 @@ fn __action44< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action45< +fn __action47< 'err, 'input, 'v, @@ -6331,7 +6597,7 @@ fn __action45< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action46< +fn __action48< 'err, 'input, 'v, @@ -6347,7 +6613,7 @@ fn __action46< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action47< +fn __action49< 'err, 'input, 'v, @@ -6363,7 +6629,7 @@ fn __action47< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action48< +fn __action50< 'err, 'input, 'v, @@ -6379,7 +6645,7 @@ fn __action48< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action49< +fn __action51< 'err, 'input, 'v, @@ -6395,7 +6661,7 @@ fn __action49< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action50< +fn __action52< 'err, 'input, 'v, @@ -6411,7 +6677,7 @@ fn __action50< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action51< +fn __action53< 'err, 'input, 'v, @@ -6427,7 +6693,7 @@ fn __action51< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action52< +fn __action54< 'err, 'input, 'v, @@ -6443,7 +6709,7 @@ fn __action52< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action53< +fn __action55< 'err, 'input, 'v, @@ -6459,7 +6725,7 @@ fn __action53< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action54< +fn __action56< 'err, 'input, 'v, @@ -6475,7 +6741,7 @@ fn __action54< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action55< +fn __action57< 'err, 'input, 'v, @@ -6491,7 +6757,7 @@ fn __action55< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action56< +fn __action58< 'err, 'input, 'v, @@ -6507,7 +6773,7 @@ fn __action56< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action57< +fn __action59< 'err, 'input, 'v, @@ -6523,7 +6789,7 @@ fn __action57< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action58< +fn __action60< 'err, 'input, 'v, @@ -6539,7 +6805,7 @@ fn __action58< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action59< +fn __action61< 'err, 'input, 'v, @@ -6555,7 +6821,7 @@ fn __action59< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action60< +fn __action62< 'err, 'input, 'v, @@ -6571,7 +6837,7 @@ fn __action60< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action61< +fn __action63< 'err, 'input, 'v, @@ -6587,7 +6853,7 @@ fn __action61< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action62< +fn __action64< 'err, 'input, 'v, @@ -6603,7 +6869,7 @@ fn __action62< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action63< +fn __action65< 'err, 'input, 'v, @@ -6619,7 +6885,7 @@ fn __action63< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action64< +fn __action66< 'err, 'input, 'v, @@ -6635,7 +6901,7 @@ fn __action64< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action65< +fn __action67< 'err, 'input, 'v, @@ -6651,7 +6917,7 @@ fn __action65< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action66< +fn __action68< 'err, 'input, 'v, @@ -6667,7 +6933,7 @@ fn __action66< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action67< +fn __action69< 'err, 'input, 'v, @@ -6683,7 +6949,7 @@ fn __action67< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action68< +fn __action70< 'err, 'input, 'v, @@ -6699,7 +6965,7 @@ fn __action68< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action69< +fn __action71< 'err, 'input, 'v, @@ -6715,7 +6981,7 @@ fn __action69< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action70< +fn __action72< 'err, 'input, 'v, @@ -6731,7 +6997,7 @@ fn __action70< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action71< +fn __action73< 'err, 'input, 'v, @@ -6747,7 +7013,7 @@ fn __action71< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action72< +fn __action74< 'err, 'input, 'v, @@ -6763,7 +7029,7 @@ fn __action72< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action73< +fn __action75< 'err, 'input, 'v, @@ -6779,7 +7045,7 @@ fn __action73< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action74< +fn __action76< 'err, 'input, 'v, @@ -6795,7 +7061,7 @@ fn __action74< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action75< +fn __action77< 'err, 'input, 'v, @@ -6811,7 +7077,7 @@ fn __action75< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action76< +fn __action78< 'err, 'input, 'v, @@ -6827,7 +7093,7 @@ fn __action76< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action77< +fn __action79< 'err, 'input, 'v, @@ -6844,7 +7110,7 @@ fn __action77< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action78< +fn __action80< 'err, 'input, 'v, @@ -6860,7 +7126,7 @@ fn __action78< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action79< +fn __action81< 'err, 'input, 'v, @@ -6876,7 +7142,7 @@ fn __action79< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action80< +fn __action82< 'err, 'input, 'v, @@ -6892,7 +7158,7 @@ fn __action80< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action81< +fn __action83< 'err, 'input, 'v, @@ -6908,7 +7174,7 @@ fn __action81< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action82< +fn __action84< 'err, 'input, 'v, @@ -6924,7 +7190,7 @@ fn __action82< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action83< +fn __action85< 'err, 'input, 'v, @@ -6940,7 +7206,7 @@ fn __action83< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action84< +fn __action86< 'err, 'input, 'v, @@ -6956,7 +7222,7 @@ fn __action84< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action85< +fn __action87< 'err, 'input, 'v, @@ -6972,7 +7238,7 @@ fn __action85< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action86< +fn __action88< 'err, 'input, 'v, @@ -6988,7 +7254,7 @@ fn __action86< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action87< +fn __action89< 'err, 'input, 'v, @@ -7004,7 +7270,7 @@ fn __action87< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action88< +fn __action90< 'err, 'input, 'v, @@ -7020,7 +7286,7 @@ fn __action88< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action89< +fn __action91< 'err, 'input, 'v, @@ -7036,7 +7302,7 @@ fn __action89< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action90< +fn __action92< 'err, 'input, 'v, @@ -7052,7 +7318,7 @@ fn __action90< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action91< +fn __action93< 'err, 'input, 'v, @@ -7068,7 +7334,7 @@ fn __action91< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action92< +fn __action94< 'err, 'input, 'v, @@ -7084,7 +7350,7 @@ fn __action92< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action93< +fn __action95< 'err, 'input, 'v, @@ -7100,7 +7366,7 @@ fn __action93< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action94< +fn __action96< 'err, 'input, 'v, @@ -7117,7 +7383,7 @@ fn __action94< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action95< +fn __action97< 'err, 'input, 'v, @@ -7133,7 +7399,7 @@ fn __action95< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action96< +fn __action98< 'err, 'input, 'v, @@ -7149,7 +7415,7 @@ fn __action96< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action97< +fn __action99< 'err, 'input, 'v, @@ -7165,7 +7431,7 @@ fn __action97< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action98< +fn __action100< 'err, 'input, 'v, @@ -7181,7 +7447,7 @@ fn __action98< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action99< +fn __action101< 'err, 'input, 'v, @@ -7197,7 +7463,7 @@ fn __action99< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action100< +fn __action102< 'err, 'input, 'v, @@ -7213,7 +7479,7 @@ fn __action100< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action101< +fn __action103< 'err, 'input, 'v, @@ -7229,7 +7495,7 @@ fn __action101< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action102< +fn __action104< 'err, 'input, 'v, @@ -7245,7 +7511,7 @@ fn __action102< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action103< +fn __action105< 'err, 'input, 'v, @@ -7261,7 +7527,7 @@ fn __action103< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action104< +fn __action106< 'err, 'input, 'v, @@ -7278,7 +7544,7 @@ fn __action104< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action105< +fn __action107< 'err, 'input, 'v, @@ -7294,7 +7560,7 @@ fn __action105< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action106< +fn __action108< 'err, 'input, 'v, @@ -7310,7 +7576,40 @@ fn __action106< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action107< +fn __action109< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + (_, __0, _): (AirPos, EmbedOutputValue<'input>, AirPos), +) -> core::option::Option> +{ + Some(__0) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action110< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __lookbehind: &AirPos, + __lookahead: &AirPos, +) -> core::option::Option> +{ + None +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action111< 'err, 'input, 'v, @@ -7326,7 +7625,7 @@ fn __action107< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action108< +fn __action112< 'err, 'input, 'v, @@ -7342,7 +7641,7 @@ fn __action108< } #[allow(unused_variables)] -fn __action109< +fn __action113< 'err, 'input, 'v, @@ -7359,7 +7658,7 @@ fn __action109< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action110< +fn __action114< 'err, 'input, 'v, @@ -7375,7 +7674,7 @@ fn __action110< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action111< +fn __action115< 'err, 'input, 'v, @@ -7391,7 +7690,7 @@ fn __action111< } #[allow(unused_variables)] -fn __action112< +fn __action116< 'err, 'input, 'v, @@ -7408,7 +7707,7 @@ fn __action112< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action113< +fn __action117< 'err, 'input, 'v, @@ -7424,7 +7723,7 @@ fn __action113< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action114< +fn __action118< 'err, 'input, 'v, @@ -7441,7 +7740,7 @@ fn __action114< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action115< +fn __action119< 'err, 'input, 'v, @@ -7454,14 +7753,14 @@ fn __action115< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action106( + let __temp0 = __action108( input, errors, validator, __0, ); let __temp0 = (__start0, __temp0, __end0); - __action113( + __action117( input, errors, validator, @@ -7471,7 +7770,7 @@ fn __action115< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action116< +fn __action120< 'err, 'input, 'v, @@ -7485,14 +7784,14 @@ fn __action116< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action106( + let __temp0 = __action108( input, errors, validator, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action114( + __action118( input, errors, validator, @@ -7503,7 +7802,7 @@ fn __action116< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action117< +fn __action121< 'err, 'input, 'v, @@ -7517,7 +7816,7 @@ fn __action117< { let __start0 = __0.2; let __end0 = __1.0; - let __temp0 = __action104( + let __temp0 = __action106( input, errors, validator, @@ -7525,7 +7824,7 @@ fn __action117< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action22( + __action23( input, errors, validator, @@ -7537,7 +7836,7 @@ fn __action117< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action118< +fn __action122< 'err, 'input, 'v, @@ -7552,14 +7851,14 @@ fn __action118< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action105( + let __temp0 = __action107( input, errors, validator, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action22( + __action23( input, errors, validator, @@ -7571,7 +7870,7 @@ fn __action118< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action119< +fn __action123< 'err, 'input, 'v, @@ -7585,7 +7884,7 @@ fn __action119< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7593,7 +7892,7 @@ fn __action119< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action37( + __action39( input, errors, validator, @@ -7605,7 +7904,7 @@ fn __action119< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action120< +fn __action124< 'err, 'input, 'v, @@ -7619,7 +7918,7 @@ fn __action120< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7627,7 +7926,7 @@ fn __action120< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action38( + __action40( input, errors, validator, @@ -7639,7 +7938,7 @@ fn __action120< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action121< +fn __action125< 'err, 'input, 'v, @@ -7658,7 +7957,7 @@ fn __action121< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7683,7 +7982,7 @@ fn __action121< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action122< +fn __action126< 'err, 'input, 'v, @@ -7702,7 +8001,7 @@ fn __action122< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7727,7 +8026,7 @@ fn __action122< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action123< +fn __action127< 'err, 'input, 'v, @@ -7746,7 +8045,7 @@ fn __action123< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7771,7 +8070,7 @@ fn __action123< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action124< +fn __action128< 'err, 'input, 'v, @@ -7790,7 +8089,7 @@ fn __action124< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7815,7 +8114,7 @@ fn __action124< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action125< +fn __action129< 'err, 'input, 'v, @@ -7833,7 +8132,7 @@ fn __action125< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7857,7 +8156,7 @@ fn __action125< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action126< +fn __action130< 'err, 'input, 'v, @@ -7878,7 +8177,7 @@ fn __action126< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7905,7 +8204,7 @@ fn __action126< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action127< +fn __action131< 'err, 'input, 'v, @@ -7923,7 +8222,7 @@ fn __action127< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7947,7 +8246,7 @@ fn __action127< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action128< +fn __action132< 'err, 'input, 'v, @@ -7965,7 +8264,7 @@ fn __action128< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -7989,7 +8288,7 @@ fn __action128< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action129< +fn __action133< 'err, 'input, 'v, @@ -8005,7 +8304,7 @@ fn __action129< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8027,7 +8326,7 @@ fn __action129< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action130< +fn __action134< 'err, 'input, 'v, @@ -8043,7 +8342,7 @@ fn __action130< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8065,7 +8364,7 @@ fn __action130< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action131< +fn __action135< 'err, 'input, 'v, @@ -8083,7 +8382,7 @@ fn __action131< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8107,7 +8406,7 @@ fn __action131< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action132< +fn __action136< 'err, 'input, 'v, @@ -8124,7 +8423,7 @@ fn __action132< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8147,7 +8446,7 @@ fn __action132< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action133< +fn __action137< 'err, 'input, 'v, @@ -8167,7 +8466,7 @@ fn __action133< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8193,7 +8492,7 @@ fn __action133< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action134< +fn __action138< 'err, 'input, 'v, @@ -8213,7 +8512,7 @@ fn __action134< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8239,7 +8538,7 @@ fn __action134< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action135< +fn __action139< 'err, 'input, 'v, @@ -8259,7 +8558,7 @@ fn __action135< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8285,7 +8584,7 @@ fn __action135< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action136< +fn __action140< 'err, 'input, 'v, @@ -8302,7 +8601,7 @@ fn __action136< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8325,7 +8624,7 @@ fn __action136< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action137< +fn __action141< 'err, 'input, 'v, @@ -8343,7 +8642,50 @@ fn __action137< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( + input, + errors, + validator, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action18( + input, + errors, + validator, + __temp0, + __0, + __1, + __2, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action142< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __0: (AirPos, Token<'input>, AirPos), + __1: (AirPos, Token<'input>, AirPos), + __2: (AirPos, ImmutableValue<'input>, AirPos), + __3: (AirPos, ImmutableValue<'input>, AirPos), + __4: (AirPos, Instruction<'input>, AirPos), + __5: (AirPos, Token<'input>, AirPos), + __6: (AirPos, AirPos, AirPos), +) -> Instruction<'input> +{ + let __start0 = __0.0; + let __end0 = __0.0; + let __temp0 = __action116( input, errors, validator, @@ -8351,7 +8693,7 @@ fn __action137< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action18( + __action19( input, errors, validator, @@ -8362,12 +8704,13 @@ fn __action137< __3, __4, __5, + __6, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action138< +fn __action143< 'err, 'input, 'v, @@ -8386,7 +8729,7 @@ fn __action138< { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8394,7 +8737,7 @@ fn __action138< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action19( + __action20( input, errors, validator, @@ -8411,7 +8754,7 @@ fn __action138< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action139< +fn __action144< 'err, 'input, 'v, @@ -8421,16 +8764,16 @@ fn __action139< validator: &'v mut VariableValidator<'input>, __0: (AirPos, Token<'input>, AirPos), __1: (AirPos, Token<'input>, AirPos), - __2: (AirPos, ImmutableValue<'input>, AirPos), - __3: (AirPos, ImmutableValue<'input>, AirPos), - __4: (AirPos, Instruction<'input>, AirPos), + __2: (AirPos, Vec>, AirPos), + __3: (AirPos, &'input str, AirPos), + __4: (AirPos, core::option::Option>, AirPos), __5: (AirPos, Token<'input>, AirPos), __6: (AirPos, AirPos, AirPos), ) -> Instruction<'input> { let __start0 = __0.0; let __end0 = __0.0; - let __temp0 = __action112( + let __temp0 = __action116( input, errors, validator, @@ -8438,7 +8781,7 @@ fn __action139< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action20( + __action21( input, errors, validator, @@ -8455,7 +8798,7 @@ fn __action139< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action140< +fn __action145< 'err, 'input, 'v, @@ -8468,7 +8811,7 @@ fn __action140< { let __start0 = __0.2; let __end0 = __0.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8476,7 +8819,7 @@ fn __action140< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action119( + __action123( input, errors, validator, @@ -8487,7 +8830,7 @@ fn __action140< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action141< +fn __action146< 'err, 'input, 'v, @@ -8500,7 +8843,7 @@ fn __action141< { let __start0 = __0.2; let __end0 = __0.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8508,7 +8851,7 @@ fn __action141< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action120( + __action124( input, errors, validator, @@ -8519,7 +8862,7 @@ fn __action141< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action142< +fn __action147< 'err, 'input, 'v, @@ -8537,7 +8880,7 @@ fn __action142< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8545,7 +8888,7 @@ fn __action142< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action121( + __action125( input, errors, validator, @@ -8561,7 +8904,7 @@ fn __action142< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action143< +fn __action148< 'err, 'input, 'v, @@ -8579,7 +8922,7 @@ fn __action143< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8587,7 +8930,7 @@ fn __action143< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action122( + __action126( input, errors, validator, @@ -8603,7 +8946,7 @@ fn __action143< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action144< +fn __action149< 'err, 'input, 'v, @@ -8621,7 +8964,7 @@ fn __action144< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8629,7 +8972,7 @@ fn __action144< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action123( + __action127( input, errors, validator, @@ -8645,7 +8988,7 @@ fn __action144< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action145< +fn __action150< 'err, 'input, 'v, @@ -8663,7 +9006,7 @@ fn __action145< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8671,7 +9014,7 @@ fn __action145< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action124( + __action128( input, errors, validator, @@ -8687,7 +9030,7 @@ fn __action145< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action146< +fn __action151< 'err, 'input, 'v, @@ -8704,7 +9047,7 @@ fn __action146< { let __start0 = __4.2; let __end0 = __4.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8712,7 +9055,7 @@ fn __action146< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action125( + __action129( input, errors, validator, @@ -8727,7 +9070,7 @@ fn __action146< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action147< +fn __action152< 'err, 'input, 'v, @@ -8747,7 +9090,7 @@ fn __action147< { let __start0 = __7.2; let __end0 = __7.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8755,7 +9098,7 @@ fn __action147< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action126( + __action130( input, errors, validator, @@ -8773,7 +9116,7 @@ fn __action147< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action148< +fn __action153< 'err, 'input, 'v, @@ -8790,7 +9133,7 @@ fn __action148< { let __start0 = __4.2; let __end0 = __4.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8798,7 +9141,7 @@ fn __action148< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action127( + __action131( input, errors, validator, @@ -8813,7 +9156,7 @@ fn __action148< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action149< +fn __action154< 'err, 'input, 'v, @@ -8830,7 +9173,7 @@ fn __action149< { let __start0 = __4.2; let __end0 = __4.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8838,7 +9181,7 @@ fn __action149< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action128( + __action132( input, errors, validator, @@ -8853,7 +9196,7 @@ fn __action149< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action150< +fn __action155< 'err, 'input, 'v, @@ -8868,7 +9211,7 @@ fn __action150< { let __start0 = __2.2; let __end0 = __2.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8876,7 +9219,7 @@ fn __action150< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action129( + __action133( input, errors, validator, @@ -8889,7 +9232,7 @@ fn __action150< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action151< +fn __action156< 'err, 'input, 'v, @@ -8904,7 +9247,7 @@ fn __action151< { let __start0 = __2.2; let __end0 = __2.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8912,7 +9255,7 @@ fn __action151< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action130( + __action134( input, errors, validator, @@ -8925,7 +9268,7 @@ fn __action151< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action152< +fn __action157< 'err, 'input, 'v, @@ -8942,7 +9285,7 @@ fn __action152< { let __start0 = __4.2; let __end0 = __4.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8950,7 +9293,7 @@ fn __action152< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action131( + __action135( input, errors, validator, @@ -8965,7 +9308,7 @@ fn __action152< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action153< +fn __action158< 'err, 'input, 'v, @@ -8981,7 +9324,7 @@ fn __action153< { let __start0 = __3.2; let __end0 = __3.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -8989,7 +9332,7 @@ fn __action153< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action132( + __action136( input, errors, validator, @@ -9003,7 +9346,7 @@ fn __action153< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action154< +fn __action159< 'err, 'input, 'v, @@ -9022,7 +9365,7 @@ fn __action154< { let __start0 = __6.2; let __end0 = __6.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9030,7 +9373,7 @@ fn __action154< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action133( + __action137( input, errors, validator, @@ -9047,7 +9390,7 @@ fn __action154< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action155< +fn __action160< 'err, 'input, 'v, @@ -9066,7 +9409,7 @@ fn __action155< { let __start0 = __6.2; let __end0 = __6.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9074,7 +9417,7 @@ fn __action155< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action134( + __action138( input, errors, validator, @@ -9091,7 +9434,7 @@ fn __action155< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action156< +fn __action161< 'err, 'input, 'v, @@ -9110,7 +9453,7 @@ fn __action156< { let __start0 = __6.2; let __end0 = __6.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9118,7 +9461,7 @@ fn __action156< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action135( + __action139( input, errors, validator, @@ -9135,7 +9478,7 @@ fn __action156< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action157< +fn __action162< 'err, 'input, 'v, @@ -9151,7 +9494,7 @@ fn __action157< { let __start0 = __3.2; let __end0 = __3.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9159,7 +9502,7 @@ fn __action157< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action136( + __action140( input, errors, validator, @@ -9173,7 +9516,7 @@ fn __action157< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action158< +fn __action163< 'err, 'input, 'v, @@ -9190,7 +9533,7 @@ fn __action158< { let __start0 = __4.2; let __end0 = __4.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9198,7 +9541,7 @@ fn __action158< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action137( + __action141( input, errors, validator, @@ -9213,7 +9556,7 @@ fn __action158< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action159< +fn __action164< 'err, 'input, 'v, @@ -9231,7 +9574,7 @@ fn __action159< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9239,7 +9582,7 @@ fn __action159< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action138( + __action142( input, errors, validator, @@ -9255,7 +9598,7 @@ fn __action159< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action160< +fn __action165< 'err, 'input, 'v, @@ -9273,7 +9616,7 @@ fn __action160< { let __start0 = __5.2; let __end0 = __5.2; - let __temp0 = __action109( + let __temp0 = __action113( input, errors, validator, @@ -9281,7 +9624,7 @@ fn __action160< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action139( + __action143( input, errors, validator, @@ -9297,7 +9640,49 @@ fn __action160< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action161< +fn __action166< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __0: (AirPos, Token<'input>, AirPos), + __1: (AirPos, Token<'input>, AirPos), + __2: (AirPos, Vec>, AirPos), + __3: (AirPos, &'input str, AirPos), + __4: (AirPos, core::option::Option>, AirPos), + __5: (AirPos, Token<'input>, AirPos), +) -> Instruction<'input> +{ + let __start0 = __5.2; + let __end0 = __5.2; + let __temp0 = __action113( + input, + errors, + validator, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action144( + input, + errors, + validator, + __0, + __1, + __2, + __3, + __4, + __5, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action167< 'err, 'input, 'v, @@ -9315,14 +9700,14 @@ fn __action161< { let __start0 = __4.0; let __end0 = __4.2; - let __temp0 = __action110( + let __temp0 = __action114( input, errors, validator, __4, ); let __temp0 = (__start0, __temp0, __end0); - __action142( + __action147( input, errors, validator, @@ -9337,7 +9722,7 @@ fn __action161< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action162< +fn __action168< 'err, 'input, 'v, @@ -9354,7 +9739,7 @@ fn __action162< { let __start0 = __3.2; let __end0 = __4.0; - let __temp0 = __action111( + let __temp0 = __action115( input, errors, validator, @@ -9362,7 +9747,7 @@ fn __action162< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action142( + __action147( input, errors, validator, @@ -9377,7 +9762,87 @@ fn __action162< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action163< +fn __action169< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __0: (AirPos, Token<'input>, AirPos), + __1: (AirPos, Token<'input>, AirPos), + __2: (AirPos, Vec>, AirPos), + __3: (AirPos, &'input str, AirPos), + __4: (AirPos, EmbedOutputValue<'input>, AirPos), + __5: (AirPos, Token<'input>, AirPos), +) -> Instruction<'input> +{ + let __start0 = __4.0; + let __end0 = __4.2; + let __temp0 = __action109( + input, + errors, + validator, + __4, + ); + let __temp0 = (__start0, __temp0, __end0); + __action166( + input, + errors, + validator, + __0, + __1, + __2, + __3, + __temp0, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action170< + 'err, + 'input, + 'v, +>( + input: &'input str, + errors: &'err mut Vec, ParserError>>, + validator: &'v mut VariableValidator<'input>, + __0: (AirPos, Token<'input>, AirPos), + __1: (AirPos, Token<'input>, AirPos), + __2: (AirPos, Vec>, AirPos), + __3: (AirPos, &'input str, AirPos), + __4: (AirPos, Token<'input>, AirPos), +) -> Instruction<'input> +{ + let __start0 = __3.2; + let __end0 = __4.0; + let __temp0 = __action110( + input, + errors, + validator, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action166( + input, + errors, + validator, + __0, + __1, + __2, + __3, + __temp0, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action171< 'err, 'input, 'v, @@ -9396,14 +9861,14 @@ fn __action163< { let __start0 = __5.0; let __end0 = __5.2; - let __temp0 = __action107( + let __temp0 = __action111( input, errors, validator, __5, ); let __temp0 = (__start0, __temp0, __end0); - __action154( + __action159( input, errors, validator, @@ -9419,7 +9884,7 @@ fn __action163< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action164< +fn __action172< 'err, 'input, 'v, @@ -9437,7 +9902,7 @@ fn __action164< { let __start0 = __4.2; let __end0 = __5.0; - let __temp0 = __action108( + let __temp0 = __action112( input, errors, validator, @@ -9445,7 +9910,7 @@ fn __action164< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action154( + __action159( input, errors, validator, @@ -9461,7 +9926,7 @@ fn __action164< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action165< +fn __action173< 'err, 'input, 'v, @@ -9480,14 +9945,14 @@ fn __action165< { let __start0 = __5.0; let __end0 = __5.2; - let __temp0 = __action107( + let __temp0 = __action111( input, errors, validator, __5, ); let __temp0 = (__start0, __temp0, __end0); - __action155( + __action160( input, errors, validator, @@ -9503,7 +9968,7 @@ fn __action165< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action166< +fn __action174< 'err, 'input, 'v, @@ -9521,7 +9986,7 @@ fn __action166< { let __start0 = __4.2; let __end0 = __5.0; - let __temp0 = __action108( + let __temp0 = __action112( input, errors, validator, @@ -9529,7 +9994,7 @@ fn __action166< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action155( + __action160( input, errors, validator, @@ -9545,7 +10010,7 @@ fn __action166< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action167< +fn __action175< 'err, 'input, 'v, @@ -9564,14 +10029,14 @@ fn __action167< { let __start0 = __5.0; let __end0 = __5.2; - let __temp0 = __action107( + let __temp0 = __action111( input, errors, validator, __5, ); let __temp0 = (__start0, __temp0, __end0); - __action156( + __action161( input, errors, validator, @@ -9587,7 +10052,7 @@ fn __action167< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action168< +fn __action176< 'err, 'input, 'v, @@ -9605,7 +10070,7 @@ fn __action168< { let __start0 = __4.2; let __end0 = __5.0; - let __temp0 = __action108( + let __temp0 = __action112( input, errors, validator, @@ -9613,7 +10078,7 @@ fn __action168< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action156( + __action161( input, errors, validator, diff --git a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs index 035b37694..b9130d4da 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs @@ -231,6 +231,7 @@ fn string_to_token(input: &str, start_pos: AirPos) -> LexerResult { NULL_INSTR => Ok(Token::Null), MATCH_INSTR => Ok(Token::Match), MISMATCH_INSTR => Ok(Token::MisMatch), + EMBED_INSTR => Ok(Token::Embed), INIT_PEER_ID => Ok(Token::InitPeerId), _ if input.starts_with(ERROR) => parse_error(input, start_pos, ERROR, Token::Error), @@ -294,6 +295,7 @@ const NEXT_INSTR: &str = "next"; const NULL_INSTR: &str = "null"; const MATCH_INSTR: &str = "match"; const MISMATCH_INSTR: &str = "mismatch"; +const EMBED_INSTR: &str = "embed"; const INIT_PEER_ID: &str = "%init_peer_id%"; pub(crate) const LAST_ERROR: &str = "%last_error%"; diff --git a/crates/air-lib/air-parser/src/parser/lexer/token.rs b/crates/air-lib/air-parser/src/parser/lexer/token.rs index acf991533..89473cffe 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/token.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/token.rs @@ -105,4 +105,5 @@ pub enum Token<'input> { Null, Match, MisMatch, + Embed, } diff --git a/crates/beautifier/src/beautifier.rs b/crates/beautifier/src/beautifier.rs index b0acdc1c8..73455e03f 100644 --- a/crates/beautifier/src/beautifier.rs +++ b/crates/beautifier/src/beautifier.rs @@ -167,6 +167,7 @@ impl Beautifier { ast::Instruction::Next(next) => self.beautify_simple(next, indent), ast::Instruction::Null(null) => self.beautify_simple(null, indent), ast::Instruction::Error => self.beautify_simple("error", indent), + ast::Instruction::Embed(embed) => self.beautify_embed(embed, indent), } } @@ -185,6 +186,21 @@ impl Beautifier { ) } + fn beautify_embed(&mut self, embed: &ast::Embed<'_>, indent: usize) -> io::Result<()> { + fmt_indent(&mut self.output, indent)?; + match &embed.output { + ast::EmbedOutputValue::Scalar(v) => write!(&mut self.output, "{v} <- ")?, + ast::EmbedOutputValue::None => {} + } + writeln!( + &mut self.output, + "embed [{}] (#{}#)", + CallArgs(embed.args.as_slice()), + embed.script, + + ) + } + fn beautify_simple(&mut self, instruction: impl Display, indent: usize) -> io::Result<()> { fmt_indent(&mut self.output, indent)?; writeln!(&mut self.output, "{instruction}") From d6650f93bfd7e34c005cf6f17fe268e7c9f2e9c9 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 25 Jul 2024 23:16:54 +0200 Subject: [PATCH 09/36] More starlark tests --- .../air-lib/interpreter-starlark/src/lib.rs | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 9a9fcd6b4..afec786ce 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -250,7 +250,70 @@ mod tests { .into(); let script = r#"get_value(0)["property"]"#; - let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); + let res = execute(script, &[(value.clone(), tetraplet)]).unwrap(); assert_eq!(res, JValue::Null); } + + #[test] + fn test_value_eq_self() { + let tetraplet = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value: JValue = json!({ + "test": 42, + "property": null, + }) + .into(); + let script = "get_value(0) == get_value(0)"; + + let res = execute(script, &[(value, tetraplet)]).unwrap(); + assert_eq!(res, true); + } + + #[test] + fn test_value_eq_same() { + let tetraplet: Rc<_> = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value: JValue = json!({ + "test": 42, + "property": null, + }) + .into(); + let script = "get_value(0) == get_value(1)"; + + let res = execute( + script, + &[(value.clone(), tetraplet.clone()), (value, tetraplet)], + ) + .unwrap(); + assert_eq!(res, true); + } + + #[test] + fn test_value_eq_different() { + let tetraplet: Rc<_> = + SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let value1: JValue = json!({ + "test": 42, + "property": null, + }) + .into(); + let value2: JValue = json!({ + "test": 48, + "property": null, + }) + .into(); + let script = "get_value(0) == get_value(1)"; + + let res = execute(script, &[(value1, tetraplet.clone()), (value2, tetraplet)]).unwrap(); + assert_eq!(res, false); + } + + #[test] + fn test_escape_cannot_be_used_in_air_parser() { + let script = r#"'test\#'"#; + + let res = execute(script, &[]).unwrap(); + assert_eq!(res, "test\\#"); + } + } From 804ba8c2fa76f79d4ae79256c1b2b568ddf26957 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Fri, 26 Jul 2024 18:24:20 +0200 Subject: [PATCH 10/36] Add `embed` parser tests --- .../air-parser/src/ast/tests/instructions.rs | 6 + .../air-parser/src/parser/tests/embed.rs | 128 ++++++++++++++++++ .../air-parser/src/parser/tests/mod.rs | 1 + 3 files changed, 135 insertions(+) create mode 100644 crates/air-lib/air-parser/src/parser/tests/embed.rs diff --git a/crates/air-lib/air-parser/src/ast/tests/instructions.rs b/crates/air-lib/air-parser/src/ast/tests/instructions.rs index bd5d27b8d..939da41be 100644 --- a/crates/air-lib/air-parser/src/ast/tests/instructions.rs +++ b/crates/air-lib/air-parser/src/ast/tests/instructions.rs @@ -34,3 +34,9 @@ fn display_fail_last_error() { let ast = crate::parse("(fail %last_error%)").unwrap(); assert_eq!(ast.to_string(), "fail %last_error%"); } + +#[test] +fn display_embed() { + let ast = crate::parse("(embed [var1 var2.$.length] (#get_argument(0)+get_argument(1)#) x)").unwrap(); + assert_eq!(ast.to_string(), "embed [var1 var2.$.length] (#get_argument(0)+get_argument(1)#) x"); +} diff --git a/crates/air-lib/air-parser/src/parser/tests/embed.rs b/crates/air-lib/air-parser/src/parser/tests/embed.rs new file mode 100644 index 000000000..998f3458b --- /dev/null +++ b/crates/air-lib/air-parser/src/parser/tests/embed.rs @@ -0,0 +1,128 @@ +/* + * AquaVM Workflow Engine + * + * Copyright (C) 2024 Fluence DAO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +use air_lambda_ast::{LambdaAST, ValueAccessor}; + +use super::parse; +use crate::ast::Embed; +use crate::ast::EmbedOutputValue; +use crate::ast::ImmutableValue; +use crate::ast::ImmutableVariable; +use crate::ast::Scalar; + +#[test] +fn embed_with_var() { + let embed_script = r#" +def sum(x): + n = 0 + for i in range(x): + n += i + return n + +sum(get_value(0) + get_value(1)) + "#; + let source_code = format!( + " + (embed [x %last_error%.$.message!] (#{}#) + var) + ", + embed_script + ); + + let actual = parse(&source_code); + let expected = crate::ast::Instruction::Embed( + Embed { + args: vec![ + ImmutableValue::Variable(ImmutableVariable::Scalar(Scalar::new("x", 17.into()))), + ImmutableValue::LastError(Some( + LambdaAST::try_from_accessors(vec![ValueAccessor::FieldAccessByName { + field_name: "message", + }]) + .unwrap(), + )), + ] + .into(), + script: embed_script, + output: EmbedOutputValue::Scalar(Scalar::new("var", 180.into())), + } + .into(), + ); + + assert_eq!(actual, expected); +} + +#[test] +fn embed_no_var() { + let embed_script = r#" get_tetraplet(0).peer_pk + ": " + get_value(1) "#; + let source_code = format!( + r#" + (embed [x %last_error%.$.message!] (#{}#)) + "#, + embed_script + ); + + let actual = parse(&source_code); + let expected = crate::ast::Instruction::Embed( + Embed { + args: vec![ + ImmutableValue::Variable(ImmutableVariable::Scalar(Scalar::new("x", 17.into()))), + ImmutableValue::LastError(Some( + LambdaAST::try_from_accessors(vec![ValueAccessor::FieldAccessByName { + field_name: "message", + }]) + .unwrap(), + )), + ] + .into(), + script: embed_script, + output: EmbedOutputValue::None, + } + .into(), + ); + + assert_eq!(actual, expected); +} + +#[test] +fn embed_with_hash_symbol_string() { + let source_code = r##" + (embed [x %last_error%.$.message!] (#"the hash inside the string: \x23"#) var) + "##; + + let actual = parse(source_code); + let expected = crate::ast::Instruction::Embed( + Embed { + args: vec![ + ImmutableValue::Variable(ImmutableVariable::Scalar(Scalar::new("x", 17.into()))), + ImmutableValue::LastError(Some( + LambdaAST::try_from_accessors(vec![ValueAccessor::FieldAccessByName { + field_name: "message", + }]) + .unwrap(), + )), + ] + .into(), + script: r#""the hash inside the string: \x23""#, + output: EmbedOutputValue::Scalar(Scalar::new("var", 83.into())), + } + .into(), + ); + + assert_eq!(actual, expected); +} diff --git a/crates/air-lib/air-parser/src/parser/tests/mod.rs b/crates/air-lib/air-parser/src/parser/tests/mod.rs index 6d5b96111..78424e2e4 100644 --- a/crates/air-lib/air-parser/src/parser/tests/mod.rs +++ b/crates/air-lib/air-parser/src/parser/tests/mod.rs @@ -21,6 +21,7 @@ mod ap; mod call; mod canon; mod dsl; +mod embed; mod fail; mod fold; mod match_; From e06aaa21be4083a85c9e18c2e6f806fde8d17661 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 30 Jul 2024 16:24:14 +0200 Subject: [PATCH 11/36] starlark's get_tetraplet returns list As theoretically many tetraplets may be associated with a value, we return all of them instead of just one. --- .../air-lib/interpreter-starlark/src/lib.rs | 55 +++++++++++-------- .../interpreter-starlark/src/tetraplet.rs | 51 ++++++++++------- 2 files changed, 63 insertions(+), 43 deletions(-) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index afec786ce..05bb4ccbe 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -77,7 +77,7 @@ impl ExecutionError { pub fn execute( content: &str, - args: &[(JValue, Rc)], + args: Vec<(JValue, Vec>)>, ) -> Result { // unfortunately, // 1. AstModule is not clonable @@ -142,11 +142,11 @@ pub fn execute( #[derive(Debug, Default, ProvidesStaticType)] struct StarlarkCtx { error: RefCell>, - args: Vec<(JValue, Rc)>, + args: Vec<(JValue, Vec>)>, } impl StarlarkCtx { - fn new(args: Vec<(JValue, Rc)>) -> Self { + fn new(args: Vec<(JValue, Vec>)>) -> Self { Self { error: <_>::default(), args, @@ -208,10 +208,18 @@ fn aquavm_module(builder: &mut GlobalsBuilder) { let heap = eval.heap(); match ctx.args.get(index) { - Some((_value, ref tetraplet)) => Ok(heap.alloc(StarlarkSecurityTetraplet::new( - tetraplet, - eval.frozen_heap(), - ))), + Some((_value, ref tetraplets)) => { + let tetraplets: Vec<_> = tetraplets + .iter() + .map(|tetraplet| { + heap.alloc(StarlarkSecurityTetraplet::new( + tetraplet, + eval.frozen_heap(), + )) + }) + .collect(); + Ok(heap.alloc(tetraplets)) + } // TODO is it a catchable error? None => anyhow::bail!("value index {index} not valid"), } @@ -226,8 +234,8 @@ mod tests { #[test] fn test_value() { - let tetraplet = - SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let tetraplets: Vec> = + vec![SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into()]; let value: JValue = json!({ "test": 42, "property": null, @@ -235,14 +243,14 @@ mod tests { .into(); let script = "get_value(0)"; - let res = execute(script, &[(value.clone(), tetraplet)][..]).unwrap(); + let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap(); assert_eq!(res, value); } #[test] fn test_value2() { - let tetraplet = - SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let tetraplets: Vec> = + vec![SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into()]; let value: JValue = json!({ "test": 42, "property": null, @@ -250,14 +258,14 @@ mod tests { .into(); let script = r#"get_value(0)["property"]"#; - let res = execute(script, &[(value.clone(), tetraplet)]).unwrap(); + let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap(); assert_eq!(res, JValue::Null); } #[test] fn test_value_eq_self() { - let tetraplet = - SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let tetraplets: Vec> = + vec![SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into()]; let value: JValue = json!({ "test": 42, "property": null, @@ -265,14 +273,14 @@ mod tests { .into(); let script = "get_value(0) == get_value(0)"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, tetraplets)]).unwrap(); assert_eq!(res, true); } #[test] fn test_value_eq_same() { - let tetraplet: Rc<_> = - SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let tetraplets: Vec> = + vec![SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into()]; let value: JValue = json!({ "test": 42, "property": null, @@ -282,7 +290,7 @@ mod tests { let res = execute( script, - &[(value.clone(), tetraplet.clone()), (value, tetraplet)], + vec![(value.clone(), tetraplets.clone()), (value, tetraplets)], ) .unwrap(); assert_eq!(res, true); @@ -290,8 +298,8 @@ mod tests { #[test] fn test_value_eq_different() { - let tetraplet: Rc<_> = - SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); + let tetraplets: Vec> = + vec![SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into()]; let value1: JValue = json!({ "test": 42, "property": null, @@ -304,7 +312,7 @@ mod tests { .into(); let script = "get_value(0) == get_value(1)"; - let res = execute(script, &[(value1, tetraplet.clone()), (value2, tetraplet)]).unwrap(); + let res = execute(script, vec![(value1, tetraplets.clone()), (value2, tetraplets)]).unwrap(); assert_eq!(res, false); } @@ -312,8 +320,7 @@ mod tests { fn test_escape_cannot_be_used_in_air_parser() { let script = r#"'test\#'"#; - let res = execute(script, &[]).unwrap(); + let res = execute(script, vec![]).unwrap(); assert_eq!(res, "test\\#"); } - } diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index 8999c5733..c00dfd242 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -115,6 +115,8 @@ impl fmt::Display for StarlarkSecurityTetraplet { #[cfg(test)] mod tests { + use std::rc::Rc; + use air_interpreter_value::JValue; use serde_json::json; @@ -127,9 +129,9 @@ mod tests { let tetraplet = SecurityTetraplet::new("my_peer", "service_id", "function_name", ".$.lens").into(); let value = json!(42).into(); - let script = "get_tetraplet(0).peer_pk"; + let script = "get_tetraplet(0)[0].peer_pk"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, "my_peer"); } @@ -138,9 +140,9 @@ mod tests { let tetraplet = SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); let value = json!(42).into(); - let script = "get_tetraplet(0).service_id"; + let script = "get_tetraplet(0)[0].service_id"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, "my_service"); } #[test] @@ -148,9 +150,9 @@ mod tests { let tetraplet = SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); let value = json!(42).into(); - let script = "get_tetraplet(0).function_name"; + let script = "get_tetraplet(0)[0].function_name"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, "my_func"); } @@ -159,9 +161,9 @@ mod tests { let tetraplet = SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens").into(); let value = json!(42).into(); - let script = "get_tetraplet(0).lens"; + let script = "get_tetraplet(0)[0].lens"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, ".$.lens"); } @@ -172,7 +174,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0) == get_tetraplet(0)"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, true); } @@ -184,23 +186,23 @@ mod tests { let script = "tet = get_tetraplet(0) tet == tet"; - let res = execute(script, &[(value, tetraplet)]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); assert_eq!(res, true); } #[test] fn test_tetraplet_same() { let tetraplet1 = SecurityTetraplet::new("my_peer", "my_service", "my_func", ".$.lens"); - let tetraplet2: SecurityTetraplet = tetraplet1.clone(); + let tetraplet2 = tetraplet1.clone(); let value: JValue = json!(42).into(); let script = "tet = get_tetraplet(0) tet == tet"; let res = execute( script, - &[ - (value.clone(), tetraplet1.into()), - (value.clone(), tetraplet2.into()), + vec![ + (value.clone(), vec![tetraplet1.into()]), + (value.clone(), vec![tetraplet2.into()]), ], ) .unwrap(); @@ -210,10 +212,18 @@ tet == tet"; #[test] fn test_tetraplet_different() { // TODO it worth variating fields - let tetraplet1 = - SecurityTetraplet::new("my_peer1", "my_service1", "my_func1", ".$.lens1").into(); - let tetraplet2 = - SecurityTetraplet::new("my_peer2", "my_service2", "my_func2", ".$.lens2").into(); + let tetraplet1 = Rc::new(SecurityTetraplet::new( + "my_peer1", + "my_service1", + "my_func1", + ".$.lens1", + )); + let tetraplet2 = Rc::new(SecurityTetraplet::new( + "my_peer2", + "my_service2", + "my_func2", + ".$.lens2", + )); let value: JValue = json!(42).into(); let script = "tet1 = get_tetraplet(0) tet2 = get_tetraplet(1) @@ -221,7 +231,10 @@ tet1 == tet2"; let res = execute( script, - &[(value.clone(), tetraplet1), (value.clone(), tetraplet2)], + vec![ + (value.clone(), vec![tetraplet1]), + (value.clone(), vec![tetraplet2]), + ], ) .unwrap(); assert_eq!(res, false); From 0e4c9f5bdf4d30bff73a2fb66b390415216e44fd Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 30 Jul 2024 18:42:33 +0200 Subject: [PATCH 12/36] Implement validator for `embed` --- .../air-lib/air-parser/src/ast/tests/instructions.rs | 6 ------ crates/air-lib/air-parser/src/parser/air.lalrpop | 1 + crates/air-lib/air-parser/src/parser/air.rs | 3 ++- crates/air-lib/air-parser/src/parser/validator.rs | 12 ++++++++++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/crates/air-lib/air-parser/src/ast/tests/instructions.rs b/crates/air-lib/air-parser/src/ast/tests/instructions.rs index 939da41be..bd5d27b8d 100644 --- a/crates/air-lib/air-parser/src/ast/tests/instructions.rs +++ b/crates/air-lib/air-parser/src/ast/tests/instructions.rs @@ -34,9 +34,3 @@ fn display_fail_last_error() { let ast = crate::parse("(fail %last_error%)").unwrap(); assert_eq!(ast.to_string(), "fail %last_error%"); } - -#[test] -fn display_embed() { - let ast = crate::parse("(embed [var1 var2.$.length] (#get_argument(0)+get_argument(1)#) x)").unwrap(); - assert_eq!(ast.to_string(), "embed [var1 var2.$.length] (#get_argument(0)+get_argument(1)#) x"); -} diff --git a/crates/air-lib/air-parser/src/parser/air.lalrpop b/crates/air-lib/air-parser/src/parser/air.lalrpop index 8cda7a610..72209d1b1 100644 --- a/crates/air-lib/air-parser/src/parser/air.lalrpop +++ b/crates/air-lib/air-parser/src/parser/air.lalrpop @@ -180,6 +180,7 @@ Instr: Instruction<'input> = { let output = output.unwrap_or(EmbedOutputValue::None); let embed = Embed::new(args, script, output); let span = Span::new(left, right); + validator.met_embed(&embed, span); Instruction::Embed(embed.into()) }, diff --git a/crates/air-lib/air-parser/src/parser/air.rs b/crates/air-lib/air-parser/src/parser/air.rs index 782bc70b5..bb46cb80c 100644 --- a/crates/air-lib/air-parser/src/parser/air.rs +++ b/crates/air-lib/air-parser/src/parser/air.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.20.0" -// sha3: 2570f46a3405c50e2c3c3bffe2a6eb22ee625326123629245297453e9c271512 +// sha3: 18bc374a6a0d8991d3da6a5fa07ca8053b90de4ad0f9e460854c288f7911cbb1 use crate::ast::*; use crate::parser::ParserError; use crate::parser::VariableValidator; @@ -6151,6 +6151,7 @@ fn __action21< let output = output.unwrap_or(EmbedOutputValue::None); let embed = Embed::new(args, script, output); let span = Span::new(left, right); + validator.met_embed(&embed, span); Instruction::Embed(embed.into()) } diff --git a/crates/air-lib/air-parser/src/parser/validator.rs b/crates/air-lib/air-parser/src/parser/validator.rs index 3bd0ab9f2..1e82fe5e2 100644 --- a/crates/air-lib/air-parser/src/parser/validator.rs +++ b/crates/air-lib/air-parser/src/parser/validator.rs @@ -394,6 +394,18 @@ impl<'i> VariableValidator<'i> { self.met_pivotalnext_instr(iterable_name, span); } + pub(super) fn met_embed(&mut self, embed: &Embed<'i>, span: Span) { + self.met_args(&embed.args, span); + + match &embed.output { + EmbedOutputValue::Scalar(name) => { + self.met_variable_name_definition(name.name, span); + } + EmbedOutputValue::None => {} + } + self.met_simple_instr(span); + } + pub(super) fn met_ap(&mut self, ap: &Ap<'i>, span: Span) { match &ap.argument { ApArgument::Number(_) From f916166ed7a828e174a966be845e9b4d3458889e Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 30 Jul 2024 18:42:54 +0200 Subject: [PATCH 13/36] Remove dbg output --- crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs index b9130d4da..f76acb8e7 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs @@ -48,7 +48,7 @@ impl<'input> AIRLexer<'input> { } pub fn next_token(&mut self) -> Option, AirPos, LexerError>> { - while let Some((start_pos, ch)) = dbg!(self.chars.next()) { + while let Some((start_pos, ch)) = self.chars.next() { let start_pos = AirPos::from(start_pos); match ch { '(' => return self.bracket_or_embedded_script(start_pos), @@ -74,7 +74,7 @@ impl<'input> AIRLexer<'input> { &mut self, start_pos: AirPos, ) -> Option, AirPos, LexerError>> { - if let Some((_, '#')) = dbg!(self.chars.peek()) { + if let Some((_, '#')) = self.chars.peek() { self.chars.next(); self.embedded_script(start_pos) } else { @@ -139,10 +139,10 @@ impl<'input> AIRLexer<'input> { &mut self, start_pos: AirPos, ) -> Option, AirPos, LexerError>> { - while let Some((pos, ch)) = dbg!(self.chars.next()) { + while let Some((pos, ch)) = self.chars.next() { // TODO consider ```...``` for the scripts if ch == '#' { - if let Some((_, ')')) = dbg!(self.chars.peek()) { + if let Some((_, ')')) = self.chars.peek() { self.chars.next(); let string_size = AirPos::from(pos) - start_pos + 2; return Some(Ok(( From 9239cb68d1ca6c5aea15bbd700e352c08cfd5e54 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Tue, 30 Jul 2024 18:00:48 +0200 Subject: [PATCH 14/36] Execute `embed` statement --- Cargo.lock | 1 + air/Cargo.toml | 1 + .../execution_step/errors/catchable_errors.rs | 3 + .../errors/uncatchable_errors.rs | 3 + air/src/execution_step/instructions/embed.rs | 65 ++++++++++++++++++- air/tests/test_module/instructions/embed.rs | 47 ++++++++++++++ air/tests/test_module/instructions/mod.rs | 1 + .../air-lib/interpreter-starlark/src/lib.rs | 2 +- 8 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 air/tests/test_module/instructions/embed.rs diff --git a/Cargo.lock b/Cargo.lock index 9a91f4dfd..443fa0b44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -442,6 +442,7 @@ dependencies = [ "air-interpreter-interface", "air-interpreter-sede", "air-interpreter-signatures", + "air-interpreter-starlark", "air-interpreter-value", "air-lambda-ast", "air-lambda-parser", diff --git a/air/Cargo.toml b/air/Cargo.toml index 857641b58..b75848699 100644 --- a/air/Cargo.toml +++ b/air/Cargo.toml @@ -24,6 +24,7 @@ air-interpreter-sede = { version = "0.1.0", path = "../crates/air-lib/interprete air-interpreter-signatures = { version = "0.1.7", path = "../crates/air-lib/interpreter-signatures", features = ["rkyv"] } air-interpreter-value = { version = "0.1.0", path = "../crates/air-lib/interpreter-value" } air-interpreter-interface = { version = "0.19.0", path = "../crates/air-lib/interpreter-interface", default-features = false } +air-interpreter-starlark = { version = "0.1.0", path = "../crates/air-lib/interpreter-starlark", default-features = false } air-log-targets = { version = "0.1.0", path = "../crates/air-lib/log-targets" } air-lambda-ast = { version = "0.1.0", path = "../crates/air-lib/lambda/ast" } air-lambda-parser = { version = "0.1.0", path = "../crates/air-lib/lambda/parser" } diff --git a/air/src/execution_step/errors/catchable_errors.rs b/air/src/execution_step/errors/catchable_errors.rs index 02c7ab00a..f0ac727ba 100644 --- a/air/src/execution_step/errors/catchable_errors.rs +++ b/air/src/execution_step/errors/catchable_errors.rs @@ -101,6 +101,9 @@ pub enum CatchableError { /// Stream map related errors. #[error(transparent)] StreamMapError(#[from] StreamMapError), + + #[error("Starlark error: {0}")] + StalarkError(air_interpreter_starlark::ExecutionError), } impl From for Rc { diff --git a/air/src/execution_step/errors/uncatchable_errors.rs b/air/src/execution_step/errors/uncatchable_errors.rs index cd3582b46..14227a29f 100644 --- a/air/src/execution_step/errors/uncatchable_errors.rs +++ b/air/src/execution_step/errors/uncatchable_errors.rs @@ -143,6 +143,9 @@ pub enum UncatchableError { #[error("failed to serialize call arguments {0}")] CallArgumentsSerializationFailed(::SerializeError), + + #[error("Starlark error: {0}")] + StalarkError(air_interpreter_starlark::ExecutionError), } impl ToErrorCode for UncatchableError { diff --git a/air/src/execution_step/instructions/embed.rs b/air/src/execution_step/instructions/embed.rs index a20911339..d142a0f41 100644 --- a/air/src/execution_step/instructions/embed.rs +++ b/air/src/execution_step/instructions/embed.rs @@ -17,7 +17,20 @@ * along with this program. If not, see . */ +use air_interpreter_starlark::execute as starlark_execute; use air_parser::ast::Embed; +use air_parser::ast::ImmutableValue; + +use crate::execution_step::errors::Joinable as _; +use crate::execution_step::resolver::Resolvable as _; +use crate::execution_step::LiteralAggregate; +use crate::execution_step::RcSecurityTetraplets; +use crate::execution_step::ValueAggregate; +use crate::joinable; +use crate::CatchableError; +use crate::ExecutionError; +use crate::JValue; +use crate::UncatchableError; use super::ExecutableInstruction; use super::ExecutionCtx; @@ -25,7 +38,55 @@ use super::ExecutionResult; use super::TraceHandler; impl<'i> ExecutableInstruction<'i> for Embed<'i> { - fn execute(&self, _exec_ctx: &mut ExecutionCtx<'i>, _trace_ctx: &mut TraceHandler) -> ExecutionResult<()> { - todo!() + fn execute(&self, exec_ctx: &mut ExecutionCtx<'i>, _trace_ctx: &mut TraceHandler) -> ExecutionResult<()> { + let args = joinable!(collect_args(&self.args, exec_ctx), exec_ctx, ())?; + + let output_value = starlark_execute(self.script, args).map_err(classify_starlark_error)?; + maybe_set_output_value(&self.output, output_value, exec_ctx) + } +} + +fn collect_args( + args: &[ImmutableValue<'_>], + exec_ctx: &ExecutionCtx<'_>, +) -> ExecutionResult> { + let mut result = Vec::with_capacity(args.len()); + + for instruction_value in args { + let (arg, tetraplet, _) = instruction_value.resolve(exec_ctx)?; + result.push((arg, tetraplet)); + } + Ok(result) +} + +fn classify_starlark_error(err: air_interpreter_starlark::ExecutionError) -> ExecutionError { + use air_interpreter_starlark::ExecutionError::*; + + match err { + Fail(_, _) => todo!("handle it separately"), + Value(_) | Function(_) | Other(_) => ExecutionError::Catchable(CatchableError::StalarkError(err).into()), + Scope(_) | Lexer(_) | Internal(_) => ExecutionError::Uncatchable(UncatchableError::StalarkError(err).into()), + } +} + +fn maybe_set_output_value( + embed_output_value: &air_parser::ast::EmbedOutputValue<'_>, + result_value: air_interpreter_value::JValue, + exec_ctx: &mut ExecutionCtx<'_>, +) -> Result<(), ExecutionError> { + match embed_output_value { + air_parser::ast::EmbedOutputValue::Scalar(scalar) => { + // TODO for now, we treat value produced by Starlark as a literal, as it has to be + // same on every peer. + let result = ValueAggregate::from_literal_result(LiteralAggregate::new( + result_value, + exec_ctx.run_parameters.init_peer_id.clone(), + 0.into(), // TODO is it correct? + )); + + exec_ctx.scalars.set_scalar_value(scalar.name, result)?; + } + air_parser::ast::EmbedOutputValue::None => {} } + Ok(()) } diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs new file mode 100644 index 000000000..11fa2a3b4 --- /dev/null +++ b/air/tests/test_module/instructions/embed.rs @@ -0,0 +1,47 @@ +/* + * AquaVM Workflow Engine + * + * Copyright (C) 2024 Fluence DAO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +use air_test_utils::prelude::*; + +#[tokio::test] +async fn embed_basic() { + let init_peer_id = "init_peer_id"; + let mut vm = create_avm(unit_call_service(), init_peer_id).await; + + let script = r#" + (seq + (embed [] +(# +"a string\nwith escape" +#) + var) + (call %init_peer_id% ("" "") [var] result_name))"#; + + let result = checked_call_vm!(vm, <_>::default(), script, "", ""); + assert!(result.next_peer_pks.is_empty()); + + let expected_trace = vec![scalar!( + json!("a string\nwith escape"), + peer_name = init_peer_id, + args = ["a string\nwith escape"] + )]; + + let trace = trace_from_result(&result); + assert_eq!(trace, expected_trace); +} diff --git a/air/tests/test_module/instructions/mod.rs b/air/tests/test_module/instructions/mod.rs index 2947d47bd..0ad83b7b7 100644 --- a/air/tests/test_module/instructions/mod.rs +++ b/air/tests/test_module/instructions/mod.rs @@ -20,6 +20,7 @@ mod ap; mod call; mod canon; +mod embed; mod fail; mod fold; mod match_; diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 05bb4ccbe..7002e625b 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -38,7 +38,7 @@ use starlark::values::Value; use crate::tetraplet::StarlarkSecurityTetraplet; -#[derive(thiserror::Error, Debug)] +#[derive(thiserror::Error, Debug, Clone)] pub enum ExecutionError { #[error("Starlark fail: {0}, {1}")] Fail(i32, String), From 2fe198fb4accec07991c627506620d7f66629c8c Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 31 Jul 2024 13:59:16 +0200 Subject: [PATCH 15/36] Test `embed` errors --- air/tests/test_module/instructions/embed.rs | 71 +++++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 11fa2a3b4..36369aa5e 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -17,12 +17,13 @@ * along with this program. If not, see . */ +use air::{CatchableError, UncatchableError}; +use air_interpreter_starlark::ExecutionError as StarlarkExecutionError; use air_test_utils::prelude::*; #[tokio::test] async fn embed_basic() { - let init_peer_id = "init_peer_id"; - let mut vm = create_avm(unit_call_service(), init_peer_id).await; + let mut vm = create_avm(echo_call_service(), "").await; let script = r#" (seq @@ -38,10 +39,72 @@ async fn embed_basic() { let expected_trace = vec![scalar!( json!("a string\nwith escape"), - peer_name = init_peer_id, + peer = "", args = ["a string\nwith escape"] )]; let trace = trace_from_result(&result); - assert_eq!(trace, expected_trace); + assert_eq!(&*trace, expected_trace); +} + +#[tokio::test] +async fn embed_error_fail() { + let mut vm = create_avm(echo_call_service(), "").await; + + let script = r#" + (xor + (embed [] (# +fail(42, "message") +#) + var) + (call %init_peer_id% ("" "") [%last_error%.$.code %last_error%.$.message] result_name))"#; + + let result = checked_call_vm!(vm, <_>::default(), script, "", ""); + assert!(result.next_peer_pks.is_empty()); + + let expected_trace = vec![scalar!( + json!(42), + peer = "", + args = [json!(42), json!("message")] + )]; + + let trace = trace_from_result(&result); + assert_eq!(&*trace, expected_trace); +} + +#[tokio::test] +async fn embed_error_value() { + let mut vm = create_avm(echo_call_service(), "").await; + + let script = r#" + (embed [] +(# +42 + "string" +#) + var)"#; + + let result = call_vm!(vm, <_>::default(), script, "", ""); + let expected_error = CatchableError::StalarkError(StarlarkExecutionError::Value( + "error: Operation `+` not supported for types `int` and `string`\n --> dummy.star:2:1\n |\n2 | 42 + \"string\"\n | ^^^^^^^^^^^^^\n |\n".to_owned(), + )); + assert_error_eq!(&result, expected_error); +} + +// TODO 42.length gives Other, and it is a problem +#[tokio::test] +async fn embed_error_lexer() { + let mut vm = create_avm(echo_call_service(), "").await; + + let script = r#" + (embed [] +(# +"an unterminated string +#) + var)"#; + + let result = call_vm!(vm, <_>::default(), script, "", ""); + let expected_error = UncatchableError::StalarkError(StarlarkExecutionError::Lexer( + "Parse error: unfinished string literal".to_owned(), + )); + assert_error_eq!(&result, expected_error); } From 5aa104d778902dbc1fd920a6c4e22a6d3bc85e58 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 31 Jul 2024 14:53:36 +0200 Subject: [PATCH 16/36] Revert "Simplify returning error" This reverts commit 3300d870bcda76f904697c54e9392cf5a6085c0b. It seems to be more convenient to work with typed result in the AquaVM. --- .../air-lib/interpreter-starlark/src/lib.rs | 32 ++++++++++++------- .../interpreter-starlark/src/tetraplet.rs | 15 +++++---- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index 7002e625b..de8b6c001 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -40,8 +40,6 @@ use crate::tetraplet::StarlarkSecurityTetraplet; #[derive(thiserror::Error, Debug, Clone)] pub enum ExecutionError { - #[error("Starlark fail: {0}, {1}")] - Fail(i32, String), #[error("Starlark value: {0}")] Value(String), #[error("Starlark function: {0}")] @@ -78,7 +76,7 @@ impl ExecutionError { pub fn execute( content: &str, args: Vec<(JValue, Vec>)>, -) -> Result { +) -> Result, ExecutionError> { // unfortunately, // 1. AstModule is not clonable // 2. AstModule is consumed on evaluation @@ -114,16 +112,18 @@ pub fn execute( // TODO TryInto may fail if `starlark::Value` serialization to `serde_json::Value` fails match res.and_then(TryInto::::try_into) { - Ok(val) => Ok(val), + Ok(val) => Ok(Ok(val)), Err(err) => { use starlark::ErrorKind::*; match err.kind() { Fail(_e) => { // the error is set by aquavm_module's `fail` function // n.b.: `_e` is an opaque object, for that reason we use `Ctx` to get error's code and message - let (code, message) = - ctx.error.into_inner().expect("Starlark Ctx error is empty"); - Err(ExecutionError::Fail(code, message)) + Ok(Err(ctx + .error + .into_inner() + // TODO does Starlark std library ever calls fail? + .expect("Starlark Ctx error is empty"))) } Value(_) => Err(ExecutionError::Value(err.to_string())), Function(_) => Err(ExecutionError::Function(err.to_string())), @@ -243,7 +243,7 @@ mod tests { .into(); let script = "get_value(0)"; - let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap(); + let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap().unwrap(); assert_eq!(res, value); } @@ -258,7 +258,9 @@ mod tests { .into(); let script = r#"get_value(0)["property"]"#; - let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap(); + let res = execute(script, vec![(value.clone(), tetraplets)]) + .unwrap() + .unwrap(); assert_eq!(res, JValue::Null); } @@ -273,7 +275,7 @@ mod tests { .into(); let script = "get_value(0) == get_value(0)"; - let res = execute(script, vec![(value, tetraplets)]).unwrap(); + let res = execute(script, vec![(value, tetraplets)]).unwrap().unwrap(); assert_eq!(res, true); } @@ -292,6 +294,7 @@ mod tests { script, vec![(value.clone(), tetraplets.clone()), (value, tetraplets)], ) + .unwrap() .unwrap(); assert_eq!(res, true); } @@ -312,7 +315,12 @@ mod tests { .into(); let script = "get_value(0) == get_value(1)"; - let res = execute(script, vec![(value1, tetraplets.clone()), (value2, tetraplets)]).unwrap(); + let res = execute( + script, + vec![(value1, tetraplets.clone()), (value2, tetraplets)], + ) + .unwrap() + .unwrap(); assert_eq!(res, false); } @@ -320,7 +328,7 @@ mod tests { fn test_escape_cannot_be_used_in_air_parser() { let script = r#"'test\#'"#; - let res = execute(script, vec![]).unwrap(); + let res = execute(script, vec![]).unwrap().unwrap(); assert_eq!(res, "test\\#"); } } diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index c00dfd242..e9dd1a6c3 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -131,7 +131,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].peer_pk"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, "my_peer"); } @@ -142,9 +142,10 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].service_id"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, "my_service"); } + #[test] fn test_tetraplet_function_name() { let tetraplet = @@ -152,7 +153,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].function_name"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, "my_func"); } @@ -163,7 +164,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].lens"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, ".$.lens"); } @@ -174,7 +175,7 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0) == get_tetraplet(0)"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, true); } @@ -186,7 +187,7 @@ mod tests { let script = "tet = get_tetraplet(0) tet == tet"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); assert_eq!(res, true); } @@ -205,6 +206,7 @@ tet == tet"; (value.clone(), vec![tetraplet2.into()]), ], ) + .unwrap() .unwrap(); assert_eq!(res, true); } @@ -236,6 +238,7 @@ tet1 == tet2"; (value.clone(), vec![tetraplet2]), ], ) + .unwrap() .unwrap(); assert_eq!(res, false); } From fbfe9ff8ad0451e5f0eda08f07e529b246cf33d5 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 31 Jul 2024 17:03:05 +0200 Subject: [PATCH 17/36] Handle Starlark's `fail` in AquaVM --- air/src/execution_step/instructions/embed.rs | 34 ++++++++++++++++---- air/src/execution_step/instructions/fail.rs | 2 +- air/tests/test_module/instructions/embed.rs | 10 ++---- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/air/src/execution_step/instructions/embed.rs b/air/src/execution_step/instructions/embed.rs index d142a0f41..4eeff315d 100644 --- a/air/src/execution_step/instructions/embed.rs +++ b/air/src/execution_step/instructions/embed.rs @@ -17,10 +17,19 @@ * along with this program. If not, see . */ +use std::rc::Rc; + +use air_interpreter_data::Provenance; use air_interpreter_starlark::execute as starlark_execute; use air_parser::ast::Embed; use air_parser::ast::ImmutableValue; +use polyplets::SecurityTetraplet; +use super::fail::fail_with_error_object; +use super::ExecutableInstruction; +use super::ExecutionCtx; +use super::ExecutionResult; +use super::TraceHandler; use crate::execution_step::errors::Joinable as _; use crate::execution_step::resolver::Resolvable as _; use crate::execution_step::LiteralAggregate; @@ -32,17 +41,29 @@ use crate::ExecutionError; use crate::JValue; use crate::UncatchableError; -use super::ExecutableInstruction; -use super::ExecutionCtx; -use super::ExecutionResult; -use super::TraceHandler; - impl<'i> ExecutableInstruction<'i> for Embed<'i> { fn execute(&self, exec_ctx: &mut ExecutionCtx<'i>, _trace_ctx: &mut TraceHandler) -> ExecutionResult<()> { let args = joinable!(collect_args(&self.args, exec_ctx), exec_ctx, ())?; let output_value = starlark_execute(self.script, args).map_err(classify_starlark_error)?; - maybe_set_output_value(&self.output, output_value, exec_ctx) + match output_value { + Ok(value) => maybe_set_output_value(&self.output, value, exec_ctx), + Err((error_code, error_message)) => { + let error_object = crate::execution_step::execution_context::error_from_raw_fields_w_peerid( + error_code.into(), + &error_message, + &self.to_string(), + exec_ctx.run_parameters.init_peer_id.as_ref(), + ); + let literal_tetraplet = + SecurityTetraplet::literal_tetraplet(exec_ctx.run_parameters.init_peer_id.as_ref()); + let literal_tetraplet = Rc::new(literal_tetraplet); + // in (fail x y), x and y are always literals + let provenance = Provenance::literal(); + + fail_with_error_object(exec_ctx, error_object, Some(literal_tetraplet), provenance) + } + } } } @@ -63,7 +84,6 @@ fn classify_starlark_error(err: air_interpreter_starlark::ExecutionError) -> Exe use air_interpreter_starlark::ExecutionError::*; match err { - Fail(_, _) => todo!("handle it separately"), Value(_) | Function(_) | Other(_) => ExecutionError::Catchable(CatchableError::StalarkError(err).into()), Scope(_) | Lexer(_) | Internal(_) => ExecutionError::Uncatchable(UncatchableError::StalarkError(err).into()), } diff --git a/air/src/execution_step/instructions/fail.rs b/air/src/execution_step/instructions/fail.rs index e2f0adc37..535881fcc 100644 --- a/air/src/execution_step/instructions/fail.rs +++ b/air/src/execution_step/instructions/fail.rs @@ -148,7 +148,7 @@ fn fail_with_error(exec_ctx: &mut ExecutionCtx<'_>) -> ExecutionResult<()> { result } -fn fail_with_error_object( +pub(crate) fn fail_with_error_object( exec_ctx: &mut ExecutionCtx<'_>, error: JValue, tetraplet: Option, diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 36369aa5e..dd6850f7a 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -54,19 +54,15 @@ async fn embed_error_fail() { let script = r#" (xor (embed [] (# -fail(42, "message") +fail(42, "my message") #) var) - (call %init_peer_id% ("" "") [%last_error%.$.code %last_error%.$.message] result_name))"#; + (call %init_peer_id% ("" "") [%last_error%.$.error_code %last_error%.$.message] result_name))"#; let result = checked_call_vm!(vm, <_>::default(), script, "", ""); assert!(result.next_peer_pks.is_empty()); - let expected_trace = vec![scalar!( - json!(42), - peer = "", - args = [json!(42), json!("message")] - )]; + let expected_trace = vec![scalar!(json!(42), peer = "", args = [json!(42), json!("my message")])]; let trace = trace_from_result(&result); assert_eq!(&*trace, expected_trace); From d601a48238afdd63ff8cec3fcf505269235c34ea Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 31 Jul 2024 18:06:07 +0200 Subject: [PATCH 18/36] Some comments --- air/src/execution_step/instructions/embed.rs | 1 + crates/air-lib/interpreter-starlark/src/lib.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/air/src/execution_step/instructions/embed.rs b/air/src/execution_step/instructions/embed.rs index 4eeff315d..d08ab36c5 100644 --- a/air/src/execution_step/instructions/embed.rs +++ b/air/src/execution_step/instructions/embed.rs @@ -84,6 +84,7 @@ fn classify_starlark_error(err: air_interpreter_starlark::ExecutionError) -> Exe use air_interpreter_starlark::ExecutionError::*; match err { + // TODO perhaps, Other should be uncatchable Value(_) | Function(_) | Other(_) => ExecutionError::Catchable(CatchableError::StalarkError(err).into()), Scope(_) | Lexer(_) | Internal(_) => ExecutionError::Uncatchable(UncatchableError::StalarkError(err).into()), } diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index de8b6c001..deab9fbe1 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -82,6 +82,8 @@ pub fn execute( // 2. AstModule is consumed on evaluation // // for that reason, we have to parse the script on each invocation + // + // see https://github.com/facebook/starlark-rust/issues/124 let ast: AstModule = AstModule::parse("dummy.star", content.to_owned(), &Dialect::Standard) .map_err(ExecutionError::from_parser_error)?; From 5a7167475f546b4a66f6f1024a6aff23f078e815 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 31 Jul 2024 18:34:23 +0200 Subject: [PATCH 19/36] `embed` args test --- air/tests/test_module/instructions/embed.rs | 40 ++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index dd6850f7a..2894f79e7 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -47,13 +47,51 @@ async fn embed_basic() { assert_eq!(&*trace, expected_trace); } +#[tokio::test] +async fn embed_args() { + let init_peer_id = "my_id"; + let mut vm = create_avm(echo_call_service(), init_peer_id).await; + + let script = r#" + (seq + (call %init_peer_id% ("myservice" "myfunc") [42] arg) + (seq + (embed [arg] +(# +t = get_tetraplet(0)[0] +"{}: {}/{}:{}".format(get_value(0), t.peer_pk, t.service_id, t.function_name) +#) + var) + (call %init_peer_id% ("" "") [var] result_name)))"#; + + let run_params = TestRunParameters::from_init_peer_id(init_peer_id); + let result = checked_call_vm!(vm, run_params, script, "", ""); + assert!(result.next_peer_pks.is_empty()); + + let expected_val = format!("42: {init_peer_id}/myservice:myfunc"); + let expected_trace = vec![ + scalar!( + json!(42), + peer = init_peer_id, + service = "myservice", + function = "myfunc", + args = [42] + ), + scalar!(json!(expected_val), peer = init_peer_id, args = [expected_val]), + ]; + + let trace = trace_from_result(&result); + assert_eq!(&*trace, expected_trace); +} + #[tokio::test] async fn embed_error_fail() { let mut vm = create_avm(echo_call_service(), "").await; let script = r#" (xor - (embed [] (# + (embed [] +(# fail(42, "my message") #) var) From 962830489e7b452f10be39a23d71cd8eb8aacd78 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 1 Aug 2024 12:59:44 +0200 Subject: [PATCH 20/36] Update time@0.30.30 to 0.30.36 --- Cargo.lock | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 443fa0b44..2813a7c6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4439,6 +4439,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -5667,7 +5673,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.30", + "time 0.3.36", ] [[package]] @@ -6244,12 +6250,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -6264,10 +6271,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -6470,7 +6478,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.30", + "time 0.3.36", "tracing", "tracing-core", "tracing-serde", From 646796ba797db80c82b3ab454c24ffd834cdcccc Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 1 Aug 2024 13:07:10 +0200 Subject: [PATCH 21/36] Make clippy happy --- air/src/execution_step/instructions/embed.rs | 2 +- crates/air-lib/interpreter-value/src/starlark.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/air/src/execution_step/instructions/embed.rs b/air/src/execution_step/instructions/embed.rs index d08ab36c5..a121ecc1e 100644 --- a/air/src/execution_step/instructions/embed.rs +++ b/air/src/execution_step/instructions/embed.rs @@ -86,7 +86,7 @@ fn classify_starlark_error(err: air_interpreter_starlark::ExecutionError) -> Exe match err { // TODO perhaps, Other should be uncatchable Value(_) | Function(_) | Other(_) => ExecutionError::Catchable(CatchableError::StalarkError(err).into()), - Scope(_) | Lexer(_) | Internal(_) => ExecutionError::Uncatchable(UncatchableError::StalarkError(err).into()), + Scope(_) | Lexer(_) | Internal(_) => ExecutionError::Uncatchable(UncatchableError::StalarkError(err)), } } diff --git a/crates/air-lib/interpreter-value/src/starlark.rs b/crates/air-lib/interpreter-value/src/starlark.rs index e97a40749..2db599330 100644 --- a/crates/air-lib/interpreter-value/src/starlark.rs +++ b/crates/air-lib/interpreter-value/src/starlark.rs @@ -58,7 +58,7 @@ impl<'v, 'a> AllocValue<'v> for &'a JValue { } } -impl<'v, 'a> AllocFrozenValue for &'a JValue { +impl AllocFrozenValue for &JValue { fn alloc_frozen_value( self, heap: &starlark::values::FrozenHeap, From 8a4bb18ca3d495d5036f7d50b14f9f45410013a3 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 1 Aug 2024 13:19:26 +0200 Subject: [PATCH 22/36] Make fmt happy --- .../air-lib/interpreter-starlark/src/lib.rs | 4 +++- .../interpreter-starlark/src/tetraplet.rs | 24 ++++++++++++++----- crates/air-lib/interpreter-value/src/lib.rs | 2 +- crates/beautifier/src/beautifier.rs | 1 - 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/crates/air-lib/interpreter-starlark/src/lib.rs b/crates/air-lib/interpreter-starlark/src/lib.rs index deab9fbe1..18f15ba74 100644 --- a/crates/air-lib/interpreter-starlark/src/lib.rs +++ b/crates/air-lib/interpreter-starlark/src/lib.rs @@ -245,7 +245,9 @@ mod tests { .into(); let script = "get_value(0)"; - let res = execute(script, vec![(value.clone(), tetraplets)]).unwrap().unwrap(); + let res = execute(script, vec![(value.clone(), tetraplets)]) + .unwrap() + .unwrap(); assert_eq!(res, value); } diff --git a/crates/air-lib/interpreter-starlark/src/tetraplet.rs b/crates/air-lib/interpreter-starlark/src/tetraplet.rs index e9dd1a6c3..de95e2e89 100644 --- a/crates/air-lib/interpreter-starlark/src/tetraplet.rs +++ b/crates/air-lib/interpreter-starlark/src/tetraplet.rs @@ -131,7 +131,9 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].peer_pk"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, "my_peer"); } @@ -142,7 +144,9 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].service_id"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, "my_service"); } @@ -153,7 +157,9 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].function_name"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, "my_func"); } @@ -164,7 +170,9 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0)[0].lens"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, ".$.lens"); } @@ -175,7 +183,9 @@ mod tests { let value = json!(42).into(); let script = "get_tetraplet(0) == get_tetraplet(0)"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, true); } @@ -187,7 +197,9 @@ mod tests { let script = "tet = get_tetraplet(0) tet == tet"; - let res = execute(script, vec![(value, vec![tetraplet])]).unwrap().unwrap(); + let res = execute(script, vec![(value, vec![tetraplet])]) + .unwrap() + .unwrap(); assert_eq!(res, true); } diff --git a/crates/air-lib/interpreter-value/src/lib.rs b/crates/air-lib/interpreter-value/src/lib.rs index 20c200e2a..d10c2caae 100644 --- a/crates/air-lib/interpreter-value/src/lib.rs +++ b/crates/air-lib/interpreter-value/src/lib.rs @@ -62,9 +62,9 @@ macro_rules! tri { }; } -mod value; #[cfg(feature = "starlark")] mod starlark; +mod value; pub use value::JValue; diff --git a/crates/beautifier/src/beautifier.rs b/crates/beautifier/src/beautifier.rs index 73455e03f..43c9ea1d7 100644 --- a/crates/beautifier/src/beautifier.rs +++ b/crates/beautifier/src/beautifier.rs @@ -197,7 +197,6 @@ impl Beautifier { "embed [{}] (#{}#)", CallArgs(embed.args.as_slice()), embed.script, - ) } From 97fe1cec4b5d2aa05db2af924e69a037b6144db6 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 1 Aug 2024 15:54:02 +0200 Subject: [PATCH 23/36] Use raw strings `#".."#` for embed 1. `EmbedString` is removed from lexer 2. `#".."#` is parsed as a string. It can contain quotation marks and hash signs inside, but `"#` combination ends it. The raw strings can be used everywhere where string can be used. `(#...#)` cannot be used because it can exist in real code (for example, canon stream in call triplet). --- air/tests/test_module/instructions/embed.rs | 40 +- .../air-lib/air-parser/src/parser/air.lalrpop | 3 +- crates/air-lib/air-parser/src/parser/air.rs | 522 +++++++++--------- .../air-parser/src/parser/lexer/air_lexer.rs | 22 +- .../air-parser/src/parser/lexer/errors.rs | 8 - .../air-parser/src/parser/lexer/tests.rs | 12 +- .../air-parser/src/parser/lexer/token.rs | 1 - .../air-parser/src/parser/tests/embed.rs | 14 +- 8 files changed, 306 insertions(+), 316 deletions(-) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 2894f79e7..edb49f958 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -25,14 +25,14 @@ use air_test_utils::prelude::*; async fn embed_basic() { let mut vm = create_avm(echo_call_service(), "").await; - let script = r#" + let script = r##" (seq (embed [] -(# +#" "a string\nwith escape" -#) +"# var) - (call %init_peer_id% ("" "") [var] result_name))"#; + (call %init_peer_id% ("" "") [var] result_name))"##; let result = checked_call_vm!(vm, <_>::default(), script, "", ""); assert!(result.next_peer_pks.is_empty()); @@ -52,17 +52,17 @@ async fn embed_args() { let init_peer_id = "my_id"; let mut vm = create_avm(echo_call_service(), init_peer_id).await; - let script = r#" + let script = r##" (seq (call %init_peer_id% ("myservice" "myfunc") [42] arg) (seq (embed [arg] -(# +#" t = get_tetraplet(0)[0] "{}: {}/{}:{}".format(get_value(0), t.peer_pk, t.service_id, t.function_name) -#) +"# var) - (call %init_peer_id% ("" "") [var] result_name)))"#; + (call %init_peer_id% ("" "") [var] result_name)))"##; let run_params = TestRunParameters::from_init_peer_id(init_peer_id); let result = checked_call_vm!(vm, run_params, script, "", ""); @@ -88,14 +88,14 @@ t = get_tetraplet(0)[0] async fn embed_error_fail() { let mut vm = create_avm(echo_call_service(), "").await; - let script = r#" + let script = r##" (xor (embed [] -(# +#" fail(42, "my message") -#) +"# var) - (call %init_peer_id% ("" "") [%last_error%.$.error_code %last_error%.$.message] result_name))"#; + (call %init_peer_id% ("" "") [%last_error%.$.error_code %last_error%.$.message] result_name))"##; let result = checked_call_vm!(vm, <_>::default(), script, "", ""); assert!(result.next_peer_pks.is_empty()); @@ -110,12 +110,12 @@ fail(42, "my message") async fn embed_error_value() { let mut vm = create_avm(echo_call_service(), "").await; - let script = r#" + let script = r##" (embed [] -(# +#" 42 + "string" -#) - var)"#; +"# + var)"##; let result = call_vm!(vm, <_>::default(), script, "", ""); let expected_error = CatchableError::StalarkError(StarlarkExecutionError::Value( @@ -129,12 +129,12 @@ async fn embed_error_value() { async fn embed_error_lexer() { let mut vm = create_avm(echo_call_service(), "").await; - let script = r#" + let script = r##" (embed [] -(# +#" "an unterminated string -#) - var)"#; +"# + var)"##; let result = call_vm!(vm, <_>::default(), script, "", ""); let expected_error = UncatchableError::StalarkError(StarlarkExecutionError::Lexer( diff --git a/crates/air-lib/air-parser/src/parser/air.lalrpop b/crates/air-lib/air-parser/src/parser/air.lalrpop index 72209d1b1..a2e4a6a5c 100644 --- a/crates/air-lib/air-parser/src/parser/air.lalrpop +++ b/crates/air-lib/air-parser/src/parser/air.lalrpop @@ -175,7 +175,7 @@ Instr: Instruction<'input> = { Instruction::MisMatch(mismatch.into()) }, - "(" embed ")" => { + "(" embed ")" => { let args = Rc::new(args); let output = output.unwrap_or(EmbedOutputValue::None); let embed = Embed::new(args, script, output); @@ -359,7 +359,6 @@ extern { CanonStreamMapWithLambda => Token::CanonStreamMapWithLambda {name: <&'input str>, lambda:>, position: }, Literal => Token::StringLiteral(<&'input str>), - EmbeddedScript => Token::EmbeddedScript(<&'input str>), I64 => Token::I64(), F64 => Token::F64(), Boolean => Token::Boolean(), diff --git a/crates/air-lib/air-parser/src/parser/air.rs b/crates/air-lib/air-parser/src/parser/air.rs index bb46cb80c..adc09869d 100644 --- a/crates/air-lib/air-parser/src/parser/air.rs +++ b/crates/air-lib/air-parser/src/parser/air.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.20.0" -// sha3: 18bc374a6a0d8991d3da6a5fa07ca8053b90de4ad0f9e460854c288f7911cbb1 +// sha3: ff1c2460ed57b0b50468e885b28a40a9090414e39cf68de3026c41b68981ee23 use crate::ast::*; use crate::parser::ParserError; use crate::parser::VariableValidator; @@ -41,10 +41,10 @@ mod __parse__AIR { Variant1(bool), Variant2((&'input str, AirPos)), Variant3((&'input str, LambdaAST<'input>, AirPos)), - Variant4(&'input str), - Variant5(LambdaAST<'input>), - Variant6(f64), - Variant7(i64), + Variant4(LambdaAST<'input>), + Variant5(f64), + Variant6(i64), + Variant7(&'input str), Variant8(__lalrpop_util::ErrorRecovery, ParserError>), Variant9(ImmutableValue<'input>), Variant10(alloc::vec::Vec>), @@ -73,384 +73,384 @@ mod __parse__AIR { } const __ACTION: &[i16] = &[ // State 0 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 1 - 15, 0, 49, 0, 50, 51, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 49, 0, 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65,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// State 6 - 0, 0, 83, 0, 0, 84, 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 88, 89, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 0, 0, 84, 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 88, 89, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 7 - 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 8 - 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 9 - 0, 0, 0, 0, 0, 109, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 112, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 109, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 112, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 10 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 0, 0, 120, 0, 0, 0, 121, 122, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 15 - 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 16 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 17 - 0, 0, 92, 129, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 129, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 18 - 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 19 - 0, 0, 92, 0, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 0, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 20 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 21 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 22 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 23 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, // State 24 - 0, 0, 49, 0, 50, 51, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 0, 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 25 - 0, 0, 0, 0, 0, 0, 0, 142, 143, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 142, 143, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 26 - 0, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 27 - 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 28 - 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 29 - 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 30 - 0, 0, 92, 160, 93, 94, 95, 96, 97, 0, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 160, 93, 94, 95, 96, 97, 98, 99, 56, 57, 100, 101, 102, 103, 104, 105, 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 31 - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 53 - 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 54 - 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 55 - -86, -86, -86, -86, -86, -86, -86, -86, -86, 0, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 0, -86, -86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86, + -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 0, -86, -86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86, // State 56 - -85, -85, -85, -85, -85, -85, -85, -85, -85, 0, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, 0, -85, -85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -85, + -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, 0, -85, -85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -85, // State 57 - 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 58 - 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 59 - 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 60 - 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -16, 0,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, 0, 0, 0, 0, 0, // State 90 - -116, 0, -116, -116, -116, -116, -116, -116, -116, 0, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 0, 0, -116, -116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, + -116, 0, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 0, 0, -116, -116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, // State 91 - 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 92 - -117, 0, -117, -117, -117, -117, -117, -117, -117, 0, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 0, 0, -117, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, + -117, 0, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 0, 0, -117, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, // State 93 - -121, 0, -121, -121, -121, -121, -121, -121, -121, 0, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 0, 0, -121, -121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -121, + -121, 0, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 0, 0, -121, -121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -121, // State 94 - -123, 0, -123, -123, -123, -123, -123, -123, -123, 0, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 0, 0, -123, -123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -123, + -123, 0, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 0, 0, -123, -123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -123, // State 95 - -124, 0, -124, -124, -124, -124, -124, -124, -124, 0, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 0, 0, -124, -124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -124, + -124, 0, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 0, 0, -124, -124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -124, // State 96 - -122, 0, -122, -122, -122, -122, -122, -122, -122, 0, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, + -122, 0, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, // State 97 - -111, 0, -111, -111, -111, -111, -111, -111, -111, 0, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 0, 0, -111, -111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -111, + -111, 0, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 0, 0, -111, -111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -111, // State 98 - -112, 0, -112, -112, -112, -112, -112, -112, -112, 0, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 0, 0, -112, -112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112, + -112, 0, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 0, 0, -112, -112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112, // State 99 - -108, 0, -108, -108, -108, -108, -108, -108, -108, 0, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 0, 0, -108, -108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -108, + -108, 0, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 0, 0, -108, -108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -108, // State 100 - -109, 0, -109, -109, -109, -109, -109, -109, -109, 0, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 0, 0, -109, -109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -109, + -109, 0, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 0, 0, -109, -109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -109, // State 101 - -110, 0, -110, -110, -110, -110, -110, -110, -110, 0, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 0, 0, -110, -110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -110, + -110, 0, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 0, 0, -110, -110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -110, // State 102 - -113, 0, -113, -113, -113, -113, -113, -113, -113, 0, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 0, 0, -113, -113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -113, + -113, 0, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 0, 0, -113, -113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -113, // State 103 - -119, 0, -119, -119, -119, -119, -119, -119, -119, 0, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 0, 0, -119, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -119, + -119, 0, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 0, 0, -119, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -119, // State 104 - -120, 0, -120, -120, -120, -120, -120, -120, -120, 0, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 0, 0, -120, -120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -120, + -120, 0, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 0, 0, -120, -120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -120, // State 105 - -115, 0, -115, -115, -115, -115, -115, -115, -115, 0, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 0, 0, -115, -115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, + -115, 0, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 0, 0, -115, -115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, // State 106 - -114, 0, -114, -114, -114, -114, -114, -114, -114, 0, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 0, 0, -114, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -114, + -114, 0, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 116 - 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 117 - 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 118 - 0, 0, -106, 0, -106, -106, 0, -106, -106, 0, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 0, 0, -106, -106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -106, 0, -106, -106, 0, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 0, 0, -106, -106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 119 - 0, 0, -103, 0, -103, -103, 0, -103, -103, 0, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 0, 0, -103, -103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -103, 0, -103, -103, 0, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 0, 0, -103, -103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 120 - 0, 0, -102, 0, -102, -102, 0, -102, -102, 0, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 0, 0, -102, -102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -102, 0, -102, -102, 0, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 0, 0, -102, -102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 121 - 0, 0, -104, 0, -104, -104, 0, -104, -104, 0, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 0, 0, -104, -104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -104, 0, -104, -104, 0, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 0, 0, -104, -104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 122 - 0, 0, -105, 0, -105, -105, 0, -105, -105, 0, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 0, 0, -105, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -105, 0, -105, -105, 0, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 0, 0, -105, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 123 - 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 124 - 0, 0, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 125 - 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 126 - 0, 0, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 127 - 0, 0, -27, -27, -27, -27, -27, -27, -27, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,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 0, 0, 0, 0, 0, 0, 0, 0, // State 132 - -118, 0, -118, -118, -118, -118, -118, -118, -118, 0, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 0, 0, -118, -118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, + -118, 0, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 0, 0, -118, -118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -118, // State 133 - 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 134 - -71, -71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -71, + -71, -71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -71, // State 135 - 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 136 - 0, 165, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -99, -99, 0, 0, 0, 0, 0, 0, 0, -99, -99, -99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 141 - 0, -98, 0, 0, 0, 0, 0, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, -98, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -98, 0, 0, 0, 0, 0, -98, -98, 0, 0, 0, 0, 0, 0, 0, -98, -98, -98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 142 - 0, -97, 0, 0, 0, 0, 0, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, -97, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -97, 0, 0, 0, 0, 0, -97, -97, 0, 0, 0, 0, 0, 0, 0, -97, -97, -97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 143 - 0, -94, 0, 0, 0, 0, 0, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, -94, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -94, 0, 0, 0, 0, 0, -94, -94, 0, 0, 0, 0, 0, 0, 0, -94, -94, -94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 144 - 0, -95, 0, 0, 0, 0, 0, -95, -95, 0, 0, 0, 0, 0, 0, 0, 0, -95, -95, -95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, -69, + -69, -69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -69, // State 187 - -58, -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, + -58, -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, ]; fn __action(state: i16, integer: usize) -> i16 { - __ACTION[(state as usize) * 40 + integer] + __ACTION[(state as usize) * 39 + integer] } const __EOF_ACTION: &[i16] = &[ // State 0 @@ -911,7 +911,6 @@ mod __parse__AIR { r###"CanonStreamMap"###, r###"CanonStreamMapWithLambda"###, r###"CanonStreamWithLambda"###, - r###"EmbeddedScript"###, r###"Error"###, r###"ErrorWithLambda"###, r###"F64"###, @@ -1016,7 +1015,7 @@ mod __parse__AIR { #[inline] fn error_action(&self, state: i16) -> i16 { - __action(state, 40 - 1) + __action(state, 39 - 1) } #[inline] @@ -1096,36 +1095,35 @@ mod __parse__AIR { Token::CanonStreamMap { name: _, position: _ } if true => Some(6), Token::CanonStreamMapWithLambda { name: _, lambda: _, position: _ } if true => Some(7), Token::CanonStreamWithLambda { name: _, lambda: _, position: _ } if true => Some(8), - Token::EmbeddedScript(_) if true => Some(9), - Token::Error if true => Some(10), - Token::ErrorWithLambda(_) if true => Some(11), - Token::F64(_) if true => Some(12), - Token::I64(_) if true => Some(13), - Token::InitPeerId if true => Some(14), - Token::LastError if true => Some(15), - Token::LastErrorWithLambda(_) if true => Some(16), - Token::StringLiteral(_) if true => Some(17), - Token::Scalar { name: _, position: _ } if true => Some(18), - Token::ScalarWithLambda { name: _, lambda: _, position: _ } if true => Some(19), - Token::Stream { name: _, position: _ } if true => Some(20), - Token::StreamMap { name: _, position: _ } if true => Some(21), - Token::TTL if true => Some(22), - Token::Timestamp if true => Some(23), - Token::Ap if true => Some(24), - Token::Call if true => Some(25), - Token::Canon if true => Some(26), - Token::Embed if true => Some(27), - Token::Fail if true => Some(28), - Token::Fold if true => Some(29), - Token::Match if true => Some(30), - Token::MisMatch if true => Some(31), - Token::Never if true => Some(32), - Token::New if true => Some(33), - Token::Next if true => Some(34), - Token::Null if true => Some(35), - Token::Par if true => Some(36), - Token::Seq if true => Some(37), - Token::Xor if true => Some(38), + Token::Error if true => Some(9), + Token::ErrorWithLambda(_) if true => Some(10), + Token::F64(_) if true => Some(11), + Token::I64(_) if true => Some(12), + Token::InitPeerId if true => Some(13), + Token::LastError if true => Some(14), + Token::LastErrorWithLambda(_) if true => Some(15), + Token::StringLiteral(_) if true => Some(16), + Token::Scalar { name: _, position: _ } if true => Some(17), + Token::ScalarWithLambda { name: _, lambda: _, position: _ } if true => Some(18), + Token::Stream { name: _, position: _ } if true => Some(19), + Token::StreamMap { name: _, position: _ } if true => Some(20), + Token::TTL if true => Some(21), + Token::Timestamp if true => Some(22), + Token::Ap if true => Some(23), + Token::Call if true => Some(24), + Token::Canon if true => Some(25), + Token::Embed if true => Some(26), + Token::Fail if true => Some(27), + Token::Fold if true => Some(28), + Token::Match if true => Some(29), + Token::MisMatch if true => Some(30), + Token::Never if true => Some(31), + Token::New if true => Some(32), + Token::Next if true => Some(33), + Token::Null if true => Some(34), + Token::Par if true => Some(35), + Token::Seq if true => Some(36), + Token::Xor if true => Some(37), _ => None, } } @@ -1140,33 +1138,33 @@ mod __parse__AIR { ) -> __Symbol<'input> { match __token_index { - 0 | 1 | 2 | 3 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 => __Symbol::Variant0(__token), + 0 | 1 | 2 | 3 | 9 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 => __Symbol::Variant0(__token), 4 => match __token { Token::Boolean(__tok0) if true => __Symbol::Variant1(__tok0), _ => unreachable!(), }, - 5 | 6 | 18 | 20 | 21 => match __token { + 5 | 6 | 17 | 19 | 20 => match __token { Token::CanonStream { name: __tok0, position: __tok1 } | Token::CanonStreamMap { name: __tok0, position: __tok1 } | Token::Scalar { name: __tok0, position: __tok1 } | Token::Stream { name: __tok0, position: __tok1 } | Token::StreamMap { name: __tok0, position: __tok1 } if true => __Symbol::Variant2((__tok0, __tok1)), _ => unreachable!(), }, - 7 | 8 | 19 => match __token { + 7 | 8 | 18 => match __token { Token::CanonStreamMapWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } | Token::CanonStreamWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } | Token::ScalarWithLambda { name: __tok0, lambda: __tok1, position: __tok2 } if true => __Symbol::Variant3((__tok0, __tok1, __tok2)), _ => unreachable!(), }, - 9 | 17 => match __token { - Token::EmbeddedScript(__tok0) | Token::StringLiteral(__tok0) if true => __Symbol::Variant4(__tok0), + 10 | 15 => match __token { + Token::ErrorWithLambda(__tok0) | Token::LastErrorWithLambda(__tok0) if true => __Symbol::Variant4(__tok0), _ => unreachable!(), }, - 11 | 16 => match __token { - Token::ErrorWithLambda(__tok0) | Token::LastErrorWithLambda(__tok0) if true => __Symbol::Variant5(__tok0), + 11 => match __token { + Token::F64(__tok0) if true => __Symbol::Variant5(__tok0), _ => unreachable!(), }, 12 => match __token { - Token::F64(__tok0) if true => __Symbol::Variant6(__tok0), + Token::I64(__tok0) if true => __Symbol::Variant6(__tok0), _ => unreachable!(), }, - 13 => match __token { - Token::I64(__tok0) if true => __Symbol::Variant7(__tok0), + 16 => match __token { + Token::StringLiteral(__tok0) if true => __Symbol::Variant7(__tok0), _ => unreachable!(), }, _ => unreachable!(), @@ -2562,14 +2560,14 @@ mod __parse__AIR { _ => __symbol_type_mismatch() } } - fn __pop_Variant5< + fn __pop_Variant4< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, LambdaAST<'input>, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -2749,36 +2747,36 @@ mod __parse__AIR { _ => __symbol_type_mismatch() } } - fn __pop_Variant6< + fn __pop_Variant5< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, f64, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant7< + fn __pop_Variant6< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, i64, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant4< + fn __pop_Variant7< 'input, >( __symbols: &mut alloc::vec::Vec<(AirPos,__Symbol<'input>,AirPos)> ) -> (AirPos, &'input str, AirPos) { match __symbols.pop() { - Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -3005,7 +3003,7 @@ mod __parse__AIR { ) -> (usize, usize) { // ApArgument = LastErrorWithLambda => ActionFn(88); - let __sym0 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action88::<>(input, errors, validator, __sym0); @@ -3047,7 +3045,7 @@ mod __parse__AIR { ) -> (usize, usize) { // ApArgument = ErrorWithLambda => ActionFn(90); - let __sym0 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action90::<>(input, errors, validator, __sym0); @@ -3110,7 +3108,7 @@ mod __parse__AIR { ) -> (usize, usize) { // ApArgument = Literal => ActionFn(93); - let __sym0 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action93::<>(input, errors, validator, __sym0); @@ -3641,8 +3639,8 @@ mod __parse__AIR { { // FailBody = I64, Literal => ActionFn(37); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant4(__symbols); - let __sym0 = __pop_Variant7(__symbols); + let __sym1 = __pop_Variant7(__symbols); + let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action37::<>(input, errors, validator, __sym0, __sym1); @@ -4484,11 +4482,11 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", embed, Args, EmbeddedScript, EmbedOutput, ")" => ActionFn(169); + // Instr = "(", embed, Args, Literal, EmbedOutput, ")" => ActionFn(169); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant20(__symbols); - let __sym3 = __pop_Variant4(__symbols); + let __sym3 = __pop_Variant7(__symbols); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); @@ -4511,10 +4509,10 @@ mod __parse__AIR { _: core::marker::PhantomData<(&'err (), &'input (), &'v ())>, ) -> (usize, usize) { - // Instr = "(", embed, Args, EmbeddedScript, ")" => ActionFn(170); + // Instr = "(", embed, Args, Literal, ")" => ActionFn(170); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant4(__symbols); + let __sym3 = __pop_Variant7(__symbols); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); @@ -4705,7 +4703,7 @@ mod __parse__AIR { ) -> (usize, usize) { // Number = I64 => ActionFn(66); - let __sym0 = __pop_Variant7(__symbols); + let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action66::<>(input, errors, validator, __sym0); @@ -4726,7 +4724,7 @@ mod __parse__AIR { ) -> (usize, usize) { // Number = F64 => ActionFn(67); - let __sym0 = __pop_Variant6(__symbols); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action67::<>(input, errors, validator, __sym0); @@ -4789,7 +4787,7 @@ mod __parse__AIR { ) -> (usize, usize) { // ResolvableToPeerIdVariable = Literal => ActionFn(51); - let __sym0 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action51::<>(input, errors, validator, __sym0); @@ -4894,7 +4892,7 @@ mod __parse__AIR { ) -> (usize, usize) { // ResolvableToStringVariable = Literal => ActionFn(56); - let __sym0 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action56::<>(input, errors, validator, __sym0); @@ -5062,7 +5060,7 @@ mod __parse__AIR { ) -> (usize, usize) { // StreamMapKeyClause = Literal => ActionFn(27); - let __sym0 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action27::<>(input, errors, validator, __sym0); @@ -5083,7 +5081,7 @@ mod __parse__AIR { ) -> (usize, usize) { // StreamMapKeyClause = I64 => ActionFn(28); - let __sym0 = __pop_Variant7(__symbols); + let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action28::<>(input, errors, validator, __sym0); @@ -5235,7 +5233,7 @@ mod __parse__AIR { ) -> (usize, usize) { // Value = LastErrorWithLambda => ActionFn(71); - let __sym0 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action71::<>(input, errors, validator, __sym0); @@ -5277,7 +5275,7 @@ mod __parse__AIR { ) -> (usize, usize) { // Value = ErrorWithLambda => ActionFn(73); - let __sym0 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action73::<>(input, errors, validator, __sym0); @@ -5298,7 +5296,7 @@ mod __parse__AIR { ) -> (usize, usize) { // Value = Literal => ActionFn(74); - let __sym0 = __pop_Variant4(__symbols); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action74::<>(input, errors, validator, __sym0); diff --git a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs index f76acb8e7..1a9bfdb1f 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/air_lexer.rs @@ -51,12 +51,14 @@ impl<'input> AIRLexer<'input> { while let Some((start_pos, ch)) = self.chars.next() { let start_pos = AirPos::from(start_pos); match ch { - '(' => return self.bracket_or_embedded_script(start_pos), + '(' => return Some(Ok((start_pos, Token::OpenRoundBracket, start_pos + 1))), ')' => return Some(Ok((start_pos, Token::CloseRoundBracket, start_pos + 1))), '[' => return Some(Ok((start_pos, Token::OpenSquareBracket, start_pos + 1))), ']' => return Some(Ok((start_pos, Token::CloseSquareBracket, start_pos + 1))), + '#' => return self.hash_or_string(start_pos), + ';' => self.skip_comment(), ch if ch.is_whitespace() => {} @@ -70,15 +72,15 @@ impl<'input> AIRLexer<'input> { None } - fn bracket_or_embedded_script( + fn hash_or_string( &mut self, start_pos: AirPos, ) -> Option, AirPos, LexerError>> { - if let Some((_, '#')) = self.chars.peek() { + if let Some((_, '"')) = self.chars.peek() { self.chars.next(); - self.embedded_script(start_pos) + self.raw_string(start_pos) } else { - Some(Ok((start_pos, Token::OpenRoundBracket, start_pos + 1))) + self.tokenize_string(start_pos, false) } } @@ -135,26 +137,26 @@ impl<'input> AIRLexer<'input> { Some(Ok((start_pos, token, start_pos + token_str_len))) } - fn embedded_script( + fn raw_string( &mut self, start_pos: AirPos, ) -> Option, AirPos, LexerError>> { while let Some((pos, ch)) = self.chars.next() { // TODO consider ```...``` for the scripts - if ch == '#' { - if let Some((_, ')')) = self.chars.peek() { + if ch == '"' { + if let Some((_, '#')) = self.chars.peek() { self.chars.next(); let string_size = AirPos::from(pos) - start_pos + 2; return Some(Ok(( start_pos, - Token::EmbeddedScript(&self.input[(start_pos + 2).into()..pos]), + Token::StringLiteral(&self.input[(start_pos + 2).into()..pos]), start_pos + string_size, ))); } } } - Some(Err(LexerError::unclosed_embedded( + Some(Err(LexerError::unclosed_quote( start_pos..self.input.len().into(), ))) } diff --git a/crates/air-lib/air-parser/src/parser/lexer/errors.rs b/crates/air-lib/air-parser/src/parser/lexer/errors.rs index a10ce2d3d..5aee225ad 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/errors.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/errors.rs @@ -73,9 +73,6 @@ pub enum LexerError { #[error("leading dot without any symbols before - please write 0 if it's float or variable name if it's a lambda")] LeadingDot(Span), - - #[error("this embedded program has not terminating sequence")] - UnclosedEmbedded(Span), } impl LexerError { @@ -95,7 +92,6 @@ impl LexerError { Self::LastErrorPathError { span, .. } => span, Self::TooBigFloat(span) => span, Self::LeadingDot(span) => span, - Self::UnclosedEmbedded(span) => span, }; *span @@ -165,10 +161,6 @@ impl LexerError { pub fn leading_dot(range: Range) -> Self { Self::LeadingDot(range.into()) } - - pub fn unclosed_embedded(range: Range) -> Self { - Self::UnclosedEmbedded(range.into()) - } } use super::Token; diff --git a/crates/air-lib/air-parser/src/parser/lexer/tests.rs b/crates/air-lib/air-parser/src/parser/lexer/tests.rs index 479896245..858026699 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/tests.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/tests.rs @@ -719,22 +719,22 @@ fn stream_map_lambda_scalar_accessor() { } #[test] -fn embedded_script_normal() { +fn raw_string_normal() { lexer_test( - r#")"str"(# ("test")#)("#, + r##")"str"#" ("test")"#("##, All(vec![ Ok((0.into(), Token::CloseRoundBracket, 1.into())), Ok((1.into(), Token::StringLiteral(r#"str"#), 6.into())), - Ok((6.into(), Token::EmbeddedScript(r#" ("test")"#), 19.into())), + Ok((6.into(), Token::StringLiteral(r#" ("test")"#), 19.into())), Ok((19.into(), Token::OpenRoundBracket, 20.into())), ]), ); } #[test] -fn embedded_script_unclosed() { +fn raw_string_unclosed() { lexer_test( - r#")(#("test")()"#, - One(1, Err(LexerError::unclosed_embedded(1.into()..13.into()))), + r##"""#"("test")()"##, + One(1, Err(LexerError::unclosed_quote(2.into()..14.into()))), ); } diff --git a/crates/air-lib/air-parser/src/parser/lexer/token.rs b/crates/air-lib/air-parser/src/parser/lexer/token.rs index 89473cffe..024e1ebd3 100644 --- a/crates/air-lib/air-parser/src/parser/lexer/token.rs +++ b/crates/air-lib/air-parser/src/parser/lexer/token.rs @@ -78,7 +78,6 @@ pub enum Token<'input> { }, StringLiteral(&'input str), - EmbeddedScript(&'input str), I64(i64), F64(f64), Boolean(bool), diff --git a/crates/air-lib/air-parser/src/parser/tests/embed.rs b/crates/air-lib/air-parser/src/parser/tests/embed.rs index 998f3458b..734a05678 100644 --- a/crates/air-lib/air-parser/src/parser/tests/embed.rs +++ b/crates/air-lib/air-parser/src/parser/tests/embed.rs @@ -38,10 +38,10 @@ def sum(x): sum(get_value(0) + get_value(1)) "#; let source_code = format!( - " - (embed [x %last_error%.$.message!] (#{}#) + r##" + (embed [x %last_error%.$.message!] #"{}"# var) - ", + "##, embed_script ); @@ -71,9 +71,9 @@ sum(get_value(0) + get_value(1)) fn embed_no_var() { let embed_script = r#" get_tetraplet(0).peer_pk + ": " + get_value(1) "#; let source_code = format!( - r#" - (embed [x %last_error%.$.message!] (#{}#)) - "#, + r##" + (embed [x %last_error%.$.message!] #"{}"#) + "##, embed_script ); @@ -102,7 +102,7 @@ fn embed_no_var() { #[test] fn embed_with_hash_symbol_string() { let source_code = r##" - (embed [x %last_error%.$.message!] (#"the hash inside the string: \x23"#) var) + (embed [x %last_error%.$.message!] #""the hash inside the string: \x23""# var) "##; let actual = parse(source_code); From c8f8297b3c826b87956ba5c9aa84571ffc5eac9f Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Wed, 7 Aug 2024 10:49:02 +0200 Subject: [PATCH 24/36] add embed join behavior test --- air/tests/test_module/instructions/embed.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index edb49f958..5f1203b87 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -142,3 +142,23 @@ async fn embed_error_lexer() { )); assert_error_eq!(&result, expected_error); } + +#[tokio::test] +async fn embed_with_join_behavior() { + let mut vm = create_avm(echo_call_service(), "").await; + + let script = r##" + (par + (call "other_peer" ("" "") [] var) + (seq + (embed [var] #"var + var"# var2) + (call %init_peer_id% ("" "") [var2])))"##; + + let result = call_vm!(vm, <_>::default(), script, "", ""); + + assert_eq!(result.error_message, ""); + assert_eq!(result.ret_code, 0); + + let trace = trace_from_result(&result); + assert_eq!(trace.len(), 2); +} From 9725bf9742eaef6d989cf6cfcff394491dfcb735 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 8 Aug 2024 16:14:18 +0200 Subject: [PATCH 25/36] add `embed_zip_reverse` test --- air/tests/test_module/instructions/embed.rs | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 5f1203b87..334ff5736 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -162,3 +162,53 @@ async fn embed_with_join_behavior() { let trace = trace_from_result(&result); assert_eq!(trace.len(), 2); } + +#[tokio::test] +async fn embed_zip_reverse() { + let mut vm = create_avm(echo_call_service(), "").await; + + let script = r##" + (seq + (seq + (seq + (ap 1 $stream) + (ap 2 $stream)) + (canon %init_peer_id% $stream #canon)) + (seq + (embed [#canon #canon] +#" +v1 = get_value(0) +v2 = get_value(1) + +if get_tetraplet(0)['peer_pk'] != get_tetraplet(1)['peer_pk']: + fail(42, "tetraplet peer_pk mismatch") + +(list(zip(v1, reversed(v2))), get_tetraplet(0)) +"# + var2) + (call %init_peer_id% ("" "") [var2] var3)))"##; + + let result = call_vm!(vm, <_>::default(), script, "", ""); + + assert_eq!(result.error_message, "", "{}", result.error_message); + assert_eq!(result.ret_code, 0); + + let expected_trace = vec![ + ap(0), + ap(0), + canon(json!({ + "tetraplet": {"function_name": "", "lens": "", "peer_pk": "", "service_id": ""}, + "values": [{ + "tetraplet": {"function_name": "", "lens": "", "peer_pk": "", "service_id": ""}, + "result": 1 + }, { + "tetraplet": {"function_name": "", "lens": "", "peer_pk": "", "service_id": ""}, + "result": 2 + }] + })), + scalar!(json!([(1, 2), (2, 1)]), args = [json!([[1, 2], (2, 1)])]), + ]; + let data = data_from_result(&result); + let trace = trace_from_result(&result); + assert_eq!(&*trace, expected_trace, "{:#?}", data.cid_info); +} From 7df92630117edf5d417f79a6aae6dda0fc9998b4 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 8 Aug 2024 16:45:55 +0200 Subject: [PATCH 26/36] fix last-minute change in tests --- air/tests/test_module/instructions/embed.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 334ff5736..922ee13c9 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -177,13 +177,16 @@ async fn embed_zip_reverse() { (seq (embed [#canon #canon] #" -v1 = get_value(0) -v2 = get_value(1) +def main(): + v1 = get_value(0) + v2 = get_value(1) -if get_tetraplet(0)['peer_pk'] != get_tetraplet(1)['peer_pk']: - fail(42, "tetraplet peer_pk mismatch") + if get_tetraplet(0)[0].peer_pk != get_tetraplet(1)[0].peer_pk: + fail(42, 'tetraplet peer_pk mismatch') -(list(zip(v1, reversed(v2))), get_tetraplet(0)) + return list(zip(v1, reversed(v2))) + +main() "# var2) (call %init_peer_id% ("" "") [var2] var3)))"##; @@ -206,7 +209,10 @@ if get_tetraplet(0)['peer_pk'] != get_tetraplet(1)['peer_pk']: "result": 2 }] })), - scalar!(json!([(1, 2), (2, 1)]), args = [json!([[1, 2], (2, 1)])]), + scalar!( + json!([(1, 2), (2, 1)]), + args = [json!([(1, 2), (2, 1)])] + ), ]; let data = data_from_result(&result); let trace = trace_from_result(&result); From 39dede12c14f9ad5857f5e4cd2b70195e0aa6dc7 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 8 Aug 2024 17:15:20 +0200 Subject: [PATCH 27/36] make fmt happy --- air/tests/test_module/instructions/embed.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/air/tests/test_module/instructions/embed.rs b/air/tests/test_module/instructions/embed.rs index 922ee13c9..d06aac861 100644 --- a/air/tests/test_module/instructions/embed.rs +++ b/air/tests/test_module/instructions/embed.rs @@ -209,10 +209,7 @@ main() "result": 2 }] })), - scalar!( - json!([(1, 2), (2, 1)]), - args = [json!([(1, 2), (2, 1)])] - ), + scalar!(json!([(1, 2), (2, 1)]), args = [json!([(1, 2), (2, 1)])]), ]; let data = data_from_result(&result); let trace = trace_from_result(&result); From aba042310614543a2b6df0b864cff4417e89cae2 Mon Sep 17 00:00:00 2001 From: Ivan Boldyrev Date: Thu, 8 Aug 2024 18:33:59 +0200 Subject: [PATCH 28/36] Document `embed` instruction --- docs/AIR.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/AIR.md b/docs/AIR.md index d46990bee..2cb76a37f 100644 --- a/docs/AIR.md +++ b/docs/AIR.md @@ -188,6 +188,27 @@ Example - does nothing, useful for code generation +### embed + +```wasm +(embed []