From f44936ea5abcb8a6a63693db7b344348a0b3827f Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Tue, 28 May 2019 19:19:16 +1200 Subject: [PATCH] Some fixes for the new evaluator --- src/object/base.rs | 4 + src/parser/parser.lalrpop | 1 + src/parser/parser.rs | 847 ++++++++++++++++++++------------------ 3 files changed, 454 insertions(+), 398 deletions(-) diff --git a/src/object/base.rs b/src/object/base.rs index 53c2b9078..d7086495c 100644 --- a/src/object/base.rs +++ b/src/object/base.rs @@ -426,6 +426,7 @@ crate fn find(obj: &Value, field: &str, op: &Operator, rhs: &Value) -> bool { enum CompareValues { Ints(i64, i64), + Floats(OF64, OF64), Bytes(i128, i128), String(String, String), } @@ -434,6 +435,7 @@ impl CompareValues { fn compare(&self) -> std::cmp::Ordering { match self { CompareValues::Ints(left, right) => left.cmp(right), + CompareValues::Floats(left, right) => left.cmp(right), CompareValues::Bytes(left, right) => left.cmp(right), CompareValues::String(left, right) => left.cmp(right), } @@ -453,6 +455,8 @@ fn coerce_compare_primitive(left: &Primitive, right: &Primitive) -> Option Some(CompareValues::Ints(*left, *right)), + (Float(left), Int(right)) => Some(CompareValues::Floats(*left, (*right as f64).into())), + (Int(left), Float(right)) => Some(CompareValues::Floats((*left as f64).into(), *right)), (Int(left), Bytes(right)) => Some(CompareValues::Bytes(*left as i128, *right as i128)), (Bytes(left), Int(right)) => Some(CompareValues::Bytes(*left as i128, *right as i128)), (String(left), String(right)) => Some(CompareValues::String(left.clone(), right.clone())), diff --git a/src/parser/parser.lalrpop b/src/parser/parser.lalrpop index 00090f151..c66fc46c2 100644 --- a/src/parser/parser.lalrpop +++ b/src/parser/parser.lalrpop @@ -17,6 +17,7 @@ Command: ParsedCommand = { Leaf: Expression = { => Expression::Leaf(Leaf::String(<>)), => Expression::Leaf(Leaf::Int(<>)), + => Expression::Leaf(Leaf::Int(<>)), => Expression::VariableReference(<>), } diff --git a/src/parser/parser.rs b/src/parser/parser.rs index d06739736..8f3bdd414 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.17.0" -// sha256: 4ee276758faf25a1744699f385437040e58a7988edbff39291ce342def61 +// sha256: a068d921aac2bbdc85ed4e2267e06ad46a9677e9e961bca0ac7adacd6628df5 use std::str::FromStr; use byte_unit::Byte; use crate::parser::ast::*; @@ -44,143 +44,147 @@ mod __parse__Pipeline { // State 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 3 - 0, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, -14, 0, 29, 30, 31, 0, 5, + 0, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, -14, 0, 30, 31, 32, 33, 5, // State 4 - -44, -44, -44, -44, -44, -44, -44, 0, 0, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 0, -44, + -45, -45, -45, -45, -45, -45, -45, 0, 0, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, // State 5 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 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, // State 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, // State 7 - -53, -53, -53, -53, -53, -53, 0, 0, 0, -53, -53, -53, -53, -53, -53, -53, -53, 0, -53, -53, -53, 0, -53, + -54, -54, -54, -54, -54, -54, 0, 0, 0, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, -54, -54, -54, -54, // State 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, // State 9 - -54, -54, -54, -54, -54, -54, 0, 0, 0, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, -54, -54, 0, -54, + -55, -55, -55, -55, -55, -55, 0, 0, 0, -55, -55, -55, -55, -55, -55, -55, -55, 0, -55, -55, -55, -55, -55, // State 10 - -48, -48, -48, -48, -48, -48, -48, 0, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, + -49, -49, -49, -49, -49, -49, -49, 0, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, // State 11 - 35, -22, -22, -22, -22, -22, 0, 0, 0, 0, 36, 37, 38, 39, 40, -22, -22, 0, -22, -22, -22, 0, -22, + 37, -22, -22, -22, -22, -22, 0, 0, 0, 0, 38, 39, 40, 41, 42, -22, -22, 0, -22, -22, -22, -22, -22, // State 12 - 0, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, -15, 0, 29, 30, 31, 0, 5, + 0, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, -15, 0, 30, 31, 32, 33, 5, // State 13 - -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, + -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, // State 14 - -27, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, -27, + -27, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, // State 15 - -9, -9, -9, -9, -9, -9, 0, 0, 0, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 0, -9, + -9, -9, -9, -9, -9, -9, 0, 0, 0, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // State 16 - -19, -19, -19, -19, -19, -19, 0, 0, 0, 0, -19, -19, -19, -19, -19, -19, -19, 0, -19, -19, -19, 0, -19, + -19, -19, -19, -19, -19, -19, 0, 0, 0, 0, -19, -19, -19, -19, -19, -19, -19, 0, -19, -19, -19, -19, -19, // State 17 - -18, -18, -18, -18, -18, -18, 0, 0, 0, 0, -18, -18, -18, -18, -18, -18, -18, 0, -18, -18, -18, 0, -18, + -18, -18, -18, -18, -18, -18, 0, 0, 0, 0, -18, -18, -18, -18, -18, -18, -18, 0, -18, -18, -18, -18, -18, // State 18 - -47, -47, -47, -47, -47, -47, -47, 0, 0, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 0, -47, + -48, -48, -48, -48, -48, -48, -48, 0, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, // State 19 - -26, -26, -26, -26, -26, -26, -26, 0, 0, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 0, -26, + -28, -28, -28, -28, -28, -28, -28, 0, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, // State 20 - -28, -28, -28, -28, -28, -28, -28, 0, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, + -26, -26, -26, -26, -26, -26, -26, 0, 0, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, // State 21 - -40, -40, -40, -40, -40, -40, 0, 0, 0, 43, -40, -40, -40, -40, -40, -40, -40, 0, -40, -40, -40, 0, -40, + -29, -29, -29, -29, -29, -29, -29, 0, 0, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, // State 22 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + -41, -41, -41, -41, -41, -41, 0, 0, 0, 45, -41, -41, -41, -41, -41, -41, -41, 0, -41, -41, -41, -41, -41, // State 23 - -50, -50, -50, -50, -50, -50, -50, 0, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, - // State 24 - -51, -51, -51, -51, -51, -51, -51, 0, 0, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, - // State 25 - -49, -49, -49, -49, -49, -49, -49, 0, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, - // State 26 - 0, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 29, 30, 31, 0, 5, - // State 27 - 0, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 29, 30, 31, 0, 5, - // State 28 - -17, -17, -17, -17, -17, -17, -17, 0, 0, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, - // State 29 - -45, -45, -45, -45, -45, -45, -45, 0, 0, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 0, -45, - // State 30 - -31, -31, -31, -31, -31, -31, -31, 0, 0, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, - // State 31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + // State 24 + -51, -51, -51, -51, -51, -51, -51, 0, 0, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, + // State 25 + -52, -52, -52, -52, -52, -52, -52, 0, 0, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, + // State 26 + -50, -50, -50, -50, -50, -50, -50, 0, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, + // State 27 + 0, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 5, + // State 28 + 0, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 5, + // State 29 + -17, -17, -17, -17, -17, -17, -17, 0, 0, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + // State 30 + -46, -46, -46, -46, -46, -46, -46, 0, 0, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, + // State 31 + -32, -32, -32, -32, -32, -32, -32, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, // State 32 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7, 0, 0, 0, 0, 0, 0, + -47, -47, -47, -47, -47, -47, -47, 0, 0, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, // State 33 - 0, 23, 24, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 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, 5, // State 34 - 0, -33, -33, -33, -33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -33, -33, -33, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7, 0, 0, 0, 0, 0, 0, // State 35 - 0, -34, -34, -34, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -34, -34, -34, 0, 0, + 0, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 32, 33, 0, // State 36 - 0, -36, -36, -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, -36, -36, 0, 0, + 0, -34, -34, -34, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -34, -34, -34, -34, 0, // State 37 - 0, -32, -32, -32, -32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, 0, 0, + 0, -35, -35, -35, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35, -35, -35, -35, 0, // State 38 - 0, -35, -35, -35, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35, -35, -35, 0, 0, + 0, -37, -37, -37, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, -37, -37, -37, 0, // State 39 - 0, -37, -37, -37, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, -37, -37, 0, 0, + 0, -33, -33, -33, -33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -33, -33, -33, -33, 0, // State 40 - 0, -23, -23, -23, -23, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, -23, -23, 0, -23, -23, -23, 0, -23, + 0, -36, -36, -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, -36, -36, -36, 0, // State 41 - -41, -41, -41, -41, -41, -41, 0, 0, 0, 52, -41, -41, -41, -41, -41, -41, -41, 0, -41, -41, -41, 0, -41, + 0, -38, -38, -38, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, -38, -38, -38, 0, // State 42 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 0, 0, 5, + 0, -23, -23, -23, -23, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, -23, -23, 0, -23, -23, -23, -23, -23, // State 43 - -52, -52, -52, -52, -52, -52, -52, 0, 0, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, + -42, -42, -42, -42, -42, -42, 0, 0, 0, 54, -42, -42, -42, -42, -42, -42, -42, 0, -42, -42, -42, -42, -42, // State 44 - 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 31, 0, 0, 5, // State 45 - 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 0, 0, 0, 0, 0, 0, 0, 0, + -53, -53, -53, -53, -53, -53, -53, 0, 0, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, // State 46 - -10, 0, 0, 0, 0, 0, 57, 0, 0, -10, -10, -10, -10, -10, -10, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 47 - -53, 0, 0, 0, 0, 0, 0, 0, 0, -53, -53, -53, -53, -53, -53, 0, 0, 58, 0, 0, 0, 0, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, // State 48 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, + -10, 0, 0, 0, 0, 0, 59, 0, 0, -10, -10, -10, -10, -10, -10, 0, 0, 0, 0, 0, 0, 0, 0, // State 49 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, + -54, 0, 0, 0, 0, 0, 0, 0, 0, -54, -54, -54, -54, -54, -54, 0, 0, 60, 0, 0, 0, 0, 0, // State 50 - 0, 0, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, -11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, // State 51 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, // State 52 - -4, -4, -4, -4, -4, -4, 0, 0, 0, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, 0, -4, + 0, 0, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, -11, 0, 0, 0, 0, 0, // State 53 - -29, -29, -29, -29, -29, -29, 0, 0, 0, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, -29, -29, 0, -29, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 5, // State 54 - -30, -30, -30, -30, -30, -30, 0, 0, 0, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, -30, -30, 0, -30, + -4, -4, -4, -4, -4, -4, 0, 0, 0, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, // State 55 - -39, -39, -39, -39, -39, -39, 0, 0, 0, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, 0, -39, + -30, -30, -30, -30, -30, -30, 0, 0, 0, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, -30, -30, -30, -30, // State 56 - -38, -38, -38, -38, -38, -38, 0, 0, 0, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, 0, -38, + -31, -31, -31, -31, -31, -31, 0, 0, 0, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, -31, -31, -31, -31, // State 57 - -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, -12, -12, 0, -12, + -40, -40, -40, -40, -40, -40, 0, 0, 0, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, // State 58 - -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, -13, -13, 0, -13, + -39, -39, -39, -39, -39, -39, 0, 0, 0, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, // State 59 - -5, -5, -5, -5, -5, -5, 0, 0, 0, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, -5, -5, 0, -5, + -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, -12, -12, -12, -12, + // State 60 + -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, -13, -13, -13, -13, + // State 61 + -5, -5, -5, -5, -5, -5, 0, 0, 0, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, -5, -5, -5, -5, ]; const __EOF_ACTION: &'static [i8] = &[ // State 0 0, // State 1 - -42, + -43, // State 2 - -55, + -56, // State 3 -14, // State 4 - -44, + -45, // State 5 - -43, + -44, // State 6 0, // State 7 - -53, + -54, // State 8 -16, // State 9 - -54, + -55, // State 10 - -48, + -49, // State 11 -22, // State 12 @@ -196,39 +200,39 @@ mod __parse__Pipeline { // State 17 -18, // State 18 - -47, + -48, // State 19 - -26, - // State 20 -28, + // State 20 + -26, // State 21 - -40, + -29, // State 22 - 0, + -41, // State 23 - -50, + 0, // State 24 -51, // State 25 - -49, + -52, // State 26 - 0, + -50, // State 27 0, // State 28 - -17, - // State 29 - -45, - // State 30 - -31, - // State 31 0, + // State 29 + -17, + // State 30 + -46, + // State 31 + -32, // State 32 - -7, + -47, // State 33 0, // State 34 - 0, + -7, // State 35 0, // State 36 @@ -240,17 +244,17 @@ mod __parse__Pipeline { // State 39 0, // State 40 - -23, - // State 41 - -41, - // State 42 0, + // State 41 + 0, + // State 42 + -23, // State 43 - -52, + -42, // State 44 0, // State 45 - 0, + -53, // State 46 0, // State 47 @@ -258,26 +262,30 @@ mod __parse__Pipeline { // State 48 0, // State 49 - -8, - // State 50 - -11, - // State 51 0, + // State 50 + 0, + // State 51 + -8, // State 52 - -4, + -11, // State 53 - -29, + 0, // State 54 - -30, + -4, // State 55 - -39, + -30, // State 56 - -38, + -31, // State 57 - -12, + -40, // State 58 - -13, + -39, // State 59 + -12, + // State 60 + -13, + // State 61 -5, ]; const __GOTO: &'static [i8] = &[ @@ -288,13 +296,13 @@ mod __parse__Pipeline { // State 2 0, 0, 0, 0, 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 3 - 0, 0, 0, 0, 0, 8, 9, 10, 0, 11, 12, 0, 13, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 0, 20, 21, 22, 0, + 0, 0, 0, 0, 0, 8, 9, 10, 0, 11, 12, 0, 13, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 0, // State 4 0, 0, 0, 0, 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, 0, 0, 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 6 - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, // State 7 0, 0, 0, 0, 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 8 @@ -304,9 +312,9 @@ mod __parse__Pipeline { // State 10 0, 0, 0, 0, 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 11 - 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, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 12 - 0, 0, 0, 0, 0, 8, 0, 10, 0, 11, 41, 0, 0, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 0, 20, 21, 22, 0, + 0, 0, 0, 0, 0, 8, 0, 10, 0, 11, 43, 0, 0, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 0, // State 13 0, 0, 0, 0, 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 14 @@ -324,35 +332,35 @@ mod __parse__Pipeline { // State 20 0, 0, 0, 0, 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 21 - 0, 0, 42, 0, 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 22 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, - // State 23 0, 0, 0, 0, 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 22 + 0, 0, 44, 0, 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 23 + 0, 0, 0, 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, // State 24 0, 0, 0, 0, 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 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, // State 26 - 0, 0, 0, 0, 0, 8, 45, 10, 0, 11, 46, 0, 0, 0, 47, 0, 15, 0, 16, 17, 0, 18, 19, 0, 20, 21, 22, 0, - // State 27 - 0, 0, 0, 0, 0, 48, 49, 10, 0, 11, 46, 0, 0, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 0, 20, 21, 22, 0, - // State 28 0, 0, 0, 0, 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 27 + 0, 0, 0, 0, 0, 8, 47, 10, 0, 11, 48, 0, 0, 0, 49, 0, 15, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 0, + // State 28 + 0, 0, 0, 0, 0, 50, 51, 10, 0, 11, 48, 0, 0, 0, 14, 0, 15, 0, 16, 17, 0, 18, 19, 20, 21, 22, 23, 0, // State 29 0, 0, 0, 0, 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 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, // State 31 - 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 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 32 0, 0, 0, 0, 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 33 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 51, 0, 15, 0, 0, 0, 0, 0, 19, 0, 20, 21, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, // State 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, // State 35 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 53, 0, 15, 0, 0, 0, 0, 0, 19, 20, 21, 22, 0, 0, // State 36 0, 0, 0, 0, 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 37 @@ -366,17 +374,17 @@ mod __parse__Pipeline { // State 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, // State 42 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 54, 19, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 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 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, // State 44 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 55, 0, 0, 0, 0, 0, 56, 19, 0, 57, 0, 0, 0, // State 45 - 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 46 0, 0, 0, 0, 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 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, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 48 0, 0, 0, 0, 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 49 @@ -384,11 +392,11 @@ mod __parse__Pipeline { // State 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, // State 51 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 54, 19, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 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 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, // State 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, 11, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 56, 19, 0, 57, 0, 0, 0, // State 54 0, 0, 0, 0, 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 55 @@ -401,6 +409,10 @@ mod __parse__Pipeline { 0, 0, 0, 0, 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 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, + // State 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, + // State 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, ]; fn __expected_tokens(__state: usize) -> Vec<::std::string::String> { const __TERMINAL: &'static [&'static str] = &[ @@ -850,7 +862,7 @@ mod __parse__Pipeline { 28 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 14, } } 29 => { @@ -862,13 +874,13 @@ mod __parse__Pipeline { 30 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 15, } } 31 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 17, + nonterminal_produced: 16, } } 32 => { @@ -903,8 +915,8 @@ mod __parse__Pipeline { } 37 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 18, + states_to_pop: 1, + nonterminal_produced: 17, } } 38 => { @@ -915,50 +927,50 @@ mod __parse__Pipeline { } 39 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 19, + states_to_pop: 3, + nonterminal_produced: 18, } } 40 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 19, } } 41 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 20, + states_to_pop: 2, + nonterminal_produced: 19, } } 42 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 20, } } 43 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 21, + states_to_pop: 2, + nonterminal_produced: 20, } } 44 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 21, } } 45 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 22, } } 46 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 24, + nonterminal_produced: 23, } } 47 => { @@ -970,7 +982,7 @@ mod __parse__Pipeline { 48 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 25, + nonterminal_produced: 24, } } 49 => { @@ -987,14 +999,14 @@ mod __parse__Pipeline { } 51 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 25, } } 52 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 26, + states_to_pop: 2, + nonterminal_produced: 25, } } 53 => { @@ -1003,7 +1015,13 @@ mod __parse__Pipeline { nonterminal_produced: 26, } } - 54 => __state_machine::SimulatedReduce::Accept, + 54 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 26, + } + } + 55 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {}", __reduce_index) } } @@ -1215,6 +1233,9 @@ mod __parse__Pipeline { __reduce53(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) } 54 => { + __reduce54(input, __action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 55 => { // __Pipeline = Pipeline => ActionFn(0); let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0.clone(); @@ -1374,12 +1395,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." ) = ".", Member => ActionFn(43); + // ("." ) = ".", Member => ActionFn(44); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action43::<>(input, __sym0, __sym1); + let __nt = super::__action44::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 0) } @@ -1394,10 +1415,10 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )* = => ActionFn(41); + // ("." )* = => ActionFn(42); let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default(); let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone()); - let __nt = super::__action41::<>(input, &__start, &__end); + let __nt = super::__action42::<>(input, &__start, &__end); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (0, 1) } @@ -1412,11 +1433,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )* = ("." )+ => ActionFn(42); + // ("." )* = ("." )+ => ActionFn(43); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action42::<>(input, __sym0); + let __nt = super::__action43::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (1, 1) } @@ -1431,12 +1452,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )+ = ".", Member => ActionFn(53); + // ("." )+ = ".", Member => ActionFn(54); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action53::<>(input, __sym0, __sym1); + let __nt = super::__action54::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (2, 2) } @@ -1451,13 +1472,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )+ = ("." )+, ".", Member => ActionFn(54); + // ("." )+ = ("." )+, ".", Member => ActionFn(55); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action54::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action55::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (3, 2) } @@ -1472,12 +1493,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" ) = "|", Command => ActionFn(48); + // ("|" ) = "|", Command => ActionFn(49); let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action48::<>(input, __sym0, __sym1); + let __nt = super::__action49::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (2, 3) } @@ -1492,12 +1513,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = "|", Command => ActionFn(57); + // ("|" )+ = "|", Command => ActionFn(58); let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action57::<>(input, __sym0, __sym1); + let __nt = super::__action58::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (2, 4) } @@ -1512,13 +1533,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = ("|" )+, "|", Command => ActionFn(58); + // ("|" )+ = ("|" )+, "|", Command => ActionFn(59); let __sym2 = __pop_Variant3(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action58::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action59::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (3, 4) } @@ -1533,11 +1554,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Parenthesized => ActionFn(11); + // AtomicExpression = Parenthesized => ActionFn(12); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action11::<>(input, __sym0); + let __nt = super::__action12::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 5) } @@ -1552,11 +1573,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Leaf => ActionFn(12); + // AtomicExpression = Leaf => ActionFn(13); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action12::<>(input, __sym0); + let __nt = super::__action13::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 5) } @@ -1571,13 +1592,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BinaryExpression = Expr, Operator, Leaf => ActionFn(8); + // BinaryExpression = Expr, Operator, Leaf => ActionFn(9); let __sym2 = __pop_Variant5(__symbols); let __sym1 = __pop_Variant9(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action8::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action9::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (3, 6) } @@ -1592,13 +1613,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", AtomicExpression, "}" => ActionFn(13); + // Block = "{", AtomicExpression, "}" => ActionFn(14); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action13::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (3, 7) } @@ -1613,13 +1634,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", BinaryExpression, "}" => ActionFn(14); + // Block = "{", BinaryExpression, "}" => ActionFn(15); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (3, 7) } @@ -1634,11 +1655,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Command = RawBareWord => ActionFn(59); + // Command = RawBareWord => ActionFn(60); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action59::<>(input, __sym0); + let __nt = super::__action60::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (1, 8) } @@ -1653,12 +1674,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Command = RawBareWord, Expr+ => ActionFn(60); + // Command = RawBareWord, Expr+ => ActionFn(61); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action60::<>(input, __sym0, __sym1); + let __nt = super::__action61::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (2, 8) } @@ -1693,11 +1714,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // DQString = r#"\"([^\"]|\\\\\")*\""# => ActionFn(37); + // DQString = r#"\"([^\"]|\\\\\")*\""# => ActionFn(38); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action37::<>(input, __sym0); + let __nt = super::__action38::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 9) } @@ -1712,11 +1733,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = RawBareWord => ActionFn(18); + // Expr = RawBareWord => ActionFn(19); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action18::<>(input, __sym0); + let __nt = super::__action19::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 10) } @@ -1731,11 +1752,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathExpression => ActionFn(19); + // Expr = PathExpression => ActionFn(20); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action19::<>(input, __sym0); + let __nt = super::__action20::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 10) } @@ -1750,10 +1771,10 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr* = => ActionFn(44); + // Expr* = => ActionFn(45); let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default(); let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone()); - let __nt = super::__action44::<>(input, &__start, &__end); + let __nt = super::__action45::<>(input, &__start, &__end); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (0, 11) } @@ -1768,11 +1789,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr* = Expr+ => ActionFn(45); + // Expr* = Expr+ => ActionFn(46); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action45::<>(input, __sym0); + let __nt = super::__action46::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 11) } @@ -1787,11 +1808,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr => ActionFn(49); + // Expr+ = Expr => ActionFn(50); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action49::<>(input, __sym0); + let __nt = super::__action50::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -1806,12 +1827,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr+, Expr => ActionFn(50); + // Expr+ = Expr+, Expr => ActionFn(51); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action50::<>(input, __sym0, __sym1); + let __nt = super::__action51::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (2, 12) } @@ -1826,12 +1847,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "-", RawBareWord => ActionFn(32); + // Flag = "-", RawBareWord => ActionFn(33); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action32::<>(input, __sym0, __sym1); + let __nt = super::__action33::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (2, 13) } @@ -1846,12 +1867,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "--", RawBareWord => ActionFn(33); + // Flag = "--", RawBareWord => ActionFn(34); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action33::<>(input, __sym0, __sym1); + let __nt = super::__action34::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (2, 13) } @@ -1904,8 +1925,8 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = Variable => ActionFn(7); - let __sym0 = __pop_Variant11(__symbols); + // Leaf = Size => ActionFn(7); + let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action7::<>(input, __sym0); @@ -1923,13 +1944,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = RawBareWord => ActionFn(24); - let __sym0 = __pop_Variant1(__symbols); + // Leaf = Variable => ActionFn(8); + let __sym0 = __pop_Variant11(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action24::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (1, 15) + let __nt = super::__action8::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant5(__nt), __end)); + (1, 14) } pub(crate) fn __reduce29< 'input, @@ -1942,7 +1963,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = String => ActionFn(25); + // Member = RawBareWord => ActionFn(25); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -1961,13 +1982,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Num = r#"-?[0-9]+"# => ActionFn(39); - let __sym0 = __pop_Variant0(__symbols); + // Member = String => ActionFn(26); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action39::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (1, 16) + let __nt = super::__action26::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 15) } pub(crate) fn __reduce31< 'input, @@ -1980,13 +2001,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "==" => ActionFn(26); + // Num = r#"-?[0-9]+"# => ActionFn(40); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action26::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 17) + let __nt = super::__action40::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (1, 16) } pub(crate) fn __reduce32< 'input, @@ -1999,7 +2020,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "!=" => ActionFn(27); + // Operator = "==" => ActionFn(27); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2018,7 +2039,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<" => ActionFn(28); + // Operator = "!=" => ActionFn(28); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2037,7 +2058,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">" => ActionFn(29); + // Operator = "<" => ActionFn(29); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2056,7 +2077,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<=" => ActionFn(30); + // Operator = ">" => ActionFn(30); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2075,7 +2096,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">=" => ActionFn(31); + // Operator = "<=" => ActionFn(31); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2094,15 +2115,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", Leaf, ")" => ActionFn(9); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant5(__symbols); + // Operator = ">=" => ActionFn(32); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action9::<>(input, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant5(__nt), __end)); - (3, 18) + let __end = __sym0.2.clone(); + let __nt = super::__action32::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant9(__nt), __end)); + (1, 17) } pub(crate) fn __reduce38< 'input, @@ -2115,7 +2134,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", BinaryExpression, ")" => ActionFn(10); + // Parenthesized = "(", Leaf, ")" => ActionFn(10); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); @@ -2136,13 +2155,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathExpression = WholeExpression => ActionFn(55); - let __sym0 = __pop_Variant5(__symbols); + // Parenthesized = "(", BinaryExpression, ")" => ActionFn(11); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action55::<>(input, __sym0); + let __end = __sym2.2.clone(); + let __nt = super::__action11::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); - (1, 19) + (3, 18) } pub(crate) fn __reduce40< 'input, @@ -2155,16 +2176,35 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathExpression = WholeExpression, ("." )+ => ActionFn(56); + // PathExpression = WholeExpression => ActionFn(56); + let __sym0 = __pop_Variant5(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action56::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant5(__nt), __end)); + (1, 19) + } + pub(crate) fn __reduce41< + 'input, + >( + input: &'input str, + __action: i8, + __lookahead_start: Option<&usize>, + __states: &mut ::std::vec::Vec, + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: ::std::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // PathExpression = WholeExpression, ("." )+ => ActionFn(57); let __sym1 = __pop_Variant2(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action56::<>(input, __sym0, __sym1); + let __nt = super::__action57::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (2, 19) } - pub(crate) fn __reduce41< + pub(crate) fn __reduce42< 'input, >( input: &'input str, @@ -2183,7 +2223,7 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 20) } - pub(crate) fn __reduce42< + pub(crate) fn __reduce43< 'input, >( input: &'input str, @@ -2203,25 +2243,6 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (2, 20) } - pub(crate) fn __reduce43< - 'input, - >( - input: &'input str, - __action: i8, - __lookahead_start: Option<&usize>, - __states: &mut ::std::vec::Vec, - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, - _: ::std::marker::PhantomData<(&'input ())>, - ) -> (usize, usize) - { - // RawBareWord = r#"[^0-9\"\'\\-][^\\s\"\']*"# => ActionFn(36); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action36::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (1, 21) - } pub(crate) fn __reduce44< 'input, >( @@ -2233,13 +2254,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // SQString = r#"\'([^\']|\\\\\')*\'"# => ActionFn(38); + // RawBareWord = r#"[^0-9\"\'\\-][^\\s\"\']*"# => ActionFn(37); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action38::<>(input, __sym0); + let __nt = super::__action37::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (1, 22) + (1, 21) } pub(crate) fn __reduce45< 'input, @@ -2252,13 +2273,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Size = r#"-?[0-9]+[A-Za-z]+"# => ActionFn(40); + // SQString = r#"\'([^\']|\\\\\')*\'"# => ActionFn(39); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action40::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (1, 23) + let __nt = super::__action39::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 22) } pub(crate) fn __reduce46< 'input, @@ -2271,13 +2292,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = SQString => ActionFn(34); - let __sym0 = __pop_Variant1(__symbols); + // Size = r#"-?[0-9]+[A-Za-z]+"# => ActionFn(41); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action34::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (1, 24) + let __nt = super::__action41::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (1, 23) } pub(crate) fn __reduce47< 'input, @@ -2290,7 +2311,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = DQString => ActionFn(35); + // String = SQString => ActionFn(35); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2309,13 +2330,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$true" => ActionFn(20); - let __sym0 = __pop_Variant0(__symbols); + // String = DQString => ActionFn(36); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action20::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 25) + let __nt = super::__action36::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 24) } pub(crate) fn __reduce49< 'input, @@ -2328,7 +2349,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$false" => ActionFn(21); + // Variable = "$true" => ActionFn(21); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2347,7 +2368,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$it" => ActionFn(22); + // Variable = "$false" => ActionFn(22); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2366,14 +2387,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$", RawBareWord => ActionFn(23); - let __sym1 = __pop_Variant1(__symbols); + // Variable = "$it" => ActionFn(23); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action23::<>(input, __sym0, __sym1); + let __end = __sym0.2.clone(); + let __nt = super::__action23::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (2, 25) + (1, 25) } pub(crate) fn __reduce52< 'input, @@ -2386,13 +2406,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = AtomicExpression => ActionFn(15); - let __sym0 = __pop_Variant5(__symbols); + // Variable = "$", RawBareWord => ActionFn(24); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action15::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant5(__nt), __end)); - (1, 26) + let __end = __sym1.2.clone(); + let __nt = super::__action24::<>(input, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant11(__nt), __end)); + (2, 25) } pub(crate) fn __reduce53< 'input, @@ -2405,7 +2426,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = Block => ActionFn(16); + // WholeExpression = AtomicExpression => ActionFn(16); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2413,6 +2434,25 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 26) } + pub(crate) fn __reduce54< + 'input, + >( + input: &'input str, + __action: i8, + __lookahead_start: Option<&usize>, + __states: &mut ::std::vec::Vec, + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: ::std::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // WholeExpression = Block => ActionFn(17); + let __sym0 = __pop_Variant5(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action17::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant5(__nt), __end)); + (1, 26) + } } pub use self::__parse__Pipeline::PipelineParser; #[cfg_attr(rustfmt, rustfmt_skip)] @@ -2639,6 +2679,17 @@ fn __action6< #[allow(unused_variables)] fn __action7< 'input, +>( + input: &'input str, + (_, __0, _): (usize, i64, usize), +) -> Expression +{ + Expression::Leaf(Leaf::Int(__0)) +} + +#[allow(unused_variables)] +fn __action8< + 'input, >( input: &'input str, (_, __0, _): (usize, Variable, usize), @@ -2648,7 +2699,7 @@ fn __action7< } #[allow(unused_variables)] -fn __action8< +fn __action9< 'input, >( input: &'input str, @@ -2660,19 +2711,6 @@ fn __action8< Expression::Binary(Box::new(Binary::new(left, op, right))) } -#[allow(unused_variables)] -fn __action9< - 'input, ->( - input: &'input str, - (_, _, _): (usize, &'input str, usize), - (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), -) -> Expression -{ - Expression::Parenthesized(Box::new(Parenthesized::new(__0))) -} - #[allow(unused_variables)] fn __action10< 'input, @@ -2691,10 +2729,12 @@ fn __action11< 'input, >( input: &'input str, + (_, _, _): (usize, &'input str, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), ) -> Expression { - (__0) + Expression::Parenthesized(Box::new(Parenthesized::new(__0))) } #[allow(unused_variables)] @@ -2713,12 +2753,10 @@ fn __action13< 'input, >( input: &'input str, - (_, _, _): (usize, &'input str, usize), (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), ) -> Expression { - Expression::Block(Box::new(Block::new(__0))) + (__0) } #[allow(unused_variables)] @@ -2739,10 +2777,12 @@ fn __action15< 'input, >( input: &'input str, + (_, _, _): (usize, &'input str, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), ) -> Expression { - (__0) + Expression::Block(Box::new(Block::new(__0))) } #[allow(unused_variables)] @@ -2759,6 +2799,17 @@ fn __action16< #[allow(unused_variables)] fn __action17< 'input, +>( + input: &'input str, + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +#[allow(unused_variables)] +fn __action18< + 'input, >( input: &'input str, (_, head, _): (usize, Expression, usize), @@ -2769,7 +2820,7 @@ fn __action17< } #[allow(unused_variables)] -fn __action18< +fn __action19< 'input, >( input: &'input str, @@ -2780,7 +2831,7 @@ fn __action18< } #[allow(unused_variables)] -fn __action19< +fn __action20< 'input, >( input: &'input str, @@ -2791,7 +2842,7 @@ fn __action19< } #[allow(unused_variables)] -fn __action20< +fn __action21< 'input, >( input: &'input str, @@ -2802,7 +2853,7 @@ fn __action20< } #[allow(unused_variables)] -fn __action21< +fn __action22< 'input, >( input: &'input str, @@ -2813,7 +2864,7 @@ fn __action21< } #[allow(unused_variables)] -fn __action22< +fn __action23< 'input, >( input: &'input str, @@ -2824,7 +2875,7 @@ fn __action22< } #[allow(unused_variables)] -fn __action23< +fn __action24< 'input, >( input: &'input str, @@ -2835,17 +2886,6 @@ fn __action23< Variable::Other(__0.to_string()) } -#[allow(unused_variables)] -fn __action24< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, String, usize), -) -> String -{ - (__0) -} - #[allow(unused_variables)] fn __action25< 'input, @@ -2862,10 +2902,10 @@ fn __action26< 'input, >( input: &'input str, - (_, __0, _): (usize, &'input str, usize), -) -> Operator + (_, __0, _): (usize, String, usize), +) -> String { - Operator::Equal + (__0) } #[allow(unused_variables)] @@ -2876,7 +2916,7 @@ fn __action27< (_, __0, _): (usize, &'input str, usize), ) -> Operator { - Operator::NotEqual + Operator::Equal } #[allow(unused_variables)] @@ -2887,7 +2927,7 @@ fn __action28< (_, __0, _): (usize, &'input str, usize), ) -> Operator { - Operator::LessThan + Operator::NotEqual } #[allow(unused_variables)] @@ -2898,7 +2938,7 @@ fn __action29< (_, __0, _): (usize, &'input str, usize), ) -> Operator { - Operator::GreaterThan + Operator::LessThan } #[allow(unused_variables)] @@ -2909,7 +2949,7 @@ fn __action30< (_, __0, _): (usize, &'input str, usize), ) -> Operator { - Operator::LessThanOrEqual + Operator::GreaterThan } #[allow(unused_variables)] @@ -2920,7 +2960,7 @@ fn __action31< (_, __0, _): (usize, &'input str, usize), ) -> Operator { - Operator::GreaterThanOrEqual + Operator::LessThanOrEqual } #[allow(unused_variables)] @@ -2928,11 +2968,10 @@ fn __action32< 'input, >( input: &'input str, - (_, _, _): (usize, &'input str, usize), - (_, __0, _): (usize, String, usize), -) -> Flag + (_, __0, _): (usize, &'input str, usize), +) -> Operator { - Flag::Shorthand(__0.to_string()) + Operator::GreaterThanOrEqual } #[allow(unused_variables)] @@ -2944,7 +2983,7 @@ fn __action33< (_, __0, _): (usize, String, usize), ) -> Flag { - Flag::Longhand(__0.to_string()) + Flag::Shorthand(__0.to_string()) } #[allow(unused_variables)] @@ -2952,10 +2991,11 @@ fn __action34< 'input, >( input: &'input str, + (_, _, _): (usize, &'input str, usize), (_, __0, _): (usize, String, usize), -) -> String +) -> Flag { - (__0) + Flag::Longhand(__0.to_string()) } #[allow(unused_variables)] @@ -2974,10 +3014,10 @@ fn __action36< 'input, >( input: &'input str, - (_, s, _): (usize, &'input str, usize), + (_, __0, _): (usize, String, usize), ) -> String { - s.to_string() + (__0) } #[allow(unused_variables)] @@ -2988,7 +3028,7 @@ fn __action37< (_, s, _): (usize, &'input str, usize), ) -> String { - s[1..s.len() - 1].to_string() + s.to_string() } #[allow(unused_variables)] @@ -3008,9 +3048,9 @@ fn __action39< >( input: &'input str, (_, s, _): (usize, &'input str, usize), -) -> i64 +) -> String { - i64::from_str(s).unwrap() + s[1..s.len() - 1].to_string() } #[allow(unused_variables)] @@ -3021,12 +3061,23 @@ fn __action40< (_, s, _): (usize, &'input str, usize), ) -> i64 { - Byte::from_string(s).unwrap().get_bytes() as i64 + i64::from_str(s).unwrap() } #[allow(unused_variables)] fn __action41< 'input, +>( + input: &'input str, + (_, s, _): (usize, &'input str, usize), +) -> i64 +{ + Byte::from_string(s).unwrap().get_bytes() as i64 +} + +#[allow(unused_variables)] +fn __action42< + 'input, >( input: &'input str, __lookbehind: &usize, @@ -3037,7 +3088,7 @@ fn __action41< } #[allow(unused_variables)] -fn __action42< +fn __action43< 'input, >( input: &'input str, @@ -3048,7 +3099,7 @@ fn __action42< } #[allow(unused_variables)] -fn __action43< +fn __action44< 'input, >( input: &'input str, @@ -3060,7 +3111,7 @@ fn __action43< } #[allow(unused_variables)] -fn __action44< +fn __action45< 'input, >( input: &'input str, @@ -3072,7 +3123,7 @@ fn __action44< } #[allow(unused_variables)] -fn __action45< +fn __action46< 'input, >( input: &'input str, @@ -3083,7 +3134,7 @@ fn __action45< } #[allow(unused_variables)] -fn __action46< +fn __action47< 'input, >( input: &'input str, @@ -3094,7 +3145,7 @@ fn __action46< } #[allow(unused_variables)] -fn __action47< +fn __action48< 'input, >( input: &'input str, @@ -3106,7 +3157,7 @@ fn __action47< } #[allow(unused_variables)] -fn __action48< +fn __action49< 'input, >( input: &'input str, @@ -3118,7 +3169,7 @@ fn __action48< } #[allow(unused_variables)] -fn __action49< +fn __action50< 'input, >( input: &'input str, @@ -3129,7 +3180,7 @@ fn __action49< } #[allow(unused_variables)] -fn __action50< +fn __action51< 'input, >( input: &'input str, @@ -3141,7 +3192,7 @@ fn __action50< } #[allow(unused_variables)] -fn __action51< +fn __action52< 'input, >( input: &'input str, @@ -3152,7 +3203,7 @@ fn __action51< } #[allow(unused_variables)] -fn __action52< +fn __action53< 'input, >( input: &'input str, @@ -3164,7 +3215,7 @@ fn __action52< } #[allow(unused_variables)] -fn __action53< +fn __action54< 'input, >( input: &'input str, @@ -3174,20 +3225,20 @@ fn __action53< { let __start0 = __0.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action43( + let __temp0 = __action44( input, __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action51( + __action52( input, __temp0, ) } #[allow(unused_variables)] -fn __action54< +fn __action55< 'input, >( input: &'input str, @@ -3198,36 +3249,13 @@ fn __action54< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action43( + let __temp0 = __action44( input, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action52( - input, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -fn __action55< - 'input, ->( - input: &'input str, - __0: (usize, Expression, usize), -) -> Expression -{ - let __start0 = __0.2.clone(); - let __end0 = __0.2.clone(); - let __temp0 = __action41( - input, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action17( + __action53( input, __0, __temp0, @@ -3240,17 +3268,17 @@ fn __action56< >( input: &'input str, __0: (usize, Expression, usize), - __1: (usize, ::std::vec::Vec, usize), ) -> Expression { - let __start0 = __1.0.clone(); - let __end0 = __1.2.clone(); + let __start0 = __0.2.clone(); + let __end0 = __0.2.clone(); let __temp0 = __action42( input, - __1, + &__start0, + &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action17( + __action18( input, __0, __temp0, @@ -3262,20 +3290,20 @@ fn __action57< 'input, >( input: &'input str, - __0: (usize, &'input str, usize), - __1: (usize, ParsedCommand, usize), -) -> ::std::vec::Vec + __0: (usize, Expression, usize), + __1: (usize, ::std::vec::Vec, usize), +) -> Expression { - let __start0 = __0.0.clone(); + let __start0 = __1.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action48( + let __temp0 = __action43( input, - __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action46( + __action18( input, + __0, __temp0, ) } @@ -3283,6 +3311,29 @@ fn __action57< #[allow(unused_variables)] fn __action58< 'input, +>( + input: &'input str, + __0: (usize, &'input str, usize), + __1: (usize, ParsedCommand, usize), +) -> ::std::vec::Vec +{ + let __start0 = __0.0.clone(); + let __end0 = __1.2.clone(); + let __temp0 = __action49( + input, + __0, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action47( + input, + __temp0, + ) +} + +#[allow(unused_variables)] +fn __action59< + 'input, >( input: &'input str, __0: (usize, ::std::vec::Vec, usize), @@ -3292,13 +3343,13 @@ fn __action58< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action48( + let __temp0 = __action49( input, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action47( + __action48( input, __0, __temp0, @@ -3306,7 +3357,7 @@ fn __action58< } #[allow(unused_variables)] -fn __action59< +fn __action60< 'input, >( input: &'input str, @@ -3315,7 +3366,7 @@ fn __action59< { let __start0 = __0.2.clone(); let __end0 = __0.2.clone(); - let __temp0 = __action44( + let __temp0 = __action45( input, &__start0, &__end0, @@ -3329,7 +3380,7 @@ fn __action59< } #[allow(unused_variables)] -fn __action60< +fn __action61< 'input, >( input: &'input str, @@ -3339,7 +3390,7 @@ fn __action60< { let __start0 = __1.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action45( + let __temp0 = __action46( input, __1, );