From f3bb4a03c2d6e24796facfb1349f038748ed3349 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Tue, 4 Jun 2019 14:42:31 -0700 Subject: [PATCH] Improve parser --- src/cli.rs | 80 +- src/commands/classified.rs | 2 + src/errors.rs | 21 + src/evaluate/evaluator.rs | 1 + src/format/table.rs | 14 +- src/object/base.rs | 12 +- src/object/desc.rs | 23 +- src/parser.rs | 47 +- src/parser/ast.rs | 129 +- src/parser/lexer.rs | 14 +- src/parser/parser.lalrpop | 153 +- src/parser/parser.rs | 4370 +++++++++++++++++++++++++++--------- src/parser/registry.rs | 1 + 13 files changed, 3689 insertions(+), 1178 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 0a98fa9924..dbba220489 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -10,7 +10,8 @@ use crate::evaluate::Scope; crate use crate::format::{EntriesListView, GenericView}; use crate::git::current_branch; use crate::object::Value; -use crate::parser::{ParsedCommand, Pipeline}; +use crate::parser::ast::{Expression, Leaf}; +use crate::parser::{Args, ParsedCommand, Pipeline}; use crate::stream::empty_stream; use log::debug; @@ -208,6 +209,18 @@ async fn process_line(readline: Result, ctx: &mut Context input = match (item, next) { (None, _) => break, + (Some(ClassifiedCommand::Expr(_)), _) => { + return LineResult::Error(ShellError::unimplemented( + "Expression-only commands", + )) + } + + (_, Some(ClassifiedCommand::Expr(_))) => { + return LineResult::Error(ShellError::unimplemented( + "Expression-only commands", + )) + } + ( Some(ClassifiedCommand::Internal(left)), Some(ClassifiedCommand::Internal(_)), @@ -305,36 +318,55 @@ fn classify_pipeline( } fn classify_command( - command: &ParsedCommand, + command: &Expression, context: &Context, ) -> Result { - let command_name = &command.name[..]; - let args = &command.args; + // let command_name = &command.name[..]; + // let args = &command.args; - match command_name { - other => match context.has_command(command_name) { - true => { - let command = context.get_command(command_name); - let config = command.config(); - let scope = Scope::empty(); + if let Expression::Call(call) = command { + match (&call.name, &call.args) { + (Expression::Leaf(Leaf::Bare(name)), args) => { + match context.has_command(&name.to_string()) { + true => { + let command = context.get_command(&name.to_string()); + let config = command.config(); + let scope = Scope::empty(); - let args = config.evaluate_args(args.iter(), &scope)?; + let args = match args { + Some(args) => config.evaluate_args(args.iter(), &scope)?, + None => Args::default(), + }; - Ok(ClassifiedCommand::Internal(InternalCommand { - command, - args, - })) + Ok(ClassifiedCommand::Internal(InternalCommand { + command, + args, + })) + } + false => { + let arg_list_strings: Vec = match args { + Some(args) => args.iter().map(|i| i.as_external_arg()).collect(), + None => vec![], + }; + + Ok(ClassifiedCommand::External(ExternalCommand { + name: name.to_string(), + args: arg_list_strings, + })) + } + } } - false => { - let arg_list_strings: Vec = - args.iter().map(|i| i.as_external_arg()).collect(); - Ok(ClassifiedCommand::External(ExternalCommand { - name: other.to_string(), - args: arg_list_strings, - })) - } - }, + (_, None) => Err(ShellError::string( + "Unimplemented command that is just an expression (1)", + )), + (_, Some(args)) => Err(ShellError::string("Unimplemented dynamic command")), + } + } else { + Err(ShellError::string(&format!( + "Unimplemented command that is just an expression (2) -- {:?}", + command + ))) } } diff --git a/src/commands/classified.rs b/src/commands/classified.rs index b1f4f734fd..102e178661 100644 --- a/src/commands/classified.rs +++ b/src/commands/classified.rs @@ -1,3 +1,4 @@ +use crate::parser::ast::Expression; use crate::parser::registry::Args; use crate::prelude::*; use bytes::{BufMut, BytesMut}; @@ -75,6 +76,7 @@ crate struct ClassifiedPipeline { } crate enum ClassifiedCommand { + Expr(Expression), Internal(InternalCommand), External(ExternalCommand), } diff --git a/src/errors.rs b/src/errors.rs index c55112ef44..495a05032e 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -48,6 +48,10 @@ impl ShellError { ShellError::String(StringError::new(title.into(), Value::nothing())) } + crate fn unimplemented(title: impl Into) -> ShellError { + ShellError::string(&format!("Unimplemented: {}", title.into())) + } + crate fn copy_error(&self) -> ShellError { self.clone() } @@ -58,6 +62,23 @@ pub struct ShellDiagnostic { crate diagnostic: Diagnostic, } +impl ShellDiagnostic { + crate fn simple_diagnostic( + span: impl Into, + source: impl Into, + ) -> ShellDiagnostic { + use language_reporting::*; + + let span = span.into(); + let source = source.into(); + + let diagnostic = + Diagnostic::new(Severity::Error, "Parse error").with_label(Label::new_primary(span)); + + ShellDiagnostic { diagnostic } + } +} + impl PartialEq for ShellDiagnostic { fn eq(&self, _other: &ShellDiagnostic) -> bool { false diff --git a/src/evaluate/evaluator.rs b/src/evaluate/evaluator.rs index 56ca69737b..4f8c6a1f0a 100644 --- a/src/evaluate/evaluator.rs +++ b/src/evaluate/evaluator.rs @@ -23,6 +23,7 @@ impl Scope { crate fn evaluate_expr(expr: &ast::Expression, scope: &Scope) -> Result { use ast::*; match expr { + Expression::Call(c) => Err(ShellError::unimplemented("Evaluating call expression")), Expression::Leaf(l) => Ok(evaluate_leaf(l)), Expression::Parenthesized(p) => evaluate_expr(&p.expr, scope), Expression::Flag(f) => Ok(Value::Primitive(Primitive::String(f.print()))), diff --git a/src/format/table.rs b/src/format/table.rs index 29a254f913..5f79114e25 100644 --- a/src/format/table.rs +++ b/src/format/table.rs @@ -1,5 +1,5 @@ use crate::format::RenderView; -use crate::object::Value; +use crate::object::{DataDescriptor, Value}; use crate::prelude::*; use derive_new::new; use prettytable::{color, Attr, Cell, Row, Table}; @@ -11,7 +11,7 @@ use prettytable::{color, Attr, Cell, Row, Table}; // another_name : ... #[derive(new)] pub struct TableView { - headers: Vec, + headers: Vec, entries: Vec>, } @@ -22,18 +22,16 @@ impl TableView { } let item = &values[0]; - let descs = item.data_descriptors(); + let headers = item.data_descriptors(); - if descs.len() == 0 { + if headers.len() == 0 { return None; } - let headers: Vec = descs.iter().map(|d| d.name.display().to_string()).collect(); - let mut entries = vec![]; for value in values { - let row = descs + let row = headers .iter() .enumerate() .map(|(i, d)| value.get_data(d).borrow().format_leaf(Some(&headers[i]))) @@ -60,7 +58,7 @@ impl RenderView for TableView { .headers .iter() .map(|h| { - Cell::new(h) + Cell::new(h.display_header()) .with_style(Attr::ForegroundColor(color::GREEN)) .with_style(Attr::Bold) }) diff --git a/src/object/base.rs b/src/object/base.rs index 8ae47988df..2251ac4f37 100644 --- a/src/object/base.rs +++ b/src/object/base.rs @@ -75,7 +75,7 @@ impl Primitive { .to_string() } - crate fn format(&self, field_name: Option<&str>) -> String { + crate fn format(&self, field_name: Option<&DataDescriptor>) -> String { match self { Primitive::Nothing => format!("{}", Color::Black.bold().paint("-")), Primitive::Bytes(b) => { @@ -98,8 +98,10 @@ impl Primitive { Primitive::Boolean(b) => match (b, field_name) { (true, None) => format!("Yes"), (false, None) => format!("No"), - (true, Some(s)) => format!("{}", s), - (false, Some(_)) => format!(""), + (true, Some(s)) if s.is_string_name() => format!("{}", s.display_header()), + (false, Some(s)) if s.is_string_name() => format!(""), + (true, Some(_)) => format!("Yes"), + (false, Some(_)) => format!("No"), }, Primitive::Date(d) => format!("{}", d.humanize()), } @@ -207,9 +209,9 @@ impl Value { } } - crate fn format_leaf(&self, field_name: Option<&str>) -> String { + crate fn format_leaf(&self, desc: Option<&DataDescriptor>) -> String { match self { - Value::Primitive(p) => p.format(field_name), + Value::Primitive(p) => p.format(desc), Value::Block(b) => b.expression.print(), Value::Object(_) => format!("[object Object]"), Value::List(_) => format!("[list List]"), diff --git a/src/object/desc.rs b/src/object/desc.rs index 80d1ac4dc4..ee34ad7c72 100644 --- a/src/object/desc.rs +++ b/src/object/desc.rs @@ -1,7 +1,7 @@ use crate::object::types::Type; use derive_new::new; -use serde_derive::{Deserialize, Serialize}; use serde::{Serialize, Serializer}; +use serde_derive::{Deserialize, Serialize}; #[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize, Hash)] pub enum DescriptorName { @@ -39,18 +39,27 @@ pub struct DataDescriptor { crate ty: Type, } +impl DataDescriptor { + crate fn display_header(&self) -> &str { + self.name.display() + } + + crate fn is_string_name(&self) -> bool { + match self.name { + DescriptorName::String(_) => true, + DescriptorName::ValueOf => false, + } + } +} + impl Serialize for DataDescriptor { fn serialize(&self, serializer: S) -> Result where S: Serializer, { match self.name { - DescriptorName::String(ref s) => { - serializer.serialize_str(s) - } - DescriptorName::ValueOf => { - serializer.serialize_str("value") - } + DescriptorName::String(ref s) => serializer.serialize_str(s), + DescriptorName::ValueOf => serializer.serialize_str("value"), } } } diff --git a/src/parser.rs b/src/parser.rs index 36413f7eef..88768be581 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -10,12 +10,20 @@ crate use registry::{Args, CommandConfig}; use crate::errors::ShellError; use lexer::Lexer; +use log::trace; use parser::PipelineParser; pub fn parse(input: &str) -> Result { + let _ = pretty_env_logger::try_init(); + let parser = PipelineParser::new(); let tokens = Lexer::new(input, false); + trace!( + "Tokens: {:?}", + tokens.clone().collect::, _>>() + ); + match parser.parse(tokens) { Ok(val) => Ok(val), Err(err) => Err(ShellError::parse_error(err, input.to_string())), @@ -25,12 +33,33 @@ pub fn parse(input: &str) -> Result { #[cfg(test)] mod tests { use super::*; - use crate::parser::ast::{bare, binary, flag, short, unit, var, Pipeline}; + use crate::parser::ast::{bare, flag, short, unit, var, Expression, Operator, Pipeline}; use pretty_assertions::assert_eq; fn assert_parse(source: &str, expected: Pipeline) { - let parsed = parse(source).unwrap(); + let parsed = match parse(source) { + Ok(p) => p, + Err(ShellError::Diagnostic(diag, source)) => { + use language_reporting::termcolor; + + let writer = termcolor::StandardStream::stdout(termcolor::ColorChoice::Auto); + let files = crate::parser::span::Files::new(source); + + language_reporting::emit( + &mut writer.lock(), + &files, + &diag.diagnostic, + &language_reporting::DefaultConfig, + ) + .unwrap(); + + panic!("Test failed") + } + Err(err) => panic!("Something went wrong during parse: {:#?}", err), + }; + let printed = parsed.print(); + assert_eq!(parsed, expected); assert_eq!(source, printed); } @@ -47,15 +76,15 @@ mod tests { macro_rules! command { ($name:ident $( $command:expr )*) => { - ParsedCommand::new(stringify!($name).into(), vec![ $($command.into()),* ]) + Expression::call(Expression::bare(stringify!($name)), vec![ $($command.into()),* ]) }; ($name:ident $( $command:expr )*) => { - ParsedCommand::new(stringify!($name).into(), vec![ $($command.into()),* ]) + Expression::call(Expression::bare(stringify!($name)), vec![ $($command.into()),* ]) }; ($name:tt $( $command:expr )*) => { - ParsedCommand::new($name.into(), vec![ $($command.into()),* ]) + Expression::call(Expression::bare($name), vec![ $($command.into()),* ]) }; } @@ -164,4 +193,12 @@ mod tests { ], ); } + + fn binary( + left: impl Into, + op: impl Into, + right: impl Into, + ) -> Expression { + Expression::binary(left, op, right) + } } diff --git a/src/parser/ast.rs b/src/parser/ast.rs index 71af3e4235..9a859d4c5e 100644 --- a/src/parser/ast.rs +++ b/src/parser/ast.rs @@ -59,6 +59,7 @@ pub enum Expression { Block(Box), Binary(Box), Path(Box), + Call(Box), VariableReference(Variable), } @@ -68,6 +69,12 @@ impl From<&str> for Expression { } } +impl From for Expression { + fn from(input: String) -> Expression { + Expression::Leaf(Leaf::String(input.into())) + } +} + impl From for Expression { fn from(input: i64) -> Expression { Expression::Leaf(Leaf::Int(input.into())) @@ -99,8 +106,41 @@ impl From for Expression { } impl Expression { + crate fn leaf(leaf: impl Into) -> Expression { + Expression::Leaf(leaf.into()) + } + + crate fn flag(flag: impl Into) -> Expression { + Expression::Flag(flag.into()) + } + + crate fn call(head: Expression, tail: Vec) -> Expression { + if tail.len() == 0 { + Expression::Call(Box::new(ParsedCommand::new(head.into(), None))) + } else { + Expression::Call(Box::new(ParsedCommand::new(head.into(), Some(tail)))) + } + } + + crate fn binary( + left: impl Into, + operator: impl Into, + right: impl Into, + ) -> Expression { + Expression::Binary(Box::new(Binary { + left: left.into(), + operator: operator.into(), + right: right.into(), + })) + } + + crate fn block(expr: impl Into) -> Expression { + Expression::Block(Box::new(Block::new(expr.into()))) + } + crate fn print(&self) -> String { match self { + Expression::Call(c) => c.print(), Expression::Leaf(l) => l.print(), Expression::Flag(f) => f.print(), Expression::Parenthesized(p) => p.print(), @@ -113,6 +153,7 @@ impl Expression { crate fn as_external_arg(&self) -> String { match self { + Expression::Call(c) => c.as_external_arg(), Expression::Leaf(l) => l.as_external_arg(), Expression::Flag(f) => f.as_external_arg(), Expression::Parenthesized(p) => p.as_external_arg(), @@ -123,6 +164,10 @@ impl Expression { } } + crate fn bare(path: impl Into) -> Expression { + Expression::Leaf(Leaf::Bare(path.into())) + } + crate fn as_string(&self) -> Option { match self { Expression::Leaf(Leaf::String(s)) => Some(s.to_string()), @@ -131,6 +176,13 @@ impl Expression { } } + crate fn as_bare(&self) -> Option { + match self { + Expression::Leaf(Leaf::Bare(p)) => Some(p.to_string()), + _ => None, + } + } + crate fn is_flag(&self, value: &str) -> bool { match self { Expression::Flag(Flag::Longhand(f)) if value == f => true, @@ -218,8 +270,8 @@ impl Variable { crate fn from_str(input: &str) -> Expression { match input { "it" => Expression::VariableReference(Variable::It), - "true" => Expression::Leaf(Leaf::Boolean(true)), - "false" => Expression::Leaf(Leaf::Boolean(false)), + "yes" => Expression::Leaf(Leaf::Boolean(true)), + "no" => Expression::Leaf(Leaf::Boolean(false)), other => Expression::VariableReference(Variable::Other(other.to_string())), } } @@ -236,8 +288,7 @@ impl Variable { } } -#[cfg(test)] -pub fn bare(s: &str) -> BarePath { +pub fn bare(s: impl Into) -> BarePath { BarePath { head: s.into(), tail: vec![], @@ -250,7 +301,23 @@ pub struct BarePath { tail: Vec, } +impl> From for BarePath { + fn from(input: T) -> BarePath { + BarePath { + head: input.into(), + tail: vec![], + } + } +} + impl BarePath { + crate fn from_token(head: SpannedToken) -> BarePath { + BarePath { + head: head.to_string(), + tail: vec![], + } + } + crate fn from_tokens(head: SpannedToken, tail: Vec) -> BarePath { BarePath { head: head.to_string(), @@ -363,19 +430,6 @@ impl Binary { } } -#[cfg(test)] -crate fn binary( - left: impl Into, - operator: impl Into, - right: impl Into, -) -> Binary { - Binary { - left: left.into(), - operator: operator.into(), - right: right.into(), - } -} - impl Binary { fn print(&self) -> String { format!( @@ -427,21 +481,36 @@ impl Flag { } } -#[derive(new, Debug, Clone, Eq, PartialEq)] +#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, new)] pub struct ParsedCommand { - crate name: String, - crate args: Vec, + crate name: Expression, + crate args: Option>, } impl ParsedCommand { - #[allow(unused)] + fn as_external_arg(&self) -> String { + let mut out = vec![]; + + write!(out, "{}", self.name.as_external_arg()).unwrap(); + + if let Some(args) = &self.args { + for arg in args.iter() { + write!(out, " {}", arg.as_external_arg()).unwrap(); + } + } + + String::from_utf8_lossy(&out).into_owned() + } + fn print(&self) -> String { let mut out = vec![]; - write!(out, "{}", self.name).unwrap(); + write!(out, "{}", self.name.print()).unwrap(); - for arg in self.args.iter() { - write!(out, " {}", arg.print()).unwrap(); + if let Some(args) = &self.args { + for arg in args.iter() { + write!(out, " {}", arg.print()).unwrap(); + } } String::from_utf8_lossy(&out).into_owned() @@ -451,8 +520,8 @@ impl ParsedCommand { impl From<&str> for ParsedCommand { fn from(input: &str) -> ParsedCommand { ParsedCommand { - name: input.to_string(), - args: vec![], + name: Expression::Leaf(Leaf::Bare(bare(input))), + args: None, } } } @@ -460,19 +529,19 @@ impl From<&str> for ParsedCommand { impl From<(&str, Vec)> for ParsedCommand { fn from(input: (&str, Vec)) -> ParsedCommand { ParsedCommand { - name: input.0.to_string(), - args: input.1, + name: Expression::bare(input.0), + args: Some(input.1), } } } #[derive(new, Debug, Eq, PartialEq)] pub struct Pipeline { - crate commands: Vec, + crate commands: Vec, } impl Pipeline { - crate fn from_parts(command: ParsedCommand, rest: Vec) -> Pipeline { + crate fn from_parts(command: Expression, rest: Vec) -> Pipeline { let mut commands = vec![command]; commands.extend(rest); diff --git a/src/parser/lexer.rs b/src/parser/lexer.rs index 5299d46171..047c3130e9 100644 --- a/src/parser/lexer.rs +++ b/src/parser/lexer.rs @@ -23,7 +23,7 @@ crate enum TopToken { #[regex = r#""([^"]|\\")*""#] DQString, - #[regex = r"\$"] + #[token = "$"] #[callback = "start_variable"] Dollar, @@ -257,6 +257,12 @@ crate enum AfterMemberDot { #[callback = "finish_member"] Member, + #[regex = r#"'([^']|\\')*'"#] + SQString, + + #[regex = r#""([^"]|\\")*""#] + DQString, + #[regex = r"\s"] Whitespace, } @@ -268,6 +274,9 @@ impl AfterMemberDot { let result = match self { END => return None, Member => Token::Member, + SQString => Token::SQMember, + DQString => Token::DQMember, + Whitespace => Token::Whitespace, Error => unreachable!("Don't call to_token with the error variant"), }; @@ -387,6 +396,8 @@ pub enum Token { Variable, PathDot, Member, + SQMember, + DQMember, Num, SQString, DQString, @@ -418,6 +429,7 @@ pub enum Token { // Whitespace(SpannedToken<'source, &'source str>), // } +#[derive(Clone)] crate struct Lexer<'source> { lexer: logos::Lexer, first: bool, diff --git a/src/parser/parser.lalrpop b/src/parser/parser.lalrpop index d2347ff69b..61973f5cfa 100644 --- a/src/parser/parser.lalrpop +++ b/src/parser/parser.lalrpop @@ -6,72 +6,117 @@ use crate::prelude::*; use crate::parser::lexer::{SpannedToken, Token}; use byte_unit::Byte; +// nu's grammar is a little bit different from a lot of other languages, to better match +// the idioms and constraints of a shell environment. A lot of the constraints are +// the same as PowerShell, but mostly derived from the same first principles. +// +// - Other than at the beginning of a command, bare words are virtually always parsed as +// strings. This means that, in general, bare words cannot be used as keywords or +// variables. +// - Variable names begin with `$`, and so do keywords +// - Functions are invoked without `()` and without comma separation +// - In general, because of the lack of comma-separation, expressions must be grouped: +// - a single token +// - a path ($variable followed by any number of `"." member`) +// - parenthesized expression +// - This means that more elaborate expressions, like binary expressions, must usually +// be parenthesized +// - There is a special case for a command that takes a single expression, which can +// omit the parens + grammar<'input>; pub Pipeline: Pipeline = { - => Pipeline::new(vec![first]), - )+> => Pipeline::from_parts(first, rest), + )*> => Pipeline::from_parts(first, rest), } -Command: ParsedCommand = { - => ParsedCommand::new(command.to_string(), vec![]), - => ParsedCommand::new(command.to_string(), expr), - => ParsedCommand::new(command.to_string(), vec![expr]), +PipelineElement: Expression = { + => Expression::call(Expression::bare(<>), vec![]), + => <>, } -Leaf: Expression = { - => Expression::Leaf(Leaf::String(<>)), - => Expression::Leaf(Leaf::Int(<>)), - => Expression::Leaf(<>), +// A leaf expression is a single logical token that directly represents an expression +LeafExpression: Expression = { + => <>, + => Expression::leaf(Leaf::Int(<>)), + => <>, => <>, } -BinaryExpression: Expression = { - => Expression::Binary(Box::new(Binary::new(left, op, right))), +pub Call: Expression = { + => Expression::call(expr, vec![rest]), + )+> => Expression::call(expr, { let mut rest = rest; let mut v = vec![first]; v.append(&mut rest); v }), + => Expression::call(Expression::bare(expr), vec![rest]), + )+> => Expression::call(Expression::bare(expr), { let mut v = vec![first]; let mut rest = rest; v.append(&mut rest); v }), } -Parenthesized: Expression = { - "(" ")" => Expression::Parenthesized(Box::new(Parenthesized::new(<>))), - "(" ")" => Expression::Parenthesized(Box::new(Parenthesized::new(<>))), -} - -AtomicExpression: Expression = { - , - , +Binary: Expression = { + => Expression::binary(left, op, right), } +// In a block, a single bare word is interpreted as a call: +// +// foreach { ls } Block: Expression = { - "{" "}" => Expression::Block(Box::new(Block::new(<>))), - "{" "}" => Expression::Block(Box::new(Block::new(<>))), + "{" "}" => Expression::block(<>), + "{" "}" => Expression::block(Expression::call(Expression::bare(<>), vec![])), } -WholeExpression: Expression = { - , - , +// An `Expression` is the most general kind of expression. It can go anywhere, even right next to another expression, and +// even as the first part of a call. +Expression: Expression = { + => <>, + => <>, + "(" ")" => <>, + "(" ")" => Expression::call(Expression::bare(<>), vec![]), + "(" ")" => <>, } -PathHead: Expression = { - , - => Expression::Leaf(Leaf::Bare(<>)), - => Expression::Flag(<>), +// An `ArgumentExpression` is an expression that appears in an argument list. It includes all of `Expression`, and +// bare words are interpreted as strings. +ArgumentExpression: Expression = { + , + => Expression::bare(<>), } -PathExpression: Expression = { - )+> => Expression::Path(Box::new(Path::new(head, tail))) +CallArgument: Expression = { + => <>, + => Expression::flag(<>), } -Expr: Expression = { - , - +SingleCallArgument: Expression = { + , + , } -Var: Expression = { - "$" <"variable"> => Variable::from_str(<>.as_slice()), +// A `SingleExpression` is a special-case of `Expression` for situations where expressions do not appear side-by-side. +// Because expression lists in nu are not comma-separated, composite expressions (like binary expressions) must be +// parenthesized in lists. If only a single expression appears alone, the parentheses may be left out. +// +// `SingleExpression` does not include `Bare`, because expressions that include `SingleExpression` must decide how +// to interpret a single bare word (`foreach { ls }` vs `cd ls`). +SingleExpression: Expression = { + , + , + , } +// === LOGICAL TOKENS === // + +// A logical token may be composed of more than one raw token, but the tokens must be emitted +// from the stream in exactly one sequence. This allows us to use parser infrastructure to +// compose tokens without the risk that these logical tokens will introduce ambiguities. + +Bare: BarePath = { + => BarePath::from_token(head) +} + +// A member is a special token that represents bare words or string literals immediate +// following a dot. Member: String = { <"member"> => <>.to_string(), - + <"dqmember"> => <>.to_string(), + <"sqmember"> => <>.to_string(), } Operator: Operator = { @@ -83,26 +128,26 @@ Operator: Operator = { ">=" => Operator::GreaterThanOrEqual } -Flag: Flag = { - "-" => Flag::Shorthand(<>.to_string()), - "--" => Flag::Longhand(<>.to_string()), -} - -String: String = { - <"sqstring"> => <>.as_slice()[1..(<>.as_slice().len() - 1)].to_string(), - <"dqstring"> => <>.as_slice()[1..(<>.as_slice().len() - 1)].to_string() -} - -BarePath: BarePath = { - )*> => BarePath::from_tokens(head, tail) -} - Int: i64 = { <"num"> => i64::from_str(<>.as_slice()).unwrap() } -UnitsNum: Leaf = { - => Leaf::Unit(num, Unit::from_str(unit.as_slice()).unwrap()) +UnitsNum: Expression = { + => Expression::leaf(Leaf::Unit(num, Unit::from_str(unit.as_slice()).unwrap())) +} + +String: Expression = { + <"sqstring"> => <>.as_slice()[1..(<>.as_slice().len() - 1)].to_string().into(), + <"dqstring"> => <>.as_slice()[1..(<>.as_slice().len() - 1)].to_string().into() +} + +Flag: Flag = { + "-" => Flag::Shorthand(<>.to_string()), + "--" => Flag::Longhand(<>.to_string()), +} + +Var: Expression = { + "$" <"variable"> => Variable::from_str(<>.as_slice()).into(), } extern { @@ -127,6 +172,8 @@ extern { "???." => SpannedToken { token: Token::PathDot, .. }, "num" => SpannedToken { token: Token::Num, .. }, "member" => SpannedToken { token: Token::Member, .. }, + "sqmember" => SpannedToken { token: Token::SQMember, .. }, + "dqmember" => SpannedToken { token: Token::SQMember, .. }, "variable" => SpannedToken { token: Token::Variable, .. }, "bare" => SpannedToken { token: Token::Bare, .. }, "dqstring" => SpannedToken { token: Token::DQString, .. }, diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 77c0b7ba8e..cb40b4f0b8 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.17.0" -// sha256: f1722e94b575b555d0b256de7fbf9e994068cc397fab85faa22717fb778ca4 +// sha256: ebcd72b764daf3e88a462534cd5f3f51fb424dd095904c6b2cde9368af95387 #![allow(unused)] use std::str::FromStr; use crate::parser::ast::*; @@ -12,7 +12,7 @@ extern crate lalrpop_util as __lalrpop_util; use self::__lalrpop_util::state_machine as __state_machine; #[cfg_attr(rustfmt, rustfmt_skip)] -mod __parse__Pipeline { +mod __parse__Call { #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens)] use std::str::FromStr; @@ -29,223 +29,202 @@ mod __parse__Pipeline { pub enum __Symbol<'input> { Variant0(SpannedToken<'input>), - Variant1(::std::vec::Vec>), - Variant2(String), - Variant3(::std::vec::Vec), - Variant4(ParsedCommand), - Variant5(::std::vec::Vec), - Variant6(Expression), - Variant7(BarePath), - Variant8(::std::vec::Vec), - Variant9(Flag), - Variant10(i64), - Variant11(Operator), - Variant12(Pipeline), - Variant13(Leaf), + Variant1(Expression), + Variant2(::std::vec::Vec), + Variant3(BarePath), + Variant4(Flag), + Variant5(i64), + Variant6(String), + Variant7(Operator), + Variant8(Pipeline), } const __ACTION: &'static [i8] = &[ // State 0 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 1 - 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 0, 0, 29, -19, 0, + 0, 11, 12, 0, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 2 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, 0, -22, 0, -22, 0, -22, 0, 0, -22, 0, -22, // 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, // State 4 - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 33, -14, -14, 0, -14, -14, 0, 0, -14, -14, -14, + 0, 11, 12, 0, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 5 - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 0, -53, -53, 0, 0, -53, -53, -53, + -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, 0, -30, 0, -30, 0, -30, 29, 0, -30, 0, -30, // State 6 - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, -45, 0, 0, -45, -45, -45, + -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, 0, -21, 0, -21, 0, -21, 0, -21, 0, 0, -21, 0, -21, // State 7 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, -29, 0, 0, -29, 0, -29, // State 8 - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, -54, 0, 0, -54, -54, -54, + -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, 0, -31, 0, -31, 0, -31, 0, 0, -31, 0, -31, // State 9 - 35, -24, -24, 0, -24, -24, 36, 37, 38, 39, 40, 0, -24, -24, 0, -24, -24, 0, 0, -24, -24, 0, + -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, 0, -32, 0, -32, 0, -32, 0, 0, -32, 0, -32, // State 10 - 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 0, 0, 29, -20, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, // State 11 - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, 0, -46, -46, 0, -46, -46, 0, 0, -46, -46, -46, + 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 12 - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, -30, 42, 0, -30, -30, -30, + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, 0, -11, 0, -11, 0, -11, 0, -11, 0, 0, -11, 0, -11, // State 13 - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, -13, 0, 0, -13, -13, -13, + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, 0, -52, 0, -52, 0, -52, 0, 0, -52, 0, -52, // State 14 - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, -12, 0, 0, -12, -12, -12, + -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, -28, -28, 0, -28, 0, -28, // State 15 - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, -22, 0, 0, -22, -22, -22, + -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, 0, -51, 0, -51, 0, -51, 0, 0, -51, 0, -51, // State 16 - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, -23, 0, 0, -23, -23, -23, + 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 17 - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, -29, 0, 0, -29, -29, -29, + 42, -19, -19, -19, -19, -19, 43, 44, 45, 46, 47, 0, -19, 0, -19, 0, -19, 0, -19, 0, 0, -19, 0, -19, // State 18 - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, -31, 0, 0, -31, -31, -31, + -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, 0, -10, 0, -10, 0, 0, -10, 0, -10, // State 19 - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, -32, 0, 0, -32, -32, -32, + 0, 0, 0, -47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -47, // State 20 - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 44, -44, -44, 0, -44, -44, 0, 0, -44, -44, -44, + 0, 11, 12, -46, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, -46, // State 21 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, + -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 0, -9, 0, -9, 0, -9, 0, -9, 0, 0, -9, 0, -9, // State 22 - 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 0, 0, 29, 0, 0, + 0, -20, -20, -20, -20, -20, 0, 0, 0, 0, 0, 0, -20, 0, -20, 0, -20, 0, -20, 0, 0, -20, 0, -20, // State 23 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17, // State 24 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 25 - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, -50, 0, 0, -50, -50, -50, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 26 - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, -28, -28, 0, -28, -28, -28, + 0, 11, 12, -46, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, -46, // State 27 - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, -49, 0, 0, -49, -49, -49, + 0, 0, 0, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -15, // State 28 - 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 0, 0, 29, 0, 0, + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 0, -53, 0, -53, 0, -53, 0, -53, 0, 0, -53, 0, -53, // State 29 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, + -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, 0, -54, 0, -54, 0, -54, 0, 0, -54, 0, -54, // State 30 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 42, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 31 - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 55, -15, -15, 0, -15, -15, 0, 0, -15, -15, -15, + -10, 11, 12, 54, 25, 26, -10, -10, -10, -10, -10, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 32 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 33 - 0, 22, 23, 0, 24, 25, 0, 0, 0, 0, 0, 0, 5, 26, 0, 27, 28, 0, 0, 29, 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, // State 34 - 0, -36, -36, 0, -36, -36, 0, 0, 0, 0, 0, 0, -36, -36, 0, -36, -36, 0, 0, -36, 0, 0, + -9, 11, 12, 0, 25, 26, -9, -9, -9, -9, -9, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 35 - 0, -37, -37, 0, -37, -37, 0, 0, 0, 0, 0, 0, -37, -37, 0, -37, -37, 0, 0, -37, 0, 0, + -10, 11, 12, 0, 25, 26, -10, -10, -10, -10, -10, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 57, // State 36 - 0, -39, -39, 0, -39, -39, 0, 0, 0, 0, 0, 0, -39, -39, 0, -39, -39, 0, 0, -39, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -50, // State 37 - 0, -35, -35, 0, -35, -35, 0, 0, 0, 0, 0, 0, -35, -35, 0, -35, -35, 0, 0, -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, -49, // State 38 - 0, -38, -38, 0, -38, -38, 0, 0, 0, 0, 0, 0, -38, -38, 0, -38, -38, 0, 0, -38, 0, 0, + -9, 11, 12, 0, 25, 26, -9, -9, -9, -9, -9, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, -48, // State 39 - 0, -40, -40, 0, -40, -40, 0, 0, 0, 0, 0, 0, -40, -40, 0, -40, -40, 0, 0, -40, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, // State 40 - 0, -25, -25, 0, -25, -25, 0, 0, 0, 0, 0, 0, -25, -25, 0, -25, -25, 0, 0, -25, -25, 0, + 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, 0, // State 41 - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, -51, 0, 0, -51, -51, -51, + 0, -37, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, 0, 0, -37, 0, 0, // State 42 - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 58, -43, -43, 0, -43, -43, 0, 0, -43, -43, -43, + 0, -38, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, 0, 0, -38, 0, 0, // State 43 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 61, 0, 28, 0, 0, 0, 0, 0, + 0, -40, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, 0, 0, -40, 0, 0, // State 44 - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, -52, 0, 0, -52, -52, -52, + 0, -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, 0, 0, -36, 0, 0, // State 45 - 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -39, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, 0, 0, -39, 0, 0, // State 46 - 35, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -41, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, 0, 0, -41, 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, + 0, 11, 12, -18, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, -18, // State 48 - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, -26, 0, 0, -26, -26, -26, + 0, -19, -19, -19, -19, -19, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, -19, 0, -19, 0, 0, -19, 0, -19, // State 49 - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, -27, 0, 0, -27, -27, -27, + 0, -7, -7, -7, -7, -7, 0, 0, 0, 0, 0, 0, -7, 0, -7, 0, -7, 0, -7, 0, 0, -7, 0, -7, // State 50 - -53, 0, 0, 0, 0, 0, -53, -53, -53, -53, -53, -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 0, -26, -26, -26, -26, -26, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, 0, 0, -26, 0, -26, // State 51 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, + 0, -27, -27, -27, -27, -27, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, 0, 0, -27, 0, -27, // State 52 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 12, -16, 25, 26, 0, 0, 0, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 0, 17, 0, -16, // State 53 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, + -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 0, -24, 0, -24, 0, -24, 0, -24, 0, 0, -24, 0, -24, // State 54 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, + -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 0, -25, 0, -25, 0, -25, 0, -25, 0, 0, -25, 0, -25, // State 55 - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, 0, 0, -4, -4, -4, + -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 0, -23, 0, -23, 0, -23, 0, -23, 0, 0, -23, 0, -23, // State 56 - 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, + -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, -14, 0, 0, -14, 0, -14, // State 57 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 61, 0, 28, 0, 0, 0, 0, 0, + -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, 0, -13, 0, -13, 0, -13, 0, 0, -13, 0, -13, // State 58 - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, 0, -7, -7, 0, 0, -7, -7, -7, + 0, 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -12, // State 59 - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, 0, -34, -34, 0, 0, -34, -34, -34, - // State 60 - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, 0, -33, -33, 0, 0, -33, -33, -33, - // State 61 - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, 0, -42, -42, 0, 0, -42, -42, -42, - // State 62 - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, 0, -41, -41, 0, 0, -41, -41, -41, - // State 63 - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, -17, 0, 0, -17, -17, -17, - // State 64 - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, -18, 0, 0, -18, -18, -18, - // State 65 - 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, 0, 0, -5, -5, -5, - // State 67 - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 0, -8, -8, 0, 0, -8, -8, -8, + 0, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, 0, 0, -8, 0, -8, ]; const __EOF_ACTION: &'static [i8] = &[ // State 0 0, // State 1 - -19, + 0, // State 2 - -47, + -22, // State 3 -55, // State 4 - -14, + 0, // State 5 - -53, - // State 6 - -45, - // State 7 - -21, - // State 8 - -54, - // State 9 - -24, - // State 10 - -20, - // State 11 - -46, - // State 12 -30, - // State 13 - -13, - // State 14 - -12, - // State 15 - -22, - // State 16 - -23, - // State 17 + // State 6 + -21, + // State 7 -29, - // State 18 + // State 8 -31, - // State 19 + // State 9 -32, + // State 10 + 0, + // State 11 + 0, + // State 12 + -11, + // State 13 + -52, + // State 14 + -28, + // State 15 + -51, + // State 16 + 0, + // State 17 + -19, + // State 18 + -10, + // State 19 + -47, // State 20 - -44, + -46, // State 21 - 0, + -9, // State 22 - 0, + -20, // State 23 - 0, + -17, // State 24 0, // State 25 - -50, - // State 26 - -28, - // State 27 - -49, - // State 28 0, + // State 26 + -46, + // State 27 + -15, + // State 28 + -53, // State 29 - -48, + -54, // State 30 0, // State 31 - -15, + 0, // State 32 0, // State 33 @@ -263,199 +242,167 @@ mod __parse__Pipeline { // State 39 0, // State 40 - -25, + 0, // State 41 - -51, + 0, // State 42 - -43, + 0, // State 43 0, // State 44 - -52, + 0, // State 45 0, // State 46 0, // State 47 - 0, - // State 48 - -26, - // State 49 - -27, - // State 50 - 0, - // State 51 - 0, - // State 52 - 0, - // State 53 - -10, - // State 54 - 0, - // State 55 - -4, - // State 56 - -16, - // State 57 - 0, - // State 58 - -7, - // State 59 - -34, - // State 60 - -33, - // State 61 - -42, - // State 62 - -41, - // State 63 - -17, - // State 64 -18, - // State 65 - -11, - // State 66 - -5, - // State 67 + // State 48 + -19, + // State 49 + -7, + // State 50 + -26, + // State 51 + -27, + // State 52 + -16, + // State 53 + -24, + // State 54 + -25, + // State 55 + -23, + // State 56 + -14, + // State 57 + -13, + // State 58 + -12, + // State 59 -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, 2, 0, 3, 4, 0, 5, 0, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 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, 21, 0, + 0, 0, 0, 0, 0, 18, 19, 20, 3, 0, 21, 22, 23, 6, 7, 0, 0, 0, 0, 24, 0, 8, 9, 10, 0, 0, // State 2 - 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, // State 4 - 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, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 19, 20, 3, 0, 27, 22, 23, 6, 7, 0, 0, 0, 0, 28, 0, 8, 9, 10, 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, + 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 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, + 0, 0, 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 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 9 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 10 - 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 9, 0, 41, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 21, 0, + 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 32, 33, 3, 34, 0, 35, 0, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 0, 0, // State 12 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 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, + 0, 0, 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 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 15 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 16 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 36, 37, 3, 38, 0, 39, 0, 6, 7, 0, 0, 0, 0, 0, 40, 8, 9, 10, 0, 0, // State 17 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 18 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 20 - 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 49, 19, 0, 3, 0, 50, 22, 23, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 0, 0, // State 21 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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, 6, 7, 46, 9, 0, 47, 0, 12, 13, 48, 0, 0, 15, 16, 17, 0, 18, 19, 20, 21, 0, + 0, 0, 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, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 24 - 0, 0, 0, 0, 0, 0, 0, 0, 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, 51, 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, + 0, 0, 0, 0, 0, 0, 52, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 53, 49, 19, 0, 3, 0, 50, 22, 23, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 0, 0, // State 27 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 28 - 0, 0, 0, 0, 0, 0, 0, 51, 7, 52, 9, 0, 47, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 21, 0, + 0, 0, 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 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, + 0, 0, 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, 2, 0, 0, 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, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 31 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 19, 20, 3, 0, 21, 22, 23, 6, 7, 0, 0, 0, 0, 24, 0, 8, 9, 10, 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, + 0, 0, 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, 6, 7, 0, 9, 0, 57, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 21, 0, + 0, 0, 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 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, 18, 19, 20, 3, 0, 27, 22, 23, 6, 7, 0, 0, 0, 0, 28, 0, 8, 9, 10, 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, 18, 19, 20, 3, 0, 21, 22, 23, 6, 7, 0, 0, 0, 0, 24, 0, 8, 9, 10, 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, + 0, 0, 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 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 38 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 19, 20, 3, 0, 27, 22, 23, 6, 7, 0, 0, 0, 0, 28, 0, 8, 9, 10, 0, 0, // State 39 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 40 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 59, 19, 0, 3, 0, 0, 22, 0, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 0, 0, // 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, + 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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, 59, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 45 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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, 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, // 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, 49, 19, 0, 3, 0, 60, 22, 23, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 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, + 0, 0, 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 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 50 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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, 2, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 49, 19, 0, 3, 0, 60, 22, 23, 6, 7, 0, 0, 0, 0, 0, 0, 8, 9, 10, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, + 0, 0, 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 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 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 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 57 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 58 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, - // State 62 - 0, 0, 0, 0, 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 63 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - // 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, - // 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, - // 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, + 0, 0, 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] = &[ @@ -472,9 +419,11 @@ mod __parse__Pipeline { r###"">=""###, r###""???.""###, r###""bare""###, + r###""dqmember""###, r###""dqstring""###, r###""member""###, r###""num""###, + r###""sqmember""###, r###""sqstring""###, r###""unit""###, r###""variable""###, @@ -482,7 +431,7 @@ mod __parse__Pipeline { r###""|""###, r###""}""###, ]; - __ACTION[(__state * 22)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { + __ACTION[(__state * 24)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { if state == 0 { None } else { @@ -503,7 +452,7 @@ mod __parse__Pipeline { type Token = SpannedToken<'input>; type TokenIndex = usize; type Symbol = __Symbol<'input>; - type Success = Pipeline; + type Success = Expression; type StateIndex = i8; type Action = i8; type ReduceIndex = i8; @@ -526,12 +475,12 @@ mod __parse__Pipeline { #[inline] fn action(&self, state: i8, integer: usize) -> i8 { - __ACTION[(state as usize) * 22 + integer] + __ACTION[(state as usize) * 24 + integer] } #[inline] fn error_action(&self, state: i8) -> i8 { - __ACTION[(state as usize) * 22 + (22 - 1)] + __ACTION[(state as usize) * 24 + (24 - 1)] } #[inline] @@ -541,7 +490,7 @@ mod __parse__Pipeline { #[inline] fn goto(&self, state: i8, nt: usize) -> i8 { - __GOTO[(state as usize) * 28 + nt] - 1 + __GOTO[(state as usize) * 26 + nt] - 1 } fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol { @@ -606,15 +555,17 @@ mod __parse__Pipeline { SpannedToken { token: Token::OpGte, .. } if true => Some(10), SpannedToken { token: Token::PathDot, .. } if true => Some(11), SpannedToken { token: Token::Bare, .. } if true => Some(12), - 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::SQString, .. } if true => Some(16), - SpannedToken { token: Token::Unit, .. } 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), - SpannedToken { token: Token::CloseBrace, .. } if true => Some(21), + SpannedToken { token: Token::SQMember, .. } if true => Some(13), + SpannedToken { token: Token::DQString, .. } if true => Some(14), + SpannedToken { token: Token::Member, .. } if true => Some(15), + SpannedToken { token: Token::Num, .. } if true => Some(16), + SpannedToken { token: Token::SQMember, .. } if true => Some(17), + SpannedToken { token: Token::SQString, .. } if true => Some(18), + SpannedToken { token: Token::Unit, .. } if true => Some(19), + SpannedToken { token: Token::Variable, .. } if true => Some(20), + SpannedToken { token: Token::OpenBrace, .. } if true => Some(21), + SpannedToken { token: Token::Pipe, .. } if true => Some(22), + SpannedToken { token: Token::CloseBrace, .. } if true => Some(23), _ => None, } } @@ -680,38 +631,46 @@ mod __parse__Pipeline { _ => unreachable!(), }, 13 => match __token { - __tok @ SpannedToken { token: Token::DQString, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::SQMember, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 14 => match __token { - __tok @ SpannedToken { token: Token::Member, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::DQString, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 15 => match __token { - __tok @ SpannedToken { token: Token::Num, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Member, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 16 => match __token { - __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Num, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 17 => match __token { - __tok @ SpannedToken { token: Token::Unit, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::SQMember, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 18 => match __token { - __tok @ SpannedToken { token: Token::Variable, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 19 => match __token { - __tok @ SpannedToken { token: Token::OpenBrace, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Unit, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 20 => match __token { - __tok @ SpannedToken { token: Token::Pipe, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Variable, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 21 => match __token { + __tok @ SpannedToken { token: Token::OpenBrace, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 22 => match __token { + __tok @ SpannedToken { token: Token::Pipe, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 23 => match __token { __tok @ SpannedToken { token: Token::CloseBrace, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, @@ -758,62 +717,62 @@ mod __parse__Pipeline { } 5 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 3, } } 6 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 4, } } 7 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, + states_to_pop: 2, nonterminal_produced: 4, } } 8 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 5, } } 9 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 6, + states_to_pop: 1, + nonterminal_produced: 5, } } 10 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, + states_to_pop: 1, nonterminal_produced: 6, } } 11 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, + states_to_pop: 3, nonterminal_produced: 7, } } 12 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 7, + states_to_pop: 3, + nonterminal_produced: 8, } } 13 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, + states_to_pop: 3, nonterminal_produced: 8, } } 14 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, - nonterminal_produced: 8, + nonterminal_produced: 9, } } 15 => { @@ -824,233 +783,2627 @@ mod __parse__Pipeline { } 16 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 10, + states_to_pop: 2, + nonterminal_produced: 9, } } 17 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 3, - nonterminal_produced: 10, + nonterminal_produced: 9, } } 18 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 11, + nonterminal_produced: 10, } } 19 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 11, + states_to_pop: 1, + nonterminal_produced: 10, } } 20 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 11, } } 21 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 12, + nonterminal_produced: 11, } } 22 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 12, + states_to_pop: 3, + nonterminal_produced: 11, } } 23 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 13, + states_to_pop: 3, + nonterminal_produced: 11, } } 24 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 13, + states_to_pop: 3, + nonterminal_produced: 11, } } 25 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, - nonterminal_produced: 14, + nonterminal_produced: 12, } } 26 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, - nonterminal_produced: 14, + nonterminal_produced: 12, } } 27 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 15, + nonterminal_produced: 13, } } 28 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 14, } } 29 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 14, } } 30 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 14, } } 31 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 16, + nonterminal_produced: 14, } } 32 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 17, + nonterminal_produced: 15, } } 33 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 17, + nonterminal_produced: 15, } } 34 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 15, } } 35 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 16, } } 36 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 16, } } 37 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 16, } } 38 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 16, } } 39 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 18, + nonterminal_produced: 16, } } 40 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 19, + states_to_pop: 1, + nonterminal_produced: 16, } } 41 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, - nonterminal_produced: 19, + states_to_pop: 1, + nonterminal_produced: 17, } } 42 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, - nonterminal_produced: 20, + nonterminal_produced: 17, } } 43 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 21, + nonterminal_produced: 18, } } 44 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 21, + nonterminal_produced: 18, } } 45 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 21, + nonterminal_produced: 19, } } 46 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 19, } } 47 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 22, + states_to_pop: 1, + nonterminal_produced: 20, } } 48 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 20, } } 49 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 23, + nonterminal_produced: 20, } } 50 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 24, + states_to_pop: 1, + nonterminal_produced: 21, } } 51 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 25, + states_to_pop: 1, + nonterminal_produced: 21, } } 52 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 26, + states_to_pop: 2, + nonterminal_produced: 22, } } 53 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 26, + states_to_pop: 2, + nonterminal_produced: 23, } } 54 => __state_machine::SimulatedReduce::Accept, + 55 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 25, + } + } + _ => panic!("invalid reduction index {}", __reduce_index) + } + } + pub struct CallParser { + _priv: (), + } + + impl CallParser { + pub fn new() -> CallParser { + CallParser { + _priv: (), + } + } + + #[allow(dead_code)] + pub fn parse< + 'input, + __TOKEN: __ToTriple<'input, >, + __TOKENS: IntoIterator, + >( + &self, + __tokens0: __TOKENS, + ) -> Result, ShellError>> + { + let __tokens = __tokens0.into_iter(); + let mut __tokens = __tokens.map(|t| __ToTriple::to_triple(t)); + let __r = __state_machine::Parser::drive( + __StateMachine { + __phantom: ::std::marker::PhantomData::<(&())>, + }, + __tokens, + ); + __r + } + } + pub(crate) fn __reduce< + '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 ())>, + ) -> Option, ShellError>>> + { + let (__pop_states, __nonterminal) = match __action { + 0 => { + __reduce0(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 1 => { + __reduce1(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 2 => { + __reduce2(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 3 => { + __reduce3(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 4 => { + __reduce4(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 5 => { + __reduce5(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 6 => { + __reduce6(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 7 => { + __reduce7(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 8 => { + __reduce8(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 9 => { + __reduce9(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 10 => { + __reduce10(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 11 => { + __reduce11(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 12 => { + __reduce12(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 13 => { + __reduce13(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 14 => { + __reduce14(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 15 => { + __reduce15(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 16 => { + __reduce16(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 17 => { + __reduce17(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 18 => { + __reduce18(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 19 => { + __reduce19(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 20 => { + __reduce20(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 21 => { + __reduce21(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 22 => { + __reduce22(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 23 => { + __reduce23(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 24 => { + __reduce24(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 25 => { + __reduce25(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 26 => { + __reduce26(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 27 => { + __reduce27(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 28 => { + __reduce28(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 29 => { + __reduce29(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 30 => { + __reduce30(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 31 => { + __reduce31(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 32 => { + __reduce32(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 33 => { + __reduce33(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 34 => { + __reduce34(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 35 => { + __reduce35(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 36 => { + __reduce36(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 37 => { + __reduce37(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 38 => { + __reduce38(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 39 => { + __reduce39(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 40 => { + __reduce40(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 41 => { + __reduce41(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 42 => { + __reduce42(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 43 => { + __reduce43(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 44 => { + __reduce44(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 45 => { + __reduce45(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 46 => { + __reduce46(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 47 => { + __reduce47(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 48 => { + __reduce48(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 49 => { + __reduce49(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 50 => { + __reduce50(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 51 => { + __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 => { + // __Call = Call => ActionFn(1); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action1::<>(__sym0); + return Some(Ok(__nt)); + } + 55 => { + __reduce55(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + _ => panic!("invalid action code {}", __action) + }; + let __states_len = __states.len(); + __states.truncate(__states_len - __pop_states); + let __state = *__states.last().unwrap() as usize; + let __next_state = __GOTO[__state * 26 + __nonterminal] - 1; + __states.push(__next_state); + None + } + fn __pop_Variant3< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, BarePath, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant3(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant1< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, Expression, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant1(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant4< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, Flag, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant4(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant7< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, Operator, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant7(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant8< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, Pipeline, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant8(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant0< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, SpannedToken<'input>, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant0(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant6< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, String, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant6(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant5< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, i64, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant5(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant2< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, ::std::vec::Vec, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant2(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + pub(crate) fn __reduce0< + '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) + { + // ("|" ) = "|", PipelineElement => ActionFn(52); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action52::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 0) + } + pub(crate) fn __reduce1< + '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) + { + // ("|" )* = => ActionFn(50); + 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::__action50::<>(&__start, &__end); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (0, 1) + } + pub(crate) fn __reduce2< + '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) + { + // ("|" )* = ("|" )+ => ActionFn(51); + let __sym0 = __pop_Variant2(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action51::<>(__sym0); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (1, 1) + } + pub(crate) fn __reduce3< + '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) + { + // ("|" )+ = "|", PipelineElement => ActionFn(55); + 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); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (2, 2) + } + pub(crate) fn __reduce4< + '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) + { + // ("|" )+ = ("|" )+, "|", PipelineElement => ActionFn(56); + 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::__action56::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (3, 2) + } + pub(crate) fn __reduce5< + '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) + { + // () = CallArgument => ActionFn(49); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action49::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 3) + } + pub(crate) fn __reduce6< + '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) + { + // ()+ = CallArgument => ActionFn(59); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action59::<>(__sym0); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (1, 4) + } + pub(crate) fn __reduce7< + '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) + { + // ()+ = ()+, CallArgument => ActionFn(60); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant2(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action60::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (2, 4) + } + pub(crate) fn __reduce8< + '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) + { + // ArgumentExpression = Expression => ActionFn(21); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action21::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 5) + } + pub(crate) fn __reduce9< + '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) + { + // ArgumentExpression = Bare => ActionFn(22); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action22::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 5) + } + pub(crate) fn __reduce10< + '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) + { + // Bare = "bare" => ActionFn(30); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action30::<>(__sym0); + __symbols.push((__start, __Symbol::Variant3(__nt), __end)); + (1, 6) + } + pub(crate) fn __reduce11< + '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) + { + // Binary = ArgumentExpression, Operator, ArgumentExpression => ActionFn(13); + let __sym2 = __pop_Variant1(__symbols); + let __sym1 = __pop_Variant7(__symbols); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action13::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 7) + } + pub(crate) fn __reduce12< + '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) + { + // Block = "{", SingleExpression, "}" => ActionFn(14); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action14::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 8) + } + pub(crate) fn __reduce13< + '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) + { + // Block = "{", Bare, "}" => ActionFn(15); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant3(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action15::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 8) + } + pub(crate) fn __reduce14< + '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) + { + // Call = Expression, SingleCallArgument => ActionFn(9); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action9::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 9) + } + pub(crate) fn __reduce15< + '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) + { + // Call = Expression, CallArgument, ()+ => ActionFn(10); + let __sym2 = __pop_Variant2(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action10::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 9) + } + pub(crate) fn __reduce16< + '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) + { + // Call = Bare, SingleCallArgument => ActionFn(11); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action11::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 9) + } + pub(crate) fn __reduce17< + '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) + { + // Call = Bare, CallArgument, ()+ => ActionFn(12); + let __sym2 = __pop_Variant2(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action12::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 9) + } + pub(crate) fn __reduce18< + '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) + { + // CallArgument = ArgumentExpression => ActionFn(23); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action23::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 10) + } + pub(crate) fn __reduce19< + '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) + { + // CallArgument = Flag => ActionFn(24); + let __sym0 = __pop_Variant4(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action24::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 10) + } + pub(crate) fn __reduce20< + '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) + { + // Expression = LeafExpression => ActionFn(16); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action16::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 11) + } + pub(crate) fn __reduce21< + '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) + { + // Expression = Block => ActionFn(17); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action17::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 11) + } + pub(crate) fn __reduce22< + '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) + { + // Expression = "(", Call, ")" => ActionFn(18); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action18::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) + } + pub(crate) fn __reduce23< + '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) + { + // Expression = "(", Bare, ")" => ActionFn(19); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant3(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action19::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) + } + pub(crate) fn __reduce24< + '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) + { + // Expression = "(", Binary, ")" => ActionFn(20); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym2.2.clone(); + let __nt = super::__action20::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) + } + pub(crate) fn __reduce25< + '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) + { + // Flag = "-", Bare => ActionFn(44); + let __sym1 = __pop_Variant3(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action44::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant4(__nt), __end)); + (2, 12) + } + pub(crate) fn __reduce26< + '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) + { + // Flag = "--", Bare => ActionFn(45); + let __sym1 = __pop_Variant3(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action45::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant4(__nt), __end)); + (2, 12) + } + pub(crate) fn __reduce27< + '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) + { + // Int = "num" => ActionFn(40); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action40::<>(__sym0); + __symbols.push((__start, __Symbol::Variant5(__nt), __end)); + (1, 13) + } + pub(crate) fn __reduce28< + '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) + { + // LeafExpression = String => ActionFn(5); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action5::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) + } + pub(crate) fn __reduce29< + '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) + { + // LeafExpression = Int => ActionFn(6); + let __sym0 = __pop_Variant5(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action6::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) + } + pub(crate) fn __reduce30< + '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) + { + // LeafExpression = UnitsNum => ActionFn(7); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action7::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) + } + pub(crate) fn __reduce31< + '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) + { + // LeafExpression = Var => ActionFn(8); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action8::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) + } + pub(crate) fn __reduce32< + '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) + { + // Member = "member" => ActionFn(31); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action31::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) + } + pub(crate) fn __reduce33< + '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) + { + // Member = "dqmember" => ActionFn(32); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action32::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) + } + pub(crate) fn __reduce34< + '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) + { + // Member = "sqmember" => ActionFn(33); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action33::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) + } + pub(crate) fn __reduce35< + '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) + { + // Operator = "==" => ActionFn(34); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action34::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce36< + '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) + { + // Operator = "!=" => 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::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce37< + '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) + { + // Operator = "<" => ActionFn(36); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action36::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce38< + '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) + { + // Operator = ">" => ActionFn(37); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action37::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce39< + '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) + { + // Operator = "<=" => ActionFn(38); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action38::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce40< + '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) + { + // Operator = ">=" => ActionFn(39); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action39::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) + } + pub(crate) fn __reduce41< + '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 = PipelineElement => ActionFn(57); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action57::<>(__sym0); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (1, 17) + } + pub(crate) fn __reduce42< + '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 = PipelineElement, ("|" )+ => ActionFn(58); + let __sym1 = __pop_Variant2(__symbols); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action58::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (2, 17) + } + pub(crate) fn __reduce43< + '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) + { + // PipelineElement = Bare => ActionFn(3); + let __sym0 = __pop_Variant3(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action3::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 18) + } + pub(crate) fn __reduce44< + '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) + { + // PipelineElement = SingleExpression => ActionFn(4); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action4::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 18) + } + pub(crate) fn __reduce45< + '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) + { + // SingleCallArgument = CallArgument => ActionFn(25); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action25::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 19) + } + 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) + { + // SingleCallArgument = Binary => ActionFn(26); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action26::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 19) + } + 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) + { + // SingleExpression = Expression => ActionFn(27); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action27::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) + } + pub(crate) fn __reduce48< + '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) + { + // SingleExpression = Call => ActionFn(28); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action28::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) + } + pub(crate) fn __reduce49< + '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) + { + // SingleExpression = Binary => ActionFn(29); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action29::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) + } + pub(crate) fn __reduce50< + '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(42); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action42::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 21) + } + pub(crate) fn __reduce51< + '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 = "dqstring" => ActionFn(43); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action43::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 21) + } + 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) + { + // UnitsNum = Int, "unit" => ActionFn(41); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant5(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action41::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 22) + } + 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) + { + // Var = "$", "variable" => ActionFn(46); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action46::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 23) + } + pub(crate) fn __reduce55< + '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 = Pipeline => ActionFn(0); + let __sym0 = __pop_Variant8(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action0::<>(__sym0); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (1, 25) + } +} +pub use self::__parse__Call::CallParser; + +#[cfg_attr(rustfmt, rustfmt_skip)] +mod __parse__Pipeline { + #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens)] + + 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)] + use self::__lalrpop_util::state_machine as __state_machine; + use super::__ToTriple; + #[allow(dead_code)] + pub enum __Symbol<'input> + { + Variant0(SpannedToken<'input>), + Variant1(Expression), + Variant2(::std::vec::Vec), + Variant3(BarePath), + Variant4(Flag), + Variant5(i64), + Variant6(String), + Variant7(Operator), + Variant8(Pipeline), + } + const __ACTION: &'static [i8] = &[ + // State 0 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 1 + 24, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 2 + -10, 16, 17, 0, 37, 38, -10, -10, -10, -10, -10, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -44, 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, -50, -50, + // State 4 + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, 0, -22, 0, -22, 0, -22, 0, 0, -22, -22, -22, + // State 5 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -49, -49, + // State 6 + -9, 16, 17, 0, 37, 38, -9, -9, -9, -9, -9, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -48, -48, + // State 7 + -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, 0, -30, 0, -30, 0, -30, 41, 0, -30, -30, -30, + // State 8 + -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, 0, -21, 0, -21, 0, -21, 0, -21, 0, 0, -21, -21, -21, + // State 9 + 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 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, + // State 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -45, 0, + // State 12 + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, -29, 0, 0, -29, -29, -29, + // State 13 + -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, 0, -31, 0, -31, 0, -31, 0, 0, -31, -31, -31, + // State 14 + -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, 0, -32, 0, -32, 0, -32, 0, 0, -32, -32, -32, + // State 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, + // State 16 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 17 + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, 0, -11, 0, -11, 0, -11, 0, -11, 0, 0, -11, -11, -11, + // State 18 + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, 0, -52, 0, -52, 0, -52, 0, 0, -52, -52, -52, + // State 19 + -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, -28, -28, 0, -28, -28, -28, + // State 20 + -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, 0, -51, 0, -51, 0, -51, 0, 0, -51, -51, -51, + // State 21 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 22 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 23 + 0, -37, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, 0, 0, -37, 0, 0, + // State 24 + 0, -38, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, 0, 0, -38, 0, 0, + // State 25 + 0, -40, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, 0, 0, -40, 0, 0, + // State 26 + 0, -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, 0, 0, -36, 0, 0, + // State 27 + 0, -39, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, 0, 0, -39, 0, 0, + // State 28 + 0, -41, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, 0, 0, -41, 0, 0, + // State 29 + 24, -19, -19, -19, -19, -19, 25, 26, 27, 28, 29, 0, -19, 0, -19, 0, -19, 0, -19, 0, 0, -19, -19, -19, + // State 30 + -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 0, -10, 0, -10, 0, -10, 0, -10, 0, 0, -10, -10, -10, + // State 31 + 0, 0, 0, -47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -47, -47, + // State 32 + 0, 16, 17, -46, 37, 38, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -46, -46, + // State 33 + -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 0, -9, 0, -9, 0, -9, 0, -9, 0, 0, -9, -9, -9, + // State 34 + 0, -20, -20, -20, -20, -20, 0, 0, 0, 0, 0, 0, -20, 0, -20, 0, -20, 0, -20, 0, 0, -20, -20, -20, + // State 35 + 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17, -17, + // State 36 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 37 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 38 + 0, 16, 17, -46, 37, 38, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -46, -46, + // State 39 + 0, 0, 0, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -15, -15, + // State 40 + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 0, -53, 0, -53, 0, -53, 0, -53, 0, 0, -53, -53, -53, + // State 41 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + // State 42 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 43 + -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 0, -54, 0, -54, 0, -54, 0, -54, 0, 0, -54, -54, -54, + // State 44 + -10, 16, 17, 60, 37, 38, -10, -10, -10, -10, -10, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 45 + 0, 0, 0, 61, 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, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 47 + -9, 16, 17, 0, 37, 38, -9, -9, -9, -9, -9, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 48 + -10, 16, 17, 0, 37, 38, -10, -10, -10, -10, -10, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 63, + // State 49 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + // State 50 + 0, 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -12, -12, + // State 51 + 0, 16, 17, -18, 37, 38, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -18, -18, + // State 52 + 0, -19, -19, -19, -19, -19, 0, 0, 0, 0, 0, 0, -19, 0, -19, 0, -19, 0, -19, 0, 0, -19, -19, -19, + // State 53 + 0, -7, -7, -7, -7, -7, 0, 0, 0, 0, 0, 0, -7, 0, -7, 0, -7, 0, -7, 0, 0, -7, -7, -7, + // State 54 + 0, -26, -26, -26, -26, -26, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, 0, 0, -26, -26, -26, + // State 55 + 0, -27, -27, -27, -27, -27, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, 0, 0, -27, -27, -27, + // State 56 + 0, 16, 17, -16, 37, 38, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, -16, -16, + // State 57 + 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 20, 0, 21, 0, 0, 22, 0, 0, + // State 58 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, + // State 59 + -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 0, -24, 0, -24, 0, -24, 0, -24, 0, 0, -24, -24, -24, + // State 60 + -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 0, -25, 0, -25, 0, -25, 0, -25, 0, 0, -25, -25, -25, + // State 61 + -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 0, -23, 0, -23, 0, -23, 0, -23, 0, 0, -23, -23, -23, + // State 62 + -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, -14, 0, 0, -14, -14, -14, + // State 63 + -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, 0, -13, 0, -13, 0, -13, 0, 0, -13, -13, -13, + // State 64 + 0, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, 0, 0, -8, -8, -8, + // State 65 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, + ]; + const __EOF_ACTION: &'static [i8] = &[ + // State 0 + 0, + // State 1 + 0, + // State 2 + -44, + // State 3 + -50, + // State 4 + -22, + // State 5 + -49, + // State 6 + -48, + // State 7 + -30, + // State 8 + -21, + // State 9 + -56, + // State 10 + -42, + // State 11 + -45, + // State 12 + -29, + // State 13 + -31, + // State 14 + -32, + // State 15 + 0, + // State 16 + 0, + // State 17 + -11, + // State 18 + -52, + // State 19 + -28, + // State 20 + -51, + // State 21 + 0, + // State 22 + 0, + // State 23 + 0, + // State 24 + 0, + // State 25 + 0, + // State 26 + 0, + // State 27 + 0, + // State 28 + 0, + // State 29 + -19, + // State 30 + -10, + // State 31 + -47, + // State 32 + -46, + // State 33 + -9, + // State 34 + -20, + // State 35 + -17, + // State 36 + 0, + // State 37 + 0, + // State 38 + -46, + // State 39 + -15, + // State 40 + -53, + // State 41 + -43, + // State 42 + 0, + // State 43 + -54, + // State 44 + 0, + // State 45 + 0, + // State 46 + 0, + // State 47 + 0, + // State 48 + 0, + // State 49 + 0, + // State 50 + -12, + // State 51 + -18, + // State 52 + -19, + // State 53 + -7, + // State 54 + -26, + // State 55 + -27, + // State 56 + -16, + // State 57 + 0, + // State 58 + -4, + // State 59 + -24, + // State 60 + -25, + // State 61 + -23, + // State 62 + -14, + // State 63 + -13, + // State 64 + -8, + // State 65 + -5, + ]; + const __GOTO: &'static [i8] = &[ + // State 0 + 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 0, 7, 0, 8, 9, 0, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, + // State 1 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 2 + 0, 0, 0, 0, 0, 30, 31, 32, 5, 0, 33, 34, 35, 8, 9, 0, 0, 0, 0, 36, 0, 13, 14, 15, 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, + // 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, + // 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, + // State 6 + 0, 0, 0, 0, 0, 30, 31, 32, 5, 0, 39, 34, 35, 8, 9, 0, 0, 0, 0, 40, 0, 13, 14, 15, 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, + // State 8 + 0, 0, 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 9 + 0, 0, 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 10 + 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, + // State 11 + 0, 0, 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 12 + 0, 0, 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 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, + // State 14 + 0, 0, 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 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 16 + 0, 0, 0, 0, 0, 2, 45, 46, 5, 47, 0, 48, 0, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, + // State 17 + 0, 0, 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 18 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 19 + 0, 0, 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 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, + // State 21 + 0, 0, 0, 0, 0, 2, 49, 4, 5, 6, 0, 7, 0, 8, 9, 0, 0, 0, 0, 0, 50, 13, 14, 15, 0, 0, + // State 22 + 0, 0, 0, 0, 0, 51, 31, 0, 5, 0, 0, 34, 0, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 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, + // 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, + // 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, + // State 26 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 27 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 28 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 29 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 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, + // State 31 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 32 + 0, 0, 0, 0, 52, 53, 31, 0, 5, 0, 54, 34, 35, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, + // State 33 + 0, 0, 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 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, + // 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, + // State 36 + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 37 + 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, + // State 38 + 0, 0, 0, 0, 57, 53, 31, 0, 5, 0, 54, 34, 35, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, + // State 39 + 0, 0, 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 40 + 0, 0, 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 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, + // State 42 + 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 0, 7, 0, 8, 9, 0, 0, 0, 59, 0, 12, 13, 14, 15, 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, + // State 44 + 0, 0, 0, 0, 0, 30, 31, 32, 5, 0, 33, 34, 35, 8, 9, 0, 0, 0, 0, 36, 0, 13, 14, 15, 0, 0, + // State 45 + 0, 0, 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, + // State 47 + 0, 0, 0, 0, 0, 30, 31, 32, 5, 0, 39, 34, 35, 8, 9, 0, 0, 0, 0, 40, 0, 13, 14, 15, 0, 0, + // State 48 + 0, 0, 0, 0, 0, 30, 31, 32, 5, 0, 33, 34, 35, 8, 9, 0, 0, 0, 0, 36, 0, 13, 14, 15, 0, 0, + // State 49 + 0, 0, 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 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, + // State 51 + 0, 0, 0, 0, 0, 53, 31, 0, 5, 0, 65, 34, 35, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 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, + // 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, + // 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, + // State 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, + // State 56 + 0, 0, 0, 0, 0, 53, 31, 0, 5, 0, 65, 34, 35, 8, 9, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, + // State 57 + 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 0, 7, 0, 8, 9, 0, 0, 0, 66, 0, 12, 13, 14, 15, 0, 0, + // State 58 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 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, + // 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, + // 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, + // State 62 + 0, 0, 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 63 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 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, + // 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, + ]; + fn __expected_tokens(__state: usize) -> Vec<::std::string::String> { + const __TERMINAL: &'static [&'static str] = &[ + r###""!=""###, + r###""$""###, + r###""(""###, + r###"")""###, + r###""-""###, + r###""--""###, + r###""<""###, + r###""<=""###, + r###""==""###, + r###"">""###, + r###"">=""###, + r###""???.""###, + r###""bare""###, + r###""dqmember""###, + r###""dqstring""###, + r###""member""###, + r###""num""###, + r###""sqmember""###, + r###""sqstring""###, + r###""unit""###, + r###""variable""###, + r###""{""###, + r###""|""###, + r###""}""###, + ]; + __ACTION[(__state * 24)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { + if state == 0 { + None + } else { + Some(terminal.to_string()) + } + }).collect() + } + pub struct __StateMachine<'input> + where + { + __phantom: ::std::marker::PhantomData<(&'input ())>, + } + impl<'input> __state_machine::ParserDefinition for __StateMachine<'input> + where + { + type Location = usize; + type Error = ShellError; + type Token = SpannedToken<'input>; + type TokenIndex = usize; + type Symbol = __Symbol<'input>; + type Success = Pipeline; + type StateIndex = i8; + type Action = i8; + type ReduceIndex = i8; + type NonterminalIndex = usize; + + #[inline] + fn start_location(&self) -> Self::Location { + Default::default() + } + + #[inline] + fn start_state(&self) -> Self::StateIndex { + 0 + } + + #[inline] + fn token_to_index(&self, token: &Self::Token) -> Option { + __token_to_integer(token, ::std::marker::PhantomData::<(&())>) + } + + #[inline] + fn action(&self, state: i8, integer: usize) -> i8 { + __ACTION[(state as usize) * 24 + integer] + } + + #[inline] + fn error_action(&self, state: i8) -> i8 { + __ACTION[(state as usize) * 24 + (24 - 1)] + } + + #[inline] + fn eof_action(&self, state: i8) -> i8 { + __EOF_ACTION[state as usize] + } + + #[inline] + fn goto(&self, state: i8, nt: usize) -> i8 { + __GOTO[(state as usize) * 26 + nt] - 1 + } + + fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol { + __token_to_symbol(token_index, token, ::std::marker::PhantomData::<(&())>) + } + + fn expected_tokens(&self, state: i8) -> Vec { + __expected_tokens(state as usize) + } + + #[inline] + fn uses_error_recovery(&self) -> bool { + false + } + + #[inline] + fn error_recovery_symbol( + &self, + recovery: __state_machine::ErrorRecovery, + ) -> Self::Symbol { + panic!("error recovery not enabled for this grammar") + } + + fn reduce( + &mut self, + action: i8, + start_location: Option<&Self::Location>, + states: &mut Vec, + symbols: &mut Vec<__state_machine::SymbolTriple>, + ) -> Option<__state_machine::ParseResult> { + __reduce( + action, + start_location, + states, + symbols, + ::std::marker::PhantomData::<(&())>, + ) + } + + fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce { + __simulate_reduce(action, ::std::marker::PhantomData::<(&())>) + } + } + fn __token_to_integer< + 'input, + >( + __token: &SpannedToken<'input>, + _: ::std::marker::PhantomData<(&'input ())>, + ) -> Option + { + match *__token { + SpannedToken { token: Token::OpNeq, .. } if true => Some(0), + SpannedToken { token: Token::Dollar, .. } if true => Some(1), + SpannedToken { token: Token::OpenParen, .. } if true => Some(2), + SpannedToken { token: Token::CloseParen, .. } if true => Some(3), + SpannedToken { token: Token::Dash, .. } if true => Some(4), + SpannedToken { token: Token::DashDash, .. } if true => Some(5), + SpannedToken { token: Token::OpLt, .. } if true => Some(6), + SpannedToken { token: Token::OpLte, .. } if true => Some(7), + SpannedToken { token: Token::OpEq, .. } if true => Some(8), + SpannedToken { token: Token::OpGt, .. } if true => Some(9), + SpannedToken { token: Token::OpGte, .. } if true => Some(10), + SpannedToken { token: Token::PathDot, .. } if true => Some(11), + SpannedToken { token: Token::Bare, .. } if true => Some(12), + SpannedToken { token: Token::SQMember, .. } if true => Some(13), + SpannedToken { token: Token::DQString, .. } if true => Some(14), + SpannedToken { token: Token::Member, .. } if true => Some(15), + SpannedToken { token: Token::Num, .. } if true => Some(16), + SpannedToken { token: Token::SQMember, .. } if true => Some(17), + SpannedToken { token: Token::SQString, .. } if true => Some(18), + SpannedToken { token: Token::Unit, .. } if true => Some(19), + SpannedToken { token: Token::Variable, .. } if true => Some(20), + SpannedToken { token: Token::OpenBrace, .. } if true => Some(21), + SpannedToken { token: Token::Pipe, .. } if true => Some(22), + SpannedToken { token: Token::CloseBrace, .. } if true => Some(23), + _ => None, + } + } + fn __token_to_symbol< + 'input, + >( + __token_index: usize, + __token: SpannedToken<'input>, + _: ::std::marker::PhantomData<(&'input ())>, + ) -> __Symbol<'input> + { + match __token_index { + 0 => match __token { + __tok @ SpannedToken { token: Token::OpNeq, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 1 => match __token { + __tok @ SpannedToken { token: Token::Dollar, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 2 => match __token { + __tok @ SpannedToken { token: Token::OpenParen, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 3 => match __token { + __tok @ SpannedToken { token: Token::CloseParen, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 4 => match __token { + __tok @ SpannedToken { token: Token::Dash, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 5 => match __token { + __tok @ SpannedToken { token: Token::DashDash, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 6 => match __token { + __tok @ SpannedToken { token: Token::OpLt, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 7 => match __token { + __tok @ SpannedToken { token: Token::OpLte, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 8 => match __token { + __tok @ SpannedToken { token: Token::OpEq, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 9 => match __token { + __tok @ SpannedToken { token: Token::OpGt, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 10 => match __token { + __tok @ SpannedToken { token: Token::OpGte, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 11 => match __token { + __tok @ SpannedToken { token: Token::PathDot, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 12 => match __token { + __tok @ SpannedToken { token: Token::Bare, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 13 => match __token { + __tok @ SpannedToken { token: Token::SQMember, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 14 => match __token { + __tok @ SpannedToken { token: Token::DQString, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 15 => match __token { + __tok @ SpannedToken { token: Token::Member, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 16 => match __token { + __tok @ SpannedToken { token: Token::Num, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 17 => match __token { + __tok @ SpannedToken { token: Token::SQMember, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 18 => match __token { + __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 19 => match __token { + __tok @ SpannedToken { token: Token::Unit, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 20 => match __token { + __tok @ SpannedToken { token: Token::Variable, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 21 => match __token { + __tok @ SpannedToken { token: Token::OpenBrace, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 22 => match __token { + __tok @ SpannedToken { token: Token::Pipe, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 23 => match __token { + __tok @ SpannedToken { token: Token::CloseBrace, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + _ => unreachable!(), + } + } + fn __simulate_reduce< + 'input, + >( + __reduce_index: i8, + _: ::std::marker::PhantomData<(&'input ())>, + ) -> __state_machine::SimulatedReduce<__StateMachine<'input>> + { + match __reduce_index { + 0 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 0, + } + } + 1 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 0, + nonterminal_produced: 1, + } + } + 2 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 1, + } + } + 3 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 2, + } + } + 4 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 2, + } + } + 5 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 3, + } + } + 6 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 4, + } + } + 7 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 4, + } + } + 8 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 5, + } + } + 9 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 5, + } + } + 10 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 6, + } + } + 11 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 7, + } + } + 12 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 8, + } + } + 13 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 8, + } + } + 14 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 9, + } + } + 15 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 9, + } + } + 16 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 9, + } + } + 17 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 9, + } + } + 18 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 10, + } + } + 19 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 10, + } + } + 20 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 11, + } + } + 21 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 11, + } + } + 22 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 11, + } + } + 23 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 11, + } + } + 24 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 3, + nonterminal_produced: 11, + } + } + 25 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 12, + } + } + 26 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 12, + } + } + 27 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 13, + } + } + 28 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 14, + } + } + 29 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 14, + } + } + 30 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 14, + } + } + 31 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 14, + } + } + 32 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 15, + } + } + 33 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 15, + } + } + 34 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 15, + } + } + 35 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 36 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 37 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 38 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 39 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 40 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 16, + } + } + 41 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 17, + } + } + 42 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 17, + } + } + 43 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 18, + } + } + 44 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 18, + } + } + 45 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 19, + } + } + 46 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 19, + } + } + 47 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 20, + } + } + 48 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 20, + } + } + 49 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 20, + } + } + 50 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 21, + } + } + 51 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 21, + } + } + 52 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 22, + } + } + 53 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 23, + } + } + 54 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 24, + } + } + 55 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {}", __reduce_index) } } @@ -1260,8 +3613,11 @@ mod __parse__Pipeline { __reduce53(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) } 54 => { + __reduce54(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 55 => { // __Pipeline = Pipeline => ActionFn(0); - let __sym0 = __pop_Variant12(__symbols); + let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); let __nt = super::__action0::<>(__sym0); @@ -1272,62 +3628,29 @@ 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 * 28 + __nonterminal] - 1; + let __next_state = __GOTO[__state * 26 + __nonterminal] - 1; __states.push(__next_state); None } - fn __pop_Variant7< + fn __pop_Variant3< 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> ) -> (usize, BarePath, usize) { match __symbols.pop().unwrap() { - (__l, __Symbol::Variant7(__v), __r) => (__l, __v, __r), + (__l, __Symbol::Variant3(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } - fn __pop_Variant6< + fn __pop_Variant1< 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> ) -> (usize, Expression, usize) { match __symbols.pop().unwrap() { - (__l, __Symbol::Variant6(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant9< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, Flag, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant9(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant13< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, Leaf, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant13(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant11< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, Operator, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant11(__v), __r) => (__l, __v, __r), + (__l, __Symbol::Variant1(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } @@ -1335,21 +3658,32 @@ mod __parse__Pipeline { 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ParsedCommand, usize) + ) -> (usize, Flag, usize) { match __symbols.pop().unwrap() { (__l, __Symbol::Variant4(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } - fn __pop_Variant12< + fn __pop_Variant7< + 'input, + >( + __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> + ) -> (usize, Operator, usize) + { + match __symbols.pop().unwrap() { + (__l, __Symbol::Variant7(__v), __r) => (__l, __v, __r), + _ => panic!("symbol type mismatch") + } + } + fn __pop_Variant8< 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> ) -> (usize, Pipeline, usize) { match __symbols.pop().unwrap() { - (__l, __Symbol::Variant12(__v), __r) => (__l, __v, __r), + (__l, __Symbol::Variant8(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } @@ -1364,36 +3698,14 @@ mod __parse__Pipeline { _ => panic!("symbol type mismatch") } } - fn __pop_Variant2< + fn __pop_Variant6< 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> ) -> (usize, String, usize) { match __symbols.pop().unwrap() { - (__l, __Symbol::Variant2(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant10< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, i64, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant10(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant8< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ::std::vec::Vec, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant8(__v), __r) => (__l, __v, __r), + (__l, __Symbol::Variant6(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } @@ -1401,32 +3713,21 @@ mod __parse__Pipeline { 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ::std::vec::Vec, usize) + ) -> (usize, i64, usize) { match __symbols.pop().unwrap() { (__l, __Symbol::Variant5(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } - fn __pop_Variant1< + fn __pop_Variant2< 'input, >( __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ::std::vec::Vec>, usize) + ) -> (usize, ::std::vec::Vec, usize) { match __symbols.pop().unwrap() { - (__l, __Symbol::Variant1(__v), __r) => (__l, __v, __r), - _ => panic!("symbol type mismatch") - } - } - fn __pop_Variant3< - 'input, - >( - __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)> - ) -> (usize, ::std::vec::Vec, usize) - { - match __symbols.pop().unwrap() { - (__l, __Symbol::Variant3(__v), __r) => (__l, __v, __r), + (__l, __Symbol::Variant2(__v), __r) => (__l, __v, __r), _ => panic!("symbol type mismatch") } } @@ -1440,13 +3741,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">) = "???.", "member" => ActionFn(43); - let __sym1 = __pop_Variant0(__symbols); + // ("|" ) = "|", PipelineElement => ActionFn(52); + let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action43::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant0(__nt), __end)); + let __nt = super::__action52::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 0) } pub(crate) fn __reduce1< @@ -1459,11 +3760,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)* = => ActionFn(41); + // ("|" )* = => ActionFn(50); 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::<>(&__start, &__end); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + let __nt = super::__action50::<>(&__start, &__end); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (0, 1) } pub(crate) fn __reduce2< @@ -1476,12 +3777,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)* = ("???." <"member">)+ => ActionFn(42); - let __sym0 = __pop_Variant1(__symbols); + // ("|" )* = ("|" )+ => ActionFn(51); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action42::<>(__sym0); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + let __nt = super::__action51::<>(__sym0); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (1, 1) } pub(crate) fn __reduce3< @@ -1494,13 +3795,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)+ = "???.", "member" => ActionFn(54); - let __sym1 = __pop_Variant0(__symbols); + // ("|" )+ = "|", PipelineElement => ActionFn(55); + let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action54::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + let __nt = super::__action55::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (2, 2) } pub(crate) fn __reduce4< @@ -1513,14 +3814,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." <"member">)+ = ("???." <"member">)+, "???.", "member" => ActionFn(55); - let __sym2 = __pop_Variant0(__symbols); + // ("|" )+ = ("|" )+, "|", PipelineElement => ActionFn(56); + let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action55::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + let __nt = super::__action56::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (3, 2) } pub(crate) fn __reduce5< @@ -1533,14 +3834,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." ) = "???.", Member => ActionFn(46); - let __sym1 = __pop_Variant2(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // () = CallArgument => ActionFn(49); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action46::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (2, 3) + let __end = __sym0.2.clone(); + let __nt = super::__action49::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 3) } pub(crate) fn __reduce6< 'input, @@ -1552,14 +3852,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." )+ = "???.", Member => ActionFn(58); - let __sym1 = __pop_Variant2(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // ()+ = CallArgument => ActionFn(59); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action58::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant3(__nt), __end)); - (2, 4) + let __end = __sym0.2.clone(); + let __nt = super::__action59::<>(__sym0); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (1, 4) } pub(crate) fn __reduce7< 'input, @@ -1571,15 +3870,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("???." )+ = ("???." )+, "???.", Member => ActionFn(59); - let __sym2 = __pop_Variant2(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant3(__symbols); + // ()+ = ()+, CallArgument => ActionFn(60); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action59::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant3(__nt), __end)); - (3, 4) + let __end = __sym1.2.clone(); + let __nt = super::__action60::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant2(__nt), __end)); + (2, 4) } pub(crate) fn __reduce8< 'input, @@ -1591,14 +3889,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" ) = "|", Command => ActionFn(51); - let __sym1 = __pop_Variant4(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // ArgumentExpression = Expression => ActionFn(21); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action51::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant4(__nt), __end)); - (2, 5) + let __end = __sym0.2.clone(); + let __nt = super::__action21::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 5) } pub(crate) fn __reduce9< 'input, @@ -1610,14 +3907,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = "|", Command => ActionFn(60); - let __sym1 = __pop_Variant4(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // ArgumentExpression = Bare => ActionFn(22); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action60::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant5(__nt), __end)); - (2, 6) + let __end = __sym0.2.clone(); + let __nt = super::__action22::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 5) } pub(crate) fn __reduce10< 'input, @@ -1629,15 +3925,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = ("|" )+, "|", Command => ActionFn(61); - let __sym2 = __pop_Variant4(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant5(__symbols); + // Bare = "bare" => ActionFn(30); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action61::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant5(__nt), __end)); - (3, 6) + let __end = __sym0.2.clone(); + let __nt = super::__action30::<>(__sym0); + __symbols.push((__start, __Symbol::Variant3(__nt), __end)); + (1, 6) } pub(crate) fn __reduce11< 'input, @@ -1649,13 +3943,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Parenthesized => ActionFn(13); - let __sym0 = __pop_Variant6(__symbols); + // Binary = ArgumentExpression, Operator, ArgumentExpression => ActionFn(13); + let __sym2 = __pop_Variant1(__symbols); + let __sym1 = __pop_Variant7(__symbols); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action13::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 7) + let __end = __sym2.2.clone(); + let __nt = super::__action13::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 7) } pub(crate) fn __reduce12< 'input, @@ -1667,13 +3963,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomicExpression = Leaf => ActionFn(14); - let __sym0 = __pop_Variant6(__symbols); + // Block = "{", SingleExpression, "}" => ActionFn(14); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action14::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 7) + let __end = __sym2.2.clone(); + let __nt = super::__action14::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 8) } pub(crate) fn __reduce13< 'input, @@ -1685,13 +3983,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare" => ActionFn(56); + // Block = "{", Bare, "}" => ActionFn(15); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action56::<>(__sym0); - __symbols.push((__start, __Symbol::Variant7(__nt), __end)); - (1, 8) + let __end = __sym2.2.clone(); + let __nt = super::__action15::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 8) } pub(crate) fn __reduce14< 'input, @@ -1703,14 +4003,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare", ("???." <"member">)+ => ActionFn(57); + // Call = Expression, SingleCallArgument => ActionFn(9); let __sym1 = __pop_Variant1(__symbols); - let __sym0 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action57::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant7(__nt), __end)); - (2, 8) + let __nt = super::__action9::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 9) } pub(crate) fn __reduce15< 'input, @@ -1722,14 +4022,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BinaryExpression = Expr, Operator, Expr => ActionFn(10); - let __sym2 = __pop_Variant6(__symbols); - let __sym1 = __pop_Variant11(__symbols); - let __sym0 = __pop_Variant6(__symbols); + // Call = Expression, CallArgument, ()+ => ActionFn(10); + let __sym2 = __pop_Variant2(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant1(__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)); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 9) } pub(crate) fn __reduce16< @@ -1742,15 +4042,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", AtomicExpression, "}" => ActionFn(15); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant6(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // Call = Bare, SingleCallArgument => ActionFn(11); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action15::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (3, 10) + let __end = __sym1.2.clone(); + let __nt = super::__action11::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 9) } pub(crate) fn __reduce17< 'input, @@ -1762,15 +4061,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Block = "{", BinaryExpression, "}" => ActionFn(16); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant6(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // Call = Bare, CallArgument, ()+ => ActionFn(12); + let __sym2 = __pop_Variant2(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action16::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (3, 10) + let __nt = super::__action12::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 9) } pub(crate) fn __reduce18< 'input, @@ -1782,13 +4081,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Command = BarePath => ActionFn(3); - let __sym0 = __pop_Variant7(__symbols); + // CallArgument = ArgumentExpression => ActionFn(23); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action3::<>(__sym0); - __symbols.push((__start, __Symbol::Variant4(__nt), __end)); - (1, 11) + let __nt = super::__action23::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 10) } pub(crate) fn __reduce19< 'input, @@ -1800,14 +4099,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Command = BarePath, Expr+ => ActionFn(4); - let __sym1 = __pop_Variant8(__symbols); - let __sym0 = __pop_Variant7(__symbols); + // CallArgument = Flag => ActionFn(24); + let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action4::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant4(__nt), __end)); - (2, 11) + let __end = __sym0.2.clone(); + let __nt = super::__action24::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 10) } pub(crate) fn __reduce20< 'input, @@ -1819,14 +4117,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Command = BarePath, BinaryExpression => ActionFn(5); - let __sym1 = __pop_Variant6(__symbols); - let __sym0 = __pop_Variant7(__symbols); + // Expression = LeafExpression => ActionFn(16); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action5::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant4(__nt), __end)); - (2, 11) + let __end = __sym0.2.clone(); + let __nt = super::__action16::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 11) } pub(crate) fn __reduce21< 'input, @@ -1838,13 +4135,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathExpression => ActionFn(23); - let __sym0 = __pop_Variant6(__symbols); + // Expression = Block => ActionFn(17); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action23::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 12) + let __nt = super::__action17::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 11) } pub(crate) fn __reduce22< 'input, @@ -1856,13 +4153,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathHead => ActionFn(24); - let __sym0 = __pop_Variant6(__symbols); + // Expression = "(", Call, ")" => ActionFn(18); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action24::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 12) + let __end = __sym2.2.clone(); + let __nt = super::__action18::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) } pub(crate) fn __reduce23< 'input, @@ -1874,13 +4173,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr => ActionFn(47); - let __sym0 = __pop_Variant6(__symbols); + // Expression = "(", Bare, ")" => ActionFn(19); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant3(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action47::<>(__sym0); - __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (1, 13) + let __end = __sym2.2.clone(); + let __nt = super::__action19::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) } pub(crate) fn __reduce24< 'input, @@ -1892,14 +4193,15 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr+, Expr => ActionFn(48); - let __sym1 = __pop_Variant6(__symbols); - let __sym0 = __pop_Variant8(__symbols); + // Expression = "(", Binary, ")" => ActionFn(20); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action48::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (2, 13) + let __end = __sym2.2.clone(); + let __nt = super::__action20::<>(__sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (3, 11) } pub(crate) fn __reduce25< 'input, @@ -1911,14 +4213,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "-", BarePath => ActionFn(34); - let __sym1 = __pop_Variant7(__symbols); + // Flag = "-", Bare => ActionFn(44); + let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action34::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (2, 14) + let __nt = super::__action44::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant4(__nt), __end)); + (2, 12) } pub(crate) fn __reduce26< 'input, @@ -1930,14 +4232,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "--", BarePath => ActionFn(35); - let __sym1 = __pop_Variant7(__symbols); + // Flag = "--", Bare => ActionFn(45); + let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action35::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (2, 14) + let __nt = super::__action45::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant4(__nt), __end)); + (2, 12) } pub(crate) fn __reduce27< 'input, @@ -1949,13 +4251,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Int = "num" => ActionFn(39); + // Int = "num" => ActionFn(40); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action39::<>(__sym0); - __symbols.push((__start, __Symbol::Variant10(__nt), __end)); - (1, 15) + let __nt = super::__action40::<>(__sym0); + __symbols.push((__start, __Symbol::Variant5(__nt), __end)); + (1, 13) } pub(crate) fn __reduce28< 'input, @@ -1967,13 +4269,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = String => ActionFn(6); - let __sym0 = __pop_Variant2(__symbols); + // LeafExpression = String => ActionFn(5); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action6::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 16) + let __nt = super::__action5::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) } pub(crate) fn __reduce29< 'input, @@ -1985,13 +4287,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = Int => ActionFn(7); - let __sym0 = __pop_Variant10(__symbols); + // LeafExpression = Int => ActionFn(6); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action7::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 16) + let __nt = super::__action6::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) } pub(crate) fn __reduce30< 'input, @@ -2003,13 +4305,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = UnitsNum => ActionFn(8); - let __sym0 = __pop_Variant13(__symbols); + // LeafExpression = UnitsNum => ActionFn(7); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action8::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 16) + let __nt = super::__action7::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) } pub(crate) fn __reduce31< 'input, @@ -2021,13 +4323,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Leaf = Var => ActionFn(9); - let __sym0 = __pop_Variant6(__symbols); + // LeafExpression = Var => ActionFn(8); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action9::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 16) + let __nt = super::__action8::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 14) } pub(crate) fn __reduce32< 'input, @@ -2039,13 +4341,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = "member" => ActionFn(26); + // Member = "member" => ActionFn(31); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action26::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 17) + let __nt = super::__action31::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) } pub(crate) fn __reduce33< 'input, @@ -2057,13 +4359,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = String => ActionFn(27); - let __sym0 = __pop_Variant2(__symbols); + // Member = "dqmember" => ActionFn(32); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action27::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 17) + let __nt = super::__action32::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) } pub(crate) fn __reduce34< 'input, @@ -2075,13 +4377,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "==" => ActionFn(28); + // Member = "sqmember" => ActionFn(33); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action28::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action33::<>(__sym0); + __symbols.push((__start, __Symbol::Variant6(__nt), __end)); + (1, 15) } pub(crate) fn __reduce35< 'input, @@ -2093,13 +4395,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "!=" => ActionFn(29); + // Operator = "==" => ActionFn(34); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action29::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action34::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce36< 'input, @@ -2111,13 +4413,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<" => ActionFn(30); + // Operator = "!=" => ActionFn(35); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action30::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action35::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce37< 'input, @@ -2129,13 +4431,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">" => ActionFn(31); + // Operator = "<" => ActionFn(36); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action31::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action36::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce38< 'input, @@ -2147,13 +4449,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<=" => ActionFn(32); + // Operator = ">" => ActionFn(37); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action32::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action37::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce39< 'input, @@ -2165,13 +4467,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">=" => ActionFn(33); + // Operator = "<=" => ActionFn(38); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action33::<>(__sym0); - __symbols.push((__start, __Symbol::Variant11(__nt), __end)); - (1, 18) + let __nt = super::__action38::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce40< 'input, @@ -2183,15 +4485,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", Leaf, ")" => ActionFn(11); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant6(__symbols); + // Operator = ">=" => ActionFn(39); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action11::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (3, 19) + let __end = __sym0.2.clone(); + let __nt = super::__action39::<>(__sym0); + __symbols.push((__start, __Symbol::Variant7(__nt), __end)); + (1, 16) } pub(crate) fn __reduce41< 'input, @@ -2203,15 +4503,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Parenthesized = "(", BinaryExpression, ")" => ActionFn(12); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant6(__symbols); - let __sym0 = __pop_Variant0(__symbols); + // Pipeline = PipelineElement => ActionFn(57); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action12::<>(__sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (3, 19) + let __end = __sym0.2.clone(); + let __nt = super::__action57::<>(__sym0); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (1, 17) } pub(crate) fn __reduce42< 'input, @@ -2223,14 +4521,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathExpression = WholeExpression, ("???." )+ => ActionFn(22); - let __sym1 = __pop_Variant3(__symbols); - let __sym0 = __pop_Variant6(__symbols); + // Pipeline = PipelineElement, ("|" )+ => ActionFn(58); + let __sym1 = __pop_Variant2(__symbols); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action22::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (2, 20) + let __nt = super::__action58::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (2, 17) } pub(crate) fn __reduce43< 'input, @@ -2242,13 +4540,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = WholeExpression => ActionFn(19); - let __sym0 = __pop_Variant6(__symbols); + // PipelineElement = Bare => ActionFn(3); + let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action19::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 21) + let __nt = super::__action3::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 18) } pub(crate) fn __reduce44< 'input, @@ -2260,13 +4558,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = BarePath => ActionFn(20); - let __sym0 = __pop_Variant7(__symbols); + // PipelineElement = SingleExpression => ActionFn(4); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action20::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 21) + let __nt = super::__action4::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 18) } pub(crate) fn __reduce45< 'input, @@ -2278,13 +4576,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathHead = Flag => ActionFn(21); - let __sym0 = __pop_Variant9(__symbols); + // SingleCallArgument = CallArgument => ActionFn(25); + let __sym0 = __pop_Variant1(__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) + let __nt = super::__action25::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 19) } pub(crate) fn __reduce46< 'input, @@ -2296,13 +4594,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Pipeline = Command => ActionFn(1); - let __sym0 = __pop_Variant4(__symbols); + // SingleCallArgument = Binary => ActionFn(26); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action1::<>(__sym0); - __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (1, 22) + let __nt = super::__action26::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 19) } pub(crate) fn __reduce47< 'input, @@ -2314,14 +4612,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Pipeline = Command, ("|" )+ => ActionFn(2); - let __sym1 = __pop_Variant5(__symbols); - let __sym0 = __pop_Variant4(__symbols); + // SingleExpression = Expression => ActionFn(27); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action2::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant12(__nt), __end)); - (2, 22) + let __end = __sym0.2.clone(); + let __nt = super::__action27::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) } pub(crate) fn __reduce48< 'input, @@ -2333,13 +4630,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = "sqstring" => ActionFn(36); - let __sym0 = __pop_Variant0(__symbols); + // SingleExpression = Call => ActionFn(28); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action36::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 23) + let __nt = super::__action28::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) } pub(crate) fn __reduce49< 'input, @@ -2351,13 +4648,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = "dqstring" => ActionFn(37); - let __sym0 = __pop_Variant0(__symbols); + // SingleExpression = Binary => ActionFn(29); + let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action37::<>(__sym0); - __symbols.push((__start, __Symbol::Variant2(__nt), __end)); - (1, 23) + let __nt = super::__action29::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) } pub(crate) fn __reduce50< 'input, @@ -2369,14 +4666,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // UnitsNum = Int, "unit" => ActionFn(40); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant10(__symbols); + // String = "sqstring" => ActionFn(42); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action40::<>(__sym0, __sym1); - __symbols.push((__start, __Symbol::Variant13(__nt), __end)); - (2, 24) + let __end = __sym0.2.clone(); + let __nt = super::__action42::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 21) } pub(crate) fn __reduce51< 'input, @@ -2388,14 +4684,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Var = "$", "variable" => ActionFn(25); - let __sym1 = __pop_Variant0(__symbols); + // String = "dqstring" => ActionFn(43); 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::Variant6(__nt), __end)); - (2, 25) + let __end = __sym0.2.clone(); + let __nt = super::__action43::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 21) } pub(crate) fn __reduce52< 'input, @@ -2407,13 +4702,14 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = AtomicExpression => ActionFn(17); - let __sym0 = __pop_Variant6(__symbols); + // UnitsNum = Int, "unit" => ActionFn(41); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action17::<>(__sym0); - __symbols.push((__start, __Symbol::Variant6(__nt), __end)); - (1, 26) + let __end = __sym1.2.clone(); + let __nt = super::__action41::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 22) } pub(crate) fn __reduce53< 'input, @@ -2425,13 +4721,32 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // WholeExpression = Block => ActionFn(18); - let __sym0 = __pop_Variant6(__symbols); + // Var = "$", "variable" => ActionFn(46); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action46::<>(__sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 23) + } + pub(crate) fn __reduce54< + '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) + { + // __Call = Call => ActionFn(1); + let __sym0 = __pop_Variant1(__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) + let __nt = super::__action1::<>(__sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 24) } } pub use self::__parse__Pipeline::PipelineParser; @@ -2448,17 +4763,17 @@ fn __action0< fn __action1< 'input, >( - (_, first, _): (usize, ParsedCommand, usize), -) -> Pipeline + (_, __0, _): (usize, Expression, usize), +) -> Expression { - Pipeline::new(vec![first]) + (__0) } fn __action2< 'input, >( - (_, first, _): (usize, ParsedCommand, usize), - (_, rest, _): (usize, ::std::vec::Vec, usize), + (_, first, _): (usize, Expression, usize), + (_, rest, _): (usize, ::std::vec::Vec, usize), ) -> Pipeline { Pipeline::from_parts(first, rest) @@ -2467,61 +4782,14 @@ fn __action2< fn __action3< 'input, >( - (_, command, _): (usize, BarePath, usize), -) -> ParsedCommand + (_, __0, _): (usize, BarePath, usize), +) -> Expression { - ParsedCommand::new(command.to_string(), vec![]) + Expression::call(Expression::bare(__0), vec![]) } fn __action4< 'input, ->( - (_, command, _): (usize, BarePath, usize), - (_, expr, _): (usize, ::std::vec::Vec, usize), -) -> ParsedCommand -{ - ParsedCommand::new(command.to_string(), expr) -} - -fn __action5< - 'input, ->( - (_, command, _): (usize, BarePath, usize), - (_, expr, _): (usize, Expression, usize), -) -> ParsedCommand -{ - ParsedCommand::new(command.to_string(), vec![expr]) -} - -fn __action6< - 'input, ->( - (_, __0, _): (usize, String, usize), -) -> Expression -{ - Expression::Leaf(Leaf::String(__0)) -} - -fn __action7< - 'input, ->( - (_, __0, _): (usize, i64, usize), -) -> Expression -{ - Expression::Leaf(Leaf::Int(__0)) -} - -fn __action8< - 'input, ->( - (_, __0, _): (usize, Leaf, usize), -) -> Expression -{ - Expression::Leaf(__0) -} - -fn __action9< - 'input, >( (_, __0, _): (usize, Expression, usize), ) -> Expression @@ -2529,77 +4797,124 @@ fn __action9< __0 } +fn __action5< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + __0 +} + +fn __action6< + 'input, +>( + (_, __0, _): (usize, i64, usize), +) -> Expression +{ + Expression::leaf(Leaf::Int(__0)) +} + +fn __action7< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + __0 +} + +fn __action8< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + __0 +} + +fn __action9< + 'input, +>( + (_, expr, _): (usize, Expression, usize), + (_, rest, _): (usize, Expression, usize), +) -> Expression +{ + Expression::call(expr, vec![rest]) +} + fn __action10< 'input, +>( + (_, expr, _): (usize, Expression, usize), + (_, first, _): (usize, Expression, usize), + (_, rest, _): (usize, ::std::vec::Vec, usize), +) -> Expression +{ + Expression::call(expr, { let mut rest = rest; let mut v = vec![first]; v.append(&mut rest); v }) +} + +fn __action11< + 'input, +>( + (_, expr, _): (usize, BarePath, usize), + (_, rest, _): (usize, Expression, usize), +) -> Expression +{ + Expression::call(Expression::bare(expr), vec![rest]) +} + +fn __action12< + 'input, +>( + (_, expr, _): (usize, BarePath, usize), + (_, first, _): (usize, Expression, usize), + (_, rest, _): (usize, ::std::vec::Vec, usize), +) -> Expression +{ + Expression::call(Expression::bare(expr), { let mut v = vec![first]; let mut rest = rest; v.append(&mut rest); v }) +} + +fn __action13< + 'input, >( (_, left, _): (usize, Expression, usize), (_, op, _): (usize, Operator, usize), (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::Binary(Box::new(Binary::new(left, op, right))) -} - -fn __action11< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, SpannedToken<'input>, usize), -) -> Expression -{ - Expression::Parenthesized(Box::new(Parenthesized::new(__0))) -} - -fn __action12< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, SpannedToken<'input>, usize), -) -> Expression -{ - Expression::Parenthesized(Box::new(Parenthesized::new(__0))) -} - -fn __action13< - 'input, ->( - (_, __0, _): (usize, Expression, usize), -) -> Expression -{ - (__0) + Expression::binary(left, op, right) } fn __action14< 'input, >( + (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - (__0) + Expression::block(__0) } fn __action15< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, Expression, usize), + (_, __0, _): (usize, BarePath, usize), (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - Expression::Block(Box::new(Block::new(__0))) + Expression::block(Expression::call(Expression::bare(__0), vec![])) } fn __action16< 'input, >( - (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), - (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - Expression::Block(Box::new(Block::new(__0))) + __0 } fn __action17< @@ -2608,20 +4923,44 @@ fn __action17< (_, __0, _): (usize, Expression, usize), ) -> Expression { - (__0) + __0 } fn __action18< 'input, >( + (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), ) -> Expression { - (__0) + __0 } fn __action19< 'input, +>( + (_, _, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, BarePath, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), +) -> Expression +{ + Expression::call(Expression::bare(__0), vec![]) +} + +fn __action20< + 'input, +>( + (_, _, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, Expression, usize), + (_, _, _): (usize, SpannedToken<'input>, usize), +) -> Expression +{ + __0 +} + +fn __action21< + 'input, >( (_, __0, _): (usize, Expression, usize), ) -> Expression @@ -2629,32 +4968,13 @@ fn __action19< (__0) } -fn __action20< +fn __action22< 'input, >( (_, __0, _): (usize, BarePath, usize), ) -> Expression { - Expression::Leaf(Leaf::Bare(__0)) -} - -fn __action21< - 'input, ->( - (_, __0, _): (usize, Flag, usize), -) -> Expression -{ - Expression::Flag(__0) -} - -fn __action22< - 'input, ->( - (_, head, _): (usize, Expression, usize), - (_, tail, _): (usize, ::std::vec::Vec, usize), -) -> Expression -{ - Expression::Path(Box::new(Path::new(head, tail))) + Expression::bare(__0) } fn __action23< @@ -2663,11 +4983,20 @@ fn __action23< (_, __0, _): (usize, Expression, usize), ) -> Expression { - (__0) + __0 } fn __action24< 'input, +>( + (_, __0, _): (usize, Flag, usize), +) -> Expression +{ + Expression::flag(__0) +} + +fn __action25< + 'input, >( (_, __0, _): (usize, Expression, usize), ) -> Expression @@ -2675,17 +5004,52 @@ fn __action24< (__0) } -fn __action25< +fn __action26< 'input, >( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, Expression, usize), ) -> Expression { - Variable::from_str(__0.as_slice()) + (__0) } -fn __action26< +fn __action27< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action28< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action29< + 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action30< + 'input, +>( + (_, head, _): (usize, SpannedToken<'input>, usize), +) -> BarePath +{ + BarePath::from_token(head) +} + +fn __action31< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2694,16 +5058,25 @@ fn __action26< __0.to_string() } -fn __action27< +fn __action32< 'input, >( - (_, __0, _): (usize, String, usize), + (_, __0, _): (usize, SpannedToken<'input>, usize), ) -> String { - (__0) + __0.to_string() } -fn __action28< +fn __action33< + 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> String +{ + __0.to_string() +} + +fn __action34< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2712,7 +5085,7 @@ fn __action28< Operator::Equal } -fn __action29< +fn __action35< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2721,7 +5094,7 @@ fn __action29< Operator::NotEqual } -fn __action30< +fn __action36< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2730,7 +5103,7 @@ fn __action30< Operator::LessThan } -fn __action31< +fn __action37< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2739,7 +5112,7 @@ fn __action31< Operator::GreaterThan } -fn __action32< +fn __action38< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2748,7 +5121,7 @@ fn __action32< Operator::LessThanOrEqual } -fn __action33< +fn __action39< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2757,7 +5130,44 @@ fn __action33< Operator::GreaterThanOrEqual } -fn __action34< +fn __action40< + 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> i64 +{ + i64::from_str(__0.as_slice()).unwrap() +} + +fn __action41< + 'input, +>( + (_, num, _): (usize, i64, usize), + (_, unit, _): (usize, SpannedToken<'input>, usize), +) -> Expression +{ + Expression::leaf(Leaf::Unit(num, Unit::from_str(unit.as_slice()).unwrap())) +} + +fn __action42< + 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> Expression +{ + __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string().into() +} + +fn __action43< + 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> Expression +{ + __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string().into() +} + +fn __action44< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2767,7 +5177,7 @@ fn __action34< Flag::Shorthand(__0.to_string()) } -fn __action35< +fn __action45< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2777,109 +5187,14 @@ fn __action35< Flag::Longhand(__0.to_string()) } -fn __action36< - 'input, ->( - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> String -{ - __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string() -} - -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), -) -> BarePath -{ - BarePath::from_tokens(head, tail) -} - -fn __action39< - 'input, ->( - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> i64 -{ - i64::from_str(__0.as_slice()).unwrap() -} - -fn __action40< - 'input, ->( - (_, num, _): (usize, i64, usize), - (_, unit, _): (usize, SpannedToken<'input>, usize), -) -> Leaf -{ - Leaf::Unit(num, Unit::from_str(unit.as_slice()).unwrap()) -} - -fn __action41< - 'input, ->( - __lookbehind: &usize, - __lookahead: &usize, -) -> ::std::vec::Vec> -{ - vec![] -} - -fn __action42< - 'input, ->( - (_, v, _): (usize, ::std::vec::Vec>, usize), -) -> ::std::vec::Vec> -{ - v -} - -fn __action43< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> SpannedToken<'input> -{ - (__0) -} - -fn __action44< - 'input, ->( - (_, __0, _): (usize, String, usize), -) -> ::std::vec::Vec -{ - vec![__0] -} - -fn __action45< - 'input, ->( - (_, v, _): (usize, ::std::vec::Vec, usize), - (_, e, _): (usize, String, usize), -) -> ::std::vec::Vec -{ - { let mut v = v; v.push(e); v } -} - fn __action46< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, String, usize), -) -> String + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> Expression { - (__0) + Variable::from_str(__0.as_slice()).into() } fn __action47< @@ -2904,87 +5219,75 @@ fn __action48< fn __action49< 'input, >( - (_, __0, _): (usize, ParsedCommand, usize), -) -> ::std::vec::Vec + (_, __0, _): (usize, Expression, usize), +) -> Expression { - vec![__0] + (__0) } fn __action50< 'input, >( - (_, v, _): (usize, ::std::vec::Vec, usize), - (_, e, _): (usize, ParsedCommand, usize), -) -> ::std::vec::Vec + __lookbehind: &usize, + __lookahead: &usize, +) -> ::std::vec::Vec { - { let mut v = v; v.push(e); v } + vec![] } fn __action51< 'input, >( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, ParsedCommand, usize), -) -> ParsedCommand + (_, v, _): (usize, ::std::vec::Vec, usize), +) -> ::std::vec::Vec { - (__0) + v } fn __action52< 'input, >( - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> ::std::vec::Vec> + (_, _, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, Expression, usize), +) -> Expression { - vec![__0] + (__0) } fn __action53< 'input, >( - (_, v, _): (usize, ::std::vec::Vec>, usize), - (_, e, _): (usize, SpannedToken<'input>, usize), -) -> ::std::vec::Vec> + (_, __0, _): (usize, Expression, usize), +) -> ::std::vec::Vec { - { let mut v = v; v.push(e); v } + vec![__0] } fn __action54< 'input, >( - __0: (usize, SpannedToken<'input>, usize), - __1: (usize, SpannedToken<'input>, usize), -) -> ::std::vec::Vec> + (_, v, _): (usize, ::std::vec::Vec, usize), + (_, e, _): (usize, Expression, usize), +) -> ::std::vec::Vec { - let __start0 = __0.0.clone(); - let __end0 = __1.2.clone(); - let __temp0 = __action43( - __0, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action52( - __temp0, - ) + { let mut v = v; v.push(e); v } } fn __action55< 'input, >( - __0: (usize, ::std::vec::Vec>, usize), - __1: (usize, SpannedToken<'input>, usize), - __2: (usize, SpannedToken<'input>, usize), -) -> ::std::vec::Vec> + __0: (usize, SpannedToken<'input>, usize), + __1: (usize, Expression, usize), +) -> ::std::vec::Vec { - let __start0 = __1.0.clone(); - let __end0 = __2.2.clone(); - let __temp0 = __action43( + let __start0 = __0.0.clone(); + let __end0 = __1.2.clone(); + let __temp0 = __action52( + __0, __1, - __2, ); let __temp0 = (__start0, __temp0, __end0); __action53( - __0, __temp0, ) } @@ -2992,17 +5295,19 @@ fn __action55< fn __action56< 'input, >( - __0: (usize, SpannedToken<'input>, usize), -) -> BarePath + __0: (usize, ::std::vec::Vec, usize), + __1: (usize, SpannedToken<'input>, usize), + __2: (usize, Expression, usize), +) -> ::std::vec::Vec { - let __start0 = __0.2.clone(); - let __end0 = __0.2.clone(); - let __temp0 = __action41( - &__start0, - &__end0, + let __start0 = __1.0.clone(); + let __end0 = __2.2.clone(); + let __temp0 = __action52( + __1, + __2, ); let __temp0 = (__start0, __temp0, __end0); - __action38( + __action54( __0, __temp0, ) @@ -3011,17 +5316,17 @@ fn __action56< fn __action57< 'input, >( - __0: (usize, SpannedToken<'input>, usize), - __1: (usize, ::std::vec::Vec>, usize), -) -> BarePath + __0: (usize, Expression, usize), +) -> Pipeline { - let __start0 = __1.0.clone(); - let __end0 = __1.2.clone(); - let __temp0 = __action42( - __1, + let __start0 = __0.2.clone(); + let __end0 = __0.2.clone(); + let __temp0 = __action50( + &__start0, + &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action38( + __action2( __0, __temp0, ) @@ -3030,18 +5335,18 @@ fn __action57< fn __action58< 'input, >( - __0: (usize, SpannedToken<'input>, usize), - __1: (usize, String, usize), -) -> ::std::vec::Vec + __0: (usize, Expression, usize), + __1: (usize, ::std::vec::Vec, usize), +) -> Pipeline { - let __start0 = __0.0.clone(); + let __start0 = __1.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action46( - __0, + let __temp0 = __action51( __1, ); let __temp0 = (__start0, __temp0, __end0); - __action44( + __action2( + __0, __temp0, ) } @@ -3049,20 +5354,16 @@ fn __action58< fn __action59< 'input, >( - __0: (usize, ::std::vec::Vec, usize), - __1: (usize, SpannedToken<'input>, usize), - __2: (usize, String, usize), -) -> ::std::vec::Vec + __0: (usize, Expression, usize), +) -> ::std::vec::Vec { - let __start0 = __1.0.clone(); - let __end0 = __2.2.clone(); - let __temp0 = __action46( - __1, - __2, + let __start0 = __0.0.clone(); + let __end0 = __0.2.clone(); + let __temp0 = __action49( + __0, ); let __temp0 = (__start0, __temp0, __end0); - __action45( - __0, + __action47( __temp0, ) } @@ -3070,38 +5371,17 @@ fn __action59< 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), - __2: (usize, ParsedCommand, usize), -) -> ::std::vec::Vec + __0: (usize, ::std::vec::Vec, usize), + __1: (usize, Expression, usize), +) -> ::std::vec::Vec { let __start0 = __1.0.clone(); - let __end0 = __2.2.clone(); - let __temp0 = __action51( + let __end0 = __1.2.clone(); + let __temp0 = __action49( __1, - __2, ); let __temp0 = (__start0, __temp0, __end0); - __action50( + __action48( __0, __temp0, ) diff --git a/src/parser/registry.rs b/src/parser/registry.rs index ddccdee375..11fbcfa65b 100644 --- a/src/parser/registry.rs +++ b/src/parser/registry.rs @@ -73,6 +73,7 @@ pub struct CommandConfig { crate named: IndexMap, } +#[derive(Debug, Default)] pub struct Args { pub positional: Vec, pub named: IndexMap,