30282 lines
1.0 MiB
30282 lines
1.0 MiB
// auto-generated: "lalrpop 0.19.9"
|
|
// sha3: e3c0aaee72cba0cffa77a0a1341baf0059c3cd40d77aa5ee684fb58b4861fdda
|
|
use crate::syn::ast::*;
|
|
use crate::syn::{unescape, Span, Spanned};
|
|
use std::str::FromStr;
|
|
#[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 alloc;
|
|
extern crate core;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__AssignLhs {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
|
|
// State 1
|
|
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,
|
|
// State 3
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
-62,
|
|
// State 2
|
|
-21,
|
|
// State 3
|
|
-42,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
13 => 1,
|
|
21 => 2,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = AssignLhs;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct AssignLhsParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl AssignLhsParser {
|
|
pub fn new() -> AssignLhsParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
AssignLhsParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<AssignLhs, __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<AssignLhs,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__AssignLhs::AssignLhsParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__Atom {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9,
|
|
// State 1
|
|
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,
|
|
// State 3
|
|
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,
|
|
// State 5
|
|
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,
|
|
// State 7
|
|
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,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
-63,
|
|
// State 2
|
|
-23,
|
|
// State 3
|
|
-24,
|
|
// State 4
|
|
-22,
|
|
// State 5
|
|
-60,
|
|
// State 6
|
|
-61,
|
|
// State 7
|
|
-41,
|
|
// State 8
|
|
-42,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
14 => 1,
|
|
20 => 2,
|
|
21 => 3,
|
|
35 => 4,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Atom;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct AtomParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl AtomParser {
|
|
pub fn new() -> AtomParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
AtomParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Atom, __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<Atom,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__Atom::AtomParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__Block {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 1
|
|
4, 0, 0, 0, 0, 0, 5, 0, -27, 35, 36, 37, 38,
|
|
// State 2
|
|
4, 0, 0, 0, 0, 0, 5, 0, -29, 35, 36, 37, 38,
|
|
// State 3
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 4
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 5
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 6
|
|
4, 48, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 7
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 8
|
|
4, 53, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 9
|
|
0, 0, 0, -39, 0, 11, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 10
|
|
0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 13
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 14
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 18
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 19
|
|
0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
|
|
// State 20
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 21
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 22
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 23
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 24
|
|
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 25
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 26
|
|
7, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 27
|
|
0, 0, 0, 41, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 28
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 29
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 30
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 31
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 32
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 33
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 34
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 35
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 36
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 37
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 38
|
|
0, 0, 0, 45, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 39
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 40
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 41
|
|
-55, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 42
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 43
|
|
7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 44
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 45
|
|
7, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 46
|
|
7, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 47
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 48
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 49
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 50
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 51
|
|
7, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 52
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 53
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 54
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 55
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 56
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 57
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 58
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 59
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// 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
|
|
-64,
|
|
// State 17
|
|
0,
|
|
// State 18
|
|
0,
|
|
// State 19
|
|
0,
|
|
// State 20
|
|
0,
|
|
// State 21
|
|
0,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
0,
|
|
// State 24
|
|
0,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
0,
|
|
// State 27
|
|
0,
|
|
// State 28
|
|
0,
|
|
// State 29
|
|
0,
|
|
// State 30
|
|
0,
|
|
// 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
|
|
-25,
|
|
// State 40
|
|
0,
|
|
// 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
|
|
0,
|
|
// State 51
|
|
0,
|
|
// State 52
|
|
0,
|
|
// State 53
|
|
0,
|
|
// State 54
|
|
0,
|
|
// State 55
|
|
0,
|
|
// State 56
|
|
0,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
0,
|
|
// State 59
|
|
0,
|
|
// State 60
|
|
0,
|
|
// State 61
|
|
0,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 55,
|
|
7 => 8,
|
|
10 => 2,
|
|
13 => 17,
|
|
14 => 18,
|
|
15 => match state {
|
|
0 => 16,
|
|
_ => 49,
|
|
},
|
|
16 => 19,
|
|
17 => match state {
|
|
3 => 41,
|
|
_ => 20,
|
|
},
|
|
19 => 21,
|
|
20 => 22,
|
|
21 => match state {
|
|
1..=2 => 23,
|
|
_ => 42,
|
|
},
|
|
22 => 24,
|
|
23 => 25,
|
|
24 => match state {
|
|
10 => 58,
|
|
11 => 59,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 9,
|
|
},
|
|
25 => match state {
|
|
12 => 14,
|
|
13 => 15,
|
|
1..=2 => 26,
|
|
3 => 43,
|
|
5 => 45,
|
|
6 => 46,
|
|
8 => 51,
|
|
_ => 7,
|
|
},
|
|
27 => match state {
|
|
2 => 38,
|
|
_ => 27,
|
|
},
|
|
29 => 28,
|
|
30 => 29,
|
|
31 => 50,
|
|
32 => 30,
|
|
33 => 31,
|
|
34 => 32,
|
|
35 => 33,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Body;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct BlockParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl BlockParser {
|
|
pub fn new() -> BlockParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
BlockParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Body, __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<Body,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__Block::BlockParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__Body {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
3, 0, 0, 0, 0, 0, 4, 0, 0, 34, 35, 36, 37,
|
|
// State 1
|
|
3, 0, 0, 0, 0, 0, 4, 0, -29, 34, 35, 36, 37,
|
|
// State 2
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 3
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 4
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 5
|
|
3, 46, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 6
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 7
|
|
3, 51, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 8
|
|
0, 0, 0, -39, 0, 11, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 9
|
|
3, 0, 0, 0, 0, 0, 4, 0, -27, 34, 35, 36, 37,
|
|
// State 10
|
|
0, 0, 0, 0, 0, 0, 13, 10, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 10, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 13
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37,
|
|
// State 14
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 18
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 19
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 20
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 21
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 22
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 23
|
|
0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 24
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 25
|
|
6, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 26
|
|
0, 0, 0, 39, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 27
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 28
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 29
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 30
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 31
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 32
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 33
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 34
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 35
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 36
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 37
|
|
0, 0, 0, 43, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 38
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 39
|
|
-55, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 40
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 41
|
|
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 42
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 43
|
|
6, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 44
|
|
6, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 45
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 46
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 47
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 48
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 49
|
|
6, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 50
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 51
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 52
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 53
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 54
|
|
0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0,
|
|
// State 55
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 56
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 57
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 58
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 59
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
-27,
|
|
// State 1
|
|
-29,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
0,
|
|
// State 5
|
|
0,
|
|
// State 6
|
|
0,
|
|
// State 7
|
|
0,
|
|
// State 8
|
|
-39,
|
|
// State 9
|
|
0,
|
|
// State 10
|
|
0,
|
|
// State 11
|
|
0,
|
|
// State 12
|
|
0,
|
|
// State 13
|
|
0,
|
|
// State 14
|
|
0,
|
|
// State 15
|
|
0,
|
|
// State 16
|
|
0,
|
|
// State 17
|
|
-53,
|
|
// State 18
|
|
-65,
|
|
// State 19
|
|
-55,
|
|
// State 20
|
|
-59,
|
|
// State 21
|
|
-23,
|
|
// State 22
|
|
-24,
|
|
// State 23
|
|
0,
|
|
// State 24
|
|
-34,
|
|
// State 25
|
|
-57,
|
|
// State 26
|
|
-26,
|
|
// State 27
|
|
0,
|
|
// State 28
|
|
-44,
|
|
// State 29
|
|
-46,
|
|
// State 30
|
|
-49,
|
|
// State 31
|
|
-56,
|
|
// State 32
|
|
-22,
|
|
// State 33
|
|
-60,
|
|
// State 34
|
|
-61,
|
|
// State 35
|
|
-41,
|
|
// State 36
|
|
-42,
|
|
// State 37
|
|
-28,
|
|
// State 38
|
|
-17,
|
|
// State 39
|
|
0,
|
|
// State 40
|
|
-24,
|
|
// State 41
|
|
0,
|
|
// State 42
|
|
-18,
|
|
// State 43
|
|
-58,
|
|
// State 44
|
|
0,
|
|
// State 45
|
|
-31,
|
|
// State 46
|
|
-35,
|
|
// State 47
|
|
-54,
|
|
// State 48
|
|
-45,
|
|
// State 49
|
|
0,
|
|
// State 50
|
|
-33,
|
|
// State 51
|
|
-30,
|
|
// State 52
|
|
0,
|
|
// State 53
|
|
-40,
|
|
// State 54
|
|
0,
|
|
// State 55
|
|
-32,
|
|
// State 56
|
|
0,
|
|
// State 57
|
|
-37,
|
|
// State 58
|
|
-25,
|
|
// State 59
|
|
-38,
|
|
// State 60
|
|
-7,
|
|
// State 61
|
|
-8,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 53,
|
|
7 => 7,
|
|
10 => 1,
|
|
13 => 16,
|
|
14 => 17,
|
|
15 => 47,
|
|
16 => match state {
|
|
9 => 54,
|
|
_ => 18,
|
|
},
|
|
17 => match state {
|
|
2 => 39,
|
|
_ => 19,
|
|
},
|
|
19 => 20,
|
|
20 => 21,
|
|
21 => match state {
|
|
0..=1 | 9 => 22,
|
|
_ => 40,
|
|
},
|
|
22 => 23,
|
|
23 => 24,
|
|
24 => match state {
|
|
10 => 57,
|
|
11 => 59,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 8,
|
|
},
|
|
25 => match state {
|
|
3 => 6,
|
|
12 => 14,
|
|
13 => 15,
|
|
2 => 41,
|
|
4 => 43,
|
|
5 => 44,
|
|
7 => 49,
|
|
_ => 25,
|
|
},
|
|
27 => match state {
|
|
1 => 37,
|
|
_ => 26,
|
|
},
|
|
29 => 27,
|
|
30 => 28,
|
|
31 => 48,
|
|
32 => 29,
|
|
33 => 30,
|
|
34 => 31,
|
|
35 => 32,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Body;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct BodyParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl BodyParser {
|
|
pub fn new() -> BodyParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
BodyParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Body, __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<Body,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__Body::BodyParser;
|
|
|
|
#[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::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 1
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 2
|
|
2, 21, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 3
|
|
2, 24, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 4
|
|
-53, -53, -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 5
|
|
-55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 6
|
|
-23, -23, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 7
|
|
-24, -24, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 8
|
|
-34, -34, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 9
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 10
|
|
-44, -44, -44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
-46, -46, -46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
-22, -22, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 13
|
|
-60, -60, -60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 14
|
|
-61, -61, -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
-41, -41, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
-42, -42, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-55, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 18
|
|
-55, -55, -55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 19
|
|
3, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 20
|
|
-31, -31, -31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 21
|
|
-35, -35, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 22
|
|
3, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 23
|
|
-33, -33, -33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 24
|
|
-30, -30, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 25
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 26
|
|
-32, -32, -32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 27
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
-53,
|
|
// State 5
|
|
-66,
|
|
// State 6
|
|
-23,
|
|
// State 7
|
|
-24,
|
|
// State 8
|
|
-34,
|
|
// State 9
|
|
0,
|
|
// State 10
|
|
-44,
|
|
// State 11
|
|
0,
|
|
// State 12
|
|
-22,
|
|
// State 13
|
|
-60,
|
|
// State 14
|
|
-61,
|
|
// State 15
|
|
-41,
|
|
// State 16
|
|
-42,
|
|
// State 17
|
|
0,
|
|
// State 18
|
|
0,
|
|
// State 19
|
|
0,
|
|
// State 20
|
|
-31,
|
|
// State 21
|
|
-35,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
-33,
|
|
// State 24
|
|
-30,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
-32,
|
|
// State 27
|
|
0,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
7 => 3,
|
|
14 => 4,
|
|
17 => match state {
|
|
1 => 17,
|
|
2..=3 => 18,
|
|
_ => 5,
|
|
},
|
|
20 => 6,
|
|
21 => 7,
|
|
23 => 8,
|
|
25 => match state {
|
|
2 => 19,
|
|
3 => 22,
|
|
_ => 9,
|
|
},
|
|
30 => 10,
|
|
32 => 11,
|
|
35 => 12,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = 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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(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<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<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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
// __Expr = Expr => ActionFn(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__Expr::ExprParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__File {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
3, 0, 0, 0, 0, 0, 4, 0, 0, 35, 36, 37, 38,
|
|
// State 1
|
|
3, 0, 0, 0, 0, 0, 4, 0, -29, 35, 36, 37, 38,
|
|
// State 2
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 3
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 4
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 5
|
|
3, 47, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 6
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 7
|
|
3, 52, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 8
|
|
0, 0, 0, -39, 0, 11, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 9
|
|
3, 0, 0, 0, 0, 0, 4, 0, -27, 35, 36, 37, 38,
|
|
// State 10
|
|
0, 0, 0, 0, 0, 0, 13, 10, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 10, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 13
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 38,
|
|
// State 14
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
6, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 18
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 19
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 20
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 21
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 22
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 23
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 24
|
|
0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 25
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 26
|
|
6, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 27
|
|
0, 0, 0, 40, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 28
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 29
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 30
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 31
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 32
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 33
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 34
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 35
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 36
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 37
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 38
|
|
0, 0, 0, 44, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 39
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 40
|
|
-55, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 41
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 42
|
|
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 43
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 44
|
|
6, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 45
|
|
6, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 46
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 47
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 48
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 49
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 50
|
|
6, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 51
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 52
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 53
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 54
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 55
|
|
0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0,
|
|
// State 56
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 57
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 58
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 59
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 60
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 62
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
-27,
|
|
// State 1
|
|
-29,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
0,
|
|
// State 5
|
|
0,
|
|
// State 6
|
|
0,
|
|
// State 7
|
|
0,
|
|
// State 8
|
|
-39,
|
|
// State 9
|
|
0,
|
|
// State 10
|
|
0,
|
|
// State 11
|
|
0,
|
|
// State 12
|
|
0,
|
|
// State 13
|
|
0,
|
|
// State 14
|
|
0,
|
|
// State 15
|
|
0,
|
|
// State 16
|
|
0,
|
|
// State 17
|
|
-53,
|
|
// State 18
|
|
-36,
|
|
// State 19
|
|
-55,
|
|
// State 20
|
|
-67,
|
|
// State 21
|
|
-59,
|
|
// State 22
|
|
-23,
|
|
// State 23
|
|
-24,
|
|
// State 24
|
|
0,
|
|
// State 25
|
|
-34,
|
|
// State 26
|
|
-57,
|
|
// State 27
|
|
-26,
|
|
// State 28
|
|
0,
|
|
// State 29
|
|
-44,
|
|
// State 30
|
|
-46,
|
|
// State 31
|
|
-49,
|
|
// State 32
|
|
-56,
|
|
// State 33
|
|
-22,
|
|
// State 34
|
|
-60,
|
|
// State 35
|
|
-61,
|
|
// State 36
|
|
-41,
|
|
// State 37
|
|
-42,
|
|
// State 38
|
|
-28,
|
|
// State 39
|
|
-17,
|
|
// State 40
|
|
0,
|
|
// State 41
|
|
-24,
|
|
// State 42
|
|
0,
|
|
// State 43
|
|
-18,
|
|
// State 44
|
|
-58,
|
|
// State 45
|
|
0,
|
|
// State 46
|
|
-31,
|
|
// State 47
|
|
-35,
|
|
// State 48
|
|
-54,
|
|
// State 49
|
|
-45,
|
|
// State 50
|
|
0,
|
|
// State 51
|
|
-33,
|
|
// State 52
|
|
-30,
|
|
// State 53
|
|
0,
|
|
// State 54
|
|
-40,
|
|
// State 55
|
|
0,
|
|
// State 56
|
|
-32,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
-37,
|
|
// State 59
|
|
-25,
|
|
// State 60
|
|
-38,
|
|
// State 61
|
|
-7,
|
|
// State 62
|
|
-8,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 54,
|
|
7 => 7,
|
|
10 => 1,
|
|
13 => 16,
|
|
14 => 17,
|
|
15 => 48,
|
|
16 => match state {
|
|
9 => 55,
|
|
_ => 18,
|
|
},
|
|
17 => match state {
|
|
2 => 40,
|
|
_ => 19,
|
|
},
|
|
18 => 20,
|
|
19 => 21,
|
|
20 => 22,
|
|
21 => match state {
|
|
0..=1 | 9 => 23,
|
|
_ => 41,
|
|
},
|
|
22 => 24,
|
|
23 => 25,
|
|
24 => match state {
|
|
10 => 58,
|
|
11 => 60,
|
|
14 => 61,
|
|
15 => 62,
|
|
_ => 8,
|
|
},
|
|
25 => match state {
|
|
3 => 6,
|
|
12 => 14,
|
|
13 => 15,
|
|
2 => 42,
|
|
4 => 44,
|
|
5 => 45,
|
|
7 => 50,
|
|
_ => 26,
|
|
},
|
|
27 => match state {
|
|
1 => 38,
|
|
_ => 27,
|
|
},
|
|
29 => 28,
|
|
30 => 29,
|
|
31 => 49,
|
|
32 => 30,
|
|
33 => 31,
|
|
34 => 32,
|
|
35 => 33,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Body;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct FileParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl FileParser {
|
|
pub fn new() -> FileParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
FileParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Body, __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<Body,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__File::FileParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__IfStmt {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
|
|
// State 1
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 2
|
|
6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
|
|
// State 3
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 4
|
|
0, 0, 0, -39, 0, 8, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 5
|
|
4, 36, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 6
|
|
4, 0, 0, 0, 0, 0, 2, 0, -27, 26, 27, 28, 29,
|
|
// State 7
|
|
0, 0, 0, 0, 0, 0, 12, 7, 0, 0, 0, 0, 0,
|
|
// State 8
|
|
4, 50, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 9
|
|
4, 0, 0, 0, 0, 0, 2, 0, -29, 26, 27, 28, 29,
|
|
// State 10
|
|
0, 0, 0, 0, 0, 0, 14, 7, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 12
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 13
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
|
|
// State 14
|
|
6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 18
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 19
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 20
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 21
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 22
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 23
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 24
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 25
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 26
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 27
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 28
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 29
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 30
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 31
|
|
-55, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 32
|
|
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 33
|
|
0, 0, 0, -40, 0, 11, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 34
|
|
6, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 35
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 36
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 37
|
|
0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0,
|
|
// State 38
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 39
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 40
|
|
0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 41
|
|
6, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 42
|
|
0, 0, 0, 55, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 43
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 44
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 45
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 46
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 47
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 48
|
|
6, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 49
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 50
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 51
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 52
|
|
0, 0, 0, 59, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 53
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 54
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 55
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 56
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 57
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 58
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 59
|
|
6, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
-39,
|
|
// 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
|
|
-68,
|
|
// State 17
|
|
0,
|
|
// State 18
|
|
0,
|
|
// State 19
|
|
0,
|
|
// State 20
|
|
0,
|
|
// State 21
|
|
0,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
0,
|
|
// State 24
|
|
0,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
0,
|
|
// State 27
|
|
0,
|
|
// State 28
|
|
0,
|
|
// State 29
|
|
-54,
|
|
// State 30
|
|
-45,
|
|
// State 31
|
|
0,
|
|
// State 32
|
|
0,
|
|
// State 33
|
|
-40,
|
|
// 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
|
|
0,
|
|
// State 47
|
|
-37,
|
|
// State 48
|
|
0,
|
|
// State 49
|
|
0,
|
|
// State 50
|
|
0,
|
|
// State 51
|
|
0,
|
|
// State 52
|
|
0,
|
|
// State 53
|
|
-25,
|
|
// State 54
|
|
0,
|
|
// State 55
|
|
-38,
|
|
// State 56
|
|
0,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
0,
|
|
// State 59
|
|
0,
|
|
// State 60
|
|
-7,
|
|
// State 61
|
|
-8,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 33,
|
|
7 => 8,
|
|
10 => 9,
|
|
13 => 36,
|
|
14 => 17,
|
|
15 => 29,
|
|
16 => 37,
|
|
17 => match state {
|
|
3 => 31,
|
|
_ => 18,
|
|
},
|
|
19 => match state {
|
|
0 => 16,
|
|
_ => 38,
|
|
},
|
|
20 => 19,
|
|
21 => match state {
|
|
6 | 9 => 39,
|
|
_ => 20,
|
|
},
|
|
22 => 40,
|
|
23 => 21,
|
|
24 => match state {
|
|
7 => 47,
|
|
10 => 55,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 4,
|
|
},
|
|
25 => match state {
|
|
1 => 2,
|
|
11 => 14,
|
|
13 => 15,
|
|
3 => 32,
|
|
5 => 34,
|
|
8 => 48,
|
|
12 => 59,
|
|
_ => 41,
|
|
},
|
|
27 => match state {
|
|
9 => 52,
|
|
_ => 42,
|
|
},
|
|
29 => 43,
|
|
30 => 22,
|
|
31 => 30,
|
|
32 => 23,
|
|
33 => 44,
|
|
34 => 45,
|
|
35 => 24,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Stmt;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct IfStmtParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl IfStmtParser {
|
|
pub fn new() -> IfStmtParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
IfStmtParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Stmt, __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<Stmt,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__IfStmt::IfStmtParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__SpAssignLhs {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
|
|
// State 1
|
|
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,
|
|
// State 3
|
|
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,
|
|
// State 5
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
-52,
|
|
// State 2
|
|
-21,
|
|
// State 3
|
|
-69,
|
|
// State 4
|
|
-43,
|
|
// State 5
|
|
-42,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
13 => 1,
|
|
21 => 2,
|
|
22 => 3,
|
|
29 => 4,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Spanned<AssignLhs>;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct SpAssignLhsParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl SpAssignLhsParser {
|
|
pub fn new() -> SpAssignLhsParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
SpAssignLhsParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Spanned<AssignLhs>, __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<Spanned<AssignLhs>,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__SpAssignLhs::SpAssignLhsParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__SpAtom {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 11,
|
|
// State 1
|
|
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,
|
|
// State 3
|
|
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,
|
|
// State 5
|
|
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,
|
|
// State 7
|
|
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,
|
|
// State 9
|
|
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,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
-53,
|
|
// State 2
|
|
-23,
|
|
// State 3
|
|
-24,
|
|
// State 4
|
|
-70,
|
|
// State 5
|
|
-44,
|
|
// State 6
|
|
-22,
|
|
// State 7
|
|
-60,
|
|
// State 8
|
|
-61,
|
|
// State 9
|
|
-41,
|
|
// State 10
|
|
-42,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
14 => 1,
|
|
20 => 2,
|
|
21 => 3,
|
|
23 => 4,
|
|
30 => 5,
|
|
35 => 6,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Spanned<Atom>;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct SpAtomParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl SpAtomParser {
|
|
pub fn new() -> SpAtomParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
SpAtomParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Spanned<Atom>, __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<Spanned<Atom>,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__SpAtom::SpAtomParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__SpBlock {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 1
|
|
4, 0, 0, 0, 0, 0, 5, 0, -27, 37, 38, 39, 40,
|
|
// State 2
|
|
4, 0, 0, 0, 0, 0, 5, 0, -29, 37, 38, 39, 40,
|
|
// State 3
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 4
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 5
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 6
|
|
4, 50, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 7
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 8
|
|
4, 53, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 9
|
|
0, 0, 0, -39, 0, 11, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 10
|
|
0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 13
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40,
|
|
// State 14
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
7, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 17
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 18
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 19
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 20
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 21
|
|
0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
|
|
// State 22
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 23
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 24
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 25
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 26
|
|
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 27
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 28
|
|
7, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 29
|
|
0, 0, 0, 43, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 30
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 31
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 32
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 33
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 34
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 35
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 36
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 37
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 38
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 39
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 40
|
|
0, 0, 0, 47, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 41
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 42
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 43
|
|
-55, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 44
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 45
|
|
7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 46
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 47
|
|
7, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 48
|
|
7, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 49
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 50
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 51
|
|
7, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 52
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 53
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 54
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 55
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 56
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 57
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 58
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 59
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// 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
|
|
-54,
|
|
// State 17
|
|
-71,
|
|
// State 18
|
|
-45,
|
|
// State 19
|
|
0,
|
|
// State 20
|
|
0,
|
|
// State 21
|
|
0,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
0,
|
|
// State 24
|
|
0,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
0,
|
|
// State 27
|
|
0,
|
|
// State 28
|
|
0,
|
|
// State 29
|
|
0,
|
|
// State 30
|
|
0,
|
|
// 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
|
|
-25,
|
|
// 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
|
|
0,
|
|
// State 51
|
|
0,
|
|
// State 52
|
|
0,
|
|
// State 53
|
|
0,
|
|
// State 54
|
|
0,
|
|
// State 55
|
|
0,
|
|
// State 56
|
|
0,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
0,
|
|
// State 59
|
|
0,
|
|
// State 60
|
|
0,
|
|
// State 61
|
|
0,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 55,
|
|
7 => 8,
|
|
10 => 2,
|
|
13 => 19,
|
|
14 => 20,
|
|
15 => 16,
|
|
16 => 21,
|
|
17 => match state {
|
|
3 => 43,
|
|
_ => 22,
|
|
},
|
|
19 => 23,
|
|
20 => 24,
|
|
21 => match state {
|
|
1..=2 => 25,
|
|
_ => 44,
|
|
},
|
|
22 => 26,
|
|
23 => 27,
|
|
24 => match state {
|
|
0 => 17,
|
|
10 => 58,
|
|
11 => 59,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 9,
|
|
},
|
|
25 => match state {
|
|
12 => 14,
|
|
13 => 15,
|
|
1..=2 => 28,
|
|
3 => 45,
|
|
5 => 47,
|
|
6 => 48,
|
|
8 => 51,
|
|
_ => 7,
|
|
},
|
|
27 => match state {
|
|
2 => 40,
|
|
_ => 29,
|
|
},
|
|
29 => 30,
|
|
30 => 31,
|
|
31 => 18,
|
|
32 => 32,
|
|
33 => 33,
|
|
34 => 34,
|
|
35 => 35,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Spanned<Body>;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct SpBlockParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl SpBlockParser {
|
|
pub fn new() -> SpBlockParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
SpBlockParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Spanned<Body>, __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<Spanned<Body>,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__SpBlock::SpBlockParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__SpExpr {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 1
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 2
|
|
2, 21, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 3
|
|
2, 24, 0, 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
|
|
// State 4
|
|
-53, -53, -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 5
|
|
-55, -55, -55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 6
|
|
-23, -23, -23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 7
|
|
-24, -24, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 8
|
|
-34, -34, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 9
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 10
|
|
-44, -44, -44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 11
|
|
-46, -46, -46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
-22, -22, -22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 13
|
|
-60, -60, -60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 14
|
|
-61, -61, -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
-41, -41, -41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
-42, -42, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-55, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 18
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 19
|
|
3, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 20
|
|
-31, -31, -31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 21
|
|
-35, -35, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 22
|
|
3, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 23
|
|
-33, -33, -33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 24
|
|
-30, -30, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 25
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 26
|
|
-32, -32, -32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 27
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
-53,
|
|
// State 5
|
|
-55,
|
|
// State 6
|
|
-23,
|
|
// State 7
|
|
-24,
|
|
// State 8
|
|
-34,
|
|
// State 9
|
|
-72,
|
|
// State 10
|
|
-44,
|
|
// State 11
|
|
-46,
|
|
// State 12
|
|
-22,
|
|
// State 13
|
|
-60,
|
|
// State 14
|
|
-61,
|
|
// State 15
|
|
-41,
|
|
// State 16
|
|
-42,
|
|
// State 17
|
|
0,
|
|
// State 18
|
|
0,
|
|
// State 19
|
|
0,
|
|
// State 20
|
|
-31,
|
|
// State 21
|
|
-35,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
-33,
|
|
// State 24
|
|
-30,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
-32,
|
|
// State 27
|
|
0,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
7 => 3,
|
|
14 => 4,
|
|
17 => match state {
|
|
1 => 17,
|
|
_ => 5,
|
|
},
|
|
20 => 6,
|
|
21 => 7,
|
|
23 => 8,
|
|
25 => match state {
|
|
1 => 18,
|
|
2 => 19,
|
|
3 => 22,
|
|
_ => 9,
|
|
},
|
|
30 => 10,
|
|
32 => 11,
|
|
35 => 12,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Spanned<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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct SpExprParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl SpExprParser {
|
|
pub fn new() -> SpExprParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
SpExprParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Spanned<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<Spanned<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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__SpExpr::SpExprParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__SpStmt {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
2, 0, 0, 0, 0, 0, 3, 0, 0, 33, 34, 35, 36,
|
|
// State 1
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 2
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 3
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 4
|
|
2, 42, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 5
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 6
|
|
2, 47, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 7
|
|
0, 0, 0, -39, 0, 10, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 8
|
|
2, 0, 0, 0, 0, 0, 3, 0, -27, 33, 34, 35, 36,
|
|
// State 9
|
|
0, 0, 0, 0, 0, 0, 13, 9, 0, 0, 0, 0, 0,
|
|
// State 10
|
|
2, 0, 0, 0, 0, 0, 3, 0, -29, 33, 34, 35, 36,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 9, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 13
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
|
|
// State 14
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 18
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 19
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 20
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 21
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 22
|
|
0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 23
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 24
|
|
5, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 25
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 26
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 27
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 28
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 29
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 30
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 31
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 32
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 33
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 34
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 35
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 36
|
|
-55, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 37
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 38
|
|
5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 39
|
|
5, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 40
|
|
5, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 41
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 42
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 43
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 44
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 45
|
|
5, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 46
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 47
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 48
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 49
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 50
|
|
0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0,
|
|
// State 51
|
|
0, 0, 0, 58, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 52
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 53
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 54
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 55
|
|
0, 0, 0, 60, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 56
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 57
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 58
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 59
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
0,
|
|
// State 5
|
|
0,
|
|
// State 6
|
|
0,
|
|
// State 7
|
|
-39,
|
|
// 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
|
|
0,
|
|
// State 17
|
|
-53,
|
|
// State 18
|
|
-55,
|
|
// State 19
|
|
-59,
|
|
// State 20
|
|
-23,
|
|
// State 21
|
|
-24,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
-34,
|
|
// State 24
|
|
-57,
|
|
// State 25
|
|
-73,
|
|
// State 26
|
|
0,
|
|
// State 27
|
|
-44,
|
|
// State 28
|
|
-46,
|
|
// State 29
|
|
-49,
|
|
// State 30
|
|
-56,
|
|
// State 31
|
|
-22,
|
|
// State 32
|
|
-60,
|
|
// State 33
|
|
-61,
|
|
// State 34
|
|
-41,
|
|
// State 35
|
|
-42,
|
|
// State 36
|
|
0,
|
|
// State 37
|
|
-24,
|
|
// State 38
|
|
0,
|
|
// State 39
|
|
-58,
|
|
// State 40
|
|
0,
|
|
// State 41
|
|
-31,
|
|
// State 42
|
|
-35,
|
|
// State 43
|
|
-54,
|
|
// State 44
|
|
-45,
|
|
// State 45
|
|
0,
|
|
// State 46
|
|
-33,
|
|
// State 47
|
|
-30,
|
|
// State 48
|
|
0,
|
|
// State 49
|
|
-40,
|
|
// State 50
|
|
0,
|
|
// State 51
|
|
0,
|
|
// State 52
|
|
-32,
|
|
// State 53
|
|
0,
|
|
// State 54
|
|
-37,
|
|
// State 55
|
|
0,
|
|
// State 56
|
|
-25,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
-38,
|
|
// State 59
|
|
0,
|
|
// State 60
|
|
-7,
|
|
// State 61
|
|
-8,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 49,
|
|
7 => 6,
|
|
10 => 10,
|
|
13 => 16,
|
|
14 => 17,
|
|
15 => 43,
|
|
16 => 50,
|
|
17 => match state {
|
|
1 => 36,
|
|
_ => 18,
|
|
},
|
|
19 => 19,
|
|
20 => 20,
|
|
21 => match state {
|
|
1..=4 | 6 | 12..=13 => 37,
|
|
_ => 21,
|
|
},
|
|
22 => 22,
|
|
23 => 23,
|
|
24 => match state {
|
|
9 => 54,
|
|
11 => 58,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 7,
|
|
},
|
|
25 => match state {
|
|
2 => 5,
|
|
12 => 14,
|
|
13 => 15,
|
|
1 => 38,
|
|
3 => 39,
|
|
4 => 40,
|
|
6 => 45,
|
|
_ => 24,
|
|
},
|
|
27 => match state {
|
|
8 => 51,
|
|
10 => 55,
|
|
_ => 25,
|
|
},
|
|
29 => 26,
|
|
30 => 27,
|
|
31 => 44,
|
|
32 => 28,
|
|
33 => 29,
|
|
34 => 30,
|
|
35 => 31,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Spanned<Stmt>;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct SpStmtParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl SpStmtParser {
|
|
pub fn new() -> SpStmtParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
SpStmtParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Spanned<Stmt>, __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<Spanned<Stmt>,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
return Some(Ok(__nt));
|
|
}
|
|
73 => {
|
|
__reduce73(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce73<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 48)
|
|
}
|
|
}
|
|
pub use self::__parse__SpStmt::SpStmtParser;
|
|
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __parse__Stmt {
|
|
#![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
|
|
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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(Spanned<Body>),
|
|
Variant2(core::option::Option<Spanned<Body>>),
|
|
Variant3((usize, Spanned<Expr>, Spanned<Body>, usize)),
|
|
Variant4(alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>),
|
|
Variant5(Spanned<Expr>),
|
|
Variant6(alloc::vec::Vec<Spanned<Expr>>),
|
|
Variant7(Spanned<Stmt>),
|
|
Variant8(alloc::vec::Vec<Spanned<Stmt>>),
|
|
Variant9(usize),
|
|
Variant10(AssignLhs),
|
|
Variant11(Atom),
|
|
Variant12(Body),
|
|
Variant13(Expr),
|
|
Variant14(Stmt),
|
|
Variant15(i64),
|
|
Variant16(String),
|
|
Variant17(Spanned<AssignLhs>),
|
|
Variant18(Spanned<Atom>),
|
|
Variant19(core::option::Option<Spanned<Expr>>),
|
|
Variant20(core::option::Option<Spanned<Stmt>>),
|
|
}
|
|
const __ACTION: &[i8] = &[
|
|
// State 0
|
|
2, 0, 0, 0, 0, 0, 3, 0, 0, 31, 32, 33, 34,
|
|
// State 1
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 2
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 3
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 4
|
|
2, 40, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 5
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 6
|
|
2, 45, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 7
|
|
0, 0, 0, -39, 0, 10, 0, 0, -39, 0, 0, 0, 0,
|
|
// State 8
|
|
2, 0, 0, 0, 0, 0, 3, 0, -27, 31, 32, 33, 34,
|
|
// State 9
|
|
0, 0, 0, 0, 0, 0, 13, 9, 0, 0, 0, 0, 0,
|
|
// State 10
|
|
2, 0, 0, 0, 0, 0, 3, 0, -29, 31, 32, 33, 34,
|
|
// State 11
|
|
0, 0, 0, 0, 0, 0, 14, 9, 0, 0, 0, 0, 0,
|
|
// State 12
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 13
|
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 34,
|
|
// State 14
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 15
|
|
5, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
|
|
// State 16
|
|
0, 0, 0, 0, -52, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 17
|
|
-53, -53, -53, -53, 0, 0, 0, -53, -53, 0, 0, 0, 0,
|
|
// State 18
|
|
-55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, 0, 0,
|
|
// State 19
|
|
0, 0, 0, -59, 0, 0, 0, 0, -59, 0, 0, 0, 0,
|
|
// State 20
|
|
-23, -23, -23, -23, 0, 0, 0, -23, -23, 0, 0, 0, 0,
|
|
// State 21
|
|
-24, 0, 0, -24, -21, 0, 0, 0, -24, 0, 0, 0, 0,
|
|
// State 22
|
|
0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 23
|
|
-34, -34, -34, -34, 0, 0, 0, -34, -34, 0, 0, 0, 0,
|
|
// State 24
|
|
5, 0, 0, -57, 0, 0, 0, 0, -57, 0, 0, 0, 0,
|
|
// State 25
|
|
0, 0, 0, 0, -43, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 26
|
|
-44, -44, -44, -44, 0, 0, 0, -44, -44, 0, 0, 0, 0,
|
|
// State 27
|
|
-46, -46, -46, -46, 0, 0, 0, -46, -46, 0, 0, 0, 0,
|
|
// State 28
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 29
|
|
-22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, 0, 0,
|
|
// State 30
|
|
-60, -60, -60, -60, 0, 0, 0, -60, -60, 0, 0, 0, 0,
|
|
// State 31
|
|
-61, -61, -61, -61, 0, 0, 0, -61, -61, 0, 0, 0, 0,
|
|
// State 32
|
|
-41, -41, -41, -41, 0, 0, 0, -41, -41, 0, 0, 0, 0,
|
|
// State 33
|
|
-42, -42, -42, -42, -42, 0, 0, -42, -42, 0, 0, 0, 0,
|
|
// State 34
|
|
-55, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 35
|
|
-24, -24, -24, -24, 0, 0, 0, -24, -24, 0, 0, 0, 0,
|
|
// State 36
|
|
5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 37
|
|
5, 0, 0, -58, 0, 0, 0, 0, -58, 0, 0, 0, 0,
|
|
// State 38
|
|
5, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 39
|
|
-31, -31, -31, -31, 0, 0, 0, -31, -31, 0, 0, 0, 0,
|
|
// State 40
|
|
-35, -35, -35, -35, 0, 0, 0, -35, -35, 0, 0, 0, 0,
|
|
// State 41
|
|
0, 0, 0, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0,
|
|
// State 42
|
|
0, 0, 0, -45, 0, -45, 0, 0, -45, 0, 0, 0, 0,
|
|
// State 43
|
|
5, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
// State 44
|
|
-33, -33, -33, -33, 0, 0, 0, -33, -33, 0, 0, 0, 0,
|
|
// State 45
|
|
-30, -30, -30, -30, 0, 0, 0, -30, -30, 0, 0, 0, 0,
|
|
// State 46
|
|
-12, -12, 0, 0, 0, 0, 0, 0, 0, -12, -12, -12, -12,
|
|
// State 47
|
|
0, 0, 0, -40, 0, 12, 0, 0, -40, 0, 0, 0, 0,
|
|
// State 48
|
|
0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0,
|
|
// State 49
|
|
0, 0, 0, 58, 0, 0, 0, 0, -26, 0, 0, 0, 0,
|
|
// State 50
|
|
0, 0, 0, -49, 0, 0, 0, 0, -49, 0, 0, 0, 0,
|
|
// State 51
|
|
0, 0, 0, -56, 0, 0, 0, 0, -56, 0, 0, 0, 0,
|
|
// State 52
|
|
-32, -32, -32, -32, 0, 0, 0, -32, -32, 0, 0, 0, 0,
|
|
// State 53
|
|
-13, -13, 0, 0, 0, 0, 0, 0, 0, -13, -13, -13, -13,
|
|
// State 54
|
|
0, 0, 0, -37, 0, 0, 0, 0, -37, 0, 0, 0, 0,
|
|
// State 55
|
|
0, 0, 0, 60, 0, 0, 0, 0, -28, 0, 0, 0, 0,
|
|
// State 56
|
|
0, 0, 0, -25, 0, -25, 0, 0, -25, 0, 0, 0, 0,
|
|
// State 57
|
|
-17, 0, 0, 0, 0, 0, -17, 0, -17, -17, -17, -17, -17,
|
|
// State 58
|
|
0, 0, 0, -38, 0, 0, 0, 0, -38, 0, 0, 0, 0,
|
|
// State 59
|
|
-18, 0, 0, 0, 0, 0, -18, 0, -18, -18, -18, -18, -18,
|
|
// State 60
|
|
0, 0, 0, -7, 0, -7, 0, 0, -7, 0, 0, 0, 0,
|
|
// State 61
|
|
0, 0, 0, -8, 0, -8, 0, 0, -8, 0, 0, 0, 0,
|
|
];
|
|
fn __action(state: i8, integer: usize) -> i8 {
|
|
__ACTION[(state as usize) * 13 + integer]
|
|
}
|
|
const __EOF_ACTION: &[i8] = &[
|
|
// State 0
|
|
0,
|
|
// State 1
|
|
0,
|
|
// State 2
|
|
0,
|
|
// State 3
|
|
0,
|
|
// State 4
|
|
0,
|
|
// State 5
|
|
0,
|
|
// State 6
|
|
0,
|
|
// State 7
|
|
-39,
|
|
// 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
|
|
0,
|
|
// State 17
|
|
-53,
|
|
// State 18
|
|
-55,
|
|
// State 19
|
|
-59,
|
|
// State 20
|
|
-23,
|
|
// State 21
|
|
-24,
|
|
// State 22
|
|
0,
|
|
// State 23
|
|
-34,
|
|
// State 24
|
|
-57,
|
|
// State 25
|
|
0,
|
|
// State 26
|
|
-44,
|
|
// State 27
|
|
-46,
|
|
// State 28
|
|
-74,
|
|
// State 29
|
|
-22,
|
|
// State 30
|
|
-60,
|
|
// State 31
|
|
-61,
|
|
// State 32
|
|
-41,
|
|
// State 33
|
|
-42,
|
|
// State 34
|
|
0,
|
|
// State 35
|
|
-24,
|
|
// State 36
|
|
0,
|
|
// State 37
|
|
-58,
|
|
// State 38
|
|
0,
|
|
// State 39
|
|
-31,
|
|
// State 40
|
|
-35,
|
|
// State 41
|
|
-54,
|
|
// State 42
|
|
-45,
|
|
// State 43
|
|
0,
|
|
// State 44
|
|
-33,
|
|
// State 45
|
|
-30,
|
|
// State 46
|
|
0,
|
|
// State 47
|
|
-40,
|
|
// State 48
|
|
0,
|
|
// State 49
|
|
0,
|
|
// State 50
|
|
0,
|
|
// State 51
|
|
0,
|
|
// State 52
|
|
-32,
|
|
// State 53
|
|
0,
|
|
// State 54
|
|
-37,
|
|
// State 55
|
|
0,
|
|
// State 56
|
|
-25,
|
|
// State 57
|
|
0,
|
|
// State 58
|
|
-38,
|
|
// State 59
|
|
0,
|
|
// State 60
|
|
-7,
|
|
// State 61
|
|
-8,
|
|
];
|
|
fn __goto(state: i8, nt: usize) -> i8 {
|
|
match nt {
|
|
4 => 47,
|
|
7 => 6,
|
|
10 => 10,
|
|
13 => 16,
|
|
14 => 17,
|
|
15 => 41,
|
|
16 => 48,
|
|
17 => match state {
|
|
1 => 34,
|
|
_ => 18,
|
|
},
|
|
19 => 19,
|
|
20 => 20,
|
|
21 => match state {
|
|
1..=4 | 6 | 12..=13 => 35,
|
|
_ => 21,
|
|
},
|
|
22 => 22,
|
|
23 => 23,
|
|
24 => match state {
|
|
9 => 54,
|
|
11 => 58,
|
|
14 => 60,
|
|
15 => 61,
|
|
_ => 7,
|
|
},
|
|
25 => match state {
|
|
2 => 5,
|
|
12 => 14,
|
|
13 => 15,
|
|
1 => 36,
|
|
3 => 37,
|
|
4 => 38,
|
|
6 => 43,
|
|
_ => 24,
|
|
},
|
|
27 => match state {
|
|
10 => 55,
|
|
_ => 49,
|
|
},
|
|
29 => 25,
|
|
30 => 26,
|
|
31 => 42,
|
|
32 => 27,
|
|
33 => 50,
|
|
34 => match state {
|
|
0 => 28,
|
|
_ => 51,
|
|
},
|
|
35 => 29,
|
|
_ => 0,
|
|
}
|
|
}
|
|
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
|
|
const __TERMINAL: &[&str] = &[
|
|
r###""(""###,
|
|
r###"")""###,
|
|
r###"",""###,
|
|
r###"";""###,
|
|
r###""=""###,
|
|
r###""else""###,
|
|
r###""if""###,
|
|
r###""{""###,
|
|
r###""}""###,
|
|
r###"r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""#"###,
|
|
r###"r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"#"###,
|
|
r###"r#"[0-9]+"#"###,
|
|
r###"r#"[a-zA-Z_][a-zA-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 = Stmt;
|
|
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, 13 - 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(0, _) if true => Some(9),
|
|
Token(1, _) if true => Some(10),
|
|
Token(2, _) if true => Some(11),
|
|
Token(3, _) if true => Some(12),
|
|
_ => 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 => 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(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) if true => __Symbol::Variant0(__tok0),
|
|
_ => unreachable!(),
|
|
},
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
pub struct StmtParser {
|
|
builder: __lalrpop_util::lexer::MatcherBuilder,
|
|
_priv: (),
|
|
}
|
|
|
|
impl StmtParser {
|
|
pub fn new() -> StmtParser {
|
|
let __builder = super::__intern_token::new_builder();
|
|
StmtParser {
|
|
builder: __builder,
|
|
_priv: (),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub fn parse<
|
|
'input,
|
|
>(
|
|
&self,
|
|
input: &'input str,
|
|
) -> Result<Stmt, __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<Stmt,__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 => {
|
|
__reduce57(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
58 => {
|
|
__reduce58(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
59 => {
|
|
__reduce59(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
60 => {
|
|
__reduce60(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
61 => {
|
|
__reduce61(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
62 => {
|
|
__reduce62(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
63 => {
|
|
__reduce63(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
64 => {
|
|
__reduce64(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
65 => {
|
|
__reduce65(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
66 => {
|
|
__reduce66(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
67 => {
|
|
__reduce67(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
68 => {
|
|
__reduce68(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
69 => {
|
|
__reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
70 => {
|
|
__reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
71 => {
|
|
__reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
72 => {
|
|
__reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>)
|
|
}
|
|
73 => {
|
|
// __Stmt = Stmt => ActionFn(5);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action5::<>(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, (usize, Spanned<Expr>, Spanned<Body>, usize), usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant10<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, AssignLhs, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant11<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Atom, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant12<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Body, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant13<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Expr, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant17<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<AssignLhs>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant17(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant18<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Atom>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant18(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant1<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Body>, 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, Spanned<Expr>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant7<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Spanned<Stmt>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant14<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, Stmt, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant16<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, String, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant4<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant6<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant8<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, alloc::vec::Vec<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant2<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Body>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant19<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Expr>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant19(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant20<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, core::option::Option<Spanned<Stmt>>, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant20(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant15<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, i64, usize)
|
|
{
|
|
match __symbols.pop() {
|
|
Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r),
|
|
_ => __symbol_type_mismatch()
|
|
}
|
|
}
|
|
fn __pop_Variant9<
|
|
'input,
|
|
>(
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
|
|
) -> (usize, usize, 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)
|
|
{
|
|
// ("else" <SpBlock>) = "else", SpBlock => ActionFn(45);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action45::<>(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)
|
|
{
|
|
// ("else" <SpBlock>)? = "else", SpBlock => ActionFn(65);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant1(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action65::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(2, 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)
|
|
{
|
|
// ("else" <SpBlock>)? = => ActionFn(44);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action44::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
|
|
(0, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>) = "else", "if", SpExpr, SpBlock => ActionFn(76);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
|
|
(4, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = => ActionFn(46);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action46::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(0, 3)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)* = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(47);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action47::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(1, 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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = "else", "if", SpExpr, SpBlock => ActionFn(84);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant1(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action84::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(4, 4)
|
|
}
|
|
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)
|
|
{
|
|
// (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ = (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", "if", SpExpr, SpBlock => ActionFn(85);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant4(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action85::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
|
|
(5, 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)
|
|
{
|
|
// (<SpExpr> ",") = SpExpr, "," => ActionFn(41);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action41::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(2, 5)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = => ActionFn(39);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action39::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(0, 6)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")* = (<SpExpr> ",")+ => ActionFn(40);
|
|
let __sym0 = __pop_Variant6(__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 __reduce11<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// (<SpExpr> ",")+ = SpExpr, "," => ActionFn(90);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action90::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(2, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpExpr> ",")+ = (<SpExpr> ",")+, SpExpr, "," => ActionFn(91);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant6(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action91::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
|
|
(3, 7)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";") = SpStmt, ";" => ActionFn(57);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action57::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(2, 8)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = => ActionFn(55);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action55::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(0, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")* = (<SpStmt> ";")+ => ActionFn(56);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action56::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(1, 9)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = SpStmt, ";" => ActionFn(94);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action94::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(2, 10)
|
|
}
|
|
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)
|
|
{
|
|
// (<SpStmt> ";")+ = (<SpStmt> ";")+, SpStmt, ";" => ActionFn(95);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action95::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
|
|
(3, 10)
|
|
}
|
|
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)
|
|
{
|
|
// @L = => 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::Variant9(__nt), __end));
|
|
(0, 11)
|
|
}
|
|
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)
|
|
{
|
|
// @R = => 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::Variant9(__nt), __end));
|
|
(0, 12)
|
|
}
|
|
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)
|
|
{
|
|
// AssignLhs = Name => ActionFn(22);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action22::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 13)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Str => ActionFn(29);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action29::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Int => ActionFn(30);
|
|
let __sym0 = __pop_Variant15(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action30::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Atom = Name => ActionFn(31);
|
|
let __sym0 = __pop_Variant16(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action31::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 14)
|
|
}
|
|
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)
|
|
{
|
|
// Block = "{", Body, "}" => ActionFn(15);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant12(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(3, 15)
|
|
}
|
|
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)
|
|
{
|
|
// Body = SpStmt => ActionFn(102);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action102::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = => ActionFn(103);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action103::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(0, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+, SpStmt => ActionFn(104);
|
|
assert!(__symbols.len() >= 2);
|
|
let __sym1 = __pop_Variant7(__symbols);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym1.2.clone();
|
|
let __nt = super::__action104::<>(input, __sym0, __sym1);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(2, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Body = (<SpStmt> ";")+ => ActionFn(105);
|
|
let __sym0 = __pop_Variant8(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action105::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 16)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", SpExpr, ")" => ActionFn(98);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action98::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", ")" => ActionFn(99);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action99::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, SpExpr, ")" => ActionFn(100);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant5(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action100::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(5, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpExpr, "(", (<SpExpr> ",")+, ")" => ActionFn(101);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant6(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action101::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(4, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = SpAtom => ActionFn(26);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action26::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 17)
|
|
}
|
|
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)
|
|
{
|
|
// Expr = "(", Expr, ")" => ActionFn(27);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant0(__symbols);
|
|
let __sym1 = __pop_Variant13(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(3, 17)
|
|
}
|
|
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)
|
|
{
|
|
// File = Body => ActionFn(13);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action13::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 18)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, "else", SpBlock => ActionFn(86);
|
|
assert!(__symbols.len() >= 5);
|
|
let __sym4 = __pop_Variant1(__symbols);
|
|
let __sym3 = __pop_Variant0(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym4.2.clone();
|
|
let __nt = super::__action86::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(5, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+, "else", SpBlock => ActionFn(87);
|
|
assert!(__symbols.len() >= 6);
|
|
let __sym5 = __pop_Variant1(__symbols);
|
|
let __sym4 = __pop_Variant0(__symbols);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym5.2.clone();
|
|
let __nt = super::__action87::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(6, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock => ActionFn(88);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action88::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 19)
|
|
}
|
|
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)
|
|
{
|
|
// IfStmt = "if", SpExpr, SpBlock, (<@L> "else" "if" <SpExpr> <SpBlock> <@R>)+ => ActionFn(89);
|
|
assert!(__symbols.len() >= 4);
|
|
let __sym3 = __pop_Variant4(__symbols);
|
|
let __sym2 = __pop_Variant1(__symbols);
|
|
let __sym1 = __pop_Variant5(__symbols);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym3.2.clone();
|
|
let __nt = super::__action89::<>(input, __sym0, __sym1, __sym2, __sym3);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(4, 19)
|
|
}
|
|
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)
|
|
{
|
|
// Int = r#"[0-9]+"# => ActionFn(32);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action32::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant15(__nt), __end));
|
|
(1, 20)
|
|
}
|
|
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)
|
|
{
|
|
// Name = r#"[a-zA-Z_][a-zA-Z0-9_]*"# => ActionFn(35);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action35::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 21)
|
|
}
|
|
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)
|
|
{
|
|
// SpAssignLhs = Spanned<AssignLhs> => ActionFn(21);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action21::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 22)
|
|
}
|
|
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)
|
|
{
|
|
// SpAtom = Spanned<Atom> => ActionFn(28);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action28::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 23)
|
|
}
|
|
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)
|
|
{
|
|
// SpBlock = Spanned<Block> => ActionFn(14);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action14::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 24)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr = Spanned<Expr> => ActionFn(24);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action24::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 25)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = SpExpr => ActionFn(37);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action37::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(1, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpExpr? = => ActionFn(38);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action38::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant19(__nt), __end));
|
|
(0, 26)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt = Spanned<Stmt> => ActionFn(17);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action17::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 27)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = SpStmt => ActionFn(53);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action53::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(1, 28)
|
|
}
|
|
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)
|
|
{
|
|
// SpStmt? = => ActionFn(54);
|
|
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default();
|
|
let __end = __start.clone();
|
|
let __nt = super::__action54::<>(input, &__start, &__end);
|
|
__symbols.push((__start, __Symbol::Variant20(__nt), __end));
|
|
(0, 28)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<AssignLhs> = AssignLhs => ActionFn(79);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action79::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 29)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Atom> = Atom => ActionFn(80);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action80::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 30)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Block> = Block => ActionFn(81);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action81::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 31)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Expr> = Expr => ActionFn(82);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action82::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 32)
|
|
}
|
|
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)
|
|
{
|
|
// Spanned<Stmt> = Stmt => ActionFn(83);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action83::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 33)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpExpr => ActionFn(18);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action18::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
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)
|
|
{
|
|
// Stmt = SpAssignLhs, "=", SpExpr => ActionFn(19);
|
|
assert!(__symbols.len() >= 3);
|
|
let __sym2 = __pop_Variant5(__symbols);
|
|
let __sym1 = __pop_Variant0(__symbols);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym2.2.clone();
|
|
let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(3, 34)
|
|
}
|
|
pub(crate) fn __reduce58<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Stmt = IfStmt => ActionFn(20);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action20::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 34)
|
|
}
|
|
pub(crate) fn __reduce59<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"\"([^\"\\\\]|\\\\[ntr\"'\\\\])*\""# => ActionFn(33);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action33::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce60<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// Str = r#"'([^\"\\\\]|\\\\[ntr\"'\\\\])*'"# => ActionFn(34);
|
|
let __sym0 = __pop_Variant0(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action34::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant16(__nt), __end));
|
|
(1, 35)
|
|
}
|
|
pub(crate) fn __reduce61<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __AssignLhs = AssignLhs => ActionFn(7);
|
|
let __sym0 = __pop_Variant10(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action7::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant10(__nt), __end));
|
|
(1, 36)
|
|
}
|
|
pub(crate) fn __reduce62<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Atom = Atom => ActionFn(12);
|
|
let __sym0 = __pop_Variant11(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action12::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant11(__nt), __end));
|
|
(1, 37)
|
|
}
|
|
pub(crate) fn __reduce63<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Block = Block => ActionFn(2);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action2::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 38)
|
|
}
|
|
pub(crate) fn __reduce64<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __Body = Body => ActionFn(3);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action3::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 39)
|
|
}
|
|
pub(crate) fn __reduce65<
|
|
'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(10);
|
|
let __sym0 = __pop_Variant13(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action10::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant13(__nt), __end));
|
|
(1, 40)
|
|
}
|
|
pub(crate) fn __reduce66<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __File = File => ActionFn(0);
|
|
let __sym0 = __pop_Variant12(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action0::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant12(__nt), __end));
|
|
(1, 41)
|
|
}
|
|
pub(crate) fn __reduce67<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __IfStmt = IfStmt => ActionFn(8);
|
|
let __sym0 = __pop_Variant14(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action8::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant14(__nt), __end));
|
|
(1, 42)
|
|
}
|
|
pub(crate) fn __reduce68<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAssignLhs = SpAssignLhs => ActionFn(6);
|
|
let __sym0 = __pop_Variant17(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action6::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant17(__nt), __end));
|
|
(1, 43)
|
|
}
|
|
pub(crate) fn __reduce69<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpAtom = SpAtom => ActionFn(11);
|
|
let __sym0 = __pop_Variant18(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action11::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant18(__nt), __end));
|
|
(1, 44)
|
|
}
|
|
pub(crate) fn __reduce70<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpBlock = SpBlock => ActionFn(1);
|
|
let __sym0 = __pop_Variant1(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action1::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant1(__nt), __end));
|
|
(1, 45)
|
|
}
|
|
pub(crate) fn __reduce71<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpExpr = SpExpr => ActionFn(9);
|
|
let __sym0 = __pop_Variant5(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action9::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
|
|
(1, 46)
|
|
}
|
|
pub(crate) fn __reduce72<
|
|
'input,
|
|
>(
|
|
input: &'input str,
|
|
__lookahead_start: Option<&usize>,
|
|
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>,
|
|
_: core::marker::PhantomData<(&'input ())>,
|
|
) -> (usize, usize)
|
|
{
|
|
// __SpStmt = SpStmt => ActionFn(4);
|
|
let __sym0 = __pop_Variant7(__symbols);
|
|
let __start = __sym0.0.clone();
|
|
let __end = __sym0.2.clone();
|
|
let __nt = super::__action4::<>(input, __sym0);
|
|
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
|
|
(1, 47)
|
|
}
|
|
}
|
|
pub use self::__parse__Stmt::StmtParser;
|
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
|
mod __intern_token {
|
|
#![allow(unused_imports)]
|
|
use std::str::FromStr;
|
|
use crate::syn::{Span, Spanned, unescape};
|
|
use crate::syn::ast::*;
|
|
#[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)] = &[
|
|
("^(\"([\0-!\\#-\\[\\]-\u{10ffff}]|\\\\[\"'\\\\nrt])*\")", false),
|
|
("^('([\0-!\\#-\\[\\]-\u{10ffff}]|\\\\[\"'\\\\nrt])*')", false),
|
|
("^([0-9]+)", false),
|
|
("^([A-Z_a-z][0-9A-Z_a-z]*)", false),
|
|
("^(\\()", false),
|
|
("^(\\))", false),
|
|
("^(,)", false),
|
|
("^(;)", false),
|
|
("^(=)", false),
|
|
("^(else)", false),
|
|
("^(if)", false),
|
|
("^(\\{)", 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, Body, usize)) -> Body {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action1<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Body>, usize),
|
|
) -> Spanned<Body> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action2<'input>(input: &'input str, (_, __0, _): (usize, Body, usize)) -> Body {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action3<'input>(input: &'input str, (_, __0, _): (usize, Body, usize)) -> Body {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action4<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Stmt>, usize),
|
|
) -> Spanned<Stmt> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action5<'input>(input: &'input str, (_, __0, _): (usize, Stmt, usize)) -> Stmt {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action6<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<AssignLhs>, usize),
|
|
) -> Spanned<AssignLhs> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action7<'input>(input: &'input str, (_, __0, _): (usize, AssignLhs, usize)) -> AssignLhs {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action8<'input>(input: &'input str, (_, __0, _): (usize, Stmt, usize)) -> Stmt {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action9<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Expr>, usize),
|
|
) -> Spanned<Expr> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action10<'input>(input: &'input str, (_, __0, _): (usize, Expr, usize)) -> Expr {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action11<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Atom>, usize),
|
|
) -> Spanned<Atom> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action12<'input>(input: &'input str, (_, __0, _): (usize, Atom, usize)) -> Atom {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action13<'input>(input: &'input str, (_, __0, _): (usize, Body, usize)) -> Body {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action14<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Body>, usize),
|
|
) -> Spanned<Body> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action15<'input>(
|
|
input: &'input str,
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, __0, _): (usize, Body, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
) -> Body {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action16<'input>(
|
|
input: &'input str,
|
|
(_, mut head, _): (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
(_, tail, _): (usize, core::option::Option<Spanned<Stmt>>, usize),
|
|
) -> Body {
|
|
{
|
|
if let Some(tail) = tail {
|
|
head.push(tail);
|
|
}
|
|
head
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action17<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Stmt>, usize),
|
|
) -> Spanned<Stmt> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action18<'input>(input: &'input str, (_, __0, _): (usize, Spanned<Expr>, usize)) -> Stmt {
|
|
Stmt::Expr(__0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action19<'input>(
|
|
input: &'input str,
|
|
(_, lhs, _): (usize, Spanned<AssignLhs>, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, expr, _): (usize, Spanned<Expr>, usize),
|
|
) -> Stmt {
|
|
Stmt::Assign(lhs, expr)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action20<'input>(input: &'input str, (_, __0, _): (usize, Stmt, usize)) -> Stmt {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action21<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<AssignLhs>, usize),
|
|
) -> Spanned<AssignLhs> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action22<'input>(input: &'input str, (_, __0, _): (usize, String, usize)) -> AssignLhs {
|
|
{
|
|
AssignLhs::Name(__0)
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action23<'input>(
|
|
input: &'input str,
|
|
(_, if_start, _): (usize, usize, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, if_condition, _): (usize, Spanned<Expr>, usize),
|
|
(_, if_block, _): (usize, Spanned<Body>, usize),
|
|
(_, if_end, _): (usize, usize, usize),
|
|
(_, elif_start, _): (usize, usize, usize),
|
|
(_, elif_block, _): (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
(_, elif_end, _): (usize, usize, usize),
|
|
(_, else_start, _): (usize, usize, usize),
|
|
(_, else_block, _): (usize, core::option::Option<Spanned<Body>>, usize),
|
|
(_, else_end, _): (usize, usize, usize),
|
|
) -> Stmt {
|
|
{
|
|
// Make if statement cond body
|
|
let if_true = CondBody {
|
|
cond: if_condition,
|
|
body: if_block,
|
|
};
|
|
// Make elif statement cond body
|
|
let mut elseif = Vec::with_capacity(elif_block.len());
|
|
for (start, expr, block, end) in elif_block {
|
|
let elseif_cond_body = CondBody {
|
|
cond: expr,
|
|
body: block,
|
|
};
|
|
elseif.push(Spanned::new(Span::new(start, end), elseif_cond_body));
|
|
}
|
|
Stmt::If {
|
|
if_true: Spanned::new(Span::new(if_start, if_end), if_true),
|
|
elseif,
|
|
else_body: else_block,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action24<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Expr>, usize),
|
|
) -> Spanned<Expr> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action25<'input>(
|
|
input: &'input str,
|
|
(_, fun, _): (usize, Spanned<Expr>, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, mut argv, _): (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
(_, last, _): (usize, core::option::Option<Spanned<Expr>>, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
) -> Expr {
|
|
{
|
|
let argv = match last {
|
|
Some(expr) => {
|
|
argv.push(expr);
|
|
argv
|
|
}
|
|
None => argv,
|
|
};
|
|
Expr::Call(Box::new(fun), argv)
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action26<'input>(input: &'input str, (_, atom, _): (usize, Spanned<Atom>, usize)) -> Expr {
|
|
Expr::Atom(atom)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action27<'input>(
|
|
input: &'input str,
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, expr, _): (usize, Expr, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
) -> Expr {
|
|
expr
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action28<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Atom>, usize),
|
|
) -> Spanned<Atom> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action29<'input>(input: &'input str, (_, s, _): (usize, String, usize)) -> Atom {
|
|
Atom::Str(s)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action30<'input>(input: &'input str, (_, n, _): (usize, i64, usize)) -> Atom {
|
|
Atom::Int(n)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action31<'input>(input: &'input str, (_, name, _): (usize, String, usize)) -> Atom {
|
|
Atom::Name(name)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action32<'input>(input: &'input str, (_, s, _): (usize, &'input str, usize)) -> i64 {
|
|
i64::from_str(s).unwrap()
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action33<'input>(input: &'input str, (_, s, _): (usize, &'input str, usize)) -> String {
|
|
unescape(&s[1..s.len() - 1])
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action34<'input>(input: &'input str, (_, s, _): (usize, &'input str, usize)) -> String {
|
|
unescape(&s[1..s.len() - 1])
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action35<'input>(input: &'input str, (_, s, _): (usize, &'input str, usize)) -> String {
|
|
s.to_string()
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action36<'input>(
|
|
input: &'input str,
|
|
(_, start, _): (usize, usize, usize),
|
|
(_, inner, _): (usize, Atom, usize),
|
|
(_, end, _): (usize, usize, usize),
|
|
) -> Spanned<Atom> {
|
|
Spanned::new(Span::new(start, end), inner)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action37<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Expr>, usize),
|
|
) -> core::option::Option<Spanned<Expr>> {
|
|
Some(__0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action38<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> core::option::Option<Spanned<Expr>> {
|
|
None
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action39<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
alloc::vec![]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action40<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
v
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action41<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Expr>, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
) -> Spanned<Expr> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action42<'input>(
|
|
input: &'input str,
|
|
(_, start, _): (usize, usize, usize),
|
|
(_, inner, _): (usize, Expr, usize),
|
|
(_, end, _): (usize, usize, usize),
|
|
) -> Spanned<Expr> {
|
|
Spanned::new(Span::new(start, end), inner)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action43<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Body>, usize),
|
|
) -> core::option::Option<Spanned<Body>> {
|
|
Some(__0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action44<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> core::option::Option<Spanned<Body>> {
|
|
None
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action45<'input>(
|
|
input: &'input str,
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, __0, _): (usize, Spanned<Body>, usize),
|
|
) -> Spanned<Body> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action46<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
alloc::vec![]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action47<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
v
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action48<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, usize, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
(_, __1, _): (usize, Spanned<Expr>, usize),
|
|
(_, __2, _): (usize, Spanned<Body>, usize),
|
|
(_, __3, _): (usize, usize, usize),
|
|
) -> (usize, Spanned<Expr>, Spanned<Body>, usize) {
|
|
(__0, __1, __2, __3)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action49<'input>(input: &'input str, __lookbehind: &usize, __lookahead: &usize) -> usize {
|
|
__lookbehind.clone()
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action50<'input>(input: &'input str, __lookbehind: &usize, __lookahead: &usize) -> usize {
|
|
__lookahead.clone()
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action51<'input>(
|
|
input: &'input str,
|
|
(_, start, _): (usize, usize, usize),
|
|
(_, inner, _): (usize, AssignLhs, usize),
|
|
(_, end, _): (usize, usize, usize),
|
|
) -> Spanned<AssignLhs> {
|
|
Spanned::new(Span::new(start, end), inner)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action52<'input>(
|
|
input: &'input str,
|
|
(_, start, _): (usize, usize, usize),
|
|
(_, inner, _): (usize, Stmt, usize),
|
|
(_, end, _): (usize, usize, usize),
|
|
) -> Spanned<Stmt> {
|
|
Spanned::new(Span::new(start, end), inner)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action53<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Stmt>, usize),
|
|
) -> core::option::Option<Spanned<Stmt>> {
|
|
Some(__0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action54<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> core::option::Option<Spanned<Stmt>> {
|
|
None
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action55<'input>(
|
|
input: &'input str,
|
|
__lookbehind: &usize,
|
|
__lookahead: &usize,
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
alloc::vec![]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action56<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
v
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action57<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Stmt>, usize),
|
|
(_, _, _): (usize, &'input str, usize),
|
|
) -> Spanned<Stmt> {
|
|
__0
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action58<'input>(
|
|
input: &'input str,
|
|
(_, start, _): (usize, usize, usize),
|
|
(_, inner, _): (usize, Body, usize),
|
|
(_, end, _): (usize, usize, usize),
|
|
) -> Spanned<Body> {
|
|
Spanned::new(Span::new(start, end), inner)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action59<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Stmt>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
alloc::vec![__0]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action60<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
(_, e, _): (usize, Spanned<Stmt>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
{
|
|
let mut v = v;
|
|
v.push(e);
|
|
v
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action61<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, (usize, Spanned<Expr>, Spanned<Body>, usize), usize),
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
alloc::vec![__0]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action62<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
(_, e, _): (usize, (usize, Spanned<Expr>, Spanned<Body>, usize), usize),
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
{
|
|
let mut v = v;
|
|
v.push(e);
|
|
v
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action63<'input>(
|
|
input: &'input str,
|
|
(_, __0, _): (usize, Spanned<Expr>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
alloc::vec![__0]
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action64<'input>(
|
|
input: &'input str,
|
|
(_, v, _): (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
(_, e, _): (usize, Spanned<Expr>, usize),
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
{
|
|
let mut v = v;
|
|
v.push(e);
|
|
v
|
|
}
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action65<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Body>, usize),
|
|
) -> core::option::Option<Spanned<Body>> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action45(input, __0, __1);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action43(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action66<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
__4: (usize, usize, usize),
|
|
__5: (usize, usize, usize),
|
|
__6: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__7: (usize, usize, usize),
|
|
__8: (usize, usize, usize),
|
|
__9: (usize, &'input str, usize),
|
|
__10: (usize, Spanned<Body>, usize),
|
|
__11: (usize, usize, usize),
|
|
) -> Stmt {
|
|
let __start0 = __9.0.clone();
|
|
let __end0 = __10.2.clone();
|
|
let __temp0 = __action65(input, __9, __10);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action23(
|
|
input, __0, __1, __2, __3, __4, __5, __6, __7, __8, __temp0, __11,
|
|
)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action67<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
__4: (usize, usize, usize),
|
|
__5: (usize, usize, usize),
|
|
__6: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__7: (usize, usize, usize),
|
|
__8: (usize, usize, usize),
|
|
__9: (usize, usize, usize),
|
|
) -> Stmt {
|
|
let __start0 = __8.2.clone();
|
|
let __end0 = __9.0.clone();
|
|
let __temp0 = __action44(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action23(
|
|
input, __0, __1, __2, __3, __4, __5, __6, __7, __8, __temp0, __9,
|
|
)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action68<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, &'input str, usize),
|
|
__3: (usize, Spanned<Expr>, usize),
|
|
__4: (usize, Spanned<Body>, usize),
|
|
) -> (usize, Spanned<Expr>, Spanned<Body>, usize) {
|
|
let __start0 = __4.2.clone();
|
|
let __end0 = __4.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action48(input, __0, __1, __2, __3, __4, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action69<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
__4: (usize, usize, usize),
|
|
__5: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__6: (usize, usize, usize),
|
|
__7: (usize, &'input str, usize),
|
|
__8: (usize, Spanned<Body>, usize),
|
|
) -> Stmt {
|
|
let __start0 = __3.2.clone();
|
|
let __end0 = __4.0.clone();
|
|
let __start1 = __5.2.clone();
|
|
let __end1 = __6.0.clone();
|
|
let __start2 = __8.2.clone();
|
|
let __end2 = __8.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
let __temp1 = __action49(input, &__start1, &__end1);
|
|
let __temp1 = (__start1, __temp1, __end1);
|
|
let __temp2 = __action49(input, &__start2, &__end2);
|
|
let __temp2 = (__start2, __temp2, __end2);
|
|
__action66(
|
|
input, __0, __1, __2, __3, __temp0, __4, __5, __temp1, __6, __7, __8, __temp2,
|
|
)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action70<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
__4: (usize, usize, usize),
|
|
__5: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__6: (usize, usize, usize),
|
|
) -> Stmt {
|
|
let __start0 = __3.2.clone();
|
|
let __end0 = __4.0.clone();
|
|
let __start1 = __5.2.clone();
|
|
let __end1 = __6.0.clone();
|
|
let __start2 = __6.2.clone();
|
|
let __end2 = __6.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
let __temp1 = __action49(input, &__start1, &__end1);
|
|
let __temp1 = (__start1, __temp1, __end1);
|
|
let __temp2 = __action49(input, &__start2, &__end2);
|
|
let __temp2 = (__start2, __temp2, __end2);
|
|
__action67(
|
|
input, __0, __1, __2, __3, __temp0, __4, __5, __temp1, __6, __temp2,
|
|
)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action71<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, AssignLhs, usize),
|
|
) -> Spanned<AssignLhs> {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action51(input, __0, __1, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action72<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, Atom, usize),
|
|
) -> Spanned<Atom> {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action36(input, __0, __1, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action73<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, Body, usize),
|
|
) -> Spanned<Body> {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action58(input, __0, __1, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action74<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, Expr, usize),
|
|
) -> Spanned<Expr> {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action42(input, __0, __1, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action75<'input>(
|
|
input: &'input str,
|
|
__0: (usize, usize, usize),
|
|
__1: (usize, Stmt, usize),
|
|
) -> Spanned<Stmt> {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action49(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action52(input, __0, __1, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action76<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
) -> (usize, Spanned<Expr>, Spanned<Body>, usize) {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action68(input, __temp0, __0, __1, __2, __3)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action77<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
__3: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__4: (usize, &'input str, usize),
|
|
__5: (usize, Spanned<Body>, usize),
|
|
) -> Stmt {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __start1 = __2.2.clone();
|
|
let __end1 = __3.0.clone();
|
|
let __start2 = __3.2.clone();
|
|
let __end2 = __4.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
let __temp1 = __action50(input, &__start1, &__end1);
|
|
let __temp1 = (__start1, __temp1, __end1);
|
|
let __temp2 = __action50(input, &__start2, &__end2);
|
|
let __temp2 = (__start2, __temp2, __end2);
|
|
__action69(
|
|
input, __temp0, __0, __1, __2, __temp1, __3, __temp2, __4, __5,
|
|
)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action78<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
__3: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
) -> Stmt {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __start1 = __2.2.clone();
|
|
let __end1 = __3.0.clone();
|
|
let __start2 = __3.2.clone();
|
|
let __end2 = __3.2.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
let __temp1 = __action50(input, &__start1, &__end1);
|
|
let __temp1 = (__start1, __temp1, __end1);
|
|
let __temp2 = __action50(input, &__start2, &__end2);
|
|
let __temp2 = (__start2, __temp2, __end2);
|
|
__action70(input, __temp0, __0, __1, __2, __temp1, __3, __temp2)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action79<'input>(input: &'input str, __0: (usize, AssignLhs, usize)) -> Spanned<AssignLhs> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action71(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action80<'input>(input: &'input str, __0: (usize, Atom, usize)) -> Spanned<Atom> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action72(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action81<'input>(input: &'input str, __0: (usize, Body, usize)) -> Spanned<Body> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action73(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action82<'input>(input: &'input str, __0: (usize, Expr, usize)) -> Spanned<Expr> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action74(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action83<'input>(input: &'input str, __0: (usize, Stmt, usize)) -> Spanned<Stmt> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action50(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action75(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action84<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, Spanned<Body>, usize),
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __3.2.clone();
|
|
let __temp0 = __action76(input, __0, __1, __2, __3);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action61(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action85<'input>(
|
|
input: &'input str,
|
|
__0: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, &'input str, usize),
|
|
__3: (usize, Spanned<Expr>, usize),
|
|
__4: (usize, Spanned<Body>, usize),
|
|
) -> alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)> {
|
|
let __start0 = __1.0.clone();
|
|
let __end0 = __4.2.clone();
|
|
let __temp0 = __action76(input, __1, __2, __3, __4);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action62(input, __0, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action86<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
__3: (usize, &'input str, usize),
|
|
__4: (usize, Spanned<Body>, usize),
|
|
) -> Stmt {
|
|
let __start0 = __2.2.clone();
|
|
let __end0 = __3.0.clone();
|
|
let __temp0 = __action46(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action77(input, __0, __1, __2, __temp0, __3, __4)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action87<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
__3: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
__4: (usize, &'input str, usize),
|
|
__5: (usize, Spanned<Body>, usize),
|
|
) -> Stmt {
|
|
let __start0 = __3.0.clone();
|
|
let __end0 = __3.2.clone();
|
|
let __temp0 = __action47(input, __3);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action77(input, __0, __1, __2, __temp0, __4, __5)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action88<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
) -> Stmt {
|
|
let __start0 = __2.2.clone();
|
|
let __end0 = __2.2.clone();
|
|
let __temp0 = __action46(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action78(input, __0, __1, __2, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action89<'input>(
|
|
input: &'input str,
|
|
__0: (usize, &'input str, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, Spanned<Body>, usize),
|
|
__3: (
|
|
usize,
|
|
alloc::vec::Vec<(usize, Spanned<Expr>, Spanned<Body>, usize)>,
|
|
usize,
|
|
),
|
|
) -> Stmt {
|
|
let __start0 = __3.0.clone();
|
|
let __end0 = __3.2.clone();
|
|
let __temp0 = __action47(input, __3);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action78(input, __0, __1, __2, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action90<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action41(input, __0, __1);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action63(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action91<'input>(
|
|
input: &'input str,
|
|
__0: (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
__1: (usize, Spanned<Expr>, usize),
|
|
__2: (usize, &'input str, usize),
|
|
) -> alloc::vec::Vec<Spanned<Expr>> {
|
|
let __start0 = __1.0.clone();
|
|
let __end0 = __2.2.clone();
|
|
let __temp0 = __action41(input, __1, __2);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action64(input, __0, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action92<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, core::option::Option<Spanned<Expr>>, usize),
|
|
__3: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __2.0.clone();
|
|
let __temp0 = __action39(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action25(input, __0, __1, __temp0, __2, __3)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action93<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
__3: (usize, core::option::Option<Spanned<Expr>>, usize),
|
|
__4: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __2.0.clone();
|
|
let __end0 = __2.2.clone();
|
|
let __temp0 = __action40(input, __2);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action25(input, __0, __1, __temp0, __3, __4)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action94<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Stmt>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action57(input, __0, __1);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action59(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action95<'input>(
|
|
input: &'input str,
|
|
__0: (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
__1: (usize, Spanned<Stmt>, usize),
|
|
__2: (usize, &'input str, usize),
|
|
) -> alloc::vec::Vec<Spanned<Stmt>> {
|
|
let __start0 = __1.0.clone();
|
|
let __end0 = __2.2.clone();
|
|
let __temp0 = __action57(input, __1, __2);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action60(input, __0, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action96<'input>(
|
|
input: &'input str,
|
|
__0: (usize, core::option::Option<Spanned<Stmt>>, usize),
|
|
) -> Body {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.0.clone();
|
|
let __temp0 = __action55(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action16(input, __temp0, __0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action97<'input>(
|
|
input: &'input str,
|
|
__0: (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
__1: (usize, core::option::Option<Spanned<Stmt>>, usize),
|
|
) -> Body {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.2.clone();
|
|
let __temp0 = __action56(input, __0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action16(input, __temp0, __1)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action98<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, Spanned<Expr>, usize),
|
|
__3: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __2.0.clone();
|
|
let __end0 = __2.2.clone();
|
|
let __temp0 = __action37(input, __2);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action92(input, __0, __1, __temp0, __3)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action99<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __1.2.clone();
|
|
let __end0 = __2.0.clone();
|
|
let __temp0 = __action38(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action92(input, __0, __1, __temp0, __2)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action100<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
__3: (usize, Spanned<Expr>, usize),
|
|
__4: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __3.0.clone();
|
|
let __end0 = __3.2.clone();
|
|
let __temp0 = __action37(input, __3);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action93(input, __0, __1, __2, __temp0, __4)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action101<'input>(
|
|
input: &'input str,
|
|
__0: (usize, Spanned<Expr>, usize),
|
|
__1: (usize, &'input str, usize),
|
|
__2: (usize, alloc::vec::Vec<Spanned<Expr>>, usize),
|
|
__3: (usize, &'input str, usize),
|
|
) -> Expr {
|
|
let __start0 = __2.2.clone();
|
|
let __end0 = __3.0.clone();
|
|
let __temp0 = __action38(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action93(input, __0, __1, __2, __temp0, __3)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action102<'input>(input: &'input str, __0: (usize, Spanned<Stmt>, usize)) -> Body {
|
|
let __start0 = __0.0.clone();
|
|
let __end0 = __0.2.clone();
|
|
let __temp0 = __action53(input, __0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action96(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action103<'input>(input: &'input str, __lookbehind: &usize, __lookahead: &usize) -> Body {
|
|
let __start0 = __lookbehind.clone();
|
|
let __end0 = __lookahead.clone();
|
|
let __temp0 = __action54(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action96(input, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action104<'input>(
|
|
input: &'input str,
|
|
__0: (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
__1: (usize, Spanned<Stmt>, usize),
|
|
) -> Body {
|
|
let __start0 = __1.0.clone();
|
|
let __end0 = __1.2.clone();
|
|
let __temp0 = __action53(input, __1);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action97(input, __0, __temp0)
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn __action105<'input>(
|
|
input: &'input str,
|
|
__0: (usize, alloc::vec::Vec<Spanned<Stmt>>, usize),
|
|
) -> Body {
|
|
let __start0 = __0.2.clone();
|
|
let __end0 = __0.2.clone();
|
|
let __temp0 = __action54(input, &__start0, &__end0);
|
|
let __temp0 = (__start0, __temp0, __end0);
|
|
__action97(input, __0, __temp0)
|
|
}
|
|
|
|
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 }),
|
|
}
|
|
}
|
|
}
|