use crate::{Span, schema_coordinates::*};
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
#[allow(unused_extern_crates)]
extern crate alloc;
#[rustfmt::skip]
#[allow(explicit_outlives_requirements, non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::needless_lifetimes, clippy::type_complexity, clippy::needless_return, clippy::too_many_arguments, clippy::never_loop, clippy::match_single_binding, clippy::needless_raw_string_hashes)]
mod __parse__SchemaCoordinate {
use crate::{
Span,
schema_coordinates::*,
};
#[allow(unused_extern_crates)]
extern crate lalrpop_util as __lalrpop_util;
#[allow(unused_imports)]
use self::__lalrpop_util::state_machine as __state_machine;
#[allow(unused_extern_crates)]
extern crate alloc;
use super::__ToTriple;
#[allow(dead_code)]
pub(crate) enum __Symbol<'input>
{
Variant0(lexer::Token<'input>),
Variant1(&'input str),
Variant2(usize),
Variant3(ArgumentCoordinate),
Variant4(DirectiveArgumentCoordinate),
Variant5(DirectiveCoordinate),
Variant6(MemberCoordinate),
Variant7(Name),
Variant8(SchemaCoordinate),
Variant9(TypeCoordinate),
}
const __ACTION: &[i8] = &[
0, 0, 0, 2, 0, 13,
0, 0, 0, 0, 0, 13,
0, 0, 0, 0, 0, 13,
0, 0, 0, 0, 0, 13,
0, 0, 0, 0, 0, 13,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 3, 0, 0, 0, 0,
0, 4, 0, 0, 0, 0,
0, 0, 0, 0, -13, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 5, 0,
-7, -7, 0, 0, -7, 0,
0, -5, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0,
19, 0, 0, 0, 0, 0,
0, -6, 0, 0, 0, 0,
0, 0, 20, 0, 0, 0,
0, 0, 21, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
];
fn __action(state: i8, integer: usize) -> i8 {
__ACTION[(state as usize) * 6 + integer]
}
const __EOF_ACTION: &[i8] = &[
0,
0,
0,
0,
0,
-10,
-12,
-11,
-9,
-13,
-14,
-8,
-7,
-5,
0,
0,
-6,
0,
0,
-4,
-3,
];
fn __goto(state: i8, nt: usize) -> i8 {
match nt {
2 => 5,
3 => 6,
4 => 7,
5 => 8,
6 => match state {
1 => 13,
2 => 14,
3 => 15,
4 => 16,
_ => 9,
},
7 => 10,
8 => 11,
_ => 0,
}
}
const __TERMINAL: &[&str] = &[
r###"":""###,
r###""(""###,
r###"")""###,
r###""@""###,
r###"".""###,
r###"Ident"###,
];
fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
__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()
}
fn __expected_tokens_from_states<
'input,
>(
__states: &[i8],
_: core::marker::PhantomData<(&'input ())>,
) -> alloc::vec::Vec<alloc::string::String>
{
__TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
if __accepts(None, __states, Some(index), core::marker::PhantomData::<(&())>) {
Some(alloc::string::ToString::to_string(terminal))
} else {
None
}
}).collect()
}
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 = crate::parser::AdditionalErrors;
type Token = lexer::Token<'input>;
type TokenIndex = usize;
type Symbol = __Symbol<'input>;
type Success = SchemaCoordinate;
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, 6 - 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)
}
fn expected_tokens_from_states(&self, states: &[i8]) -> alloc::vec::Vec<alloc::string::String> {
__expected_tokens_from_states(states, core::marker::PhantomData::<(&())>)
}
#[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> {
__simulate_reduce(action, core::marker::PhantomData::<(&())>)
}
}
fn __token_to_integer<
'input,
>(
__token: &lexer::Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> Option<usize>
{
#[warn(unused_variables)]
match __token {
lexer::Token::Colon if true => Some(0),
lexer::Token::OpenParen if true => Some(1),
lexer::Token::CloseParen if true => Some(2),
lexer::Token::At if true => Some(3),
lexer::Token::Dot if true => Some(4),
lexer::Token::Identifier(_) if true => Some(5),
_ => None,
}
}
fn __token_to_symbol<
'input,
>(
__token_index: usize,
__token: lexer::Token<'input>,
_: core::marker::PhantomData<(&'input ())>,
) -> __Symbol<'input>
{
#[allow(clippy::manual_range_patterns)]match __token_index {
0 | 1 | 2 | 3 | 4 => __Symbol::Variant0(__token),
5 => match __token {
lexer::Token::Identifier(__tok0) if true => __Symbol::Variant1(__tok0),
_ => unreachable!(),
},
_ => unreachable!(),
}
}
fn __simulate_reduce<
'input,
>(
__reduce_index: i8,
_: core::marker::PhantomData<(&'input ())>,
) -> __state_machine::SimulatedReduce<__StateMachine<'input>>
{
match __reduce_index {
0 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 0,
nonterminal_produced: 0,
}
}
1 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 0,
nonterminal_produced: 1,
}
}
2 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 5,
nonterminal_produced: 2,
}
}
3 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 5,
nonterminal_produced: 3,
}
}
4 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 2,
nonterminal_produced: 4,
}
}
5 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 3,
nonterminal_produced: 5,
}
}
6 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 6,
}
}
7 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 7,
}
}
8 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 7,
}
}
9 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 7,
}
}
10 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 7,
}
}
11 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 7,
}
}
12 => {
__state_machine::SimulatedReduce::Reduce {
states_to_pop: 1,
nonterminal_produced: 8,
}
}
13 => __state_machine::SimulatedReduce::Accept,
_ => panic!("invalid reduction index {}", __reduce_index)
}
}
pub struct SchemaCoordinateParser {
_priv: (),
}
impl Default for SchemaCoordinateParser { fn default() -> Self { Self::new() } }
impl SchemaCoordinateParser {
pub fn new() -> SchemaCoordinateParser {
SchemaCoordinateParser {
_priv: (),
}
}
#[allow(dead_code)]
pub fn parse<
'input,
__TOKEN: __ToTriple<'input, >,
__TOKENS: IntoIterator<Item=__TOKEN>,
>(
&self,
input: &'input str,
__tokens0: __TOKENS,
) -> Result<SchemaCoordinate, __lalrpop_util::ParseError<usize, lexer::Token<'input>, crate::parser::AdditionalErrors>>
{
let __tokens = __tokens0.into_iter();
let mut __tokens = __tokens.map(|t| __ToTriple::to_triple(t));
__state_machine::Parser::drive(
__StateMachine {
input,
__phantom: core::marker::PhantomData::<(&())>,
},
__tokens,
)
}
}
fn __accepts<
'input,
>(
__error_state: Option<i8>,
__states: &[i8],
__opt_integer: Option<usize>,
_: core::marker::PhantomData<(&'input ())>,
) -> bool
{
let mut __states = __states.to_vec();
__states.extend(__error_state);
loop {
let mut __states_len = __states.len();
let __top = __states[__states_len - 1];
let __action = match __opt_integer {
None => __EOF_ACTION[__top as usize],
Some(__integer) => __action(__top, __integer),
};
if __action == 0 { return false; }
if __action > 0 { return true; }
let (__to_pop, __nt) = match __simulate_reduce(-(__action + 1), core::marker::PhantomData::<(&())>) {
__state_machine::SimulatedReduce::Reduce {
states_to_pop, nonterminal_produced
} => (states_to_pop, nonterminal_produced),
__state_machine::SimulatedReduce::Accept => return true,
};
__states_len -= __to_pop;
__states.truncate(__states_len);
let __top = __states[__states_len - 1];
let __next_state = __goto(__top, __nt);
__states.push(__next_state);
}
}
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<SchemaCoordinate,__lalrpop_util::ParseError<usize, lexer::Token<'input>, crate::parser::AdditionalErrors>>>
{
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 => {
let __sym0 = __pop_Variant8(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action0::<>(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, ArgumentCoordinate, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant3(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant4<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, DirectiveArgumentCoordinate, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant4(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant5<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, DirectiveCoordinate, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant5(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant6<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, MemberCoordinate, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant6(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant7<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, Name, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant7(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant8<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, SchemaCoordinate, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant8(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant9<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, TypeCoordinate, 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, lexer::Token<'input>, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant2<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, usize, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant2(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
fn __pop_Variant1<
'input,
>(
__symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>
) -> (usize, &'input str, usize)
{
match __symbols.pop() {
Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
_ => __symbol_type_mismatch()
}
}
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)
{
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default();
let __end = __start;
let __nt = super::__action13::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 0)
}
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)
{
let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default();
let __end = __start;
let __nt = super::__action12::<>(input, &__start, &__end);
__symbols.push((__start, __Symbol::Variant2(__nt), __end));
(0, 1)
}
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)
{
assert!(__symbols.len() >= 5);
let __sym4 = __pop_Variant0(__symbols);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant7(__symbols);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0;
let __end = __sym4.2;
let __nt = super::__action8::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
__symbols.push((__start, __Symbol::Variant3(__nt), __end));
(5, 2)
}
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)
{
assert!(__symbols.len() >= 5);
let __sym4 = __pop_Variant0(__symbols);
let __sym3 = __pop_Variant0(__symbols);
let __sym2 = __pop_Variant7(__symbols);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0;
let __end = __sym4.2;
let __nt = super::__action10::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4);
__symbols.push((__start, __Symbol::Variant4(__nt), __end));
(5, 3)
}
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)
{
assert!(__symbols.len() >= 2);
let __sym1 = __pop_Variant7(__symbols);
let __sym0 = __pop_Variant0(__symbols);
let __start = __sym0.0;
let __end = __sym1.2;
let __nt = super::__action16::<>(input, __sym0, __sym1);
__symbols.push((__start, __Symbol::Variant5(__nt), __end));
(2, 4)
}
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)
{
assert!(__symbols.len() >= 3);
let __sym2 = __pop_Variant7(__symbols);
let __sym1 = __pop_Variant0(__symbols);
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0;
let __end = __sym2.2;
let __nt = super::__action7::<>(input, __sym0, __sym1, __sym2);
__symbols.push((__start, __Symbol::Variant6(__nt), __end));
(3, 5)
}
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)
{
let __sym0 = __pop_Variant1(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action17::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant7(__nt), __end));
(1, 6)
}
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)
{
let __sym0 = __pop_Variant9(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action1::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 7)
}
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)
{
let __sym0 = __pop_Variant6(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action2::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 7)
}
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)
{
let __sym0 = __pop_Variant3(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action3::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 7)
}
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)
{
let __sym0 = __pop_Variant5(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action4::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 7)
}
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)
{
let __sym0 = __pop_Variant4(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action5::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant8(__nt), __end));
(1, 7)
}
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)
{
let __sym0 = __pop_Variant7(__symbols);
let __start = __sym0.0;
let __end = __sym0.2;
let __nt = super::__action6::<>(input, __sym0);
__symbols.push((__start, __Symbol::Variant9(__nt), __end));
(1, 8)
}
}
#[allow(unused_imports)]
pub use self::__parse__SchemaCoordinate::SchemaCoordinateParser;
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action0<'input>(
input: &'input str,
(_, __0, _): (usize, SchemaCoordinate, usize),
) -> SchemaCoordinate {
__0
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action1<'input>(
input: &'input str,
(_, inner, _): (usize, TypeCoordinate, usize),
) -> SchemaCoordinate {
{ SchemaCoordinate::Type(inner) }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action2<'input>(
input: &'input str,
(_, inner, _): (usize, MemberCoordinate, usize),
) -> SchemaCoordinate {
{ SchemaCoordinate::Member(inner) }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action3<'input>(
input: &'input str,
(_, inner, _): (usize, ArgumentCoordinate, usize),
) -> SchemaCoordinate {
{ SchemaCoordinate::Argument(inner) }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action4<'input>(
input: &'input str,
(_, inner, _): (usize, DirectiveCoordinate, usize),
) -> SchemaCoordinate {
{ SchemaCoordinate::Directive(inner) }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action5<'input>(
input: &'input str,
(_, inner, _): (usize, DirectiveArgumentCoordinate, usize),
) -> SchemaCoordinate {
{ SchemaCoordinate::DirectiveArgument(inner) }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action6<'input>(input: &'input str, (_, name, _): (usize, Name, usize)) -> TypeCoordinate {
{ TypeCoordinate { name } }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action7<'input>(
input: &'input str,
(_, ty, _): (usize, TypeCoordinate, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, name, _): (usize, Name, usize),
) -> MemberCoordinate {
{ MemberCoordinate { ty, name } }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action8<'input>(
input: &'input str,
(_, member, _): (usize, MemberCoordinate, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, name, _): (usize, Name, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
) -> ArgumentCoordinate {
{ ArgumentCoordinate { member, name } }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action9<'input>(
input: &'input str,
(_, start, _): (usize, usize, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, name, _): (usize, Name, usize),
(_, end, _): (usize, usize, usize),
) -> DirectiveCoordinate {
{
DirectiveCoordinate {
span: Span::new(start, end),
name,
}
}
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action10<'input>(
input: &'input str,
(_, directive, _): (usize, DirectiveCoordinate, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, name, _): (usize, Name, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
(_, _, _): (usize, lexer::Token<'input>, usize),
) -> DirectiveArgumentCoordinate {
{ DirectiveArgumentCoordinate { directive, name } }
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action11<'input>(
input: &'input str,
(_, start, _): (usize, usize, usize),
(_, ident, _): (usize, &'input str, usize),
(_, end, _): (usize, usize, usize),
) -> Name {
Name {
value: ident.into(),
span: Span::new(start, end),
}
}
#[allow(unused_variables)]
#[allow(clippy::needless_lifetimes)]
fn __action12<'input>(input: &'input str, __lookbehind: &usize, __lookahead: &usize) -> usize {
*__lookbehind
}
#[allow(unused_variables)]
#[allow(clippy::needless_lifetimes)]
fn __action13<'input>(input: &'input str, __lookbehind: &usize, __lookahead: &usize) -> usize {
*__lookahead
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action14<'input>(
input: &'input str,
__0: (usize, lexer::Token<'input>, usize),
__1: (usize, Name, usize),
__2: (usize, usize, usize),
) -> DirectiveCoordinate {
let __start0 = __0.0;
let __end0 = __0.0;
let __temp0 = __action13(input, &__start0, &__end0);
let __temp0 = (__start0, __temp0, __end0);
__action9(input, __temp0, __0, __1, __2)
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action15<'input>(
input: &'input str,
__0: (usize, &'input str, usize),
__1: (usize, usize, usize),
) -> Name {
let __start0 = __0.0;
let __end0 = __0.0;
let __temp0 = __action13(input, &__start0, &__end0);
let __temp0 = (__start0, __temp0, __end0);
__action11(input, __temp0, __0, __1)
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action16<'input>(
input: &'input str,
__0: (usize, lexer::Token<'input>, usize),
__1: (usize, Name, usize),
) -> DirectiveCoordinate {
let __start0 = __1.2;
let __end0 = __1.2;
let __temp0 = __action12(input, &__start0, &__end0);
let __temp0 = (__start0, __temp0, __end0);
__action14(input, __0, __1, __temp0)
}
#[allow(unused_variables)]
#[allow(
clippy::too_many_arguments,
clippy::needless_lifetimes,
clippy::just_underscores_and_digits
)]
fn __action17<'input>(input: &'input str, __0: (usize, &'input str, usize)) -> Name {
let __start0 = __0.2;
let __end0 = __0.2;
let __temp0 = __action12(input, &__start0, &__end0);
let __temp0 = (__start0, __temp0, __end0);
__action15(input, __0, __temp0)
}
#[allow(clippy::type_complexity, dead_code)]
pub trait __ToTriple<'input> {
fn to_triple(
self,
) -> Result<
(usize, lexer::Token<'input>, usize),
__lalrpop_util::ParseError<usize, lexer::Token<'input>, crate::parser::AdditionalErrors>,
>;
}
impl<'input> __ToTriple<'input> for (usize, lexer::Token<'input>, usize) {
fn to_triple(
self,
) -> Result<
(usize, lexer::Token<'input>, usize),
__lalrpop_util::ParseError<usize, lexer::Token<'input>, crate::parser::AdditionalErrors>,
> {
Ok(self)
}
}
impl<'input> __ToTriple<'input>
for Result<(usize, lexer::Token<'input>, usize), crate::parser::AdditionalErrors>
{
fn to_triple(
self,
) -> Result<
(usize, lexer::Token<'input>, usize),
__lalrpop_util::ParseError<usize, lexer::Token<'input>, crate::parser::AdditionalErrors>,
> {
self.map_err(|error| __lalrpop_util::ParseError::User { error })
}
}