From dd35b2460c65f0ba4e9e39f07e522430fb132a01 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Thu, 30 May 2019 17:08:42 +1200 Subject: [PATCH 1/2] Add row-split --- src/cli.rs | 3 +- src/commands.rs | 3 +- src/commands/{split.rs => col_split.rs} | 4 +-- src/commands/row_split.rs | 37 +++++++++++++++++++++++++ src/object/base.rs | 2 +- 5 files changed, 44 insertions(+), 5 deletions(-) rename src/commands/{split.rs => col_split.rs} (93%) create mode 100644 src/commands/row_split.rs diff --git a/src/cli.rs b/src/cli.rs index 18f25885d..98fa7075b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -52,7 +52,8 @@ pub async fn cli() -> Result<(), Box> { command("from-json", from_json::from_json), command("open", open::open), command("column", column::column), - command("split", split::split), + command("column-split", col_split::col_split), + command("row-split", row_split::row_split), command("reject", reject::reject), command("select", select::select), command("to-array", to_array::to_array), diff --git a/src/commands.rs b/src/commands.rs index 06829b48a..ca345a751 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -12,7 +12,8 @@ crate mod select; crate mod size; crate mod skip; crate mod sort_by; -crate mod split; +crate mod col_split; +crate mod row_split; crate mod take; crate mod to_array; crate mod to_json; diff --git a/src/commands/split.rs b/src/commands/col_split.rs similarity index 93% rename from src/commands/split.rs rename to src/commands/col_split.rs index 49881a2d9..f0badee0f 100644 --- a/src/commands/split.rs +++ b/src/commands/col_split.rs @@ -5,7 +5,7 @@ use log::debug; // TODO: "Amount remaining" wrapper -pub fn split(args: CommandArgs) -> Result { +pub fn col_split(args: CommandArgs) -> Result { //let splitter = args.args[0].as_string()?; let input = args.input; let args = args.args; @@ -13,7 +13,7 @@ pub fn split(args: CommandArgs) -> Result { Ok(input .map(move |v| match v { Value::Primitive(Primitive::String(s)) => { - let splitter = args[0].as_string().unwrap(); + let splitter = args[0].as_string().unwrap().replace("\\n", "\n"); debug!("splitting with {:?}", splitter); let split_result: Vec<_> = s.split(&splitter).filter(|s| s.trim() != "").collect(); diff --git a/src/commands/row_split.rs b/src/commands/row_split.rs new file mode 100644 index 000000000..a76529595 --- /dev/null +++ b/src/commands/row_split.rs @@ -0,0 +1,37 @@ +use crate::errors::ShellError; +use crate::object::{Primitive, Value}; +use crate::prelude::*; +use log::debug; + +// TODO: "Amount remaining" wrapper + +pub fn row_split(args: CommandArgs) -> Result { + //let splitter = args.args[0].as_string()?; + let input = args.input; + let args = args.args; + + let stream = input + .map(move |v| match v { + Value::Primitive(Primitive::String(s)) => { + let splitter = args[0].as_string().unwrap().replace("\\n", "\n"); + debug!("splitting with {:?}", splitter); + let split_result: Vec<_> = s.split(&splitter).filter(|s| s.trim() != "").collect(); + + debug!("split result = {:?}", split_result); + + let mut result = VecDeque::new(); + for s in split_result { + result.push_back(ReturnValue::Value(Value::Primitive(Primitive::String(s.to_string())))); + } + result + } + _ => { + let mut result = VecDeque::new(); + result.push_back(ReturnValue::Value(Value::Object(crate::object::Dictionary::default()))); + result + } + }) + .flatten(); + + Ok(stream.boxed()) +} diff --git a/src/object/base.rs b/src/object/base.rs index d7086495c..ce014bc3c 100644 --- a/src/object/base.rs +++ b/src/object/base.rs @@ -183,7 +183,7 @@ impl Value { crate fn compare(&self, operator: ast::Operator, other: &Value) -> Option { match operator { - ast::Operator::Equal | ast::Operator::NotEqual => unimplemented!(), + //ast::Operator::Equal | ast::Operator::NotEqual => unimplemented!(), _ => { let coerced = coerce_compare(self, other)?; let ordering = coerced.compare(); From f38726d2aad9c2a7561e8494f742d04df9372048 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 1 Jun 2019 05:21:03 +1200 Subject: [PATCH 2/2] Add back in number w/ units parsing --- src/commands/row_split.rs | 2 +- src/parser/lexer.rs | 6 +- src/parser/parser.lalrpop | 9 +- src/parser/parser.rs | 1014 ++++++++++++++++++++----------------- 4 files changed, 561 insertions(+), 470 deletions(-) diff --git a/src/commands/row_split.rs b/src/commands/row_split.rs index a76529595..06231c906 100644 --- a/src/commands/row_split.rs +++ b/src/commands/row_split.rs @@ -27,7 +27,7 @@ pub fn row_split(args: CommandArgs) -> Result { } _ => { let mut result = VecDeque::new(); - result.push_back(ReturnValue::Value(Value::Object(crate::object::Dictionary::default()))); + //result.push_back(ReturnValue::Value(Value::Object(crate::object::Dictionary::default()))); result } }) diff --git a/src/parser/lexer.rs b/src/parser/lexer.rs index ae21e9fe4..d3bd9d689 100644 --- a/src/parser/lexer.rs +++ b/src/parser/lexer.rs @@ -23,7 +23,7 @@ crate enum TopToken { DQString, #[regex = "-?[0-9]+[A-Za-z]+"] - Size, + UnitsNum, #[regex = r"\$"] #[callback = "start_variable"] @@ -88,7 +88,7 @@ impl TopToken { Num => Token::Num, SQString => Token::SQString, DQString => Token::DQString, - Size => Token::Size, + UnitsNum => Token::UnitsNum, Dollar => Token::Dollar, Bare => Token::Bare, Pipe => Token::Pipe, @@ -344,7 +344,7 @@ pub enum Token { Num, SQString, DQString, - Size, + UnitsNum, Dollar, Bare, Pipe, diff --git a/src/parser/parser.lalrpop b/src/parser/parser.lalrpop index e423b9c13..2d2de686a 100644 --- a/src/parser/parser.lalrpop +++ b/src/parser/parser.lalrpop @@ -4,6 +4,7 @@ use std::str::FromStr; use crate::parser::ast::*; use crate::prelude::*; use crate::parser::lexer::{SpannedToken, Token}; +use byte_unit::Byte; grammar<'input>; @@ -21,7 +22,7 @@ Command: ParsedCommand = { Leaf: Expression = { => Expression::Leaf(Leaf::String(<>)), => Expression::Leaf(Leaf::Int(<>)), - // => Expression::Leaf(Leaf::Int(<>)), + => Expression::Leaf(Leaf::Int(<>)), => Expression::VariableReference(<>), } @@ -100,6 +101,10 @@ Int: i64 = { <"num"> => i64::from_str(<>.as_slice()).unwrap() } +UnitsNum: i64 = { + <"unitsnum"> => Byte::from_string(<>.as_slice()).unwrap().get_bytes() as i64 +} + extern { type Location = usize; type Error = ShellError; @@ -126,6 +131,6 @@ extern { "bare" => SpannedToken { token: Token::Bare, .. }, "dqstring" => SpannedToken { token: Token::DQString, .. }, "sqstring" => SpannedToken { token: Token::SQString, .. }, - "size" => SpannedToken { token: Token::Size, .. }, + "unitsnum" => SpannedToken { token: Token::UnitsNum, .. }, } } \ No newline at end of file diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 1c05ad6f3..1b11bae89 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1,10 +1,11 @@ // auto-generated: "lalrpop 0.17.0" -// sha256: c7eac268e354044ccb73aea4829c2dbd02ae11ce74a7dc33b74944ec862f9 +// sha256: efaf89a1d956869b47a3f5daff048341c19934c68ad5e1ed9fe8e5c4222d2 #![allow(unused)] use std::str::FromStr; use crate::parser::ast::*; use crate::prelude::*; use crate::parser::lexer::{SpannedToken, Token}; +use byte_unit::Byte; #[allow(unused_extern_crates)] extern crate lalrpop_util as __lalrpop_util; #[allow(unused_imports)] @@ -18,6 +19,7 @@ mod __parse__Pipeline { use crate::parser::ast::*; use crate::prelude::*; use crate::parser::lexer::{SpannedToken, Token}; + use byte_unit::Byte; #[allow(unused_extern_crates)] extern crate lalrpop_util as __lalrpop_util; #[allow(unused_imports)] @@ -45,135 +47,139 @@ mod __parse__Pipeline { // State 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1 - 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, -19, 0, + 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 29, 0, 30, -19, 0, // State 2 - 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, 32, 0, // State 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 4 - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 32, -14, -14, 0, -14, 0, -14, 0, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 34, -14, -14, 0, -14, -14, -14, 0, -14, -14, -14, // State 5 - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, 0, -51, 0, -51, -51, -51, + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 0, -53, -53, -53, 0, -53, -53, -53, // State 6 - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 0, -44, -44, 0, -44, 0, -44, 0, -44, -44, -44, + -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, -45, -45, 0, -45, -45, -45, // State 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, // State 8 - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, 0, -52, 0, -52, -52, -52, + -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, -54, -54, 0, -54, -54, -54, // State 9 - 34, -24, -24, 0, -24, -24, 35, 36, 37, 38, 39, 0, -24, -24, 0, -24, 0, -24, 0, -24, -24, 0, + 36, -24, -24, 0, -24, -24, 37, 38, 39, 40, 41, 0, -24, -24, 0, -24, -24, -24, 0, -24, -24, 0, // State 10 - 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, -20, 0, + 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 29, 0, 30, -20, 0, // State 11 - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, 0, -45, 0, -45, -45, -45, + -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, 0, -46, -46, 0, -46, -46, -46, 0, -46, -46, -46, // State 12 - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, 0, -30, 0, -30, -30, -30, + -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, -30, -30, 0, -30, -30, -30, // State 13 - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, 0, -13, 0, -13, -13, -13, + -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, -13, -13, 0, -13, -13, -13, // State 14 - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, 0, -12, 0, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, -12, -12, 0, -12, -12, -12, // State 15 - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, 0, -22, 0, -22, -22, -22, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, -22, -22, 0, -22, -22, -22, // State 16 - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, 0, -23, 0, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, -23, -23, 0, -23, -23, -23, // State 17 - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, -29, -29, 0, -29, -29, -29, // State 18 - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, 0, -31, 0, -31, -31, -31, + -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, -31, -31, 0, -31, -31, -31, // State 19 - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 42, -43, -43, 0, -43, 0, -43, 0, -43, -43, -43, + -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, -32, -32, 0, -32, -32, -32, // State 20 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, + -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 44, -44, -44, 0, -44, -44, -44, 0, -44, -44, -44, // State 21 - 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, // State 22 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 29, 0, 30, 0, 0, // State 23 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 24 - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, -49, -49, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 25 - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, -28, -28, + -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, -50, -50, 0, -50, -50, -50, // State 26 - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, -48, -48, + -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, -28, -28, 0, -28, -28, -28, // State 27 - 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, + -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, -49, -49, 0, -49, -49, -49, // State 28 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, + -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, -51, -51, 0, -51, -51, -51, // State 29 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 29, 0, 30, 0, 0, // State 30 - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 53, -15, -15, 0, -15, 0, -15, 0, -15, -15, -15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, // State 31 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, - // State 32 - 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, - // State 33 - 0, -35, -35, 0, -35, -35, 0, 0, 0, 0, 0, 0, -35, -35, 0, -35, 0, -35, 0, -35, 0, 0, - // State 34 - 0, -36, -36, 0, -36, -36, 0, 0, 0, 0, 0, 0, -36, -36, 0, -36, 0, -36, 0, -36, 0, 0, - // State 35 - 0, -38, -38, 0, -38, -38, 0, 0, 0, 0, 0, 0, -38, -38, 0, -38, 0, -38, 0, -38, 0, 0, - // State 36 - 0, -34, -34, 0, -34, -34, 0, 0, 0, 0, 0, 0, -34, -34, 0, -34, 0, -34, 0, -34, 0, 0, - // State 37 - 0, -37, -37, 0, -37, -37, 0, 0, 0, 0, 0, 0, -37, -37, 0, -37, 0, -37, 0, -37, 0, 0, - // State 38 - 0, -39, -39, 0, -39, -39, 0, 0, 0, 0, 0, 0, -39, -39, 0, -39, 0, -39, 0, -39, 0, 0, - // State 39 - 0, -25, -25, 0, -25, -25, 0, 0, 0, 0, 0, 0, -25, -25, 0, -25, 0, -25, 0, -25, -25, 0, - // State 40 - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, 56, -42, -42, 0, -42, 0, -42, 0, -42, -42, -42, - // State 41 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 59, 0, 0, 27, 0, 0, 0, 0, - // State 42 - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, -50, -50, - // State 43 - 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 44 - 34, 0, 0, 0, 0, 0, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 45 - -13, 0, 0, 61, 0, 0, -13, -13, -13, -13, -13, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // State 46 - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, 0, -26, 0, -26, -26, -26, - // State 47 - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, 0, -27, 0, -27, -27, -27, - // State 48 - -51, 0, 0, 0, 0, 0, -51, -51, -51, -51, -51, -51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, - // State 49 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - // State 50 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 32 + -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 55, -15, -15, 0, -15, -15, -15, 0, -15, -15, -15, + // State 33 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, + // State 34 + 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 29, 0, 30, 0, 0, + // State 35 + 0, -36, -36, 0, -36, -36, 0, 0, 0, 0, 0, 0, -36, -36, 0, -36, -36, -36, 0, -36, 0, 0, + // State 36 + 0, -37, -37, 0, -37, -37, 0, 0, 0, 0, 0, 0, -37, -37, 0, -37, -37, -37, 0, -37, 0, 0, + // State 37 + 0, -39, -39, 0, -39, -39, 0, 0, 0, 0, 0, 0, -39, -39, 0, -39, -39, -39, 0, -39, 0, 0, + // State 38 + 0, -35, -35, 0, -35, -35, 0, 0, 0, 0, 0, 0, -35, -35, 0, -35, -35, -35, 0, -35, 0, 0, + // State 39 + 0, -38, -38, 0, -38, -38, 0, 0, 0, 0, 0, 0, -38, -38, 0, -38, -38, -38, 0, -38, 0, 0, + // State 40 + 0, -40, -40, 0, -40, -40, 0, 0, 0, 0, 0, 0, -40, -40, 0, -40, -40, -40, 0, -40, 0, 0, + // State 41 + 0, -25, -25, 0, -25, -25, 0, 0, 0, 0, 0, 0, -25, -25, 0, -25, -25, -25, 0, -25, -25, 0, + // State 42 + -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 58, -43, -43, 0, -43, -43, -43, 0, -43, -43, -43, + // State 43 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 61, 0, 28, 0, 0, 0, 0, 0, + // State 44 + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, -52, -52, 0, -52, -52, -52, + // State 45 + 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 46 + 36, 0, 0, 0, 0, 0, 37, 38, 39, 40, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 47 + -13, 0, 0, 63, 0, 0, -13, -13, -13, -13, -13, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 48 + -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, -26, -26, 0, -26, -26, -26, + // State 49 + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, -27, -27, 0, -27, -27, -27, + // State 50 + -53, 0, 0, 0, 0, 0, -53, -53, -53, -53, -53, -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, // State 51 - 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, 0, 0, 0, 0, 0, 0, 0, 65, // State 52 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 53 - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, 0, -4, 0, -4, -4, -4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, // State 54 - 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, // State 55 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 59, 0, 0, 27, 0, 0, 0, 0, + -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, 0, -4, -4, -4, // State 56 - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, 0, -7, 0, -7, 0, -7, -7, -7, + 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, // State 57 - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, 0, -33, 0, -33, 0, -33, -33, -33, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 61, 0, 28, 0, 0, 0, 0, 0, // State 58 - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, 0, -32, 0, -32, -32, -32, + -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, 0, -7, -7, -7, 0, -7, -7, -7, // State 59 - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, 0, -41, 0, -41, 0, -41, -41, -41, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, 0, -34, -34, -34, 0, -34, -34, -34, // State 60 - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, 0, -40, 0, -40, 0, -40, -40, -40, + -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, 0, -33, -33, -33, 0, -33, -33, -33, // State 61 - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, 0, -17, 0, -17, -17, -17, + -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, 0, -42, -42, -42, 0, -42, -42, -42, // State 62 - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, -18, -18, + -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, 0, -41, -41, -41, 0, -41, -41, -41, // State 63 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, -17, -17, 0, -17, -17, -17, // State 64 - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, 0, -5, 0, -5, -5, -5, + -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, -18, -18, 0, -18, -18, -18, // State 65 - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 0, -8, 0, -8, 0, -8, -8, -8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, + // State 66 + -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, -5, -5, 0, -5, -5, -5, + // State 67 + -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 0, -8, -8, -8, 0, -8, -8, -8, ]; const __EOF_ACTION: &'static [i8] = &[ // State 0 @@ -181,25 +187,25 @@ mod __parse__Pipeline { // State 1 -19, // State 2 - -46, + -47, // State 3 - -53, + -55, // State 4 -14, // State 5 - -51, + -53, // State 6 - -44, + -45, // State 7 -21, // State 8 - -52, + -54, // State 9 -24, // State 10 -20, // State 11 - -45, + -46, // State 12 -30, // State 13 @@ -215,9 +221,9 @@ mod __parse__Pipeline { // State 18 -31, // State 19 - -43, + -32, // State 20 - 0, + -44, // State 21 0, // State 22 @@ -225,23 +231,23 @@ mod __parse__Pipeline { // State 23 0, // State 24 - -49, - // State 25 - -28, - // State 26 - -48, - // State 27 0, + // State 25 + -50, + // State 26 + -28, + // State 27 + -49, // State 28 - -47, + -51, // State 29 0, // State 30 - -15, + -48, // State 31 0, // State 32 - 0, + -15, // State 33 0, // State 34 @@ -255,193 +261,201 @@ mod __parse__Pipeline { // State 38 0, // State 39 - -25, - // State 40 - -42, - // State 41 0, + // State 40 + 0, + // State 41 + -25, // State 42 - -50, + -43, // State 43 0, // State 44 - 0, + -52, // State 45 0, // State 46 - -26, + 0, // State 47 - -27, + 0, // State 48 - 0, + -26, // State 49 - 0, + -27, // State 50 0, // State 51 - -10, + 0, // State 52 0, // State 53 - -4, + -10, // State 54 - -16, - // State 55 0, + // State 55 + -4, // State 56 - -7, + -16, // State 57 - -33, + 0, // State 58 - -32, + -7, // State 59 - -41, + -34, // State 60 - -40, + -33, // State 61 - -17, + -42, // State 62 - -18, + -41, // State 63 - -11, + -17, // State 64 - -5, + -18, // State 65 + -11, + // State 66 + -5, + // State 67 -8, ]; const __GOTO: &'static [i8] = &[ // State 0 - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, // State 1 - 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 11, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 11, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 21, 0, // State 2 - 0, 0, 0, 0, 0, 0, 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, 31, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 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 4 - 0, 0, 31, 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, // State 64 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 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 65 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 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 66 + 0, 0, 0, 0, 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 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, ]; fn __expected_tokens(__state: usize) -> Vec<::std::string::String> { const __TERMINAL: &'static [&'static str] = &[ @@ -461,8 +475,8 @@ mod __parse__Pipeline { r###""dqstring""###, r###""member""###, r###""num""###, - r###""size""###, r###""sqstring""###, + r###""unitsnum""###, r###""variable""###, r###""{""###, r###""|""###, @@ -527,7 +541,7 @@ mod __parse__Pipeline { #[inline] fn goto(&self, state: i8, nt: usize) -> i8 { - __GOTO[(state as usize) * 27 + nt] - 1 + __GOTO[(state as usize) * 28 + nt] - 1 } fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol { @@ -595,8 +609,8 @@ mod __parse__Pipeline { SpannedToken { token: Token::DQString, .. } if true => Some(13), SpannedToken { token: Token::Member, .. } if true => Some(14), SpannedToken { token: Token::Num, .. } if true => Some(15), - SpannedToken { token: Token::Size, .. } if true => Some(16), - SpannedToken { token: Token::SQString, .. } if true => Some(17), + SpannedToken { token: Token::SQString, .. } if true => Some(16), + SpannedToken { token: Token::UnitsNum, .. } if true => Some(17), SpannedToken { token: Token::Variable, .. } if true => Some(18), SpannedToken { token: Token::OpenBrace, .. } if true => Some(19), SpannedToken { token: Token::Pipe, .. } if true => Some(20), @@ -678,11 +692,11 @@ mod __parse__Pipeline { _ => unreachable!(), }, 16 => match __token { - __tok @ SpannedToken { token: Token::Size, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 17 => match __token { - __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::UnitsNum, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 18 => match __token { @@ -901,7 +915,7 @@ mod __parse__Pipeline { 31 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 17, + nonterminal_produced: 16, } } 32 => { @@ -913,7 +927,7 @@ mod __parse__Pipeline { 33 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 17, } } 34 => { @@ -948,8 +962,8 @@ mod __parse__Pipeline { } 39 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 19, + states_to_pop: 1, + nonterminal_produced: 18, } } 40 => { @@ -960,14 +974,14 @@ mod __parse__Pipeline { } 41 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 20, + states_to_pop: 3, + nonterminal_produced: 19, } } 42 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 21, + states_to_pop: 2, + nonterminal_produced: 20, } } 43 => { @@ -985,19 +999,19 @@ mod __parse__Pipeline { 45 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 21, } } 46 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 22, } } 47 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 23, + states_to_pop: 2, + nonterminal_produced: 22, } } 48 => { @@ -1008,23 +1022,35 @@ mod __parse__Pipeline { } 49 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 24, + states_to_pop: 1, + nonterminal_produced: 23, } } 50 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 25, + nonterminal_produced: 24, } } 51 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, + states_to_pop: 2, nonterminal_produced: 25, } } - 52 => __state_machine::SimulatedReduce::Accept, + 52 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 26, + } + } + 53 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 26, + } + } + 54 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {}", __reduce_index) } } @@ -1228,6 +1254,12 @@ mod __parse__Pipeline { __reduce51(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) } 52 => { + __reduce52(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 53 => { + __reduce53(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 54 => { // __Pipeline = Pipeline => ActionFn(0); let __sym0 = __pop_Variant12(__symbols); let __start = __sym0.0.clone(); @@ -1240,7 +1272,7 @@ mod __parse__Pipeline { let __states_len = __states.len(); __states.truncate(__states_len - __pop_states); let __state = *__states.last().unwrap() as usize; - let __next_state = __GOTO[__state * 27 + __nonterminal] - 1; + let __next_state = __GOTO[__state * 28 + __nonterminal] - 1; __states.push(__next_state); None } @@ -1408,12 +1440,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">) = "???.", "member" => ActionFn(41); + // ("???." <"member">) = "???.", "member" => ActionFn(43); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action41::<>(__sym0, __sym1); + let __nt = super::__action43::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant0(__nt), __end)); (2, 0) } @@ -1427,10 +1459,10 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)* = => ActionFn(39); + // ("???." <"member">)* = => ActionFn(41); 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::__action39::<>(&__start, &__end); + let __nt = super::__action41::<>(&__start, &__end); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (0, 1) } @@ -1444,11 +1476,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)* = ("???." <"member">)+ => ActionFn(40); + // ("???." <"member">)* = ("???." <"member">)+ => ActionFn(42); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action40::<>(__sym0); + let __nt = super::__action42::<>(__sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 1) } @@ -1462,12 +1494,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)+ = "???.", "member" => ActionFn(52); + // ("???." <"member">)+ = "???.", "member" => ActionFn(54); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action52::<>(__sym0, __sym1); + let __nt = super::__action54::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 2) } @@ -1481,13 +1513,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)+ = ("???." <"member">)+, "???.", "member" => ActionFn(53); + // ("???." <"member">)+ = ("???." <"member">)+, "???.", "member" => ActionFn(55); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action53::<>(__sym0, __sym1, __sym2); + let __nt = super::__action55::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 2) } @@ -1501,12 +1533,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." ) = "???.", Member => ActionFn(44); + // ("???." ) = "???.", Member => ActionFn(46); let __sym1 = __pop_Variant2(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action44::<>(__sym0, __sym1); + let __nt = super::__action46::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (2, 3) } @@ -1520,12 +1552,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." )+ = "???.", Member => ActionFn(56); + // ("???." )+ = "???.", Member => ActionFn(58); let __sym1 = __pop_Variant2(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action56::<>(__sym0, __sym1); + let __nt = super::__action58::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (2, 4) } @@ -1539,13 +1571,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." )+ = ("???." )+, "???.", Member => ActionFn(57); + // ("???." )+ = ("???." )+, "???.", Member => ActionFn(59); let __sym2 = __pop_Variant2(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action57::<>(__sym0, __sym1, __sym2); + let __nt = super::__action59::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (3, 4) } @@ -1559,12 +1591,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" ) = "|", Command => ActionFn(49); + // ("|" ) = "|", Command => ActionFn(51); let __sym1 = __pop_Variant4(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action49::<>(__sym0, __sym1); + let __nt = super::__action51::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (2, 5) } @@ -1578,12 +1610,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = "|", Command => ActionFn(58); + // ("|" )+ = "|", Command => ActionFn(60); let __sym1 = __pop_Variant4(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action58::<>(__sym0, __sym1); + let __nt = super::__action60::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (2, 6) } @@ -1597,13 +1629,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = ("|" )+, "|", Command => ActionFn(59); + // ("|" )+ = ("|" )+, "|", Command => ActionFn(61); let __sym2 = __pop_Variant4(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action59::<>(__sym0, __sym1, __sym2); + let __nt = super::__action61::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (3, 6) } @@ -1617,11 +1649,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Parenthesized => ActionFn(12); + // AtomicExpression = Parenthesized => ActionFn(13); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action12::<>(__sym0); + let __nt = super::__action13::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 7) } @@ -1635,11 +1667,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Leaf => ActionFn(13); + // AtomicExpression = Leaf => ActionFn(14); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action13::<>(__sym0); + let __nt = super::__action14::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 7) } @@ -1653,11 +1685,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare" => ActionFn(54); + // BarePath = "bare" => ActionFn(56); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action54::<>(__sym0); + let __nt = super::__action56::<>(__sym0); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (1, 8) } @@ -1671,12 +1703,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare", ("???." <"member">)+ => ActionFn(55); + // BarePath = "bare", ("???." <"member">)+ => ActionFn(57); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action55::<>(__sym0, __sym1); + let __nt = super::__action57::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (2, 8) } @@ -1690,13 +1722,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BinaryExpression = Expr, Operator, Expr => ActionFn(9); + // BinaryExpression = Expr, Operator, Expr => ActionFn(10); let __sym2 = __pop_Variant6(__symbols); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action9::<>(__sym0, __sym1, __sym2); + let __nt = super::__action10::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (3, 9) } @@ -1710,13 +1742,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", AtomicExpression, "}" => ActionFn(14); + // Block = "{", AtomicExpression, "}" => ActionFn(15); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action14::<>(__sym0, __sym1, __sym2); + let __nt = super::__action15::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (3, 10) } @@ -1730,13 +1762,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", BinaryExpression, "}" => ActionFn(15); + // Block = "{", BinaryExpression, "}" => ActionFn(16); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action15::<>(__sym0, __sym1, __sym2); + let __nt = super::__action16::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (3, 10) } @@ -1806,11 +1838,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathExpression => ActionFn(22); + // Expr = PathExpression => ActionFn(23); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action22::<>(__sym0); + let __nt = super::__action23::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -1824,11 +1856,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathHead => ActionFn(23); + // Expr = PathHead => ActionFn(24); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action23::<>(__sym0); + let __nt = super::__action24::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -1842,11 +1874,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr => ActionFn(45); + // Expr+ = Expr => ActionFn(47); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action45::<>(__sym0); + let __nt = super::__action47::<>(__sym0); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (1, 13) } @@ -1860,12 +1892,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr+, Expr => ActionFn(46); + // Expr+ = Expr+, Expr => ActionFn(48); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action46::<>(__sym0, __sym1); + let __nt = super::__action48::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (2, 13) } @@ -1879,12 +1911,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "-", BarePath => ActionFn(33); + // Flag = "-", BarePath => ActionFn(34); let __sym1 = __pop_Variant7(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action33::<>(__sym0, __sym1); + let __nt = super::__action34::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (2, 14) } @@ -1898,12 +1930,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "--", BarePath => ActionFn(34); + // Flag = "--", BarePath => ActionFn(35); let __sym1 = __pop_Variant7(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action34::<>(__sym0, __sym1); + let __nt = super::__action35::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (2, 14) } @@ -1917,11 +1949,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Int = "num" => ActionFn(38); + // Int = "num" => ActionFn(39); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action38::<>(__sym0); + let __nt = super::__action39::<>(__sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 15) } @@ -1971,8 +2003,8 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = Variable => ActionFn(8); - let __sym0 = __pop_Variant13(__symbols); + // Leaf = UnitsNum => ActionFn(8); + let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action8::<>(__sym0); @@ -1989,13 +2021,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = "member" => ActionFn(25); - let __sym0 = __pop_Variant0(__symbols); + // Leaf = Variable => ActionFn(9); + let __sym0 = __pop_Variant13(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action25::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 17) + let __nt = super::__action9::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 16) } pub(crate) fn __reduce32< 'input, @@ -2007,8 +2039,8 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = String => ActionFn(26); - let __sym0 = __pop_Variant2(__symbols); + // Member = "member" => ActionFn(26); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action26::<>(__sym0); @@ -2025,13 +2057,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "==" => ActionFn(27); - let __sym0 = __pop_Variant0(__symbols); + // Member = String => ActionFn(27); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action27::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (1, 17) } pub(crate) fn __reduce34< 'input, @@ -2043,7 +2075,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(); @@ -2061,7 +2093,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(); @@ -2079,7 +2111,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(); @@ -2097,7 +2129,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(); @@ -2115,7 +2147,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">=" => ActionFn(32); + // Operator = "<=" => ActionFn(32); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2133,15 +2165,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", Leaf, ")" => ActionFn(10); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant6(__symbols); + // Operator = ">=" => ActionFn(33); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action10::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (3, 19) + let __end = __sym0.2.clone(); + let __nt = super::__action33::<>(__sym0); + __symbols.push((__start, __Symbol::Variant11(__nt), __end)); + (1, 18) } pub(crate) fn __reduce40< 'input, @@ -2153,7 +2183,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", BinaryExpression, ")" => ActionFn(11); + // Parenthesized = "(", Leaf, ")" => ActionFn(11); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant0(__symbols); @@ -2173,14 +2203,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathExpression = WholeExpression, ("???." )+ => ActionFn(21); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant6(__symbols); + // Parenthesized = "(", BinaryExpression, ")" => ActionFn(12); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant6(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action21::<>(__sym0, __sym1); + let __end = __sym2.2.clone(); + let __nt = super::__action12::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (2, 20) + (3, 19) } pub(crate) fn __reduce42< 'input, @@ -2192,13 +2223,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = WholeExpression => ActionFn(18); + // PathExpression = WholeExpression, ("???." )+ => ActionFn(22); + let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action18::<>(__sym0); + let __end = __sym1.2.clone(); + let __nt = super::__action22::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 21) + (2, 20) } pub(crate) fn __reduce43< 'input, @@ -2210,8 +2242,8 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = BarePath => ActionFn(19); - let __sym0 = __pop_Variant7(__symbols); + // PathHead = WholeExpression => ActionFn(19); + let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action19::<>(__sym0); @@ -2228,8 +2260,8 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = Flag => ActionFn(20); - let __sym0 = __pop_Variant9(__symbols); + // PathHead = BarePath => ActionFn(20); + let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action20::<>(__sym0); @@ -2245,6 +2277,24 @@ mod __parse__Pipeline { __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) + { + // PathHead = Flag => ActionFn(21); + let __sym0 = __pop_Variant9(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action21::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 21) + } + pub(crate) fn __reduce46< + 'input, + >( + __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) { // Pipeline = Command => ActionFn(1); let __sym0 = __pop_Variant4(__symbols); @@ -2254,7 +2304,7 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant12(__nt), __end)); (1, 22) } - pub(crate) fn __reduce46< + pub(crate) fn __reduce47< 'input, >( __action: i8, @@ -2273,24 +2323,6 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant12(__nt), __end)); (2, 22) } - pub(crate) fn __reduce47< - 'input, - >( - __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) - { - // String = "sqstring" => ActionFn(35); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action35::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 23) - } pub(crate) fn __reduce48< 'input, >( @@ -2301,7 +2333,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = "dqstring" => ActionFn(36); + // String = "sqstring" => ActionFn(36); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2319,14 +2351,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$", "variable" => ActionFn(24); - let __sym1 = __pop_Variant0(__symbols); + // String = "dqstring" => ActionFn(37); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action24::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant13(__nt), __end)); - (2, 24) + let __end = __sym0.2.clone(); + let __nt = super::__action37::<>(__sym0); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (1, 23) } pub(crate) fn __reduce50< 'input, @@ -2338,13 +2369,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = AtomicExpression => ActionFn(16); - let __sym0 = __pop_Variant6(__symbols); + // UnitsNum = "unitsnum" => ActionFn(40); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action16::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 25) + let __nt = super::__action40::<>(__sym0); + __symbols.push((__start, __Symbol::Variant10(__nt), __end)); + (1, 24) } pub(crate) fn __reduce51< 'input, @@ -2356,13 +2387,50 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = Block => ActionFn(17); + // Variable = "$", "variable" => ActionFn(25); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action25::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant13(__nt), __end)); + (2, 25) + } + pub(crate) fn __reduce52< + 'input, + >( + __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 = AtomicExpression => ActionFn(17); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action17::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 25) + (1, 26) + } + pub(crate) fn __reduce53< + 'input, + >( + __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(18); + let __sym0 = __pop_Variant6(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action18::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 26) } } pub use self::__parse__Pipeline::PipelineParser; @@ -2444,6 +2512,15 @@ fn __action7< fn __action8< 'input, +>( + (_, __0, _): (usize, i64, usize), +) -> Expression +{ + Expression::Leaf(Leaf::Int(__0)) +} + +fn __action9< + 'input, >( (_, __0, _): (usize, Variable, usize), ) -> Expression @@ -2451,7 +2528,7 @@ fn __action8< Expression::VariableReference(__0) } -fn __action9< +fn __action10< 'input, >( (_, left, _): (usize, Expression, usize), @@ -2462,17 +2539,6 @@ fn __action9< Expression::Binary(Box::new(Binary::new(left, op, right))) } -fn __action10< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, SpannedToken<'input>, usize), -) -> Expression -{ - Expression::Parenthesized(Box::new(Parenthesized::new(__0))) -} - fn __action11< 'input, >( @@ -2487,10 +2553,12 @@ fn __action11< fn __action12< 'input, >( + (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - (__0) + Expression::Parenthesized(Box::new(Parenthesized::new(__0))) } fn __action13< @@ -2505,12 +2573,10 @@ fn __action13< fn __action14< 'input, >( - (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - Expression::Block(Box::new(Block::new(__0))) + (__0) } fn __action15< @@ -2527,10 +2593,12 @@ fn __action15< fn __action16< 'input, >( + (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - (__0) + Expression::Block(Box::new(Block::new(__0))) } fn __action17< @@ -2553,6 +2621,15 @@ fn __action18< fn __action19< 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action20< + 'input, >( (_, __0, _): (usize, BarePath, usize), ) -> Expression @@ -2560,7 +2637,7 @@ fn __action19< Expression::Leaf(Leaf::Bare(__0)) } -fn __action20< +fn __action21< 'input, >( (_, __0, _): (usize, Flag, usize), @@ -2569,7 +2646,7 @@ fn __action20< Expression::Flag(__0) } -fn __action21< +fn __action22< 'input, >( (_, head, _): (usize, Expression, usize), @@ -2579,15 +2656,6 @@ fn __action21< Expression::Path(Box::new(Path::new(head, tail))) } -fn __action22< - 'input, ->( - (_, __0, _): (usize, Expression, usize), -) -> Expression -{ - (__0) -} - fn __action23< 'input, >( @@ -2599,6 +2667,15 @@ fn __action23< fn __action24< 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action25< + 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2607,7 +2684,7 @@ fn __action24< Variable::from_str(__0.as_slice()).unwrap() } -fn __action25< +fn __action26< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2616,7 +2693,7 @@ fn __action25< __0.to_string() } -fn __action26< +fn __action27< 'input, >( (_, __0, _): (usize, String, usize), @@ -2625,7 +2702,7 @@ fn __action26< (__0) } -fn __action27< +fn __action28< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2634,7 +2711,7 @@ fn __action27< Operator::Equal } -fn __action28< +fn __action29< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2643,7 +2720,7 @@ fn __action28< Operator::NotEqual } -fn __action29< +fn __action30< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2652,7 +2729,7 @@ fn __action29< Operator::LessThan } -fn __action30< +fn __action31< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2661,7 +2738,7 @@ fn __action30< Operator::GreaterThan } -fn __action31< +fn __action32< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2670,7 +2747,7 @@ fn __action31< Operator::LessThanOrEqual } -fn __action32< +fn __action33< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2679,16 +2756,6 @@ fn __action32< Operator::GreaterThanOrEqual } -fn __action33< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, BarePath, usize), -) -> Flag -{ - Flag::Shorthand(__0.to_string()) -} - fn __action34< 'input, >( @@ -2696,16 +2763,17 @@ fn __action34< (_, __0, _): (usize, BarePath, usize), ) -> Flag { - Flag::Longhand(__0.to_string()) + Flag::Shorthand(__0.to_string()) } fn __action35< 'input, >( - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> String + (_, _, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, BarePath, usize), +) -> Flag { - __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string() + Flag::Longhand(__0.to_string()) } fn __action36< @@ -2719,6 +2787,15 @@ fn __action36< fn __action37< 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> String +{ + __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string() +} + +fn __action38< + 'input, >( (_, head, _): (usize, SpannedToken<'input>, usize), (_, tail, _): (usize, ::std::vec::Vec>, usize), @@ -2727,7 +2804,7 @@ fn __action37< BarePath::from_tokens(head, tail) } -fn __action38< +fn __action39< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2736,7 +2813,16 @@ fn __action38< i64::from_str(__0.as_slice()).unwrap() } -fn __action39< +fn __action40< + 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> i64 +{ + Byte::from_string(__0.as_slice()).unwrap().get_bytes() as i64 +} + +fn __action41< 'input, >( __lookbehind: &usize, @@ -2746,7 +2832,7 @@ fn __action39< vec![] } -fn __action40< +fn __action42< 'input, >( (_, v, _): (usize, ::std::vec::Vec>, usize), @@ -2755,7 +2841,7 @@ fn __action40< v } -fn __action41< +fn __action43< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2765,7 +2851,7 @@ fn __action41< (__0) } -fn __action42< +fn __action44< 'input, >( (_, __0, _): (usize, String, usize), @@ -2774,7 +2860,7 @@ fn __action42< vec![__0] } -fn __action43< +fn __action45< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2784,7 +2870,7 @@ fn __action43< { let mut v = v; v.push(e); v } } -fn __action44< +fn __action46< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2794,7 +2880,7 @@ fn __action44< (__0) } -fn __action45< +fn __action47< 'input, >( (_, __0, _): (usize, Expression, usize), @@ -2803,7 +2889,7 @@ fn __action45< vec![__0] } -fn __action46< +fn __action48< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2813,7 +2899,7 @@ fn __action46< { let mut v = v; v.push(e); v } } -fn __action47< +fn __action49< 'input, >( (_, __0, _): (usize, ParsedCommand, usize), @@ -2822,7 +2908,7 @@ fn __action47< vec![__0] } -fn __action48< +fn __action50< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2832,7 +2918,7 @@ fn __action48< { let mut v = v; v.push(e); v } } -fn __action49< +fn __action51< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2842,7 +2928,7 @@ fn __action49< (__0) } -fn __action50< +fn __action52< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2851,7 +2937,7 @@ fn __action50< vec![__0] } -fn __action51< +fn __action53< 'input, >( (_, v, _): (usize, ::std::vec::Vec>, usize), @@ -2861,7 +2947,7 @@ fn __action51< { let mut v = v; v.push(e); v } } -fn __action52< +fn __action54< 'input, >( __0: (usize, SpannedToken<'input>, usize), @@ -2870,17 +2956,17 @@ fn __action52< { let __start0 = __0.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action41( + let __temp0 = __action43( __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action50( + __action52( __temp0, ) } -fn __action53< +fn __action55< 'input, >( __0: (usize, ::std::vec::Vec>, usize), @@ -2890,50 +2976,12 @@ fn __action53< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action41( + let __temp0 = __action43( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action51( - __0, - __temp0, - ) -} - -fn __action54< - 'input, ->( - __0: (usize, SpannedToken<'input>, usize), -) -> BarePath -{ - let __start0 = __0.2.clone(); - let __end0 = __0.2.clone(); - let __temp0 = __action39( - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action37( - __0, - __temp0, - ) -} - -fn __action55< - 'input, ->( - __0: (usize, SpannedToken<'input>, usize), - __1: (usize, ::std::vec::Vec>, usize), -) -> BarePath -{ - let __start0 = __1.0.clone(); - let __end0 = __1.2.clone(); - let __temp0 = __action40( - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action37( + __action53( __0, __temp0, ) @@ -2943,17 +2991,17 @@ fn __action56< 'input, >( __0: (usize, SpannedToken<'input>, usize), - __1: (usize, String, usize), -) -> ::std::vec::Vec +) -> BarePath { - let __start0 = __0.0.clone(); - let __end0 = __1.2.clone(); - let __temp0 = __action44( - __0, - __1, + let __start0 = __0.2.clone(); + let __end0 = __0.2.clone(); + let __temp0 = __action41( + &__start0, + &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action42( + __action38( + __0, __temp0, ) } @@ -2961,19 +3009,17 @@ fn __action56< fn __action57< 'input, >( - __0: (usize, ::std::vec::Vec, usize), - __1: (usize, SpannedToken<'input>, usize), - __2: (usize, String, usize), -) -> ::std::vec::Vec + __0: (usize, SpannedToken<'input>, usize), + __1: (usize, ::std::vec::Vec>, usize), +) -> BarePath { let __start0 = __1.0.clone(); - let __end0 = __2.2.clone(); - let __temp0 = __action44( + let __end0 = __1.2.clone(); + let __temp0 = __action42( __1, - __2, ); let __temp0 = (__start0, __temp0, __end0); - __action43( + __action38( __0, __temp0, ) @@ -2983,23 +3029,63 @@ fn __action58< 'input, >( __0: (usize, SpannedToken<'input>, usize), - __1: (usize, ParsedCommand, usize), -) -> ::std::vec::Vec + __1: (usize, String, usize), +) -> ::std::vec::Vec { let __start0 = __0.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action49( + let __temp0 = __action46( __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action47( + __action44( __temp0, ) } fn __action59< 'input, +>( + __0: (usize, ::std::vec::Vec, usize), + __1: (usize, SpannedToken<'input>, usize), + __2: (usize, String, usize), +) -> ::std::vec::Vec +{ + let __start0 = __1.0.clone(); + let __end0 = __2.2.clone(); + let __temp0 = __action46( + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action45( + __0, + __temp0, + ) +} + +fn __action60< + 'input, +>( + __0: (usize, SpannedToken<'input>, usize), + __1: (usize, ParsedCommand, usize), +) -> ::std::vec::Vec +{ + let __start0 = __0.0.clone(); + let __end0 = __1.2.clone(); + let __temp0 = __action51( + __0, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action49( + __temp0, + ) +} + +fn __action61< + 'input, >( __0: (usize, ::std::vec::Vec, usize), __1: (usize, SpannedToken<'input>, usize), @@ -3008,12 +3094,12 @@ fn __action59< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action49( + let __temp0 = __action51( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action48( + __action50( __0, __temp0, )