From 9a639fd27bc8bcfb23d139b48c07852a9cd49b15 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Thu, 30 May 2019 17:53:54 -0700 Subject: [PATCH 1/2] Syntax highlighting --- src/parser.rs | 2 +- src/parser/lexer.rs | 15 +++++---- src/shell/helper.rs | 81 +++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 83 insertions(+), 15 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 7fdb19be66..a009cb0d7a 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -14,7 +14,7 @@ use parser::PipelineParser; pub fn parse(input: &str, _registry: &dyn CommandRegistry) -> Result { let parser = PipelineParser::new(); - let tokens = Lexer::new(input); + let tokens = Lexer::new(input, false); match parser.parse(tokens) { Ok(val) => Ok(val), diff --git a/src/parser/lexer.rs b/src/parser/lexer.rs index 7c056a84a7..90ff7095d6 100644 --- a/src/parser/lexer.rs +++ b/src/parser/lexer.rs @@ -375,14 +375,15 @@ pub enum Token { crate struct Lexer<'source> { lexer: logos::Lexer, first: bool, - // state: LexerState, + whitespace: bool, // state: LexerState } impl Lexer<'source> { - crate fn new(source: &str) -> Lexer<'_> { + crate fn new(source: &str, whitespace: bool) -> Lexer<'_> { Lexer { first: true, lexer: logos::Logos::lexer(source), + whitespace // state: LexerState::default(), } } @@ -400,7 +401,7 @@ impl Iterator for Lexer<'source> { TopToken::Error => { return Some(Err(lex_error(&self.lexer.range(), self.lexer.source))) } - TopToken::Whitespace => return self.next(), + TopToken::Whitespace if !self.whitespace => return self.next(), other => { return spanned(other.to_token()?, self.lexer.slice(), &self.lexer.range()) } @@ -415,7 +416,7 @@ impl Iterator for Lexer<'source> { match token { TopToken::Error => return Some(Err(lex_error(&range, self.lexer.source))), - TopToken::Whitespace => return self.next(), + TopToken::Whitespace if !self.whitespace => return self.next(), other => return spanned(other.to_token()?, slice, &range), } } @@ -429,7 +430,7 @@ impl Iterator for Lexer<'source> { AfterMemberDot::Error => { return Some(Err(lex_error(&range, self.lexer.source))) } - AfterMemberDot::Whitespace => self.next(), + AfterMemberDot::Whitespace if !self.whitespace => self.next(), other => return spanned(other.to_token()?, slice, &range), } } @@ -443,7 +444,7 @@ impl Iterator for Lexer<'source> { AfterVariableToken::Error => { return Some(Err(lex_error(&range, self.lexer.source))) } - AfterVariableToken::Whitespace => self.next(), + AfterVariableToken::Whitespace if !self.whitespace => self.next(), other => return spanned(other.to_token()?, slice, &range), } @@ -508,7 +509,7 @@ mod tests { use pretty_assertions::assert_eq; fn assert_lex(source: &str, tokens: &[TestToken<'_>]) { - let lex = Lexer::new(source); + let lex = Lexer::new(source, false); let mut current = 0; let expected_tokens: Vec = tokens diff --git a/src/shell/helper.rs b/src/shell/helper.rs index 23fe3435eb..116a31d56a 100644 --- a/src/shell/helper.rs +++ b/src/shell/helper.rs @@ -1,15 +1,17 @@ use crate::shell::completer::NuCompleter; +use crate::parser::lexer::SpannedToken; use crate::prelude::*; +use ansi_term::Color; +use log::debug; use rustyline::completion::{self, Completer, FilenameCompleter}; use rustyline::error::ReadlineError; -use rustyline::highlight::{Highlighter, MatchingBracketHighlighter}; +use rustyline::highlight::Highlighter; use rustyline::hint::{Hinter, HistoryHinter}; use std::borrow::Cow::{self, Owned}; crate struct Helper { completer: NuCompleter, - highlighter: MatchingBracketHighlighter, hinter: HistoryHinter, } @@ -20,7 +22,6 @@ impl Helper { file_completer: FilenameCompleter::new(), commands, }, - highlighter: MatchingBracketHighlighter::new(), hinter: HistoryHinter {}, } } @@ -54,12 +55,78 @@ impl Highlighter for Helper { Owned("\x1b[1m".to_owned() + hint + "\x1b[m") } - fn highlight<'l>(&self, line: &'l str, pos: usize) -> Cow<'l, str> { - self.highlighter.highlight(line, pos) + fn highlight<'l>(&self, line: &'l str, _pos: usize) -> Cow<'l, str> { + let tokens = crate::parser::lexer::Lexer::new(line, true); + let tokens: Result, _> = tokens.collect(); + + match tokens { + Err(_) => Cow::Borrowed(line), + Ok(v) => { + let mut out = String::new(); + let mut iter = v.iter(); + + let mut state = State::Command; + + loop { + match iter.next() { + None => return Cow::Owned(out), + Some((start, token, end)) => { + let (style, new_state) = token_style(&token, state); + + debug!("token={:?}", token); + debug!("style={:?}", style); + debug!("new_state={:?}", new_state); + + state = new_state; + let slice = &line[*start..*end]; + let styled = style.paint(slice); + out.push_str(&styled.to_string()); + } + } + } + } + } } - fn highlight_char(&self, line: &str, pos: usize) -> bool { - self.highlighter.highlight_char(line, pos) + fn highlight_char(&self, _line: &str, _pos: usize) -> bool { + true + } +} + +#[derive(Debug)] +enum State { + Command, + Flag, + Var, + Bare, + None, +} + +fn token_style( + token: &crate::parser::lexer::SpannedToken, + state: State, +) -> (ansi_term::Style, State) { + use crate::parser::lexer::Token::*; + + match (state, &token.token) { + (State::Command, Bare) => (Color::Cyan.bold(), State::None), + (State::Command, Whitespace) => (Color::White.normal(), State::Command), + + (State::Flag, Bare) => (Color::Black.bold(), State::None), + + (State::Var, Variable) => (Color::Yellow.bold(), State::None), + + (State::Bare, Dot) => (Color::Green.normal(), State::Bare), + (State::Bare, Member) => (Color::Green.normal(), State::Bare), + + (_, Dash) | (_, DashDash) => (Color::Black.bold(), State::Flag), + (_, Dollar) => (Color::Yellow.bold(), State::Var), + (_, Bare) => (Color::Green.normal(), State::Bare), + (_, Member) => (Color::Cyan.normal(), State::None), + (_, Num) => (Color::Purple.bold(), State::None), + (_, DQString) | (_, SQString) => (Color::Green.normal(), State::None), + (_, Pipe) => (Color::White.normal(), State::Command), + _ => (Color::White.normal(), State::None), } } From 9e9c0b981154587de4806d3cb831e15f30e1fd9f Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Thu, 30 May 2019 22:45:57 -0700 Subject: [PATCH 2/2] Fix bare word `.` Addresses `git add .` --- src/evaluate/evaluator.rs | 4 + src/parser/ast.rs | 12 +- src/parser/lexer.rs | 46 ++- src/parser/parser.lalrpop | 6 +- src/parser/parser.rs | 716 +++++++++++++++++++++----------------- 5 files changed, 443 insertions(+), 341 deletions(-) diff --git a/src/evaluate/evaluator.rs b/src/evaluate/evaluator.rs index b780445e5c..5b314e87e9 100644 --- a/src/evaluate/evaluator.rs +++ b/src/evaluate/evaluator.rs @@ -20,6 +20,10 @@ crate fn evaluate_expr(expr: &ast::Expression, scope: &Scope) -> Result Ok(evaluate_leaf(l)), Expression::Parenthesized(p) => evaluate_expr(&p.expr, scope), + Expression::Flag(f) => Err(ShellError::string(format!( + "can't evaluate the flag {}", + f.print() + ))), Expression::Block(b) => evaluate_block(&b, scope), Expression::Path(p) => evaluate_path(&p, scope), Expression::Binary(b) => evaluate_binary(b, scope), diff --git a/src/parser/ast.rs b/src/parser/ast.rs index b00b2f31f3..a17a4536f0 100644 --- a/src/parser/ast.rs +++ b/src/parser/ast.rs @@ -45,6 +45,7 @@ impl FromStr for Operator { #[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq)] pub enum Expression { Leaf(Leaf), + Flag(Flag), Parenthesized(Box), Block(Box), Binary(Box), @@ -56,6 +57,7 @@ impl Expression { crate fn print(&self) -> String { match self { Expression::Leaf(l) => l.print(), + Expression::Flag(f) => f.print(), Expression::Parenthesized(p) => p.print(), Expression::Block(b) => b.print(), Expression::VariableReference(r) => r.print(), @@ -67,6 +69,7 @@ impl Expression { crate fn as_external_arg(&self) -> String { match self { Expression::Leaf(l) => l.as_external_arg(), + Expression::Flag(f) => f.as_external_arg(), Expression::Parenthesized(p) => p.as_external_arg(), Expression::Block(b) => b.as_external_arg(), Expression::VariableReference(r) => r.as_external_arg(), @@ -262,7 +265,7 @@ impl Binary { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq)] pub enum Flag { Shorthand(String), Longhand(String), @@ -270,12 +273,17 @@ pub enum Flag { impl Flag { #[allow(unused)] - fn print(&self) -> String { + crate fn print(&self) -> String { match self { Flag::Shorthand(s) => format!("-{}", s), Flag::Longhand(s) => format!("--{}", s), } } + + #[allow(unused)] + crate fn as_external_arg(&self) -> String { + self.print() + } } #[derive(new, Debug, Clone)] diff --git a/src/parser/lexer.rs b/src/parser/lexer.rs index 90ff7095d6..1b56b488c4 100644 --- a/src/parser/lexer.rs +++ b/src/parser/lexer.rs @@ -92,7 +92,7 @@ impl TopToken { Dollar => Token::Dollar, Bare => Token::Bare, Pipe => Token::Pipe, - Dot => Token::Dot, + Dot => Token::Bare, OpenBrace => Token::OpenBrace, CloseBrace => Token::CloseBrace, OpenParen => Token::OpenParen, @@ -180,7 +180,7 @@ impl AfterVariableToken { let result = match self { END => return None, - Dot => Token::Dot, + Dot => Token::PathDot, Whitespace => Token::Whitespace, Error => unreachable!("Don't call to_token with the error variant"), }; @@ -340,6 +340,7 @@ impl SpannedToken<'source> { pub enum Token { Variable, Dot, + PathDot, Member, Num, SQString, @@ -445,7 +446,6 @@ impl Iterator for Lexer<'source> { return Some(Err(lex_error(&range, self.lexer.source))) } AfterVariableToken::Whitespace if !self.whitespace => self.next(), - other => return spanned(other.to_token()?, slice, &range), } } @@ -547,6 +547,7 @@ mod tests { enum TokenDesc { Ws, Member, + PathDot, Top(TopToken), Var(VariableToken), } @@ -576,6 +577,10 @@ mod tests { TokenDesc::Ws => { SpannedToken::new(Span::new(range), self.source, Token::Whitespace) } + + TokenDesc::PathDot => { + SpannedToken::new(Span::new(range), self.source, Token::PathDot) + } } } } @@ -651,42 +656,45 @@ mod tests { #[test] fn test_tokenize_path() { - assert_lex("$var.bar", tokens![ "$" Var("var") "." Member("bar") ]); - assert_lex("$it.bar", tokens![ "$" Var("it") "." Member("bar") ]); - assert_lex("$var. bar", tokens![ "$" Var("var") "." SP Member("bar") ]); - assert_lex("$it. bar", tokens![ "$" Var("it") "." SP Member("bar") ]); + assert_lex("$var.bar", tokens![ "$" Var("var") "???." Member("bar") ]); + assert_lex("$it.bar", tokens![ "$" Var("it") "???." Member("bar") ]); + assert_lex( + "$var. bar", + tokens![ "$" Var("var") "???." SP Member("bar") ], + ); + assert_lex("$it. bar", tokens![ "$" Var("it") "???." SP Member("bar") ]); } #[test] fn test_tokenize_operator() { assert_lex( "$it.cpu > 10", - tokens![ "$" Var("it") "." Member("cpu") SP ">" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP ">" SP Num("10") ], ); assert_lex( "$it.cpu < 10", - tokens![ "$" Var("it") "." Member("cpu") SP "<" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP "<" SP Num("10") ], ); assert_lex( "$it.cpu >= 10", - tokens![ "$" Var("it") "." Member("cpu") SP ">=" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP ">=" SP Num("10") ], ); assert_lex( "$it.cpu <= 10", - tokens![ "$" Var("it") "." Member("cpu") SP "<=" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP "<=" SP Num("10") ], ); assert_lex( "$it.cpu == 10", - tokens![ "$" Var("it") "." Member("cpu") SP "==" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP "==" SP Num("10") ], ); assert_lex( "$it.cpu != 10", - tokens![ "$" Var("it") "." Member("cpu") SP "!=" SP Num("10") ], + tokens![ "$" Var("it") "???." Member("cpu") SP "!=" SP Num("10") ], ); } @@ -699,13 +707,18 @@ mod tests { assert_lex( "ls | where { $it.cpu > 10 }", - tokens![ Bare("ls") SP "|" SP Bare("where") SP "{" SP "$" Var("it") "." Member("cpu") SP ">" SP Num("10") SP "}" ], + tokens![ Bare("ls") SP "|" SP Bare("where") SP "{" SP "$" Var("it") "???." Member("cpu") SP ">" SP Num("10") SP "}" ], ); assert_lex( "open input2.json | from-json | select glossary", - tokens![ Bare("open") SP Bare("input2") "." Member("json") SP "|" SP Bare("from-json") SP "|" SP Bare("select") SP Bare("glossary") ], + tokens![ Bare("open") SP Bare("input2") "???." Member("json") SP "|" SP Bare("from-json") SP "|" SP Bare("select") SP Bare("glossary") ], ); + + assert_lex( + "git add . -v", + tokens![ Bare("git") SP Bare("add") SP Bare(".") SP "-" Bare("v") ], + ) } fn tok(name: &str, value: &'source str) -> TestToken<'source> { @@ -722,7 +735,10 @@ mod tests { fn tk(name: &'source str) -> TestToken<'source> { let token = match name { + "???." => return TestToken::new(TokenDesc::PathDot, "."), "." => TopToken::Dot, + "--" => TopToken::DashDash, + "-" => TopToken::Dash, "$" => TopToken::Dollar, "|" => TopToken::Pipe, "{" => TopToken::OpenBrace, diff --git a/src/parser/parser.lalrpop b/src/parser/parser.lalrpop index 0556e963cb..c680ae8587 100644 --- a/src/parser/parser.lalrpop +++ b/src/parser/parser.lalrpop @@ -52,10 +52,11 @@ WholeExpression: Expression = { PathHead: Expression = { , => Expression::Leaf(Leaf::Bare(<>)), + => Expression::Flag(<>), } PathExpression: Expression = { - )+> => Expression::Path(Box::new(Path::new(head, tail))) + )+> => Expression::Path(Box::new(Path::new(head, tail))) } Expr: Expression = { @@ -92,7 +93,7 @@ String: String = { } BarePath: BarePath = { - )*> => BarePath::from_tokens(head, tail) + )*> => BarePath::from_tokens(head, tail) } Int: i64 = { @@ -119,6 +120,7 @@ extern { "-" => SpannedToken { token: Token::Dash, .. }, "--" => SpannedToken { token: Token::DashDash, .. }, "$" => SpannedToken { token: Token::Dollar, .. }, + "???." => SpannedToken { token: Token::PathDot, .. }, "num" => SpannedToken { token: Token::Num, .. }, "member" => SpannedToken { token: Token::Member, .. }, "variable" => SpannedToken { token: Token::Variable, .. }, diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 1c857af8f4..b5c6525a61 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.17.0" -// sha256: b82840a51b10edc8c46329da103254cdd83b8f03b21f19f5392bd21f8f459ea +// sha256: 7d24b7dfd8aaad128886f4926feedaf9a21057b08de7f4e587cd977890a65a #![allow(unused)] use std::str::FromStr; use crate::parser::ast::*; @@ -43,127 +43,137 @@ mod __parse__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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1 - 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 0, 23, 0, 24, 0, 25, -19, 0, + 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, -19, 0, // State 2 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 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, // State 4 - -14, -14, -14, -14, 0, 0, 29, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, -14, -14, + -14, -14, -14, -14, -14, -14, 0, -14, -14, -14, -14, -14, 32, -14, -14, 0, -14, 0, -14, 0, -14, -14, -14, // State 5 - -50, -50, -50, -50, 0, 0, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, -50, -50, + -51, -51, -51, -51, -51, -51, 0, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, 0, -51, 0, -51, -51, -51, // State 6 - -44, -44, -44, -44, 0, 0, 0, -44, -44, -44, -44, -44, -44, -44, 0, -44, 0, -44, 0, -44, -44, -44, + -44, -44, -44, -44, -44, -44, 0, -44, -44, -44, -44, -44, 0, -44, -44, 0, -44, 0, -44, 0, -44, -44, -44, // State 7 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, // State 8 - -51, -51, -51, -51, 0, 0, -51, -51, -51, -51, -51, -51, -51, -51, 0, -51, 0, -51, 0, -51, -51, -51, + -52, -52, -52, -52, -52, -52, 0, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, 0, -52, 0, -52, -52, -52, // State 9 - 31, -24, -24, 0, 0, 0, 0, 32, 33, 34, 35, 36, -24, -24, 0, -24, 0, -24, 0, -24, -24, 0, + 34, -24, -24, 0, -24, -24, 0, 35, 36, 37, 38, 39, 0, -24, -24, 0, -24, 0, -24, 0, -24, -24, 0, // State 10 - 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 0, 23, 0, 24, 0, 25, -20, 0, + 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, -20, 0, // State 11 - -30, -30, -30, -30, 0, 0, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, 0, -30, 0, -30, -30, -30, + -45, -45, -45, -45, -45, -45, 0, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, 0, -45, 0, -45, -45, -45, // State 12 - -13, -13, -13, -13, 0, 0, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, 0, -13, 0, -13, -13, -13, + -30, -30, -30, -30, -30, -30, 0, -30, -30, -30, -30, -30, -30, -30, -30, 0, -30, 0, -30, 0, -30, -30, -30, // State 13 - -12, -12, -12, -12, 0, 0, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, 0, -12, 0, -12, -12, -12, + -13, -13, -13, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, -13, -13, 0, -13, 0, -13, 0, -13, -13, -13, // State 14 - -22, -22, -22, -22, 0, 0, 0, -22, -22, -22, -22, -22, -22, -22, 0, -22, 0, -22, 0, -22, -22, -22, + -12, -12, -12, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, -12, -12, 0, -12, 0, -12, 0, -12, -12, -12, // State 15 - -23, -23, -23, -23, 0, 0, 0, -23, -23, -23, -23, -23, -23, -23, 0, -23, 0, -23, 0, -23, -23, -23, + -22, -22, -22, -22, -22, -22, 0, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, 0, -22, 0, -22, -22, -22, // State 16 - -29, -29, -29, -29, 0, 0, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, -29, -29, + -23, -23, -23, -23, -23, -23, 0, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, 0, -23, 0, -23, -23, -23, // State 17 - -31, -31, -31, -31, 0, 0, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, 0, -31, 0, -31, -31, -31, + -29, -29, -29, -29, -29, -29, 0, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, -29, -29, // State 18 - -43, -43, -43, -43, 0, 0, 39, -43, -43, -43, -43, -43, -43, -43, 0, -43, 0, -43, 0, -43, -43, -43, + -31, -31, -31, -31, -31, -31, 0, -31, -31, -31, -31, -31, -31, -31, -31, 0, -31, 0, -31, 0, -31, -31, -31, // State 19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, + -43, -43, -43, -43, -43, -43, 0, -43, -43, -43, -43, -43, 42, -43, -43, 0, -43, 0, -43, 0, -43, -43, -43, // State 20 - 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 0, 23, 0, 24, 0, 25, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, // State 21 - -48, -48, -48, -48, 0, 0, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, -48, -48, + 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, // State 22 - -28, -28, -28, -28, 0, 0, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, -28, -28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 23 - -47, -47, -47, -47, 0, 0, -47, -47, -47, -47, -47, -47, -47, -47, 0, -47, 0, -47, 0, -47, -47, -47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 24 - 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 0, 23, 0, 24, 0, 25, 0, 0, + -49, -49, -49, -49, -49, -49, 0, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, -49, -49, // State 25 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, + -28, -28, -28, -28, -28, -28, 0, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, -28, -28, // State 26 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -48, -48, -48, -48, -48, -48, 0, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, -48, -48, // State 27 - -15, -15, -15, -15, 0, 0, 48, -15, -15, -15, -15, -15, -15, -15, 0, -15, 0, -15, 0, -15, -15, -15, + 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, // State 28 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, // State 29 - 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 0, 23, 0, 24, 0, 25, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 30 - 0, -35, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35, -35, 0, -35, 0, -35, 0, -35, 0, 0, + -15, -15, -15, -15, -15, -15, 0, -15, -15, -15, -15, -15, 53, -15, -15, 0, -15, 0, -15, 0, -15, -15, -15, // State 31 - 0, -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, -36, 0, -36, 0, -36, 0, -36, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, // State 32 - 0, -38, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, -38, 0, -38, 0, -38, 0, -38, 0, 0, + 0, 21, 22, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 5, 25, 0, 26, 0, 27, 0, 28, 0, 0, // State 33 - 0, -34, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, -34, -34, 0, -34, 0, -34, 0, -34, 0, 0, + 0, -35, -35, 0, -35, -35, 0, 0, 0, 0, 0, 0, 0, -35, -35, 0, -35, 0, -35, 0, -35, 0, 0, // State 34 - 0, -37, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, -37, 0, -37, 0, -37, 0, -37, 0, 0, + 0, -36, -36, 0, -36, -36, 0, 0, 0, 0, 0, 0, 0, -36, -36, 0, -36, 0, -36, 0, -36, 0, 0, // State 35 - 0, -39, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, -39, 0, -39, 0, -39, 0, -39, 0, 0, + 0, -38, -38, 0, -38, -38, 0, 0, 0, 0, 0, 0, 0, -38, -38, 0, -38, 0, -38, 0, -38, 0, 0, // State 36 - 0, -25, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, -25, 0, -25, 0, -25, 0, -25, -25, 0, + 0, -34, -34, 0, -34, -34, 0, 0, 0, 0, 0, 0, 0, -34, -34, 0, -34, 0, -34, 0, -34, 0, 0, // State 37 - -42, -42, -42, -42, 0, 0, 51, -42, -42, -42, -42, -42, -42, -42, 0, -42, 0, -42, 0, -42, -42, -42, + 0, -37, -37, 0, -37, -37, 0, 0, 0, 0, 0, 0, 0, -37, -37, 0, -37, 0, -37, 0, -37, 0, 0, // State 38 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 54, 0, 0, 24, 0, 0, 0, 0, + 0, -39, -39, 0, -39, -39, 0, 0, 0, 0, 0, 0, 0, -39, -39, 0, -39, 0, -39, 0, -39, 0, 0, // State 39 - -49, -49, -49, -49, 0, 0, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, -49, -49, + 0, -25, -25, 0, -25, -25, 0, 0, 0, 0, 0, 0, 0, -25, -25, 0, -25, 0, -25, 0, -25, -25, 0, // State 40 - 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -42, -42, -42, -42, -42, -42, 0, -42, -42, -42, -42, -42, 56, -42, -42, 0, -42, 0, -42, 0, -42, -42, -42, // State 41 - 31, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 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, 25, 59, 0, 0, 27, 0, 0, 0, 0, // State 42 - -13, 0, 0, 56, 0, 0, -13, -13, -13, -13, -13, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -50, -50, -50, -50, -50, -50, 0, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, -50, -50, // State 43 - -50, 0, 0, 0, 0, 0, -50, -50, -50, -50, -50, -50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, + 0, 0, 0, 60, 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, 58, + 34, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38, 39, 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, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -13, 0, 0, 61, 0, 0, 0, -13, -13, -13, -13, -13, -13, 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, -10, 0, + -26, -26, -26, -26, -26, -26, 0, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, 0, -26, 0, -26, -26, -26, // State 47 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, + -27, -27, -27, -27, -27, -27, 0, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, 0, -27, 0, -27, -27, -27, // State 48 - -4, -4, -4, -4, 0, 0, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, 0, -4, 0, -4, -4, -4, + -51, 0, 0, 0, 0, 0, 0, -51, -51, -51, -51, -51, -51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, // State 49 - 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, // State 50 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 54, 0, 0, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 51 - -7, -7, -7, -7, 0, 0, -7, -7, -7, -7, -7, -7, -7, -7, 0, -7, 0, -7, 0, -7, -7, -7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10, 0, // State 52 - -33, -33, -33, -33, 0, 0, -33, -33, -33, -33, -33, -33, -33, -33, 0, -33, 0, -33, 0, -33, -33, -33, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, // State 53 - -32, -32, -32, -32, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, 0, -32, 0, -32, -32, -32, + -4, -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, 0, -4, 0, -4, -4, -4, // State 54 - -41, -41, -41, -41, 0, 0, -41, -41, -41, -41, -41, -41, -41, -41, 0, -41, 0, -41, 0, -41, -41, -41, + 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, // State 55 - -40, -40, -40, -40, 0, 0, -40, -40, -40, -40, -40, -40, -40, -40, 0, -40, 0, -40, 0, -40, -40, -40, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 59, 0, 0, 27, 0, 0, 0, 0, // State 56 - -17, -17, -17, -17, 0, 0, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, 0, -17, 0, -17, -17, -17, + -7, -7, -7, -7, -7, -7, 0, -7, -7, -7, -7, -7, -7, -7, -7, 0, -7, 0, -7, 0, -7, -7, -7, // State 57 - -18, -18, -18, -18, 0, 0, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, -18, -18, + -33, -33, -33, -33, -33, -33, 0, -33, -33, -33, -33, -33, -33, -33, -33, 0, -33, 0, -33, 0, -33, -33, -33, // State 58 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, + -32, -32, -32, -32, -32, -32, 0, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, 0, -32, 0, -32, -32, -32, // State 59 - -5, -5, -5, -5, 0, 0, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, 0, -5, 0, -5, -5, -5, + -41, -41, -41, -41, -41, -41, 0, -41, -41, -41, -41, -41, -41, -41, -41, 0, -41, 0, -41, 0, -41, -41, -41, // State 60 - -8, -8, -8, -8, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, -8, 0, -8, 0, -8, -8, -8, + -40, -40, -40, -40, -40, -40, 0, -40, -40, -40, -40, -40, -40, -40, -40, 0, -40, 0, -40, 0, -40, -40, -40, + // State 61 + -17, -17, -17, -17, -17, -17, 0, -17, -17, -17, -17, -17, -17, -17, -17, 0, -17, 0, -17, 0, -17, -17, -17, + // State 62 + -18, -18, -18, -18, -18, -18, 0, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, -18, -18, + // State 63 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 0, + // State 64 + -5, -5, -5, -5, -5, -5, 0, -5, -5, -5, -5, -5, -5, -5, -5, 0, -5, 0, -5, 0, -5, -5, -5, + // State 65 + -8, -8, -8, -8, -8, -8, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, -8, 0, -8, 0, -8, -8, -8, ]; const __EOF_ACTION: &'static [i8] = &[ // State 0 @@ -171,63 +181,63 @@ mod __parse__Pipeline { // State 1 -19, // State 2 - -45, + -46, // State 3 - -52, + -53, // State 4 -14, // State 5 - -50, + -51, // State 6 -44, // State 7 -21, // State 8 - -51, + -52, // State 9 -24, // State 10 -20, // State 11 - -30, + -45, // State 12 - -13, + -30, // State 13 - -12, + -13, // State 14 - -22, + -12, // State 15 - -23, + -22, // State 16 - -29, + -23, // State 17 - -31, + -29, // State 18 - -43, + -31, // State 19 - 0, + -43, // State 20 0, // State 21 - -48, + 0, // State 22 - -28, + 0, // State 23 - -47, + 0, // State 24 - 0, + -49, // State 25 - -46, + -28, // State 26 - 0, + -48, // State 27 - -15, - // State 28 0, + // State 28 + -47, // State 29 0, // State 30 - 0, + -15, // State 31 0, // State 32 @@ -239,19 +249,19 @@ mod __parse__Pipeline { // State 35 0, // State 36 - -25, + 0, // State 37 - -42, + 0, // State 38 0, // State 39 - -49, + -25, // State 40 - 0, + -42, // State 41 0, // State 42 - 0, + -50, // State 43 0, // State 44 @@ -259,47 +269,57 @@ mod __parse__Pipeline { // State 45 0, // State 46 - -10, + -26, // State 47 - 0, + -27, // State 48 - -4, + 0, // State 49 - -16, + 0, // State 50 0, // State 51 - -7, + -10, // State 52 - -33, + 0, // State 53 - -32, + -4, // State 54 - -41, + -16, // State 55 - -40, + 0, // State 56 - -17, + -7, // State 57 - -18, + -33, // State 58 - -11, + -32, // State 59 - -5, + -41, // State 60 + -40, + // State 61 + -17, + // State 62 + -18, + // State 63 + -11, + // State 64 + -5, + // State 65 -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, // State 1 - 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 0, 0, 14, 15, 16, 0, 17, 18, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 11, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 0, // State 2 - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 29, 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, // State 4 - 0, 0, 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, 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, // 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, // State 6 @@ -309,9 +329,9 @@ mod __parse__Pipeline { // 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, // State 9 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, // State 10 - 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 9, 0, 37, 0, 0, 12, 13, 0, 0, 14, 15, 16, 0, 17, 18, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 9, 0, 40, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 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, // State 12 @@ -327,35 +347,35 @@ mod __parse__Pipeline { // 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, // State 18 - 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 41, 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, 6, 7, 41, 9, 0, 42, 0, 0, 12, 43, 0, 0, 14, 15, 16, 0, 17, 18, 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, // 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, 6, 7, 44, 9, 0, 45, 0, 12, 13, 46, 0, 0, 15, 16, 17, 0, 18, 19, 20, 0, // State 22 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 23 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 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, 44, 7, 45, 9, 0, 42, 0, 0, 12, 13, 0, 0, 14, 15, 16, 0, 17, 18, 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, // 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, // State 26 - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 47, 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, 0, + // State 27 + 0, 0, 0, 0, 0, 0, 0, 49, 7, 50, 9, 0, 45, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 0, // State 28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 29 - 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 9, 0, 50, 0, 0, 12, 13, 0, 0, 14, 15, 16, 0, 17, 18, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 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, // 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, 6, 7, 0, 9, 0, 55, 0, 12, 13, 14, 0, 0, 15, 16, 17, 0, 18, 19, 20, 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, 0, // State 34 @@ -367,21 +387,21 @@ mod __parse__Pipeline { // 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, // State 38 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 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, // 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, // 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, // State 41 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 58, 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, // State 43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 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, 33, 0, 0, 0, 0, 0, 0, 0, 0, // State 45 - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 46 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 47 @@ -391,7 +411,7 @@ mod __parse__Pipeline { // 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, // State 50 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 53, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 64, 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, // State 52 @@ -401,7 +421,7 @@ mod __parse__Pipeline { // 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, // 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, 66, 0, 0, 0, 0, 0, 58, 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, // State 57 @@ -412,6 +432,16 @@ mod __parse__Pipeline { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 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, + // 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, + // 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, + // 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, + // 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, + // 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, ]; fn __expected_tokens(__state: usize) -> Vec<::std::string::String> { const __TERMINAL: &'static [&'static str] = &[ @@ -427,6 +457,7 @@ mod __parse__Pipeline { r###""==""###, r###"">""###, r###"">=""###, + r###""???.""###, r###""bare""###, r###""dqstring""###, r###""member""###, @@ -438,7 +469,7 @@ mod __parse__Pipeline { r###""|""###, r###""}""###, ]; - __ACTION[(__state * 22)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { + __ACTION[(__state * 23)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| { if state == 0 { None } else { @@ -482,12 +513,12 @@ mod __parse__Pipeline { #[inline] fn action(&self, state: i8, integer: usize) -> i8 { - __ACTION[(state as usize) * 22 + integer] + __ACTION[(state as usize) * 23 + integer] } #[inline] fn error_action(&self, state: i8) -> i8 { - __ACTION[(state as usize) * 22 + (22 - 1)] + __ACTION[(state as usize) * 23 + (23 - 1)] } #[inline] @@ -561,16 +592,17 @@ mod __parse__Pipeline { SpannedToken { token: Token::OpEq, .. } if true => Some(9), SpannedToken { token: Token::OpGt, .. } if true => Some(10), SpannedToken { token: Token::OpGte, .. } 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::Size, .. } if true => Some(16), - SpannedToken { token: Token::SQString, .. } 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::PathDot, .. } if true => Some(12), + SpannedToken { token: Token::Bare, .. } 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::Size, .. } if true => Some(17), + SpannedToken { token: Token::SQString, .. } if true => Some(18), + SpannedToken { token: Token::Variable, .. } if true => Some(19), + SpannedToken { token: Token::OpenBrace, .. } if true => Some(20), + SpannedToken { token: Token::Pipe, .. } if true => Some(21), + SpannedToken { token: Token::CloseBrace, .. } if true => Some(22), _ => None, } } @@ -632,42 +664,46 @@ mod __parse__Pipeline { _ => unreachable!(), }, 12 => match __token { - __tok @ SpannedToken { token: Token::Bare, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::PathDot, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 13 => match __token { - __tok @ SpannedToken { token: Token::DQString, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Bare, .. } => __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::Size, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Num, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 17 => match __token { - __tok @ SpannedToken { token: Token::SQString, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::Size, .. } => __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::Variable, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 20 => match __token { - __tok @ SpannedToken { token: Token::Pipe, .. } => __Symbol::Variant0((__tok)), + __tok @ SpannedToken { token: Token::OpenBrace, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, 21 => match __token { + __tok @ SpannedToken { token: Token::Pipe, .. } => __Symbol::Variant0((__tok)), + _ => unreachable!(), + }, + 22 => match __token { __tok @ SpannedToken { token: Token::CloseBrace, .. } => __Symbol::Variant0((__tok)), _ => unreachable!(), }, @@ -949,19 +985,19 @@ mod __parse__Pipeline { 44 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 22, + nonterminal_produced: 21, } } 45 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 1, nonterminal_produced: 22, } } 46 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 23, + states_to_pop: 2, + nonterminal_produced: 22, } } 47 => { @@ -972,14 +1008,14 @@ mod __parse__Pipeline { } 48 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 24, + states_to_pop: 1, + nonterminal_produced: 23, } } 49 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 25, + states_to_pop: 2, + nonterminal_produced: 24, } } 50 => { @@ -988,7 +1024,13 @@ mod __parse__Pipeline { nonterminal_produced: 25, } } - 51 => __state_machine::SimulatedReduce::Accept, + 51 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 25, + } + } + 52 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {}", __reduce_index) } } @@ -1189,6 +1231,9 @@ mod __parse__Pipeline { __reduce50(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) } 51 => { + __reduce51(__action, __lookahead_start, __states, __symbols, ::std::marker::PhantomData::<(&())>) + } + 52 => { // __Pipeline = Pipeline => ActionFn(0); let __sym0 = __pop_Variant12(__symbols); let __start = __sym0.0.clone(); @@ -1369,12 +1414,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." <"member">) = ".", "member" => ActionFn(40); + // ("???." <"member">) = "???.", "member" => ActionFn(41); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action40::<>(__sym0, __sym1); + let __nt = super::__action41::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant0(__nt), __end)); (2, 0) } @@ -1388,10 +1433,10 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." <"member">)* = => ActionFn(38); + // ("???." <"member">)* = => ActionFn(39); 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::__action38::<>(&__start, &__end); + let __nt = super::__action39::<>(&__start, &__end); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (0, 1) } @@ -1405,11 +1450,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." <"member">)* = ("." <"member">)+ => ActionFn(39); + // ("???." <"member">)* = ("???." <"member">)+ => ActionFn(40); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action39::<>(__sym0); + let __nt = super::__action40::<>(__sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 1) } @@ -1423,12 +1468,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." <"member">)+ = ".", "member" => ActionFn(51); + // ("???." <"member">)+ = "???.", "member" => ActionFn(52); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action51::<>(__sym0, __sym1); + let __nt = super::__action52::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 2) } @@ -1442,13 +1487,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." <"member">)+ = ("." <"member">)+, ".", "member" => ActionFn(52); + // ("???." <"member">)+ = ("???." <"member">)+, "???.", "member" => ActionFn(53); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action52::<>(__sym0, __sym1, __sym2); + let __nt = super::__action53::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 2) } @@ -1462,12 +1507,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." ) = ".", Member => ActionFn(43); + // ("???." ) = "???.", Member => ActionFn(44); let __sym1 = __pop_Variant2(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action43::<>(__sym0, __sym1); + let __nt = super::__action44::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (2, 3) } @@ -1481,12 +1526,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )+ = ".", Member => ActionFn(55); + // ("???." )+ = "???.", Member => ActionFn(56); let __sym1 = __pop_Variant2(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action55::<>(__sym0, __sym1); + let __nt = super::__action56::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (2, 4) } @@ -1500,13 +1545,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("." )+ = ("." )+, ".", Member => ActionFn(56); + // ("???." )+ = ("???." )+, "???.", Member => ActionFn(57); let __sym2 = __pop_Variant2(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action56::<>(__sym0, __sym1, __sym2); + let __nt = super::__action57::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (3, 4) } @@ -1520,12 +1565,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" ) = "|", Command => ActionFn(48); + // ("|" ) = "|", Command => ActionFn(49); let __sym1 = __pop_Variant4(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action48::<>(__sym0, __sym1); + let __nt = super::__action49::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (2, 5) } @@ -1539,12 +1584,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = "|", Command => ActionFn(57); + // ("|" )+ = "|", Command => ActionFn(58); let __sym1 = __pop_Variant4(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action57::<>(__sym0, __sym1); + let __nt = super::__action58::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (2, 6) } @@ -1558,13 +1603,13 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ("|" )+ = ("|" )+, "|", Command => ActionFn(58); + // ("|" )+ = ("|" )+, "|", Command => ActionFn(59); let __sym2 = __pop_Variant4(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action58::<>(__sym0, __sym1, __sym2); + let __nt = super::__action59::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (3, 6) } @@ -1614,11 +1659,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare" => ActionFn(53); + // BarePath = "bare" => ActionFn(54); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action53::<>(__sym0); + let __nt = super::__action54::<>(__sym0); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (1, 8) } @@ -1632,12 +1677,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // BarePath = "bare", ("." <"member">)+ => ActionFn(54); + // BarePath = "bare", ("???." <"member">)+ => 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); + let __nt = super::__action55::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (2, 8) } @@ -1767,11 +1812,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathExpression => ActionFn(21); + // Expr = PathExpression => ActionFn(22); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action21::<>(__sym0); + let __nt = super::__action22::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -1785,11 +1830,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = PathHead => ActionFn(22); + // Expr = PathHead => ActionFn(23); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action22::<>(__sym0); + let __nt = super::__action23::<>(__sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -1803,11 +1848,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr => ActionFn(44); + // Expr+ = Expr => ActionFn(45); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action44::<>(__sym0); + let __nt = super::__action45::<>(__sym0); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (1, 13) } @@ -1821,12 +1866,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr+ = Expr+, Expr => ActionFn(45); + // Expr+ = Expr+, Expr => ActionFn(46); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action45::<>(__sym0, __sym1); + let __nt = super::__action46::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (2, 13) } @@ -1840,12 +1885,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "-", BarePath => ActionFn(32); + // Flag = "-", BarePath => ActionFn(33); let __sym1 = __pop_Variant7(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action32::<>(__sym0, __sym1); + let __nt = super::__action33::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (2, 14) } @@ -1859,12 +1904,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Flag = "--", BarePath => ActionFn(33); + // Flag = "--", BarePath => ActionFn(34); let __sym1 = __pop_Variant7(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action33::<>(__sym0, __sym1); + let __nt = super::__action34::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (2, 14) } @@ -1878,11 +1923,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Int = "num" => ActionFn(37); + // Int = "num" => ActionFn(38); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action37::<>(__sym0); + let __nt = super::__action38::<>(__sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 15) } @@ -1950,11 +1995,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = "member" => ActionFn(24); + // Member = "member" => ActionFn(25); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action24::<>(__sym0); + let __nt = super::__action25::<>(__sym0); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (1, 17) } @@ -1968,11 +2013,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Member = String => ActionFn(25); + // Member = String => ActionFn(26); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action25::<>(__sym0); + let __nt = super::__action26::<>(__sym0); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (1, 17) } @@ -1986,11 +2031,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "==" => ActionFn(26); + // Operator = "==" => ActionFn(27); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action26::<>(__sym0); + let __nt = super::__action27::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2004,11 +2049,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "!=" => ActionFn(27); + // Operator = "!=" => ActionFn(28); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action27::<>(__sym0); + let __nt = super::__action28::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2022,11 +2067,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<" => ActionFn(28); + // Operator = "<" => ActionFn(29); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action28::<>(__sym0); + let __nt = super::__action29::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2040,11 +2085,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">" => ActionFn(29); + // Operator = ">" => ActionFn(30); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action29::<>(__sym0); + let __nt = super::__action30::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2058,11 +2103,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = "<=" => ActionFn(30); + // Operator = "<=" => ActionFn(31); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action30::<>(__sym0); + let __nt = super::__action31::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2076,11 +2121,11 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Operator = ">=" => ActionFn(31); + // Operator = ">=" => ActionFn(32); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action31::<>(__sym0); + let __nt = super::__action32::<>(__sym0); __symbols.push((__start, __Symbol::Variant11(__nt), __end)); (1, 18) } @@ -2134,12 +2179,12 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // PathExpression = WholeExpression, ("." )+ => ActionFn(20); + // PathExpression = WholeExpression, ("???." )+ => ActionFn(21); let __sym1 = __pop_Variant3(__symbols); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action20::<>(__sym0, __sym1); + let __nt = super::__action21::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (2, 20) } @@ -2188,6 +2233,24 @@ mod __parse__Pipeline { __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>, _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) + { + // PathHead = Flag => ActionFn(20); + let __sym0 = __pop_Variant9(__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) + } + 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) { // Pipeline = Command => ActionFn(1); let __sym0 = __pop_Variant4(__symbols); @@ -2197,7 +2260,7 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant12(__nt), __end)); (1, 22) } - pub(crate) fn __reduce45< + pub(crate) fn __reduce46< 'input, >( __action: i8, @@ -2216,24 +2279,6 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant12(__nt), __end)); (2, 22) } - 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) - { - // String = "sqstring" => 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::Variant2(__nt), __end)); - (1, 23) - } pub(crate) fn __reduce47< 'input, >( @@ -2244,7 +2289,7 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // String = "dqstring" => ActionFn(35); + // String = "sqstring" => ActionFn(35); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); @@ -2262,16 +2307,34 @@ mod __parse__Pipeline { _: ::std::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Variable = "$", "variable" => ActionFn(23); + // String = "dqstring" => 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::Variant2(__nt), __end)); + (1, 23) + } + 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) + { + // Variable = "$", "variable" => ActionFn(24); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action23::<>(__sym0, __sym1); + let __nt = super::__action24::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant13(__nt), __end)); (2, 24) } - pub(crate) fn __reduce49< + pub(crate) fn __reduce50< 'input, >( __action: i8, @@ -2289,7 +2352,7 @@ mod __parse__Pipeline { __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 25) } - pub(crate) fn __reduce50< + pub(crate) fn __reduce51< 'input, >( __action: i8, @@ -2506,20 +2569,20 @@ fn __action19< fn __action20< 'input, >( - (_, head, _): (usize, Expression, usize), - (_, tail, _): (usize, ::std::vec::Vec, usize), + (_, __0, _): (usize, Flag, usize), ) -> Expression { - Expression::Path(Box::new(Path::new(head, tail))) + Expression::Flag(__0) } fn __action21< 'input, >( - (_, __0, _): (usize, Expression, usize), + (_, head, _): (usize, Expression, usize), + (_, tail, _): (usize, ::std::vec::Vec, usize), ) -> Expression { - (__0) + Expression::Path(Box::new(Path::new(head, tail))) } fn __action22< @@ -2533,6 +2596,15 @@ fn __action22< fn __action23< 'input, +>( + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + (__0) +} + +fn __action24< + 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2541,7 +2613,7 @@ fn __action23< Variable::from_str(__0.as_slice()).unwrap() } -fn __action24< +fn __action25< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2550,7 +2622,7 @@ fn __action24< __0.to_string() } -fn __action25< +fn __action26< 'input, >( (_, __0, _): (usize, String, usize), @@ -2559,7 +2631,7 @@ fn __action25< (__0) } -fn __action26< +fn __action27< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2568,7 +2640,7 @@ fn __action26< Operator::Equal } -fn __action27< +fn __action28< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2577,7 +2649,7 @@ fn __action27< Operator::NotEqual } -fn __action28< +fn __action29< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2586,7 +2658,7 @@ fn __action28< Operator::LessThan } -fn __action29< +fn __action30< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2595,7 +2667,7 @@ fn __action29< Operator::GreaterThan } -fn __action30< +fn __action31< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2604,7 +2676,7 @@ fn __action30< Operator::LessThanOrEqual } -fn __action31< +fn __action32< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2613,16 +2685,6 @@ fn __action31< Operator::GreaterThanOrEqual } -fn __action32< - 'input, ->( - (_, _, _): (usize, SpannedToken<'input>, usize), - (_, __0, _): (usize, BarePath, usize), -) -> Flag -{ - Flag::Shorthand(__0.to_string()) -} - fn __action33< 'input, >( @@ -2630,16 +2692,17 @@ fn __action33< (_, __0, _): (usize, BarePath, usize), ) -> Flag { - Flag::Longhand(__0.to_string()) + Flag::Shorthand(__0.to_string()) } fn __action34< 'input, >( - (_, __0, _): (usize, SpannedToken<'input>, usize), -) -> String + (_, _, _): (usize, SpannedToken<'input>, usize), + (_, __0, _): (usize, BarePath, usize), +) -> Flag { - __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string() + Flag::Longhand(__0.to_string()) } fn __action35< @@ -2653,6 +2716,15 @@ fn __action35< fn __action36< 'input, +>( + (_, __0, _): (usize, SpannedToken<'input>, usize), +) -> String +{ + __0.as_slice()[1..(__0.as_slice().len() - 1)].to_string() +} + +fn __action37< + 'input, >( (_, head, _): (usize, SpannedToken<'input>, usize), (_, tail, _): (usize, ::std::vec::Vec>, usize), @@ -2661,7 +2733,7 @@ fn __action36< BarePath::from_tokens(head, tail) } -fn __action37< +fn __action38< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2670,7 +2742,7 @@ fn __action37< i64::from_str(__0.as_slice()).unwrap() } -fn __action38< +fn __action39< 'input, >( __lookbehind: &usize, @@ -2680,7 +2752,7 @@ fn __action38< vec![] } -fn __action39< +fn __action40< 'input, >( (_, v, _): (usize, ::std::vec::Vec>, usize), @@ -2689,7 +2761,7 @@ fn __action39< v } -fn __action40< +fn __action41< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2699,7 +2771,7 @@ fn __action40< (__0) } -fn __action41< +fn __action42< 'input, >( (_, __0, _): (usize, String, usize), @@ -2708,7 +2780,7 @@ fn __action41< vec![__0] } -fn __action42< +fn __action43< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2718,7 +2790,7 @@ fn __action42< { let mut v = v; v.push(e); v } } -fn __action43< +fn __action44< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2728,7 +2800,7 @@ fn __action43< (__0) } -fn __action44< +fn __action45< 'input, >( (_, __0, _): (usize, Expression, usize), @@ -2737,7 +2809,7 @@ fn __action44< vec![__0] } -fn __action45< +fn __action46< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2747,7 +2819,7 @@ fn __action45< { let mut v = v; v.push(e); v } } -fn __action46< +fn __action47< 'input, >( (_, __0, _): (usize, ParsedCommand, usize), @@ -2756,7 +2828,7 @@ fn __action46< vec![__0] } -fn __action47< +fn __action48< 'input, >( (_, v, _): (usize, ::std::vec::Vec, usize), @@ -2766,7 +2838,7 @@ fn __action47< { let mut v = v; v.push(e); v } } -fn __action48< +fn __action49< 'input, >( (_, _, _): (usize, SpannedToken<'input>, usize), @@ -2776,7 +2848,7 @@ fn __action48< (__0) } -fn __action49< +fn __action50< 'input, >( (_, __0, _): (usize, SpannedToken<'input>, usize), @@ -2785,7 +2857,7 @@ fn __action49< vec![__0] } -fn __action50< +fn __action51< 'input, >( (_, v, _): (usize, ::std::vec::Vec>, usize), @@ -2795,7 +2867,7 @@ fn __action50< { let mut v = v; v.push(e); v } } -fn __action51< +fn __action52< 'input, >( __0: (usize, SpannedToken<'input>, usize), @@ -2804,17 +2876,17 @@ fn __action51< { let __start0 = __0.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action40( + let __temp0 = __action41( __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action49( + __action50( __temp0, ) } -fn __action52< +fn __action53< 'input, >( __0: (usize, ::std::vec::Vec>, usize), @@ -2824,31 +2896,12 @@ fn __action52< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action40( + let __temp0 = __action41( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action50( - __0, - __temp0, - ) -} - -fn __action53< - 'input, ->( - __0: (usize, SpannedToken<'input>, usize), -) -> BarePath -{ - let __start0 = __0.2.clone(); - let __end0 = __0.2.clone(); - let __temp0 = __action38( - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action36( + __action51( __0, __temp0, ) @@ -2858,16 +2911,16 @@ fn __action54< 'input, >( __0: (usize, SpannedToken<'input>, usize), - __1: (usize, ::std::vec::Vec>, usize), ) -> BarePath { - let __start0 = __1.0.clone(); - let __end0 = __1.2.clone(); + let __start0 = __0.2.clone(); + let __end0 = __0.2.clone(); let __temp0 = __action39( - __1, + &__start0, + &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action36( + __action37( __0, __temp0, ) @@ -2877,23 +2930,42 @@ fn __action55< 'input, >( __0: (usize, SpannedToken<'input>, usize), - __1: (usize, String, usize), -) -> ::std::vec::Vec + __1: (usize, ::std::vec::Vec>, usize), +) -> BarePath { - let __start0 = __0.0.clone(); + let __start0 = __1.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action43( - __0, + let __temp0 = __action40( __1, ); let __temp0 = (__start0, __temp0, __end0); - __action41( + __action37( + __0, __temp0, ) } fn __action56< 'input, +>( + __0: (usize, SpannedToken<'input>, usize), + __1: (usize, String, usize), +) -> ::std::vec::Vec +{ + let __start0 = __0.0.clone(); + let __end0 = __1.2.clone(); + let __temp0 = __action44( + __0, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action42( + __temp0, + ) +} + +fn __action57< + 'input, >( __0: (usize, ::std::vec::Vec, usize), __1: (usize, SpannedToken<'input>, usize), @@ -2902,18 +2974,18 @@ fn __action56< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action43( + let __temp0 = __action44( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action42( + __action43( __0, __temp0, ) } -fn __action57< +fn __action58< 'input, >( __0: (usize, SpannedToken<'input>, usize), @@ -2922,17 +2994,17 @@ fn __action57< { let __start0 = __0.0.clone(); let __end0 = __1.2.clone(); - let __temp0 = __action48( + let __temp0 = __action49( __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action46( + __action47( __temp0, ) } -fn __action58< +fn __action59< 'input, >( __0: (usize, ::std::vec::Vec, usize), @@ -2942,12 +3014,12 @@ fn __action58< { let __start0 = __1.0.clone(); let __end0 = __2.2.clone(); - let __temp0 = __action48( + let __temp0 = __action49( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action47( + __action48( __0, __temp0, )