// auto-generated: "lalrpop 0.19.7"
// sha3: e1acad7bcafb5ab78eeefbc3638cf565d93bd35618e7b4e4ca88b723156138a4
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__AdditiveExpr {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 1
0, 0, 0, 0, 0, 0, 32, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// State 2
-7, 34, -7, 0, -7, 35, -7, 0, -7, 36, -7, -7, -7, -7, -7, 0, 0, 0, -7, 0, -7, 0, 0, 0, 0,
// State 3
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 26, 0, 27, 0, 28, 29, 30, 0,
// State 5
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 6
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 7
-35, 0, -35, 0, -35, 0, 32, 0, 33, 0, -35, -35, -35, -35, -35, 0, 0, 0, -35, 0, -35, 0, 0, 0, 0,
// State 8
0, 0, 40, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
// State 9
43, 0, -17, 0, -17, 0, 0, 0, 0, 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, -17, 0, 0, 0, 0,
// State 10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 26, 0, 27, 0, 28, 29, 30, 0,
// State 11
-6, 34, -6, 0, -6, 35, -6, 0, -6, 36, -6, -6, -6, -6, -6, 0, 0, 0, -6, 0, -6, 0, 0, 0, 0,
// State 12
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 13
0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 14
43, 0, -16, 0, -16, 0, 0, 0, 0, 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, -16, 0, 0, 0, 0,
// State 15
-34, 0, -34, 0, -34, 0, 32, 0, 33, 0, -34, -34, -34, -34, -34, 0, 0, 0, -34, 0, -34, 0, 0, 0, 0,
// State 16
-45, -45, -45, 0, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, -45, 0, 0, 0, -45, 0, -45, 0, 0, 0, 0,
// State 17
-50, -50, -50, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, 0, 0, 0, 0,
// State 18
-28, -28, -28, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, 0, 0, 0,
// State 19
-46, -46, -46, 0, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, -46, 0, 0, 0, -46, 0, -46, 0, 0, 0, 0,
// State 20
-29, -29, -29, 0, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, 0, 0, 0,
// State 21
-49, -49, -49, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, 0, 0, 0, 0,
// State 22
-48, -48, -48, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, 0, 0, 0, 0,
// State 23
-24, -24, -24, 0, -24, -24, -24, 0, -24, -24, -24, -24, -24, -24, -24, 0, 0, 0, -24, 0, -24, 0, 0, 0, 0,
// State 24
-44, -44, -44, 0, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, -44, 0, 0, 0, -44, 0, -44, 0, 0, 0, 0,
// State 25
-15, -15, -15, 0, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 0, -15, 0, -15, 0, -15, 0, 0, 0, 0,
// State 26
-14, -14, -14, 0, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, 0, 0, 0,
// State 27
-43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, 0, -43, 0, -43, 0, 0, 0, 0,
// State 28
-20, -20, -20, 0, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 0, -20, 0, -20, 0, -20, 0, 0, 0, 0,
// State 29
-18, -18, -18, 0, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, 0, 0, 0, 0,
// State 30
-19, -19, -19, 0, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, -19, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0,
// State 31
0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, -8, -8, -8,
// State 32
0, 0, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, -9, 0, -9, -9, -9, -9,
// State 33
0, 0, 0, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, -27, -27, -27,
// State 34
0, 0, 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, -25, 0, -25, 0, -25, -25, -25, -25,
// State 35
0, 0, 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, -26, -26, -26,
// State 36
0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
// State 37
-11, -11, -11, 0, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, -11, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0,
// State 38
-23, -23, -23, 0, -23, -23, -23, 0, -23, -23, -23, -23, -23, -23, -23, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0,
// State 39
0, 0, 0, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, -21, 0, -21, 0, -21, -21, -21, -21,
// State 40
-47, -47, -47, 0, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, -47, 0, 0, 0, -47, 0, -47, 0, 0, 0, 0,
// State 41
0, 0, 0, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -22, 0, -22, 0, -22, 0, -22, -22, -22, -22,
// State 42
0, 0, 0, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, -41, -41, -41,
// State 43
0, 0, 0, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, -37, -37, -37,
// State 44
0, 0, 0, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, -39, -39, -39,
// State 45
0, 0, 0, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, -40, -40, -40,
// State 46
0, 0, 0, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, -36, -36, -36,
// State 47
0, 0, 0, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, -38, -38, -38,
// State 48
0, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42, 0, -42, 0, -42, 0, -42, -42, -42, -42,
// State 49
0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
// State 50
-13, -13, -13, 0, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0,
// State 51
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, -4, 0, -4, -4, -4, 0,
// State 52
-10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0,
// State 53
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, -5, 0, -5, 0, -5, -5, -5, 0,
// State 54
-12, -12, -12, 0, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-53,
// State 2
-7,
// State 3
0,
// State 4
0,
// State 5
0,
// State 6
0,
// State 7
0,
// State 8
0,
// State 9
0,
// State 10
0,
// State 11
-6,
// State 12
0,
// State 13
0,
// State 14
0,
// State 15
0,
// State 16
-45,
// State 17
-50,
// State 18
-28,
// State 19
-46,
// State 20
-29,
// State 21
-49,
// State 22
-48,
// State 23
-24,
// State 24
-44,
// State 25
-15,
// State 26
-14,
// State 27
-43,
// State 28
-20,
// State 29
-18,
// State 30
-19,
// State 31
0,
// State 32
0,
// State 33
0,
// State 34
0,
// State 35
0,
// State 36
0,
// State 37
-11,
// State 38
-23,
// State 39
0,
// State 40
-47,
// State 41
0,
// State 42
0,
// State 43
0,
// State 44
0,
// State 45
0,
// State 46
0,
// State 47
0,
// State 48
0,
// State 49
0,
// State 50
-13,
// State 51
0,
// State 52
-10,
// State 53
0,
// State 54
-12,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
2 => 10,
3 => match state {
0 => 1,
13 => 15,
_ => 7,
},
4 => 5,
5 => 16,
6 => 17,
7 => 8,
8 => 18,
9 => 19,
10 => 20,
11 => 12,
12 => match state {
5 => 11,
_ => 2,
},
13 => 6,
14 => 21,
16 => match state {
12 => 14,
_ => 9,
},
17 => 13,
18 => 22,
19 => match state {
6 => 38,
_ => 23,
},
20 => match state {
4 => 36,
10 => 49,
_ => 24,
},
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = Box<Expr>;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct AdditiveExprParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl AdditiveExprParser {
pub fn new() -> AdditiveExprParser {
let __builder = super::__intern_token::new_builder();
AdditiveExprParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<Box<Expr>, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<Box<Expr>,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
return Some(Ok(__nt));
}
53 => {
__reduce53(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
54 => {
__reduce54(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
55 => {
__reduce55(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
56 => {
__reduce56(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
57 => {
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce53<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 23)
}
pub(crate) fn __reduce54<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 24)
}
pub(crate) fn __reduce55<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 25)
}
pub(crate) fn __reduce56<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 26)
}
pub(crate) fn __reduce57<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 27)
}
}
pub use self::__parse__AdditiveExpr::AdditiveExprParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__Expr {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 1
-35, 0, -35, 0, -35, 0, 32, 0, 33, 0, -35, -35, -35, -35, -35, 0, 0, 0, -35, 0, -35, 0, 0, 0, 0,
// State 2
0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
// State 3
-7, 36, -7, 0, -7, 37, -7, 0, -7, 38, -7, -7, -7, -7, -7, 0, 0, 0, -7, 0, -7, 0, 0, 0, 0,
// State 4
39, 0, -17, 0, -17, 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, 0, 0, 0, 45, 0, -17, 0, 0, 0, 0,
// State 5
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 6
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 26, 0, 27, 0, 28, 29, 30, 0,
// State 7
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 8
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 9
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 10
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 11
0, 0, 34, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
// State 12
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 26, 0, 27, 0, 28, 29, 30, 0,
// State 13
-6, 36, -6, 0, -6, 37, -6, 0, -6, 38, -6, -6, -6, -6, -6, 0, 0, 0, -6, 0, -6, 0, 0, 0, 0,
// State 14
39, 0, -16, 0, -16, 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, 0, 0, 0, 45, 0, -16, 0, 0, 0, 0,
// State 15
-34, 0, -34, 0, -34, 0, 32, 0, 33, 0, -34, -34, -34, -34, -34, 0, 0, 0, -34, 0, -34, 0, 0, 0, 0,
// State 16
-45, -45, -45, 0, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, -45, 0, 0, 0, -45, 0, -45, 0, 0, 0, 0,
// State 17
-50, -50, -50, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, 0, 0, 0, 0,
// State 18
-28, -28, -28, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, 0, 0, 0,
// State 19
-46, -46, -46, 0, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, -46, 0, 0, 0, -46, 0, -46, 0, 0, 0, 0,
// State 20
-29, -29, -29, 0, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, 0, 0, 0,
// State 21
-49, -49, -49, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, 0, 0, 0, 0,
// State 22
-48, -48, -48, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, 0, 0, 0, 0,
// State 23
-24, -24, -24, 0, -24, -24, -24, 0, -24, -24, -24, -24, -24, -24, -24, 0, 0, 0, -24, 0, -24, 0, 0, 0, 0,
// State 24
-44, -44, -44, 0, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, -44, 0, 0, 0, -44, 0, -44, 0, 0, 0, 0,
// State 25
-15, -15, -15, 0, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 0, -15, 0, -15, 0, -15, 0, 0, 0, 0,
// State 26
-14, -14, -14, 0, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, 0, 0, 0,
// State 27
-43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, 0, -43, 0, -43, 0, 0, 0, 0,
// State 28
-20, -20, -20, 0, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 0, -20, 0, -20, 0, -20, 0, 0, 0, 0,
// State 29
-18, -18, -18, 0, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, 0, 0, 0, 0,
// State 30
-19, -19, -19, 0, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, -19, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0,
// State 31
0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, -8, -8, -8,
// State 32
0, 0, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, -9, 0, -9, -9, -9, -9,
// State 33
0, 0, 0, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, -21, 0, -21, 0, -21, -21, -21, -21,
// State 34
0, 0, 0, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -22, 0, -22, 0, -22, 0, -22, -22, -22, -22,
// State 35
0, 0, 0, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, -27, -27, -27,
// State 36
0, 0, 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, -25, 0, -25, 0, -25, -25, -25, -25,
// State 37
0, 0, 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, -26, -26, -26,
// State 38
0, 0, 0, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, -41, -41, -41,
// State 39
0, 0, 0, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, -37, -37, -37,
// State 40
0, 0, 0, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, -39, -39, -39,
// State 41
0, 0, 0, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, -40, -40, -40,
// State 42
0, 0, 0, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, -36, -36, -36,
// State 43
0, 0, 0, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, -38, -38, -38,
// State 44
0, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42, 0, -42, 0, -42, 0, -42, -42, -42, -42,
// State 45
0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
// State 46
-11, -11, -11, 0, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, -11, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0,
// State 47
-23, -23, -23, 0, -23, -23, -23, 0, -23, -23, -23, -23, -23, -23, -23, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0,
// State 48
-47, -47, -47, 0, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, -47, 0, 0, 0, -47, 0, -47, 0, 0, 0, 0,
// State 49
0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
// State 50
-13, -13, -13, 0, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0,
// State 51
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, -4, 0, -4, -4, -4, 0,
// State 52
-10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0,
// State 53
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, -5, 0, -5, 0, -5, -5, -5, 0,
// State 54
-12, -12, -12, 0, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-35,
// State 2
-54,
// State 3
-7,
// State 4
-17,
// State 5
0,
// State 6
0,
// State 7
0,
// State 8
0,
// State 9
0,
// State 10
0,
// State 11
0,
// State 12
0,
// State 13
-6,
// State 14
-16,
// State 15
-34,
// State 16
-45,
// State 17
-50,
// State 18
-28,
// State 19
-46,
// State 20
-29,
// State 21
-49,
// State 22
-48,
// State 23
-24,
// State 24
-44,
// State 25
-15,
// State 26
-14,
// State 27
-43,
// State 28
-20,
// State 29
-18,
// State 30
-19,
// State 31
0,
// State 32
0,
// State 33
0,
// State 34
0,
// State 35
0,
// State 36
0,
// State 37
0,
// State 38
0,
// State 39
0,
// State 40
0,
// State 41
0,
// State 42
0,
// State 43
0,
// State 44
0,
// State 45
0,
// State 46
-11,
// State 47
-23,
// State 48
-47,
// State 49
0,
// State 50
-13,
// State 51
0,
// State 52
-10,
// State 53
0,
// State 54
-12,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
2 => 12,
3 => match state {
10 => 15,
_ => 1,
},
4 => 7,
5 => 16,
6 => 17,
7 => match state {
5 => 11,
_ => 2,
},
8 => 18,
9 => 19,
10 => 20,
11 => 8,
12 => match state {
7 => 13,
_ => 3,
},
13 => 9,
14 => 21,
16 => match state {
8 => 14,
_ => 4,
},
17 => 10,
18 => 22,
19 => match state {
9 => 47,
_ => 23,
},
20 => match state {
6 => 45,
12 => 49,
_ => 24,
},
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = Box<Expr>;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct ExprParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl ExprParser {
pub fn new() -> ExprParser {
let __builder = super::__intern_token::new_builder();
ExprParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<Box<Expr>, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<Box<Expr>,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
__reduce52(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
53 => {
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
return Some(Ok(__nt));
}
54 => {
__reduce54(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
55 => {
__reduce55(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
56 => {
__reduce56(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
57 => {
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce52<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 22)
}
pub(crate) fn __reduce54<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 24)
}
pub(crate) fn __reduce55<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 25)
}
pub(crate) fn __reduce56<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 26)
}
pub(crate) fn __reduce57<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 27)
}
}
pub use self::__parse__Expr::ExprParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__Identifier {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
// State 1
0, 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 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-55,
// State 2
-19,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
9 => 1,
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = String;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct IdentifierParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl IdentifierParser {
pub fn new() -> IdentifierParser {
let __builder = super::__intern_token::new_builder();
IdentifierParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<String, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<String,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
__reduce52(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
53 => {
__reduce53(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
54 => {
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
return Some(Ok(__nt));
}
55 => {
__reduce55(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
56 => {
__reduce56(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
57 => {
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce52<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 22)
}
pub(crate) fn __reduce53<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 23)
}
pub(crate) fn __reduce55<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 25)
}
pub(crate) fn __reduce56<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 26)
}
pub(crate) fn __reduce57<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 27)
}
}
pub use self::__parse__Identifier::IdentifierParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__MultiplicativeExpr {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 1
0, 32, 0, 0, 0, 33, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// State 2
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 26, 0, 27, 0, 28, 29, 30, 0,
// State 4
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 5
-35, 0, -35, 0, -35, 0, 38, 0, 39, 0, -35, -35, -35, -35, -35, 0, 0, 0, -35, 0, -35, 0, 0, 0, 0,
// State 6
0, 0, 40, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
// State 7
-7, 32, -7, 0, -7, 33, -7, 0, -7, 34, -7, -7, -7, -7, -7, 0, 0, 0, -7, 0, -7, 0, 0, 0, 0,
// State 8
43, 0, -17, 0, -17, 0, 0, 0, 0, 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, -17, 0, 0, 0, 0,
// State 9
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 26, 0, 27, 0, 28, 29, 30, 0,
// State 10
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 11
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 12
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 13
-6, 32, -6, 0, -6, 33, -6, 0, -6, 34, -6, -6, -6, -6, -6, 0, 0, 0, -6, 0, -6, 0, 0, 0, 0,
// State 14
43, 0, -16, 0, -16, 0, 0, 0, 0, 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, -16, 0, 0, 0, 0,
// State 15
-34, 0, -34, 0, -34, 0, 38, 0, 39, 0, -34, -34, -34, -34, -34, 0, 0, 0, -34, 0, -34, 0, 0, 0, 0,
// State 16
-45, -45, -45, 0, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, -45, 0, 0, 0, -45, 0, -45, 0, 0, 0, 0,
// State 17
-50, -50, -50, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, 0, 0, 0, 0,
// State 18
-28, -28, -28, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, 0, 0, 0,
// State 19
-46, -46, -46, 0, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, -46, 0, 0, 0, -46, 0, -46, 0, 0, 0, 0,
// State 20
-29, -29, -29, 0, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, 0, 0, 0,
// State 21
-49, -49, -49, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, 0, 0, 0, 0,
// State 22
-48, -48, -48, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, 0, 0, 0, 0,
// State 23
-24, -24, -24, 0, -24, -24, -24, 0, -24, -24, -24, -24, -24, -24, -24, 0, 0, 0, -24, 0, -24, 0, 0, 0, 0,
// State 24
-44, -44, -44, 0, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, -44, 0, 0, 0, -44, 0, -44, 0, 0, 0, 0,
// State 25
-15, -15, -15, 0, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 0, -15, 0, -15, 0, -15, 0, 0, 0, 0,
// State 26
-14, -14, -14, 0, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, 0, 0, 0,
// State 27
-43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, 0, -43, 0, -43, 0, 0, 0, 0,
// State 28
-20, -20, -20, 0, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 0, -20, 0, -20, 0, -20, 0, 0, 0, 0,
// State 29
-18, -18, -18, 0, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, 0, 0, 0, 0,
// State 30
-19, -19, -19, 0, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, -19, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0,
// State 31
0, 0, 0, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, -27, -27, -27,
// State 32
0, 0, 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, -25, 0, -25, 0, -25, -25, -25, -25,
// State 33
0, 0, 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, -26, -26, -26,
// State 34
0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
// State 35
-11, -11, -11, 0, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, -11, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0,
// State 36
-23, -23, -23, 0, -23, -23, -23, 0, -23, -23, -23, -23, -23, -23, -23, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0,
// State 37
0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, -8, -8, -8,
// State 38
0, 0, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, -9, 0, -9, -9, -9, -9,
// State 39
0, 0, 0, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, -21, 0, -21, 0, -21, -21, -21, -21,
// State 40
-47, -47, -47, 0, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, -47, 0, 0, 0, -47, 0, -47, 0, 0, 0, 0,
// State 41
0, 0, 0, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -22, 0, -22, 0, -22, 0, -22, -22, -22, -22,
// State 42
0, 0, 0, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, -41, -41, -41,
// State 43
0, 0, 0, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, -37, -37, -37,
// State 44
0, 0, 0, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, -39, -39, -39,
// State 45
0, 0, 0, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, -40, -40, -40,
// State 46
0, 0, 0, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, -36, -36, -36,
// State 47
0, 0, 0, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, -38, -38, -38,
// State 48
0, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42, 0, -42, 0, -42, 0, -42, -42, -42, -42,
// State 49
0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
// State 50
-13, -13, -13, 0, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0,
// State 51
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, -4, 0, -4, -4, -4, 0,
// State 52
-10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0,
// State 53
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, -5, 0, -5, 0, -5, -5, -5, 0,
// State 54
-12, -12, -12, 0, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-56,
// State 2
0,
// State 3
0,
// State 4
0,
// State 5
0,
// State 6
0,
// State 7
0,
// State 8
0,
// State 9
0,
// State 10
0,
// State 11
0,
// State 12
0,
// State 13
0,
// State 14
0,
// State 15
0,
// State 16
-45,
// State 17
-50,
// State 18
-28,
// State 19
-46,
// State 20
-29,
// State 21
-49,
// State 22
-48,
// State 23
-24,
// State 24
-44,
// State 25
-15,
// State 26
-14,
// State 27
-43,
// State 28
-20,
// State 29
-18,
// State 30
-19,
// State 31
0,
// State 32
0,
// State 33
0,
// State 34
0,
// State 35
-11,
// State 36
-23,
// State 37
0,
// State 38
0,
// State 39
0,
// State 40
-47,
// State 41
0,
// State 42
0,
// State 43
0,
// State 44
0,
// State 45
0,
// State 46
0,
// State 47
0,
// State 48
0,
// State 49
0,
// State 50
-13,
// State 51
0,
// State 52
-10,
// State 53
0,
// State 54
-12,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
2 => 9,
3 => match state {
12 => 15,
_ => 5,
},
4 => 10,
5 => 16,
6 => 17,
7 => 6,
8 => 18,
9 => 19,
10 => 20,
11 => 11,
12 => match state {
0 => 1,
10 => 13,
_ => 7,
},
13 => 4,
14 => 21,
16 => match state {
11 => 14,
_ => 8,
},
17 => 12,
18 => 22,
19 => match state {
4 => 36,
_ => 23,
},
20 => match state {
3 => 34,
9 => 49,
_ => 24,
},
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = Box<Expr>;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct MultiplicativeExprParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl MultiplicativeExprParser {
pub fn new() -> MultiplicativeExprParser {
let __builder = super::__intern_token::new_builder();
MultiplicativeExprParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<Box<Expr>, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<Box<Expr>,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
__reduce52(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
53 => {
__reduce53(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
54 => {
__reduce54(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
55 => {
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
return Some(Ok(__nt));
}
56 => {
__reduce56(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
57 => {
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce52<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 22)
}
pub(crate) fn __reduce53<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 23)
}
pub(crate) fn __reduce54<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 24)
}
pub(crate) fn __reduce56<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 26)
}
pub(crate) fn __reduce57<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 27)
}
}
pub use self::__parse__MultiplicativeExpr::MultiplicativeExprParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__Op {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
7, 8, 9, 0, 0, 10, 11, 0, 12, 13, 14, 15, 16, 17, 18, 0, 0, 0, 19, 0, 20, 0, 0, 0, 0,
// State 1
0, 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 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
// State 10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
// 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,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-32,
// State 2
-30,
// State 3
-33,
// State 4
-57,
// State 5
-31,
// State 6
-41,
// State 7
-27,
// State 8
-21,
// State 9
-25,
// State 10
-8,
// State 11
-9,
// State 12
-26,
// State 13
-37,
// State 14
-39,
// State 15
-40,
// State 16
-36,
// State 17
-38,
// State 18
-42,
// State 19
-22,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
4 => 1,
11 => 2,
13 => 3,
15 => 4,
17 => 5,
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = Op;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct OpParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl OpParser {
pub fn new() -> OpParser {
let __builder = super::__intern_token::new_builder();
OpParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<Op, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<Op,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
__reduce52(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
53 => {
__reduce53(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
54 => {
__reduce54(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
55 => {
__reduce55(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
56 => {
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
return Some(Ok(__nt));
}
57 => {
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce52<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 22)
}
pub(crate) fn __reduce53<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 23)
}
pub(crate) fn __reduce54<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 24)
}
pub(crate) fn __reduce55<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 25)
}
pub(crate) fn __reduce57<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 27)
}
}
pub use self::__parse__Op::OpParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __parse__RelationalExpr {
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
use self::__lalrpop_util::lexer::Token;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(&'input str),
Variant1(Value),
Variant2(alloc::vec::Vec<Value>),
Variant3(Box<Expr>),
Variant4(Op),
Variant5(Vec<Value>),
Variant6(bool),
Variant7(f64),
Variant8(String),
Variant9(i64),
Variant10(core::option::Option<Value>),
}
const __ACTION: &[i8] = &[
// State 0
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 1
-35, 0, -35, 0, -35, 0, 32, 0, 33, 0, -35, -35, -35, -35, -35, 0, 0, 0, -35, 0, -35, 0, 0, 0, 0,
// State 2
-7, 34, -7, 0, -7, 35, -7, 0, -7, 36, -7, -7, -7, -7, -7, 0, 0, 0, -7, 0, -7, 0, 0, 0, 0,
// State 3
37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 40, 41, 42, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0,
// State 4
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 5
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 26, 0, 27, 0, 28, 29, 30, 0,
// State 6
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 7
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 8
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 9
0, 0, 47, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0,
// State 10
37, 0, -17, 0, -17, 0, 0, 0, 0, 0, 38, 39, 40, 41, 42, 0, 0, 0, 43, 0, -17, 0, 0, 0, 0,
// State 11
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 26, 0, 27, 0, 28, 29, 30, 0,
// State 12
-6, 34, -6, 0, -6, 35, -6, 0, -6, 36, -6, -6, -6, -6, -6, 0, 0, 0, -6, 0, -6, 0, 0, 0, 0,
// State 13
-34, 0, -34, 0, -34, 0, 32, 0, 33, 0, -34, -34, -34, -34, -34, 0, 0, 0, -34, 0, -34, 0, 0, 0, 0,
// State 14
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 26, 0, 27, 0, 28, 29, 30, 31,
// State 15
37, 0, -16, 0, -16, 0, 0, 0, 0, 0, 38, 39, 40, 41, 42, 0, 0, 0, 43, 0, -16, 0, 0, 0, 0,
// State 16
-45, -45, -45, 0, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, -45, 0, 0, 0, -45, 0, -45, 0, 0, 0, 0,
// State 17
-50, -50, -50, 0, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 0, -50, 0, -50, 0, -50, 0, 0, 0, 0,
// State 18
-28, -28, -28, 0, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 0, -28, 0, -28, 0, -28, 0, 0, 0, 0,
// State 19
-46, -46, -46, 0, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, -46, 0, 0, 0, -46, 0, -46, 0, 0, 0, 0,
// State 20
-29, -29, -29, 0, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 0, -29, 0, -29, 0, -29, 0, 0, 0, 0,
// State 21
-49, -49, -49, 0, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 0, -49, 0, -49, 0, -49, 0, 0, 0, 0,
// State 22
-48, -48, -48, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, -48, 0, -48, 0, -48, 0, 0, 0, 0,
// State 23
-24, -24, -24, 0, -24, -24, -24, 0, -24, -24, -24, -24, -24, -24, -24, 0, 0, 0, -24, 0, -24, 0, 0, 0, 0,
// State 24
-44, -44, -44, 0, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, -44, 0, 0, 0, -44, 0, -44, 0, 0, 0, 0,
// State 25
-15, -15, -15, 0, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 0, -15, 0, -15, 0, -15, 0, 0, 0, 0,
// State 26
-14, -14, -14, 0, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 0, -14, 0, -14, 0, -14, 0, 0, 0, 0,
// State 27
-43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, 0, -43, 0, -43, 0, 0, 0, 0,
// State 28
-20, -20, -20, 0, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 0, -20, 0, -20, 0, -20, 0, 0, 0, 0,
// State 29
-18, -18, -18, 0, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 0, -18, 0, -18, 0, -18, 0, 0, 0, 0,
// State 30
-19, -19, -19, 0, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, -19, 0, 0, 0, -19, 0, -19, 0, 0, 0, 0,
// State 31
0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, -8, -8, -8,
// State 32
0, 0, 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, -9, 0, -9, 0, -9, -9, -9, -9,
// State 33
0, 0, 0, -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -27, 0, -27, 0, -27, 0, -27, -27, -27, -27,
// State 34
0, 0, 0, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, -25, 0, -25, 0, -25, -25, -25, -25,
// State 35
0, 0, 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, 0, -26, 0, -26, 0, -26, -26, -26, -26,
// State 36
0, 0, 0, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -41, 0, -41, 0, -41, 0, -41, -41, -41, -41,
// State 37
0, 0, 0, -37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -37, 0, -37, 0, -37, 0, -37, -37, -37, -37,
// State 38
0, 0, 0, -39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, 0, -39, 0, -39, 0, -39, -39, -39, -39,
// State 39
0, 0, 0, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40, 0, -40, 0, -40, 0, -40, -40, -40, -40,
// State 40
0, 0, 0, -36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36, 0, -36, 0, -36, 0, -36, -36, -36, -36,
// State 41
0, 0, 0, -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, -38, 0, -38, 0, -38, -38, -38, -38,
// State 42
0, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42, 0, -42, 0, -42, 0, -42, -42, -42, -42,
// State 43
0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
// State 44
-11, -11, -11, 0, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, -11, 0, 0, 0, -11, 0, -11, 0, 0, 0, 0,
// State 45
-23, -23, -23, 0, -23, -23, -23, 0, -23, -23, -23, -23, -23, -23, -23, 0, 0, 0, -23, 0, -23, 0, 0, 0, 0,
// State 46
0, 0, 0, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 0, -21, 0, -21, 0, -21, -21, -21, -21,
// State 47
-47, -47, -47, 0, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, -47, 0, 0, 0, -47, 0, -47, 0, 0, 0, 0,
// State 48
0, 0, 0, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -22, 0, -22, 0, -22, 0, -22, -22, -22, -22,
// State 49
0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
// State 50
-13, -13, -13, 0, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, -13, 0, 0, 0, -13, 0, -13, 0, 0, 0, 0,
// State 51
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, -4, 0, -4, -4, -4, 0,
// State 52
-10, -10, -10, 0, -10, -10, -10, 0, -10, -10, -10, -10, -10, -10, -10, 0, 0, 0, -10, 0, -10, 0, 0, 0, 0,
// State 53
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, -5, 0, -5, 0, -5, -5, -5, 0,
// State 54
-12, -12, -12, 0, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, -12, 0, 0, 0, -12, 0, -12, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 25 + integer]
}
const __EOF_ACTION: &[i8] = &[
// State 0
0,
// State 1
-35,
// State 2
-7,
// State 3
-58,
// State 4
0,
// State 5
0,
// State 6
0,
// State 7
0,
// State 8
0,
// State 9
0,
// State 10
0,
// State 11
0,
// State 12
-6,
// State 13
-34,
// State 14
0,
// State 15
0,
// State 16
-45,
// State 17
-50,
// State 18
-28,
// State 19
-46,
// State 20
-29,
// State 21
-49,
// State 22
-48,
// State 23
-24,
// State 24
-44,
// State 25
-15,
// State 26
-14,
// State 27
-43,
// State 28
-20,
// State 29
-18,
// State 30
-19,
// State 31
0,
// State 32
0,
// State 33
0,
// State 34
0,
// State 35
0,
// State 36
0,
// State 37
0,
// State 38
0,
// State 39
0,
// State 40
0,
// State 41
0,
// State 42
0,
// State 43
0,
// State 44
-11,
// State 45
-23,
// State 46
0,
// State 47
-47,
// State 48
0,
// State 49
0,
// State 50
-13,
// State 51
0,
// State 52
-10,
// State 53
0,
// State 54
-12,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
2 => 11,
3 => match state {
8 => 13,
_ => 1,
},
4 => 6,
5 => 16,
6 => 17,
7 => 9,
8 => 18,
9 => 19,
10 => 20,
11 => 14,
12 => match state {
6 => 12,
_ => 2,
},
13 => 7,
14 => 21,
16 => match state {
4 => 10,
14 => 15,
_ => 3,
},
17 => 8,
18 => 22,
19 => match state {
7 => 45,
_ => 23,
},
20 => match state {
5 => 43,
11 => 49,
_ => 24,
},
_ => 0,
}
}
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
const __TERMINAL: &[&str] = &[
r###""!=""###,
r###""%""###,
r###""&&""###,
r###""(""###,
r###"")""###,
r###""*""###,
r###""+""###,
r###"",""###,
r###""-""###,
r###""/""###,
r###""<""###,
r###""<=""###,
r###""==""###,
r###"">""###,
r###"">=""###,
r###""[""###,
r###""]""###,
r###""false""###,
r###""in""###,
r###""true""###,
r###""||""###,
r###"r#"'[^']*'"#"###,
r###"r#"[0-9]+"#"###,
r###"r#"[0-9]+\\.[0-9]+"#"###,
r###"r#"\\{[a-z][a-z0-9_]*\\}"#"###,
];
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
let next_state = __action(__state, index);
if next_state == 0 {
None
} else {
Some(alloc::string::ToString::to_string(terminal))
}
}).collect()
}
pub(crate) struct __StateMachine<'input>
where
{
input: &'input str,
__phantom: core::marker::PhantomData<(&'input ())>,
}
impl<'input> __state_machine::ParserDefinition for __StateMachine<'input>
where
{
type Location = usize;
type Error = &'static str;
type Token = Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = Box<Expr>;
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<usize> {
__token_to_integer(token, core::marker::PhantomData::<(&())>)
}
#[inline]
fn action(&self, state: i8, integer: usize) -> i8 {
__action(state, integer)
}
#[inline]
fn error_action(&self, state: i8) -> i8 {
__action(state, 25 - 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, nt)
}
fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
__token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>)
}
fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens(state)
}
#[inline]
fn uses_error_recovery(&self) -> bool {
false
}
#[inline]
fn error_recovery_symbol(
&self,
recovery: __state_machine::ErrorRecovery<Self>,
) -> Self::Symbol {
panic!("error recovery not enabled for this grammar")
}
fn reduce(
&mut self,
action: i8,
start_location: Option<&Self::Location>,
states: &mut alloc::vec::Vec<i8>,
symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
) -> Option<__state_machine::ParseResult<Self>> {
__reduce(
self.input,
action,
start_location,
states,
symbols,
core::marker::PhantomData::<(&())>,
)
}
fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
panic!("error recovery not enabled for this grammar")
}
}
fn __token_to_integer<
'input,
>(
__token: &Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
match *__token {
Token(4, _) if true => Some(0),
Token(5, _) if true => Some(1),
Token(6, _) if true => Some(2),
Token(7, _) if true => Some(3),
Token(8, _) if true => Some(4),
Token(9, _) if true => Some(5),
Token(10, _) if true => Some(6),
Token(11, _) if true => Some(7),
Token(12, _) if true => Some(8),
Token(13, _) if true => Some(9),
Token(14, _) if true => Some(10),
Token(15, _) if true => Some(11),
Token(16, _) if true => Some(12),
Token(17, _) if true => Some(13),
Token(18, _) if true => Some(14),
Token(19, _) if true => Some(15),
Token(20, _) if true => Some(16),
Token(21, _) if true => Some(17),
Token(22, _) if true => Some(18),
Token(23, _) if true => Some(19),
Token(24, _) if true => Some(20),
Token(0, _) if true => Some(21),
Token(1, _) if true => Some(22),
Token(2, _) if true => Some(23),
Token(3, _) if true => Some(24),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
match __token_index {
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 => match __token {
Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
pub struct RelationalExprParser {
builder: __lalrpop_util::lexer::MatcherBuilder,
_priv: (),
}
impl RelationalExprParser {
pub fn new() -> RelationalExprParser {
let __builder = super::__intern_token::new_builder();
RelationalExprParser {
builder: __builder,
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
>(
&self,
input: &'input str,
) -> Result<Box<Expr>, __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>
{
let mut __tokens = self.builder.matcher(input);
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
pub(crate) fn __reduce<
'input,
>(
input: &'input str,
__action: i8,
__lookahead_start: Option<&usize>,
__states: &mut alloc::vec::Vec<i8>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<Result<Box<Expr>,__lalrpop_util::ParseError<usize, Token<'input>, &'static str>>>
{
let (__pop_states, __nonterminal) = match __action {
0 => {
__reduce0(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
1 => {
__reduce1(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
2 => {
__reduce2(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
3 => {
__reduce3(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
4 => {
__reduce4(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
5 => {
__reduce5(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
6 => {
__reduce6(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
7 => {
__reduce7(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
8 => {
__reduce8(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
9 => {
__reduce9(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
10 => {
__reduce10(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
11 => {
__reduce11(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
12 => {
__reduce12(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
13 => {
__reduce13(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
14 => {
__reduce14(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
15 => {
__reduce15(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
16 => {
__reduce16(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
17 => {
__reduce17(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
18 => {
__reduce18(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
19 => {
__reduce19(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
20 => {
__reduce20(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
21 => {
__reduce21(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
22 => {
__reduce22(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
23 => {
__reduce23(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
24 => {
__reduce24(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
25 => {
__reduce25(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
26 => {
__reduce26(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
27 => {
__reduce27(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
28 => {
__reduce28(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
29 => {
__reduce29(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
30 => {
__reduce30(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
31 => {
__reduce31(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
32 => {
__reduce32(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
33 => {
__reduce33(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
34 => {
__reduce34(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
35 => {
__reduce35(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
36 => {
__reduce36(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
37 => {
__reduce37(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
38 => {
__reduce38(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
39 => {
__reduce39(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
40 => {
__reduce40(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
41 => {
__reduce41(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
42 => {
__reduce42(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
43 => {
__reduce43(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
44 => {
__reduce44(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
45 => {
__reduce45(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
46 => {
__reduce46(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
47 => {
__reduce47(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
48 => {
__reduce48(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
49 => {
__reduce49(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
50 => {
__reduce50(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
51 => {
__reduce51(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
52 => {
__reduce52(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
53 => {
__reduce53(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
54 => {
__reduce54(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
55 => {
__reduce55(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
56 => {
__reduce56(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
}
57 => {
// __RelationalExpr = RelationalExpr => ActionFn(2);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action2::<>(input, __sym0);
return Some(Ok(__nt));
}
_ => panic!("invalid action code {}", __action)
};
let __states_len = __states.len();
__states.truncate(__states_len - __pop_states);
let __state = *__states.last().unwrap();
let __next_state = __goto(__state, __nonterminal);
__states.push(__next_state);
None
}
#[inline(never)]
fn __symbol_type_mismatch() -> ! {
panic!("symbol type mismatch")
}
fn __pop_Variant3<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Box<Expr>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Op, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, String, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Value, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, alloc::vec::Vec<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, bool, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant10<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, core::option::Option<Value>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, f64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, i64, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant9(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant0<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
pub(crate) fn __reduce0<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",") = Value, "," => ActionFn(52);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action52::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(2, 0)
}
pub(crate) fn __reduce1<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = => ActionFn(50);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action50::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
pub(crate) fn __reduce2<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")* = (<Value> ",")+ => ActionFn(51);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action51::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(1, 1)
}
pub(crate) fn __reduce3<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = Value, "," => ActionFn(55);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action55::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(2, 2)
}
pub(crate) fn __reduce4<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// (<Value> ",")+ = (<Value> ",")+, Value, "," => ActionFn(56);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant1(__symbols);
let __sym0 = __pop_Variant2(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action56::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(3, 2)
}
pub(crate) fn __reduce5<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = AdditiveExpr, AdditiveOp, MultiplicativeExpr => ActionFn(14);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 3)
}
pub(crate) fn __reduce6<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveExpr = MultiplicativeExpr => ActionFn(15);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action15::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 3)
}
pub(crate) fn __reduce7<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "+" => ActionFn(27);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action27::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce8<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// AdditiveOp = "-" => ActionFn(28);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action28::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 4)
}
pub(crate) fn __reduce9<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", Value, "]" => ActionFn(59);
assert!(__symbols.len() >= 3);
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::__action59::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce10<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", "]" => ActionFn(60);
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym1.2.clone();
let __nt = super::__action60::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 5)
}
pub(crate) fn __reduce11<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, Value, "]" => ActionFn(61);
assert!(__symbols.len() >= 4);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant1(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym3.2.clone();
let __nt = super::__action61::<>(input, __sym0, __sym1, __sym2, __sym3);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(4, 5)
}
pub(crate) fn __reduce12<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Array<Value> = "[", (<Value> ",")+, "]" => ActionFn(62);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant0(__symbols);
let __sym1 = __pop_Variant2(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(3, 5)
}
pub(crate) fn __reduce13<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "true" => ActionFn(40);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action40::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce14<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// BoolValue = "false" => ActionFn(41);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action41::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(1, 6)
}
pub(crate) fn __reduce15<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = Expr, LogicalOp, RelationalExpr => ActionFn(6);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 7)
}
pub(crate) fn __reduce16<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Expr = RelationalExpr => ActionFn(7);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action7::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 7)
}
pub(crate) fn __reduce17<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// FloatValue = r#"[0-9]+\\.[0-9]+"# => ActionFn(46);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action46::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 8)
}
pub(crate) fn __reduce18<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Identifier = r#"\\{[a-z][a-z0-9_]*\\}"# => ActionFn(39);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action39::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 9)
}
pub(crate) fn __reduce19<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// IntegerValue = r#"[0-9]+"# => ActionFn(45);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action45::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 10)
}
pub(crate) fn __reduce20<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "&&" => ActionFn(18);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action18::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce21<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// LogicalOp = "||" => ActionFn(19);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action19::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 11)
}
pub(crate) fn __reduce22<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = MultiplicativeExpr, MultiplicativeOp, Term => ActionFn(16);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 12)
}
pub(crate) fn __reduce23<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeExpr = Term => ActionFn(17);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 12)
}
pub(crate) fn __reduce24<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "*" => ActionFn(29);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action29::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce25<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "/" => ActionFn(30);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action30::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce26<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// MultiplicativeOp = "%" => ActionFn(31);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action31::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 13)
}
pub(crate) fn __reduce27<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = FloatValue => ActionFn(42);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action42::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce28<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// NumberValue = IntegerValue => ActionFn(43);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action43::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 14)
}
pub(crate) fn __reduce29<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = LogicalOp => ActionFn(8);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action8::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce30<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = RelationalOp => ActionFn(9);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action9::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce31<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = AdditiveOp => ActionFn(10);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action10::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce32<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Op = MultiplicativeOp => ActionFn(11);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action11::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 15)
}
pub(crate) fn __reduce33<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = RelationalExpr, RelationalOp, AdditiveExpr => ActionFn(12);
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant3(__symbols);
let __sym1 = __pop_Variant4(__symbols);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym2.2.clone();
let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 16)
}
pub(crate) fn __reduce34<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalExpr = AdditiveExpr => ActionFn(13);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action13::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 16)
}
pub(crate) fn __reduce35<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">" => ActionFn(20);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action20::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce36<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<" => ActionFn(21);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action21::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce37<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = ">=" => ActionFn(22);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action22::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce38<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "<=" => ActionFn(23);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action23::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce39<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "==" => ActionFn(24);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action24::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce40<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "!=" => ActionFn(25);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action25::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce41<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// RelationalOp = "in" => ActionFn(26);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action26::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 17)
}
pub(crate) fn __reduce42<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// StringValue = r#"'[^']*'"# => ActionFn(44);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action44::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 18)
}
pub(crate) fn __reduce43<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Value => ActionFn(35);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action35::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce44<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Array<Value> => ActionFn(36);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action36::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce45<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = Identifier => ActionFn(37);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action37::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 19)
}
pub(crate) fn __reduce46<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Term = "(", Expr, ")" => ActionFn(38);
assert!(__symbols.len() >= 3);
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::__action38::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(3, 19)
}
pub(crate) fn __reduce47<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = StringValue => ActionFn(32);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action32::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce48<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = NumberValue => ActionFn(33);
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action33::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce49<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value = BoolValue => ActionFn(34);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action34::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
(1, 20)
}
pub(crate) fn __reduce50<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = Value => ActionFn(48);
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action48::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(1, 21)
}
pub(crate) fn __reduce51<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// Value? = => ActionFn(49);
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
let __end = __start.clone();
let __nt = super::__action49::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
(0, 21)
}
pub(crate) fn __reduce52<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __AdditiveExpr = AdditiveExpr => ActionFn(3);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 22)
}
pub(crate) fn __reduce53<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Expr = Expr => ActionFn(0);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action0::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 23)
}
pub(crate) fn __reduce54<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Identifier = Identifier => ActionFn(5);
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 24)
}
pub(crate) fn __reduce55<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __MultiplicativeExpr = MultiplicativeExpr => ActionFn(4);
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(1, 25)
}
pub(crate) fn __reduce56<
'input,
>(
input: &'input str,
__lookahead_start: Option<&usize>,
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
_: core::marker::PhantomData<(&'input ())>,
) -> (usize, usize)
{
// __Op = Op => ActionFn(1);
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0.clone();
let __end = __sym0.2.clone();
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(1, 26)
}
}
pub use self::__parse__RelationalExpr::RelationalExprParser;
#[cfg_attr(rustfmt, rustfmt_skip)]
mod __intern_token {
#![allow(unused_imports)]
use std::str::FromStr;
use crate::ast::{
expr::Expr,
op::{AdditiveOp, LogicalOp, MultiplicativeOp, Op, RelationalOp},
value::Value,
};
use crate::parser::parser::parse_parameter_name;
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
extern crate core;
extern crate alloc;
pub fn new_builder() -> __lalrpop_util::lexer::MatcherBuilder {
let __strs: &[(&str, bool)] = &[
("^('[\u{0}-\\&\\(-\u{10ffff}]*')", false),
("^([0-9]+)", false),
("^([0-9]+\\.[0-9]+)", false),
("^(\\{[a-z][0-9_a-z]*\\})", false),
("^(!=)", false),
("^(%)", false),
("^(\\&\\&)", false),
("^(\\()", false),
("^(\\))", false),
("^(\\*)", false),
("^(\\+)", false),
("^(,)", false),
("^(\\-)", false),
("^(/)", false),
("^(<)", false),
("^(<=)", false),
("^(==)", false),
("^(>)", false),
("^(>=)", false),
("^(\\[)", false),
("^(\\])", false),
("^(false)", false),
("^(in)", false),
("^(true)", false),
("^(\\|\\|)", false),
(r"^(\s*)", true),
];
__lalrpop_util::lexer::MatcherBuilder::new(__strs.iter().copied()).unwrap()
}
}
pub(crate) use self::__lalrpop_util::lexer::Token;
#[allow(unused_variables)]
fn __action0<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action1<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Op, usize),
) -> Op
{
__0
}
#[allow(unused_variables)]
fn __action2<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action3<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action4<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action5<
'input,
>(
input: &'input str,
(_, __0, _): (usize, String, usize),
) -> String
{
__0
}
#[allow(unused_variables)]
fn __action6<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
(_, __1, _): (usize, Op, usize),
(_, __2, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
Box::new(Expr::Op(__0, __1, __2))
}
#[allow(unused_variables)]
fn __action7<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action8<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Op, usize),
) -> Op
{
__0
}
#[allow(unused_variables)]
fn __action9<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Op, usize),
) -> Op
{
__0
}
#[allow(unused_variables)]
fn __action10<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Op, usize),
) -> Op
{
__0
}
#[allow(unused_variables)]
fn __action11<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Op, usize),
) -> Op
{
__0
}
#[allow(unused_variables)]
fn __action12<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
(_, __1, _): (usize, Op, usize),
(_, __2, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
Box::new(Expr::Op(__0, __1, __2))
}
#[allow(unused_variables)]
fn __action13<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action14<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
(_, __1, _): (usize, Op, usize),
(_, __2, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
Box::new(Expr::Op(__0, __1, __2))
}
#[allow(unused_variables)]
fn __action15<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action16<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
(_, __1, _): (usize, Op, usize),
(_, __2, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
Box::new(Expr::Op(__0, __1, __2))
}
#[allow(unused_variables)]
fn __action17<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Box<Expr>, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action18<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Logical(LogicalOp::And)
}
#[allow(unused_variables)]
fn __action19<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Logical(LogicalOp::Or)
}
#[allow(unused_variables)]
fn __action20<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Gt)
}
#[allow(unused_variables)]
fn __action21<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Lt)
}
#[allow(unused_variables)]
fn __action22<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Gte)
}
#[allow(unused_variables)]
fn __action23<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Lte)
}
#[allow(unused_variables)]
fn __action24<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Eq)
}
#[allow(unused_variables)]
fn __action25<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::Neq)
}
#[allow(unused_variables)]
fn __action26<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Relational(RelationalOp::In)
}
#[allow(unused_variables)]
fn __action27<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Additive(AdditiveOp::Add)
}
#[allow(unused_variables)]
fn __action28<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Additive(AdditiveOp::Sub)
}
#[allow(unused_variables)]
fn __action29<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Multiplicative(MultiplicativeOp::Mul)
}
#[allow(unused_variables)]
fn __action30<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Multiplicative(MultiplicativeOp::Div)
}
#[allow(unused_variables)]
fn __action31<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> Op
{
Op::Multiplicative(MultiplicativeOp::Mod)
}
#[allow(unused_variables)]
fn __action32<
'input,
>(
input: &'input str,
(_, __0, _): (usize, String, usize),
) -> Value
{
Value::String(__0)
}
#[allow(unused_variables)]
fn __action33<
'input,
>(
input: &'input str,
(_, __0, _): (usize, f64, usize),
) -> Value
{
Value::Number(__0)
}
#[allow(unused_variables)]
fn __action34<
'input,
>(
input: &'input str,
(_, __0, _): (usize, bool, usize),
) -> Value
{
Value::Bool(__0)
}
#[allow(unused_variables)]
fn __action35<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Value, usize),
) -> Box<Expr>
{
Box::new(Expr::Value(__0))
}
#[allow(unused_variables)]
fn __action36<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Vec<Value>, usize),
) -> Box<Expr>
{
Box::new(Expr::Value(Value::Array(__0)))
}
#[allow(unused_variables)]
fn __action37<
'input,
>(
input: &'input str,
(_, __0, _): (usize, String, usize),
) -> Box<Expr>
{
Box::new(Expr::Identifier(parse_parameter_name(&__0)))
}
#[allow(unused_variables)]
fn __action38<
'input,
>(
input: &'input str,
(_, _, _): (usize, &'input str, usize),
(_, __0, _): (usize, Box<Expr>, usize),
(_, _, _): (usize, &'input str, usize),
) -> Box<Expr>
{
__0
}
#[allow(unused_variables)]
fn __action39<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> String
{
__0.to_string()
}
#[allow(unused_variables)]
fn __action40<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> bool
{
true
}
#[allow(unused_variables)]
fn __action41<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> bool
{
false
}
#[allow(unused_variables)]
fn __action42<
'input,
>(
input: &'input str,
(_, __0, _): (usize, f64, usize),
) -> f64
{
__0
}
#[allow(unused_variables)]
fn __action43<
'input,
>(
input: &'input str,
(_, __0, _): (usize, i64, usize),
) -> f64
{
__0 as f64
}
#[allow(unused_variables)]
fn __action44<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> String
{
__0.to_string()
}
#[allow(unused_variables)]
fn __action45<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> i64
{
i64::from_str(__0).unwrap()
}
#[allow(unused_variables)]
fn __action46<
'input,
>(
input: &'input str,
(_, __0, _): (usize, &'input str, usize),
) -> f64
{
f64::from_str(__0).unwrap()
}
#[allow(unused_variables)]
fn __action47<
'input,
>(
input: &'input str,
(_, _, _): (usize, &'input str, usize),
(_, v, _): (usize, alloc::vec::Vec<Value>, usize),
(_, e, _): (usize, core::option::Option<Value>, usize),
(_, _, _): (usize, &'input str, usize),
) -> Vec<Value>
{
match e {
None => v,
Some(e) => {
let mut v = v;
v.push(e);
v
}
}
}
#[allow(unused_variables)]
fn __action48<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Value, usize),
) -> core::option::Option<Value>
{
Some(__0)
}
#[allow(unused_variables)]
fn __action49<
'input,
>(
input: &'input str,
__lookbehind: &usize,
__lookahead: &usize,
) -> core::option::Option<Value>
{
None
}
#[allow(unused_variables)]
fn __action50<
'input,
>(
input: &'input str,
__lookbehind: &usize,
__lookahead: &usize,
) -> alloc::vec::Vec<Value>
{
alloc::vec![]
}
#[allow(unused_variables)]
fn __action51<
'input,
>(
input: &'input str,
(_, v, _): (usize, alloc::vec::Vec<Value>, usize),
) -> alloc::vec::Vec<Value>
{
v
}
#[allow(unused_variables)]
fn __action52<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Value, usize),
(_, _, _): (usize, &'input str, usize),
) -> Value
{
__0
}
#[allow(unused_variables)]
fn __action53<
'input,
>(
input: &'input str,
(_, __0, _): (usize, Value, usize),
) -> alloc::vec::Vec<Value>
{
alloc::vec![__0]
}
#[allow(unused_variables)]
fn __action54<
'input,
>(
input: &'input str,
(_, v, _): (usize, alloc::vec::Vec<Value>, usize),
(_, e, _): (usize, Value, usize),
) -> alloc::vec::Vec<Value>
{
{ let mut v = v; v.push(e); v }
}
#[allow(unused_variables)]
fn __action55<
'input,
>(
input: &'input str,
__0: (usize, Value, usize),
__1: (usize, &'input str, usize),
) -> alloc::vec::Vec<Value>
{
let __start0 = __0.0.clone();
let __end0 = __1.2.clone();
let __temp0 = __action52(
input,
__0,
__1,
);
let __temp0 = (__start0, __temp0, __end0);
__action53(
input,
__temp0,
)
}
#[allow(unused_variables)]
fn __action56<
'input,
>(
input: &'input str,
__0: (usize, alloc::vec::Vec<Value>, usize),
__1: (usize, Value, usize),
__2: (usize, &'input str, usize),
) -> alloc::vec::Vec<Value>
{
let __start0 = __1.0.clone();
let __end0 = __2.2.clone();
let __temp0 = __action52(
input,
__1,
__2,
);
let __temp0 = (__start0, __temp0, __end0);
__action54(
input,
__0,
__temp0,
)
}
#[allow(unused_variables)]
fn __action57<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, core::option::Option<Value>, usize),
__2: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __0.2.clone();
let __end0 = __1.0.clone();
let __temp0 = __action50(
input,
&__start0,
&__end0,
);
let __temp0 = (__start0, __temp0, __end0);
__action47(
input,
__0,
__temp0,
__1,
__2,
)
}
#[allow(unused_variables)]
fn __action58<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, alloc::vec::Vec<Value>, usize),
__2: (usize, core::option::Option<Value>, usize),
__3: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __1.0.clone();
let __end0 = __1.2.clone();
let __temp0 = __action51(
input,
__1,
);
let __temp0 = (__start0, __temp0, __end0);
__action47(
input,
__0,
__temp0,
__2,
__3,
)
}
#[allow(unused_variables)]
fn __action59<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, Value, usize),
__2: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __1.0.clone();
let __end0 = __1.2.clone();
let __temp0 = __action48(
input,
__1,
);
let __temp0 = (__start0, __temp0, __end0);
__action57(
input,
__0,
__temp0,
__2,
)
}
#[allow(unused_variables)]
fn __action60<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __0.2.clone();
let __end0 = __1.0.clone();
let __temp0 = __action49(
input,
&__start0,
&__end0,
);
let __temp0 = (__start0, __temp0, __end0);
__action57(
input,
__0,
__temp0,
__1,
)
}
#[allow(unused_variables)]
fn __action61<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, alloc::vec::Vec<Value>, usize),
__2: (usize, Value, usize),
__3: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __2.0.clone();
let __end0 = __2.2.clone();
let __temp0 = __action48(
input,
__2,
);
let __temp0 = (__start0, __temp0, __end0);
__action58(
input,
__0,
__1,
__temp0,
__3,
)
}
#[allow(unused_variables)]
fn __action62<
'input,
>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, alloc::vec::Vec<Value>, usize),
__2: (usize, &'input str, usize),
) -> Vec<Value>
{
let __start0 = __1.2.clone();
let __end0 = __2.0.clone();
let __temp0 = __action49(
input,
&__start0,
&__end0,
);
let __temp0 = (__start0, __temp0, __end0);
__action58(
input,
__0,
__1,
__temp0,
__2,
)
}
pub trait __ToTriple<'input, >
{
fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>;
}
impl<'input, > __ToTriple<'input, > for (usize, Token<'input>, usize)
{
fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>> {
Ok(value)
}
}
impl<'input, > __ToTriple<'input, > for Result<(usize, Token<'input>, usize), &'static str>
{
fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>> {
match value {
Ok(v) => Ok(v),
Err(error) => Err(__lalrpop_util::ParseError::User { error }),
}
}
}