From 9ba30449bec7ad0202d9fc659a9471d73efe1a89 Mon Sep 17 00:00:00 2001 From: Taehwan Kim Date: Fri, 3 Oct 2025 12:53:43 +0900 Subject: [PATCH 1/2] add push_data parameter to reduce_action --- rusty_lr_core/src/parser/data_stack.rs | 1 + .../src/parser/deterministic/context.rs | 33 +- .../src/parser/nondeterministic/context.rs | 38 +- rusty_lr_parser/src/emit.rs | 115 ++- rusty_lr_parser/src/parser/parser_expanded.rs | 912 +++++++++++++++--- scripts/diff/calculator.rs | 73 +- scripts/diff/calculator_u8.rs | 111 ++- scripts/diff/json.rs | 69 ++ 8 files changed, 1130 insertions(+), 222 deletions(-) diff --git a/rusty_lr_core/src/parser/data_stack.rs b/rusty_lr_core/src/parser/data_stack.rs index 958709e..a8230a2 100644 --- a/rusty_lr_core/src/parser/data_stack.rs +++ b/rusty_lr_core/src/parser/data_stack.rs @@ -42,6 +42,7 @@ pub trait DataStack: Sized + Default { // the caller (usually from generated code) must pops all of the tokens used for this reduce_action data_stack: &mut Self, location_stack: &mut Vec, + push_data: bool, // the index of the production rule to reduce rule_index: usize, diff --git a/rusty_lr_core/src/parser/deterministic/context.rs b/rusty_lr_core/src/parser/deterministic/context.rs index 1abf5cd..2f3afc7 100644 --- a/rusty_lr_core/src/parser/deterministic/context.rs +++ b/rusty_lr_core/src/parser/deterministic/context.rs @@ -65,7 +65,7 @@ impl Context { ) -> Result> where Data::Term: Clone, - Data::NonTerm: Hash + Eq + Copy + NonTerminal, + Data::NonTerm: std::fmt::Debug, P::State: State, { self.feed_eof(parser, userdata)?; @@ -80,7 +80,6 @@ impl Context { parser: &P, ) -> bool where - Data::NonTerm: Hash + Eq + NonTerminal, P::State: State, { let mut extra_state_stack = Vec::new(); @@ -230,6 +229,7 @@ impl Context { where Data::Location: Default, P::Term: Clone, + P::NonTerm: std::fmt::Debug, P::State: State, { self.feed_location(parser, term, userdata, Default::default()) @@ -245,6 +245,7 @@ impl Context { ) -> Result<(), ParseError> where P::Term: Clone, + P::NonTerm: std::fmt::Debug, P::State: State, { use crate::Location; @@ -362,6 +363,7 @@ impl Context { ) -> Result<(), ParseError> where P::Term: Clone, + P::NonTerm: std::fmt::Debug, P::State: State, { debug_assert!( @@ -446,10 +448,21 @@ impl Context { let mut new_location = Data::Location::new(self.location_stack.iter().rev(), tokens_len); + let Some(next_nonterm_shift) = parser.get_states() + [self.state_stack.last().unwrap().into_usize()] + .shift_goto_nonterm(rule.name) else { + unreachable!( + "Failed to shift nonterminal: {:?} in state {}", + rule.name, + self.state_stack.last().unwrap().into_usize() + ); + }; + // call reduce action - let non_empty_pushed = match Data::reduce_action( + match Data::reduce_action( &mut self.data_stack, &mut self.location_stack, + next_nonterm_shift.push, reduce_rule.into_usize(), &mut shift, &term, @@ -485,18 +498,7 @@ impl Context { } // shift with reduced nonterminal - if let Some(next_state_id) = parser.get_states() - [self.state_stack.last().unwrap().into_usize()] - .shift_goto_nonterm(rule.name) - { - self.state_stack.push(next_state_id.state); - if !next_state_id.push && non_empty_pushed { - self.data_stack.pop(); - self.data_stack.push_empty(); - } - } else { - unreachable!("shift nonterm failed"); - } + self.state_stack.push(next_nonterm_shift.state); } else { break shift; } @@ -735,6 +737,7 @@ impl Context { ) -> Result<(), ParseError> where P::Term: Clone, + P::NonTerm: std::fmt::Debug, P::State: State, { self.feed_location_impl( diff --git a/rusty_lr_core/src/parser/nondeterministic/context.rs b/rusty_lr_core/src/parser/nondeterministic/context.rs index 588f2ab..09bc0ec 100644 --- a/rusty_lr_core/src/parser/nondeterministic/context.rs +++ b/rusty_lr_core/src/parser/nondeterministic/context.rs @@ -459,38 +459,34 @@ impl #[cfg(feature = "tree")] let trees = node.tree_stack.split_off(node.tree_stack.len() - count); + let Some(next_nonterm_shift) = parser.get_states()[state].shift_goto_nonterm(rule.name) + else { + unreachable!( + "Failed to shift non-terminal: {:?} in state {}", + rule.name, state + ); + }; + match Data::reduce_action( &mut node.data_stack, &mut node.location_stack, + next_nonterm_shift.push, reduce_rule, shift, term, userdata, &mut new_location, ) { - Ok(non_empty_pushed) => { - if let Some(nonterm_shift_state) = - parser.get_states()[state].shift_goto_nonterm(rule.name) + Ok(_) => { + node.state_stack.push(next_nonterm_shift.state); + node.location_stack.push(new_location); + node.precedence_stack.push(precedence); + #[cfg(feature = "tree")] { - node.state_stack.push(nonterm_shift_state.state); - if !nonterm_shift_state.push && non_empty_pushed { - node.data_stack.pop(); - node.data_stack.push_empty(); - } - node.location_stack.push(new_location); - node.precedence_stack.push(precedence); - #[cfg(feature = "tree")] - { - node.tree_stack - .push(crate::tree::Tree::new_nonterminal(rule.name.clone(), trees)); - } - Ok(node_to_shift) - } else { - unreachable!( - "no shift state for non-terminal: {:?}", - parser.get_rules()[reduce_rule].name - ); + node.tree_stack + .push(crate::tree::Tree::new_nonterminal(rule.name.clone(), trees)); } + Ok(node_to_shift) } Err(err) => { self.try_remove_node_recursive(node_to_shift); diff --git a/rusty_lr_parser/src/emit.rs b/rusty_lr_parser/src/emit.rs index 7ccaa90..40b37aa 100644 --- a/rusty_lr_parser/src/emit.rs +++ b/rusty_lr_parser/src/emit.rs @@ -1151,31 +1151,97 @@ impl Grammar { TokenStream::new() } else { if rule.tokens.len() > 0 { - // if first token's tag is equal to new_tag, no need to (pop n tokens -> push new token). - // just pop n-1 tokens - let first_tag_name = token_to_stack_name(rule.tokens[0].token) - .unwrap_or(&empty_tag_name); - - if first_tag_name == new_tag_name { - // pop n-1 tokens, no new insertion - let len = rule.tokens.len() - 1; - let truncate_stream = if len > 0 { - quote! {__data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len);} + if new_tag_name == &empty_tag_name { + // if first token's tag is equal to new_tag, no need to (pop n tokens -> push new token). + // just pop n-1 tokens + let first_tag_name = token_to_stack_name(rule.tokens[0].token) + .unwrap_or(&empty_tag_name); + + if first_tag_name == new_tag_name { + // pop n-1 tokens, no new insertion + let len = rule.tokens.len() - 1; + let truncate_stream = if len > 0 { + quote! {__data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len);} + } else { + TokenStream::new() + }; + truncate_stream } else { - TokenStream::new() - }; - truncate_stream + let len = rule.tokens.len(); + // len > 0 here + quote! { + __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); + __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + } + } } else { - let len = rule.tokens.len(); - // len > 0 here - quote! { - __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); - __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + // if first token's tag is equal to new_tag, no need to (pop n tokens -> push new token). + // just pop n-1 tokens + let first_tag_name = token_to_stack_name(rule.tokens[0].token) + .unwrap_or(&empty_tag_name); + + if first_tag_name == new_tag_name { + // pop n-1 tokens, no new insertion + let lenm1 = rule.tokens.len() - 1; + let truncate_stream = if lenm1 > 0 { + quote! {__data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #lenm1);} + } else { + TokenStream::new() + }; + + let len = rule.tokens.len(); + quote! { + if __push_data { + #truncate_stream + } else { + __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); + __data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name); + } + } + } else if first_tag_name == &empty_tag_name { + // pop n-1 tokens, no new insertion + let lenm1 = rule.tokens.len() - 1; + let truncate_stream = if lenm1 > 0 { + quote! {__data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #lenm1);} + } else { + TokenStream::new() + }; + + let len = rule.tokens.len(); + quote! { + if __push_data { + __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); + __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + } else { + #truncate_stream + } + } + } else { + let len = rule.tokens.len(); + // len > 0 here + quote! { + __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); + if __push_data { + __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + } else { + __data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name); + } + } } } } else { - quote! { - __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + if new_tag_name == &empty_tag_name { + quote! { + __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + } + } else { + quote! { + if __push_data { + __data_stack.#tag_stack_name.push(#tag_enum_name::#new_tag_name); + } else { + __data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name); + } + } } } }; @@ -1286,7 +1352,7 @@ impl Grammar { } reduce_action_case_streams.extend(quote! { - #rule_index => Self::#reduce_fn_ident( data_stack, location_stack, shift, lookahead, user_data, location0 ), + #rule_index => Self::#reduce_fn_ident( data_stack, location_stack, push_data, shift, lookahead, user_data, location0 ), }); let returns_non_empty = stack_names_for_nonterm[nonterm_idx].is_some(); @@ -1309,6 +1375,7 @@ impl Grammar { fn #reduce_fn_ident( __data_stack: &mut Self, __location_stack: &mut Vec<#location_typename>, + __push_data: bool, shift: &mut bool, lookahead: &#module_prefix::TerminalSymbol<#token_typename>, #user_data_parameter_name: &mut #user_data_typename, @@ -1324,7 +1391,9 @@ impl Grammar { #custom_reduce_action_stream let __res = #reduce_action_body - __data_stack.#stack_name.push(__res); + if __push_data { + __data_stack.#stack_name.push(__res); + } Ok(#returns_non_empty) } @@ -1336,6 +1405,7 @@ impl Grammar { fn #reduce_fn_ident( __data_stack: &mut Self, __location_stack: &mut Vec<#location_typename>, + __push_data: bool, shift: &mut bool, lookahead: &#module_prefix::TerminalSymbol<#token_typename>, #user_data_parameter_name: &mut #user_data_typename, @@ -1662,6 +1732,7 @@ impl Grammar { fn reduce_action( data_stack: &mut Self, location_stack: &mut Vec<#location_typename>, + push_data: bool, rule_index: usize, shift: &mut bool, lookahead: &#module_prefix::TerminalSymbol, diff --git a/rusty_lr_parser/src/parser/parser_expanded.rs b/rusty_lr_parser/src/parser/parser_expanded.rs index e17794d..31624c8 100644 --- a/rusty_lr_parser/src/parser/parser_expanded.rs +++ b/rusty_lr_parser/src/parser/parser_expanded.rs @@ -713,6 +713,7 @@ impl GrammarDataStack { fn reduce_Rule_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -742,7 +743,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 5usize); - __data_stack.__tags.push(GrammarTags::__stack1); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack1); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut RuleType = __data_stack.__stack2.pop().unwrap(); let mut RuleLines = __data_stack.__stack3.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); @@ -764,7 +769,9 @@ impl GrammarDataStack { rule_lines: RuleLines, } }; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///RuleType -> parengroup @@ -772,6 +779,7 @@ impl GrammarDataStack { fn reduce_RuleType_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -785,7 +793,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack2); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack2); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut parengroup = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -794,7 +806,9 @@ impl GrammarDataStack { }; Some(group) }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///RuleType -> @@ -802,15 +816,22 @@ impl GrammarDataStack { fn reduce_RuleType_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack2); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack2); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { None }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///RuleLines -> RuleLines pipe RuleLine @@ -818,6 +839,7 @@ impl GrammarDataStack { fn reduce_RuleLines_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -838,7 +860,12 @@ impl GrammarDataStack { GrammarTags::__stack3) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut RuleLines = __data_stack.__stack3.pop().unwrap(); let mut RuleLine = __data_stack.__stack4.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); @@ -850,7 +877,9 @@ impl GrammarDataStack { RuleLines.push(RuleLine); RuleLines }; - __data_stack.__stack3.push(__res); + if __push_data { + __data_stack.__stack3.push(__res); + } Ok(true) } ///RuleLines -> RuleLine @@ -858,6 +887,7 @@ impl GrammarDataStack { fn reduce_RuleLines_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -871,11 +901,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack3); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack3); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut RuleLine = __data_stack.__stack4.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![RuleLine] }; - __data_stack.__stack3.push(__res); + if __push_data { + __data_stack.__stack3.push(__res); + } Ok(true) } ///RuleLine -> TokenMapped* PrecDef* Action @@ -883,6 +919,7 @@ impl GrammarDataStack { fn reduce_RuleLine_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -904,7 +941,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack4); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack4); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut TokenMapped = __data_stack.__stack11.pop().unwrap(); let mut PrecDef = __data_stack.__stack12.pop().unwrap(); let mut Action = __data_stack.__stack2.pop().unwrap(); @@ -919,7 +960,9 @@ impl GrammarDataStack { dprec: None, } }; - __data_stack.__stack4.push(__res); + if __push_data { + __data_stack.__stack4.push(__res); + } Ok(true) } ///PrecDef -> percent prec IdentOrLiteral @@ -927,6 +970,7 @@ impl GrammarDataStack { fn reduce_PrecDef_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -948,12 +992,18 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack5); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack5); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut IdentOrLiteral = __data_stack.__stack10.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); __location_stack.truncate(__location_stack.len() - 3usize); let __res = { PrecDPrecArgs::Prec(IdentOrLiteral) }; - __data_stack.__stack5.push(__res); + if __push_data { + __data_stack.__stack5.push(__res); + } Ok(true) } ///PrecDef -> percent prec error @@ -961,6 +1011,7 @@ impl GrammarDataStack { fn reduce_PrecDef_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -982,7 +1033,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack5); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack5); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -996,7 +1051,9 @@ impl GrammarDataStack { }); PrecDPrecArgs::None }; - __data_stack.__stack5.push(__res); + if __push_data { + __data_stack.__stack5.push(__res); + } Ok(true) } ///PrecDef -> percent dprec literal @@ -1004,6 +1061,7 @@ impl GrammarDataStack { fn reduce_PrecDef_2( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1025,7 +1083,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack5); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack5); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut literal = __data_stack.__terminals.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); __location_stack.truncate(__location_stack.len() - 3usize); @@ -1035,7 +1097,9 @@ impl GrammarDataStack { }; PrecDPrecArgs::DPrec(literal) }; - __data_stack.__stack5.push(__res); + if __push_data { + __data_stack.__stack5.push(__res); + } Ok(true) } ///PrecDef -> percent dprec error @@ -1043,6 +1107,7 @@ impl GrammarDataStack { fn reduce_PrecDef_3( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1064,7 +1129,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack5); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack5); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -1078,7 +1147,9 @@ impl GrammarDataStack { }); PrecDPrecArgs::None }; - __data_stack.__stack5.push(__res); + if __push_data { + __data_stack.__stack5.push(__res); + } Ok(true) } ///PrecDef -> percent error @@ -1086,6 +1157,7 @@ impl GrammarDataStack { fn reduce_PrecDef_4( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1103,7 +1175,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); - __data_stack.__tags.push(GrammarTags::__stack5); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack5); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); @@ -1117,7 +1193,9 @@ impl GrammarDataStack { }); PrecDPrecArgs::None }; - __data_stack.__stack5.push(__res); + if __push_data { + __data_stack.__stack5.push(__res); + } Ok(true) } ///TokenMapped -> Pattern @@ -1125,6 +1203,7 @@ impl GrammarDataStack { fn reduce_TokenMapped_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1138,11 +1217,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack6); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack6); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { (None, Pattern) }; - __data_stack.__stack6.push(__res); + if __push_data { + __data_stack.__stack6.push(__res); + } Ok(true) } ///TokenMapped -> ident equal Pattern @@ -1150,6 +1235,7 @@ impl GrammarDataStack { fn reduce_TokenMapped_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1171,7 +1257,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack6); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack6); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut ident = __data_stack.__terminals.pop().unwrap(); @@ -1182,7 +1272,9 @@ impl GrammarDataStack { }; (Some(ident), Pattern) }; - __data_stack.__stack6.push(__res); + if __push_data { + __data_stack.__stack6.push(__res); + } Ok(true) } ///TerminalSetItem -> ident @@ -1190,6 +1282,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1203,7 +1296,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut ident = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -1212,7 +1309,9 @@ impl GrammarDataStack { }; TerminalSetItem::Terminal(ident) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSetItem -> ident minus ident @@ -1220,6 +1319,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1241,7 +1341,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut last = __data_stack.__terminals.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut first = __data_stack.__terminals.pop().unwrap(); @@ -1255,7 +1359,9 @@ impl GrammarDataStack { }; TerminalSetItem::Range(first, last) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSetItem -> ident minus error @@ -1263,6 +1369,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_2( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1284,7 +1391,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -1298,7 +1409,9 @@ impl GrammarDataStack { }); TerminalSetItem::Terminal(format_ident!("dummy")) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSetItem -> literal @@ -1306,6 +1419,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_3( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1319,7 +1433,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut literal = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -1328,7 +1446,9 @@ impl GrammarDataStack { }; TerminalSetItem::Literal(literal) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSetItem -> literal minus literal @@ -1336,6 +1456,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_4( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1357,7 +1478,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut last = __data_stack.__terminals.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut first = __data_stack.__terminals.pop().unwrap(); @@ -1371,7 +1496,9 @@ impl GrammarDataStack { }; TerminalSetItem::LiteralRange(first, last) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSetItem -> literal minus error @@ -1379,6 +1506,7 @@ impl GrammarDataStack { fn reduce_TerminalSetItem_5( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1400,7 +1528,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack7); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack7); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -1414,7 +1546,9 @@ impl GrammarDataStack { }); TerminalSetItem::Terminal(format_ident!("dummy")) }; - __data_stack.__stack7.push(__res); + if __push_data { + __data_stack.__stack7.push(__res); + } Ok(true) } ///TerminalSet -> lbracket caret? TerminalSetItem* rbracket @@ -1422,6 +1556,7 @@ impl GrammarDataStack { fn reduce_TerminalSet_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1447,7 +1582,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize); - __data_stack.__tags.push(GrammarTags::__stack8); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack8); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut caret = __data_stack.__stack13.pop().unwrap(); let mut TerminalSetItem = __data_stack.__stack14.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); @@ -1462,7 +1601,9 @@ impl GrammarDataStack { close_span: __rustylr_location_rbracket.span(), } }; - __data_stack.__stack8.push(__res); + if __push_data { + __data_stack.__stack8.push(__res); + } Ok(true) } ///TerminalSet -> dot @@ -1470,6 +1611,7 @@ impl GrammarDataStack { fn reduce_TerminalSet_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1483,7 +1625,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack8); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack8); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut __rustylr_location_dot = __location_stack.pop().unwrap(); let __res = { @@ -1495,7 +1641,9 @@ impl GrammarDataStack { close_span: span, } }; - __data_stack.__stack8.push(__res); + if __push_data { + __data_stack.__stack8.push(__res); + } Ok(true) } ///Pattern -> ident @@ -1503,6 +1651,7 @@ impl GrammarDataStack { fn reduce_Pattern_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1516,7 +1665,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut ident = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -1525,7 +1678,9 @@ impl GrammarDataStack { }; PatternArgs::Ident(ident) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern plus @@ -1533,6 +1688,7 @@ impl GrammarDataStack { fn reduce_Pattern_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1549,7 +1705,12 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); let mut plus = __data_stack.__terminals.pop().unwrap(); let mut __rustylr_location_plus = __location_stack.pop().unwrap(); @@ -1560,7 +1721,9 @@ impl GrammarDataStack { }; PatternArgs::Plus(Box::new(Pattern), __rustylr_location_plus.span()) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern star @@ -1568,6 +1731,7 @@ impl GrammarDataStack { fn reduce_Pattern_2( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1584,7 +1748,12 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut __rustylr_location_star = __location_stack.pop().unwrap(); @@ -1592,7 +1761,9 @@ impl GrammarDataStack { let __res = { PatternArgs::Star(Box::new(Pattern), __rustylr_location_star.span()) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern question @@ -1600,6 +1771,7 @@ impl GrammarDataStack { fn reduce_Pattern_3( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1616,7 +1788,12 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut __rustylr_location_question = __location_stack.pop().unwrap(); @@ -1624,7 +1801,9 @@ impl GrammarDataStack { let __res = { PatternArgs::Question(Box::new(Pattern), __rustylr_location_question.span()) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern exclamation @@ -1632,6 +1811,7 @@ impl GrammarDataStack { fn reduce_Pattern_4( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1648,7 +1828,12 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); let mut __rustylr_location_exclamation = __location_stack.pop().unwrap(); @@ -1659,7 +1844,9 @@ impl GrammarDataStack { __rustylr_location_exclamation.span(), ) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> TerminalSet @@ -1667,6 +1854,7 @@ impl GrammarDataStack { fn reduce_Pattern_5( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1680,11 +1868,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut TerminalSet = __data_stack.__stack8.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { PatternArgs::TerminalSet(TerminalSet) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern slash Pattern @@ -1692,6 +1886,7 @@ impl GrammarDataStack { fn reduce_Pattern_6( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1712,13 +1907,20 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut lh = __data_stack.__stack9.pop().unwrap(); let mut p1 = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); __location_stack.truncate(__location_stack.len() - 3usize); let __res = { PatternArgs::Lookaheads(Box::new(p1), Box::new(lh)) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> lparen $sep(Pattern*, pipe, +) rparen @@ -1726,6 +1928,7 @@ impl GrammarDataStack { fn reduce_Pattern_7( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1747,7 +1950,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Pattern = __data_stack.__stack16.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); let mut __rustylr_location_rparen = __location_stack.pop().unwrap(); @@ -1760,7 +1967,9 @@ impl GrammarDataStack { __rustylr_location_rparen.span(), ) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> lparen error rparen @@ -1768,6 +1977,7 @@ impl GrammarDataStack { fn reduce_Pattern_8( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1789,7 +1999,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 2usize); __location_stack.truncate(__location_stack.len() - 1usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); @@ -1804,7 +2018,9 @@ impl GrammarDataStack { }); PatternArgs::Ident(format_ident!("dummy")) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> literal @@ -1812,6 +2028,7 @@ impl GrammarDataStack { fn reduce_Pattern_9( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1825,7 +2042,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut literal = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -1834,7 +2055,9 @@ impl GrammarDataStack { }; PatternArgs::Literal(literal) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> Pattern minus Pattern @@ -1842,6 +2065,7 @@ impl GrammarDataStack { fn reduce_Pattern_10( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1862,13 +2086,20 @@ impl GrammarDataStack { GrammarTags::__stack9) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut p2 = __data_stack.__stack9.pop().unwrap(); let mut p1 = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); __location_stack.truncate(__location_stack.len() - 3usize); let __res = { PatternArgs::Minus(Box::new(p1), Box::new(p2)) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma? rparen @@ -1876,6 +2107,7 @@ impl GrammarDataStack { fn reduce_Pattern_11( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1917,7 +2149,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 8usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut del = __data_stack.__stack9.pop().unwrap(); let mut base = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 3usize); @@ -1941,7 +2177,9 @@ impl GrammarDataStack { } PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma plus rparen @@ -1949,6 +2187,7 @@ impl GrammarDataStack { fn reduce_Pattern_12( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -1994,7 +2233,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut del = __data_stack.__stack9.pop().unwrap(); let mut base = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 5usize); @@ -2018,7 +2261,9 @@ impl GrammarDataStack { } PatternArgs::Sep(Box::new(base), Box::new(del), true, *__rustylr_location0) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma star rparen @@ -2026,6 +2271,7 @@ impl GrammarDataStack { fn reduce_Pattern_13( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2071,7 +2317,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut del = __data_stack.__stack9.pop().unwrap(); let mut base = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 5usize); @@ -2095,7 +2345,9 @@ impl GrammarDataStack { } PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> dollar ident lparen Pattern comma Pattern error rparen @@ -2103,6 +2355,7 @@ impl GrammarDataStack { fn reduce_Pattern_14( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2144,7 +2397,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 8usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut del = __data_stack.__stack9.pop().unwrap(); let mut base = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 3usize); @@ -2177,7 +2434,9 @@ impl GrammarDataStack { }); PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma error rparen @@ -2185,6 +2444,7 @@ impl GrammarDataStack { fn reduce_Pattern_15( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2230,7 +2490,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize); - __data_stack.__tags.push(GrammarTags::__stack9); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack9); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut del = __data_stack.__stack9.pop().unwrap(); let mut base = __data_stack.__stack9.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 4usize); @@ -2263,7 +2527,9 @@ impl GrammarDataStack { }); PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0) }; - __data_stack.__stack9.push(__res); + if __push_data { + __data_stack.__stack9.push(__res); + } Ok(true) } ///Action -> bracegroup @@ -2271,6 +2537,7 @@ impl GrammarDataStack { fn reduce_Action_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2284,7 +2551,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack2); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack2); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut bracegroup = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -2293,7 +2564,9 @@ impl GrammarDataStack { }; Some(group) }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///Action -> @@ -2301,15 +2574,22 @@ impl GrammarDataStack { fn reduce_Action_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack2); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack2); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { None }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///IdentOrLiteral -> ident @@ -2317,6 +2597,7 @@ impl GrammarDataStack { fn reduce_IdentOrLiteral_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2330,7 +2611,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack10); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack10); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut ident = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -2339,7 +2624,9 @@ impl GrammarDataStack { }; IdentOrLiteral::Ident(ident) }; - __data_stack.__stack10.push(__res); + if __push_data { + __data_stack.__stack10.push(__res); + } Ok(true) } ///IdentOrLiteral -> literal @@ -2347,6 +2634,7 @@ impl GrammarDataStack { fn reduce_IdentOrLiteral_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2360,7 +2648,11 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack10); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack10); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut literal = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -2369,7 +2661,9 @@ impl GrammarDataStack { }; IdentOrLiteral::Literal(literal) }; - __data_stack.__stack10.push(__res); + if __push_data { + __data_stack.__stack10.push(__res); + } Ok(true) } ///Directive -> percent token ident [^semicolon]+ semicolon @@ -2377,6 +2671,7 @@ impl GrammarDataStack { fn reduce_Directive_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2430,6 +2725,7 @@ impl GrammarDataStack { fn reduce_Directive_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2476,6 +2772,7 @@ impl GrammarDataStack { fn reduce_Directive_2( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2522,6 +2819,7 @@ impl GrammarDataStack { fn reduce_Directive_3( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2564,6 +2862,7 @@ impl GrammarDataStack { fn reduce_Directive_4( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2610,6 +2909,7 @@ impl GrammarDataStack { fn reduce_Directive_5( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2657,6 +2957,7 @@ impl GrammarDataStack { fn reduce_Directive_6( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2699,6 +3000,7 @@ impl GrammarDataStack { fn reduce_Directive_7( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2746,6 +3048,7 @@ impl GrammarDataStack { fn reduce_Directive_8( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2788,6 +3091,7 @@ impl GrammarDataStack { fn reduce_Directive_9( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2834,6 +3138,7 @@ impl GrammarDataStack { fn reduce_Directive_10( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2880,6 +3185,7 @@ impl GrammarDataStack { fn reduce_Directive_11( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2926,6 +3232,7 @@ impl GrammarDataStack { fn reduce_Directive_12( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -2972,6 +3279,7 @@ impl GrammarDataStack { fn reduce_Directive_13( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3014,6 +3322,7 @@ impl GrammarDataStack { fn reduce_Directive_14( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3060,6 +3369,7 @@ impl GrammarDataStack { fn reduce_Directive_15( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3107,6 +3417,7 @@ impl GrammarDataStack { fn reduce_Directive_16( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3149,6 +3460,7 @@ impl GrammarDataStack { fn reduce_Directive_17( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3196,6 +3508,7 @@ impl GrammarDataStack { fn reduce_Directive_18( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3238,6 +3551,7 @@ impl GrammarDataStack { fn reduce_Directive_19( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3273,6 +3587,7 @@ impl GrammarDataStack { fn reduce_Directive_20( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3319,6 +3634,7 @@ impl GrammarDataStack { fn reduce_Directive_21( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3354,6 +3670,7 @@ impl GrammarDataStack { fn reduce_Directive_22( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3400,6 +3717,7 @@ impl GrammarDataStack { fn reduce_Directive_23( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3434,6 +3752,7 @@ impl GrammarDataStack { fn reduce_Directive_24( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3480,6 +3799,7 @@ impl GrammarDataStack { fn reduce_Directive_25( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3515,6 +3835,7 @@ impl GrammarDataStack { fn reduce_Directive_26( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3561,6 +3882,7 @@ impl GrammarDataStack { fn reduce_Directive_27( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3608,6 +3930,7 @@ impl GrammarDataStack { fn reduce_Directive_28( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3654,6 +3977,7 @@ impl GrammarDataStack { fn reduce_Directive_29( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3700,6 +4024,7 @@ impl GrammarDataStack { fn reduce_Directive_30( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3742,6 +4067,7 @@ impl GrammarDataStack { fn reduce_Directive_31( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3787,6 +4113,7 @@ impl GrammarDataStack { fn reduce_Directive_32( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3829,6 +4156,7 @@ impl GrammarDataStack { fn reduce_Directive_33( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3871,6 +4199,7 @@ impl GrammarDataStack { fn reduce_GrammarLine_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3897,6 +4226,7 @@ impl GrammarDataStack { fn reduce__TokenMappedPlus15_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3910,11 +4240,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack11); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack11); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack6.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack11.push(__res); + if __push_data { + __data_stack.__stack11.push(__res); + } Ok(true) } ///TokenMapped+ -> TokenMapped+ TokenMapped @@ -3922,6 +4258,7 @@ impl GrammarDataStack { fn reduce__TokenMappedPlus15_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3938,7 +4275,12 @@ impl GrammarDataStack { GrammarTags::__stack11) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack11.pop().unwrap(); let mut A = __data_stack.__stack6.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -3946,7 +4288,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack11.push(__res); + if __push_data { + __data_stack.__stack11.push(__res); + } Ok(true) } ///TokenMapped* -> TokenMapped+ @@ -3954,6 +4298,7 @@ impl GrammarDataStack { fn reduce__TokenMappedStar16_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -3966,10 +4311,16 @@ impl GrammarDataStack { GrammarTags::__stack11) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack11.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = __token0; - __data_stack.__stack11.push(__res); + if __push_data { + __data_stack.__stack11.push(__res); + } Ok(true) } ///TokenMapped* -> @@ -3977,15 +4328,22 @@ impl GrammarDataStack { fn reduce__TokenMappedStar16_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack11); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack11); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { vec![] }; - __data_stack.__stack11.push(__res); + if __push_data { + __data_stack.__stack11.push(__res); + } Ok(true) } ///PrecDef+ -> PrecDef @@ -3993,6 +4351,7 @@ impl GrammarDataStack { fn reduce__PrecDefPlus17_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4006,11 +4365,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack12); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack12); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack5.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack12.push(__res); + if __push_data { + __data_stack.__stack12.push(__res); + } Ok(true) } ///PrecDef+ -> PrecDef+ PrecDef @@ -4018,6 +4383,7 @@ impl GrammarDataStack { fn reduce__PrecDefPlus17_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4034,7 +4400,12 @@ impl GrammarDataStack { GrammarTags::__stack12) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack12.pop().unwrap(); let mut A = __data_stack.__stack5.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4042,7 +4413,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack12.push(__res); + if __push_data { + __data_stack.__stack12.push(__res); + } Ok(true) } ///PrecDef* -> PrecDef+ @@ -4050,6 +4423,7 @@ impl GrammarDataStack { fn reduce__PrecDefStar18_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4062,10 +4436,16 @@ impl GrammarDataStack { GrammarTags::__stack12) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack12.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = __token0; - __data_stack.__stack12.push(__res); + if __push_data { + __data_stack.__stack12.push(__res); + } Ok(true) } ///PrecDef* -> @@ -4073,15 +4453,22 @@ impl GrammarDataStack { fn reduce__PrecDefStar18_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack12); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack12); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { vec![] }; - __data_stack.__stack12.push(__res); + if __push_data { + __data_stack.__stack12.push(__res); + } Ok(true) } ///caret? -> caret @@ -4089,6 +4476,7 @@ impl GrammarDataStack { fn reduce__caretQuestion19_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4102,11 +4490,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack13); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack13); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = Some(A); - __data_stack.__stack13.push(__res); + if __push_data { + __data_stack.__stack13.push(__res); + } Ok(true) } ///caret? -> @@ -4114,15 +4508,22 @@ impl GrammarDataStack { fn reduce__caretQuestion19_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack13); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack13); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { None }; - __data_stack.__stack13.push(__res); + if __push_data { + __data_stack.__stack13.push(__res); + } Ok(true) } ///TerminalSetItem+ -> TerminalSetItem @@ -4130,6 +4531,7 @@ impl GrammarDataStack { fn reduce__TerminalSetItemPlus20_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4143,11 +4545,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack14); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack14); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack7.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack14.push(__res); + if __push_data { + __data_stack.__stack14.push(__res); + } Ok(true) } ///TerminalSetItem+ -> TerminalSetItem+ TerminalSetItem @@ -4155,6 +4563,7 @@ impl GrammarDataStack { fn reduce__TerminalSetItemPlus20_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4171,7 +4580,12 @@ impl GrammarDataStack { GrammarTags::__stack14) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack14.pop().unwrap(); let mut A = __data_stack.__stack7.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4179,7 +4593,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack14.push(__res); + if __push_data { + __data_stack.__stack14.push(__res); + } Ok(true) } ///TerminalSetItem* -> TerminalSetItem+ @@ -4187,6 +4603,7 @@ impl GrammarDataStack { fn reduce__TerminalSetItemStar21_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4199,10 +4616,16 @@ impl GrammarDataStack { GrammarTags::__stack14) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack14.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = __token0; - __data_stack.__stack14.push(__res); + if __push_data { + __data_stack.__stack14.push(__res); + } Ok(true) } ///TerminalSetItem* -> @@ -4210,15 +4633,22 @@ impl GrammarDataStack { fn reduce__TerminalSetItemStar21_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack14); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack14); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { vec![] }; - __data_stack.__stack14.push(__res); + if __push_data { + __data_stack.__stack14.push(__res); + } Ok(true) } ///Pattern+ -> Pattern @@ -4226,6 +4656,7 @@ impl GrammarDataStack { fn reduce__PatternPlus22_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4239,11 +4670,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack15); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack15); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack9.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack15.push(__res); + if __push_data { + __data_stack.__stack15.push(__res); + } Ok(true) } ///Pattern+ -> Pattern+ Pattern @@ -4251,6 +4688,7 @@ impl GrammarDataStack { fn reduce__PatternPlus22_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4267,7 +4705,12 @@ impl GrammarDataStack { GrammarTags::__stack15) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack15.pop().unwrap(); let mut A = __data_stack.__stack9.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4275,7 +4718,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack15.push(__res); + if __push_data { + __data_stack.__stack15.push(__res); + } Ok(true) } ///Pattern* -> Pattern+ @@ -4283,6 +4728,7 @@ impl GrammarDataStack { fn reduce__PatternStar23_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4295,10 +4741,16 @@ impl GrammarDataStack { GrammarTags::__stack15) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack15.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = __token0; - __data_stack.__stack15.push(__res); + if __push_data { + __data_stack.__stack15.push(__res); + } Ok(true) } ///Pattern* -> @@ -4306,15 +4758,22 @@ impl GrammarDataStack { fn reduce__PatternStar23_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack15); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack15); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { vec![] }; - __data_stack.__stack15.push(__res); + if __push_data { + __data_stack.__stack15.push(__res); + } Ok(true) } ///$sep(Pattern*, pipe, +) -> Pattern* @@ -4322,6 +4781,7 @@ impl GrammarDataStack { fn reduce___PatternStar23SepPlus24_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4335,11 +4795,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack16); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack16); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack15.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![__token0] }; - __data_stack.__stack16.push(__res); + if __push_data { + __data_stack.__stack16.push(__res); + } Ok(true) } ///$sep(Pattern*, pipe, +) -> $sep(Pattern*, pipe, +) pipe Pattern* @@ -4347,6 +4813,7 @@ impl GrammarDataStack { fn reduce___PatternStar23SepPlus24_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4367,7 +4834,12 @@ impl GrammarDataStack { GrammarTags::__stack16) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token1 = __data_stack.__stack15.pop().unwrap(); let mut __token0 = __data_stack.__stack16.pop().unwrap(); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); @@ -4376,7 +4848,9 @@ impl GrammarDataStack { __token0.push(__token1); __token0 }; - __data_stack.__stack16.push(__res); + if __push_data { + __data_stack.__stack16.push(__res); + } Ok(true) } ///comma? -> comma @@ -4384,6 +4858,7 @@ impl GrammarDataStack { fn reduce__commaQuestion25_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4407,6 +4882,7 @@ impl GrammarDataStack { fn reduce__commaQuestion25_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4421,6 +4897,7 @@ impl GrammarDataStack { fn reduce___TermSet26Plus27_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4434,11 +4911,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack17); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack17); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///[^semicolon]+ -> [^semicolon]+ [^semicolon] @@ -4446,6 +4929,7 @@ impl GrammarDataStack { fn reduce___TermSet26Plus27_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4462,7 +4946,12 @@ impl GrammarDataStack { GrammarTags::__stack17) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack17.pop().unwrap(); let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4470,7 +4959,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///IdentOrLiteral+ -> IdentOrLiteral @@ -4478,6 +4969,7 @@ impl GrammarDataStack { fn reduce__IdentOrLiteralPlus28_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4491,11 +4983,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack18); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack18); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack10.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack18.push(__res); + if __push_data { + __data_stack.__stack18.push(__res); + } Ok(true) } ///IdentOrLiteral+ -> IdentOrLiteral+ IdentOrLiteral @@ -4503,6 +5001,7 @@ impl GrammarDataStack { fn reduce__IdentOrLiteralPlus28_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4519,7 +5018,12 @@ impl GrammarDataStack { GrammarTags::__stack18) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__stack10.pop().unwrap(); let mut Ap = __data_stack.__stack18.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4527,7 +5031,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack18.push(__res); + if __push_data { + __data_stack.__stack18.push(__res); + } Ok(true) } ///ident+ -> ident @@ -4535,6 +5041,7 @@ impl GrammarDataStack { fn reduce__identPlus29_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4548,11 +5055,17 @@ impl GrammarDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(GrammarTags::__stack17); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack17); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///ident+ -> ident+ ident @@ -4560,6 +5073,7 @@ impl GrammarDataStack { fn reduce__identPlus29_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4576,7 +5090,12 @@ impl GrammarDataStack { GrammarTags::__stack17) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut Ap = __data_stack.__stack17.pop().unwrap(); let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -4584,7 +5103,9 @@ impl GrammarDataStack { Ap.push(A); Ap }; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///ident* -> ident+ @@ -4592,6 +5113,7 @@ impl GrammarDataStack { fn reduce__identStar30_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4604,10 +5126,16 @@ impl GrammarDataStack { GrammarTags::__stack17) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(GrammarTags::Empty); + } let mut __token0 = __data_stack.__stack17.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = __token0; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///ident* -> @@ -4615,15 +5143,22 @@ impl GrammarDataStack { fn reduce__identStar30_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, ) -> Result { #[cfg(debug_assertions)] {} - __data_stack.__tags.push(GrammarTags::__stack17); + if __push_data { + __data_stack.__tags.push(GrammarTags::__stack17); + } else { + __data_stack.__tags.push(GrammarTags::Empty); + } let __res = { vec![] }; - __data_stack.__stack17.push(__res); + if __push_data { + __data_stack.__stack17.push(__res); + } Ok(true) } ///GrammarLine+ -> GrammarLine @@ -4631,6 +5166,7 @@ impl GrammarDataStack { fn reduce__GrammarLinePlus31_0( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4651,6 +5187,7 @@ impl GrammarDataStack { fn reduce__GrammarLinePlus31_1( __data_stack: &mut Self, __location_stack: &mut Vec, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, @@ -4896,6 +5433,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { fn reduce_action( data_stack: &mut Self, location_stack: &mut Vec, + push_data: bool, rule_index: usize, shift: &mut bool, lookahead: &::rusty_lr_core::TerminalSymbol, @@ -4907,6 +5445,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Rule_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4917,6 +5456,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_RuleType_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4927,6 +5467,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_RuleType_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4937,6 +5478,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_RuleLines_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4947,6 +5489,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_RuleLines_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4957,6 +5500,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_RuleLine_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4967,6 +5511,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_PrecDef_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4977,6 +5522,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_PrecDef_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4987,6 +5533,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_PrecDef_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -4997,6 +5544,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_PrecDef_3( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5007,6 +5555,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_PrecDef_4( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5017,6 +5566,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TokenMapped_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5027,6 +5577,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TokenMapped_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5037,6 +5588,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5047,6 +5599,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5057,6 +5610,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5067,6 +5621,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_3( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5077,6 +5632,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_4( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5087,6 +5643,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSetItem_5( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5097,6 +5654,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSet_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5107,6 +5665,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_TerminalSet_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5117,6 +5676,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5127,6 +5687,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5137,6 +5698,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5147,6 +5709,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_3( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5157,6 +5720,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_4( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5167,6 +5731,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_5( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5177,6 +5742,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_6( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5187,6 +5753,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_7( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5197,6 +5764,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_8( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5207,6 +5775,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_9( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5217,6 +5786,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_10( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5227,6 +5797,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_11( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5237,6 +5808,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_12( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5247,6 +5819,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_13( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5257,6 +5830,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_14( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5267,6 +5841,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Pattern_15( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5277,6 +5852,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Action_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5287,6 +5863,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Action_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5297,6 +5874,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_IdentOrLiteral_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5307,6 +5885,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_IdentOrLiteral_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5317,6 +5896,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5327,6 +5907,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5337,6 +5918,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5347,6 +5929,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_3( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5357,6 +5940,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_4( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5367,6 +5951,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_5( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5377,6 +5962,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_6( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5387,6 +5973,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_7( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5397,6 +5984,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_8( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5407,6 +5995,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_9( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5417,6 +6006,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_10( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5427,6 +6017,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_11( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5437,6 +6028,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_12( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5447,6 +6039,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_13( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5457,6 +6050,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_14( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5467,6 +6061,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_15( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5477,6 +6072,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_16( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5487,6 +6083,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_17( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5497,6 +6094,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_18( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5507,6 +6105,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_19( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5517,6 +6116,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_20( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5527,6 +6127,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_21( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5537,6 +6138,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_22( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5547,6 +6149,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_23( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5557,6 +6160,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_24( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5567,6 +6171,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_25( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5577,6 +6182,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_26( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5587,6 +6193,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_27( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5597,6 +6204,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_28( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5607,6 +6215,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_29( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5617,6 +6226,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_30( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5627,6 +6237,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_31( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5637,6 +6248,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_32( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5647,6 +6259,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_Directive_33( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5657,6 +6270,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce_GrammarLine_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5667,6 +6281,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TokenMappedPlus15_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5677,6 +6292,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TokenMappedPlus15_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5687,6 +6303,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TokenMappedStar16_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5697,6 +6314,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TokenMappedStar16_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5707,6 +6325,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PrecDefPlus17_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5717,6 +6336,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PrecDefPlus17_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5727,6 +6347,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PrecDefStar18_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5737,6 +6358,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PrecDefStar18_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5747,6 +6369,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__caretQuestion19_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5757,6 +6380,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__caretQuestion19_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5767,6 +6391,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TerminalSetItemPlus20_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5777,6 +6402,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TerminalSetItemPlus20_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5787,6 +6413,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TerminalSetItemStar21_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5797,6 +6424,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__TerminalSetItemStar21_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5807,6 +6435,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PatternPlus22_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5817,6 +6446,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PatternPlus22_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5827,6 +6457,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PatternStar23_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5837,6 +6468,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__PatternStar23_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5847,6 +6479,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce___PatternStar23SepPlus24_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5857,6 +6490,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce___PatternStar23SepPlus24_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5867,6 +6501,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__commaQuestion25_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5877,6 +6512,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__commaQuestion25_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5887,6 +6523,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce___TermSet26Plus27_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5897,6 +6534,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce___TermSet26Plus27_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5907,6 +6545,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__IdentOrLiteralPlus28_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5917,6 +6556,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__IdentOrLiteralPlus28_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5927,6 +6567,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__identPlus29_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5937,6 +6578,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__identPlus29_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5947,6 +6589,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__identStar30_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5957,6 +6600,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__identStar30_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5967,6 +6611,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__GrammarLinePlus31_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -5977,6 +6622,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { Self::reduce__GrammarLinePlus31_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, diff --git a/scripts/diff/calculator.rs b/scripts/diff/calculator.rs index b7c398e..1f2bf49 100644 --- a/scripts/diff/calculator.rs +++ b/scripts/diff/calculator.rs @@ -238,6 +238,7 @@ impl EDataStack { fn reduce_A_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -258,7 +259,12 @@ impl EDataStack { ETags::__stack1) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::Empty); + } let mut a2 = __data_stack.__stack1.pop().unwrap(); let mut A = __data_stack.__stack1.pop().unwrap(); let mut plus = __data_stack.__terminals.pop().unwrap(); @@ -268,7 +274,9 @@ impl EDataStack { *data += 1; A + a2 }; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///A -> M @@ -276,6 +284,7 @@ impl EDataStack { fn reduce_A_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -288,10 +297,16 @@ impl EDataStack { ETags::__stack1) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(ETags::Empty); + } let mut M = __data_stack.__stack1.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = M; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///M -> M star M @@ -299,6 +314,7 @@ impl EDataStack { fn reduce_M_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -319,7 +335,12 @@ impl EDataStack { ETags::__stack1) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::Empty); + } let mut __rustylr_data_2 = __data_stack.__stack1.pop().unwrap(); let mut __rustylr_data_0 = __data_stack.__stack1.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 3usize); @@ -336,7 +357,9 @@ impl EDataStack { )?; let mut m2 = __rustylr_data_2; let __res = { M_optim * m2 }; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///P -> num @@ -344,6 +367,7 @@ impl EDataStack { fn reduce_P_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -357,7 +381,11 @@ impl EDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(ETags::__stack1); + if __push_data { + __data_stack.__tags.push(ETags::__stack1); + } else { + __data_stack.__tags.push(ETags::Empty); + } let mut num = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { @@ -367,7 +395,9 @@ impl EDataStack { return Err(format!("{:?}", num)); } }; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///P -> lparen E rparen @@ -375,6 +405,7 @@ impl EDataStack { fn reduce_P_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -395,12 +426,18 @@ impl EDataStack { ETags::Empty) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(ETags::__stack1); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::__stack1); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } let mut E = __data_stack.__stack1.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 3usize); let __res = E; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///E -> A @@ -408,6 +445,7 @@ impl EDataStack { fn reduce_E_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -420,10 +458,16 @@ impl EDataStack { ETags::__stack1) ); } + if __push_data {} else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(ETags::Empty); + } let mut A = __data_stack.__stack1.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = A; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } } @@ -498,6 +542,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { fn reduce_action( data_stack: &mut Self, location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + push_data: bool, rule_index: usize, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, @@ -509,6 +554,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_A_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -519,6 +565,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_A_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -529,6 +576,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_M_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -539,6 +587,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_P_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -549,6 +598,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_P_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -559,6 +609,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_E_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, diff --git a/scripts/diff/calculator_u8.rs b/scripts/diff/calculator_u8.rs index 01e9ec2..f23dc43 100644 --- a/scripts/diff/calculator_u8.rs +++ b/scripts/diff/calculator_u8.rs @@ -266,6 +266,7 @@ impl EDataStack { fn reduce_Digit_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -278,11 +279,15 @@ impl EDataStack { ETags::Empty) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(ETags::__terminals); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + __data_stack.__tags.push(ETags::__terminals); + } else {} __location_stack.truncate(__location_stack.len() - 1usize); let __res = { '0' }; - __data_stack.__terminals.push(__res); + if __push_data { + __data_stack.__terminals.push(__res); + } Ok(true) } ///Number -> ' '* Digit+ ' '* @@ -290,6 +295,7 @@ impl EDataStack { fn reduce_Number_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -310,12 +316,18 @@ impl EDataStack { ETags::Empty) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(ETags::__stack1); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::__stack1); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } let mut Digit = __data_stack.__stack3.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 3usize); let __res = { Digit.into_iter().collect::().parse().unwrap() }; - __data_stack.__stack1.push(__res); + if __push_data { + __data_stack.__stack1.push(__res); + } Ok(true) } ///P -> Number @@ -323,6 +335,7 @@ impl EDataStack { fn reduce_P_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -336,11 +349,17 @@ impl EDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(ETags::__stack2); + if __push_data { + __data_stack.__tags.push(ETags::__stack2); + } else { + __data_stack.__tags.push(ETags::Empty); + } let mut Number = __data_stack.__stack1.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { Number as f32 }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///P -> ' '* '(' E ')' ' '* @@ -348,6 +367,7 @@ impl EDataStack { fn reduce_P_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -376,12 +396,18 @@ impl EDataStack { ETags::Empty) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 5usize); - __data_stack.__tags.push(ETags::__stack2); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 5usize); + __data_stack.__tags.push(ETags::__stack2); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize); + } let mut E = __data_stack.__stack2.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 5usize); let __res = E; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///E -> E Op E @@ -389,6 +415,7 @@ impl EDataStack { fn reduce_E_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -409,7 +436,12 @@ impl EDataStack { ETags::__stack2) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::Empty); + } let mut e2 = __data_stack.__stack2.pop().unwrap(); let mut E = __data_stack.__stack2.pop().unwrap(); let mut Op = __data_stack.__terminals.pop().unwrap(); @@ -423,7 +455,9 @@ impl EDataStack { _ => panic!("Unknown operator: {:?}", Op), } }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///E -> ' '* '-' E @@ -431,6 +465,7 @@ impl EDataStack { fn reduce_E_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -451,12 +486,18 @@ impl EDataStack { ETags::Empty) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); - __data_stack.__tags.push(ETags::__stack2); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize); + __data_stack.__tags.push(ETags::__stack2); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + } let mut E = __data_stack.__stack2.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 3usize); let __res = { -E }; - __data_stack.__stack2.push(__res); + if __push_data { + __data_stack.__stack2.push(__res); + } Ok(true) } ///' '+ -> ' '+ ' ' @@ -464,6 +505,7 @@ impl EDataStack { fn reduce___Terminal32Plus6_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -489,6 +531,7 @@ impl EDataStack { fn reduce___Terminal32Star7_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -509,6 +552,7 @@ impl EDataStack { fn reduce___Terminal32Star7_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -523,6 +567,7 @@ impl EDataStack { fn reduce__DigitPlus9_0( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -536,11 +581,17 @@ impl EDataStack { ); } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); - __data_stack.__tags.push(ETags::__stack3); + if __push_data { + __data_stack.__tags.push(ETags::__stack3); + } else { + __data_stack.__tags.push(ETags::Empty); + } let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 1usize); let __res = { vec![A] }; - __data_stack.__stack3.push(__res); + if __push_data { + __data_stack.__stack3.push(__res); + } Ok(true) } ///Digit+ -> Digit+ Digit @@ -548,6 +599,7 @@ impl EDataStack { fn reduce__DigitPlus9_1( __data_stack: &mut Self, __location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, @@ -564,7 +616,12 @@ impl EDataStack { ETags::__stack3) ); } - __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + if __push_data { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); + } else { + __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize); + __data_stack.__tags.push(ETags::Empty); + } let mut Ap = __data_stack.__stack3.pop().unwrap(); let mut A = __data_stack.__terminals.pop().unwrap(); __location_stack.truncate(__location_stack.len() - 2usize); @@ -572,7 +629,9 @@ impl EDataStack { Ap.push(A); Ap }; - __data_stack.__stack3.push(__res); + if __push_data { + __data_stack.__stack3.push(__res); + } Ok(true) } } @@ -665,6 +724,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { fn reduce_action( data_stack: &mut Self, location_stack: &mut Vec<::rusty_lr::DefaultLocation>, + push_data: bool, rule_index: usize, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, @@ -676,6 +736,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_Digit_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -686,6 +747,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_Number_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -696,6 +758,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_P_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -706,6 +769,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_P_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -716,6 +780,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_E_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -726,6 +791,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce_E_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -736,6 +802,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce___Terminal32Plus6_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -746,6 +813,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce___Terminal32Star7_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -756,6 +824,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce___Terminal32Star7_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -766,6 +835,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce__DigitPlus9_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -776,6 +846,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { Self::reduce__DigitPlus9_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, diff --git a/scripts/diff/json.rs b/scripts/diff/json.rs index 3484ad9..fb4213b 100644 --- a/scripts/diff/json.rs +++ b/scripts/diff/json.rs @@ -519,6 +519,7 @@ impl JsonDataStack { fn reduce_Object_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -533,6 +534,7 @@ impl JsonDataStack { fn reduce_Object_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -547,6 +549,7 @@ impl JsonDataStack { fn reduce_Object_2( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -568,6 +571,7 @@ impl JsonDataStack { fn reduce_Members_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -582,6 +586,7 @@ impl JsonDataStack { fn reduce_Members_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -596,6 +601,7 @@ impl JsonDataStack { fn reduce_Member_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -610,6 +616,7 @@ impl JsonDataStack { fn reduce_Array_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -624,6 +631,7 @@ impl JsonDataStack { fn reduce_Element_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -638,6 +646,7 @@ impl JsonDataStack { fn reduce_String_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -652,6 +661,7 @@ impl JsonDataStack { fn reduce_Character_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -666,6 +676,7 @@ impl JsonDataStack { fn reduce_Escape_8( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -680,6 +691,7 @@ impl JsonDataStack { fn reduce_Number_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -694,6 +706,7 @@ impl JsonDataStack { fn reduce_Integer_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -708,6 +721,7 @@ impl JsonDataStack { fn reduce_Integer_2( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -722,6 +736,7 @@ impl JsonDataStack { fn reduce_Integer_3( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -736,6 +751,7 @@ impl JsonDataStack { fn reduce_Exponent_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -750,6 +766,7 @@ impl JsonDataStack { fn reduce_Exponent_2( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -764,6 +781,7 @@ impl JsonDataStack { fn reduce_WS_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -778,6 +796,7 @@ impl JsonDataStack { fn reduce_WS_2( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -792,6 +811,7 @@ impl JsonDataStack { fn reduce__LiteralString22_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -806,6 +826,7 @@ impl JsonDataStack { fn reduce__LiteralString23_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -820,6 +841,7 @@ impl JsonDataStack { fn reduce__LiteralString24_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -834,6 +856,7 @@ impl JsonDataStack { fn reduce__ElementSepPlus25_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -848,6 +871,7 @@ impl JsonDataStack { fn reduce__ElementSepPlus25_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -862,6 +886,7 @@ impl JsonDataStack { fn reduce__ElementSepStar26_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -875,6 +900,7 @@ impl JsonDataStack { fn reduce__CharacterPlus27_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -889,6 +915,7 @@ impl JsonDataStack { fn reduce__CharacterPlus27_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -903,6 +930,7 @@ impl JsonDataStack { fn reduce__CharacterStar28_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -916,6 +944,7 @@ impl JsonDataStack { fn reduce__DigitPlus32_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -930,6 +959,7 @@ impl JsonDataStack { fn reduce__DigitPlus32_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -944,6 +974,7 @@ impl JsonDataStack { fn reduce__TermSet33_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -958,6 +989,7 @@ impl JsonDataStack { fn reduce__Group34_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -972,6 +1004,7 @@ impl JsonDataStack { fn reduce___Group34Question35_1( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -985,6 +1018,7 @@ impl JsonDataStack { fn reduce__LiteralString36_0( __data_stack: &mut Self, __location_stack: &mut Vec>, + __push_data: bool, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), @@ -1025,6 +1059,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { fn reduce_action( data_stack: &mut Self, location_stack: &mut Vec>, + push_data: bool, rule_index: usize, shift: &mut bool, lookahead: &::rusty_lr::TerminalSymbol, @@ -1036,6 +1071,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Object_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1046,6 +1082,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Object_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1056,6 +1093,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Object_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1066,6 +1104,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Members_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1076,6 +1115,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Members_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1086,6 +1126,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Member_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1096,6 +1137,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Array_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1106,6 +1148,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Element_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1116,6 +1159,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_String_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1126,6 +1170,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Character_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1136,6 +1181,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Escape_8( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1146,6 +1192,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Number_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1156,6 +1203,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Integer_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1166,6 +1214,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Integer_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1176,6 +1225,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Integer_3( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1186,6 +1236,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Exponent_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1196,6 +1247,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_Exponent_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1206,6 +1258,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_WS_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1216,6 +1269,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce_WS_2( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1226,6 +1280,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__LiteralString22_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1236,6 +1291,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__LiteralString23_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1246,6 +1302,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__LiteralString24_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1256,6 +1313,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__ElementSepPlus25_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1266,6 +1324,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__ElementSepPlus25_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1276,6 +1335,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__ElementSepStar26_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1286,6 +1346,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__CharacterPlus27_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1296,6 +1357,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__CharacterPlus27_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1306,6 +1368,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__CharacterStar28_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1316,6 +1379,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__DigitPlus32_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1326,6 +1390,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__DigitPlus32_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1336,6 +1401,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__TermSet33_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1346,6 +1412,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__Group34_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1356,6 +1423,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce___Group34Question35_1( data_stack, location_stack, + push_data, shift, lookahead, user_data, @@ -1366,6 +1434,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { Self::reduce__LiteralString36_0( data_stack, location_stack, + push_data, shift, lookahead, user_data, From c5d2a7e81cfb455e5ed8c45103a4b1724ef25fbd Mon Sep 17 00:00:00 2001 From: Taehwan Kim Date: Fri, 3 Oct 2025 13:05:39 +0900 Subject: [PATCH 2/2] do not return bool from reduce_action --- rusty_lr_core/src/parser/data_stack.rs | 2 +- .../src/parser/deterministic/context.rs | 2 +- rusty_lr_parser/src/emit.rs | 12 +- rusty_lr_parser/src/parser/parser_expanded.rs | 434 +++++++++--------- scripts/diff/calculator.rs | 26 +- scripts/diff/calculator_u8.rs | 46 +- scripts/diff/json.rs | 138 +++--- 7 files changed, 329 insertions(+), 331 deletions(-) diff --git a/rusty_lr_core/src/parser/data_stack.rs b/rusty_lr_core/src/parser/data_stack.rs index a8230a2..cbe38b5 100644 --- a/rusty_lr_core/src/parser/data_stack.rs +++ b/rusty_lr_core/src/parser/data_stack.rs @@ -56,5 +56,5 @@ pub trait DataStack: Sized + Default { userdata: &mut Self::UserData, // location of this non-terminal, e.g. `@$` location0: &mut Self::Location, - ) -> Result; + ) -> Result<(), Self::ReduceActionError>; } diff --git a/rusty_lr_core/src/parser/deterministic/context.rs b/rusty_lr_core/src/parser/deterministic/context.rs index 2f3afc7..9a4b789 100644 --- a/rusty_lr_core/src/parser/deterministic/context.rs +++ b/rusty_lr_core/src/parser/deterministic/context.rs @@ -469,7 +469,7 @@ impl Context { userdata, &mut new_location, ) { - Ok(ret) => ret, + Ok(_) => {} Err(err) => { return Err(ParseError::ReduceAction(super::error::ReduceActionError { term, diff --git a/rusty_lr_parser/src/emit.rs b/rusty_lr_parser/src/emit.rs index 40b37aa..24346f1 100644 --- a/rusty_lr_parser/src/emit.rs +++ b/rusty_lr_parser/src/emit.rs @@ -1355,8 +1355,6 @@ impl Grammar { #rule_index => Self::#reduce_fn_ident( data_stack, location_stack, push_data, shift, lookahead, user_data, location0 ), }); - let returns_non_empty = stack_names_for_nonterm[nonterm_idx].is_some(); - let reduce_action_body = match &rule.reduce_action { Some(ReduceAction::Custom(custom)) => { let body = &custom.body; @@ -1380,7 +1378,7 @@ impl Grammar { lookahead: &#module_prefix::TerminalSymbol<#token_typename>, #user_data_parameter_name: &mut #user_data_typename, __rustylr_location0: &mut #location_typename, - ) -> Result { + ) -> Result<(), #reduce_error_typename> { #[cfg(debug_assertions)] { #debug_tag_check_stream @@ -1395,7 +1393,7 @@ impl Grammar { __data_stack.#stack_name.push(__res); } - Ok(#returns_non_empty) + Ok(()) } }); } else { @@ -1410,7 +1408,7 @@ impl Grammar { lookahead: &#module_prefix::TerminalSymbol<#token_typename>, #user_data_parameter_name: &mut #user_data_typename, __rustylr_location0: &mut #location_typename, - ) -> Result { + ) -> Result<(), #reduce_error_typename> { #[cfg(debug_assertions)] { #debug_tag_check_stream @@ -1422,7 +1420,7 @@ impl Grammar { #reduce_action_body - Ok(#returns_non_empty) + Ok(()) } }); } @@ -1738,7 +1736,7 @@ impl Grammar { lookahead: &#module_prefix::TerminalSymbol, user_data: &mut Self::UserData, location0: &mut Self::Location, - ) -> Result { + ) -> Result<(), Self::ReduceActionError> { match rule_index { #reduce_action_case_streams _ => { diff --git a/rusty_lr_parser/src/parser/parser_expanded.rs b/rusty_lr_parser/src/parser/parser_expanded.rs index 31624c8..04151a5 100644 --- a/rusty_lr_parser/src/parser/parser_expanded.rs +++ b/rusty_lr_parser/src/parser/parser_expanded.rs @@ -718,7 +718,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -772,7 +772,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///RuleType -> parengroup #[inline] @@ -784,7 +784,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -809,7 +809,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///RuleType -> #[inline] @@ -821,7 +821,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack2); @@ -832,7 +832,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///RuleLines -> RuleLines pipe RuleLine #[inline] @@ -844,7 +844,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -880,7 +880,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack3.push(__res); } - Ok(true) + Ok(()) } ///RuleLines -> RuleLine #[inline] @@ -892,7 +892,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -912,7 +912,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack3.push(__res); } - Ok(true) + Ok(()) } ///RuleLine -> TokenMapped* PrecDef* Action #[inline] @@ -924,7 +924,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -963,7 +963,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack4.push(__res); } - Ok(true) + Ok(()) } ///PrecDef -> percent prec IdentOrLiteral #[inline] @@ -975,7 +975,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1004,7 +1004,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack5.push(__res); } - Ok(true) + Ok(()) } ///PrecDef -> percent prec error #[inline] @@ -1016,7 +1016,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1054,7 +1054,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack5.push(__res); } - Ok(true) + Ok(()) } ///PrecDef -> percent dprec literal #[inline] @@ -1066,7 +1066,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1100,7 +1100,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack5.push(__res); } - Ok(true) + Ok(()) } ///PrecDef -> percent dprec error #[inline] @@ -1112,7 +1112,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1150,7 +1150,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack5.push(__res); } - Ok(true) + Ok(()) } ///PrecDef -> percent error #[inline] @@ -1162,7 +1162,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1196,7 +1196,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack5.push(__res); } - Ok(true) + Ok(()) } ///TokenMapped -> Pattern #[inline] @@ -1208,7 +1208,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1228,7 +1228,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack6.push(__res); } - Ok(true) + Ok(()) } ///TokenMapped -> ident equal Pattern #[inline] @@ -1240,7 +1240,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1275,7 +1275,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack6.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> ident #[inline] @@ -1287,7 +1287,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1312,7 +1312,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> ident minus ident #[inline] @@ -1324,7 +1324,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1362,7 +1362,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> ident minus error #[inline] @@ -1374,7 +1374,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1412,7 +1412,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> literal #[inline] @@ -1424,7 +1424,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1449,7 +1449,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> literal minus literal #[inline] @@ -1461,7 +1461,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1499,7 +1499,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem -> literal minus error #[inline] @@ -1511,7 +1511,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1549,7 +1549,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack7.push(__res); } - Ok(true) + Ok(()) } ///TerminalSet -> lbracket caret? TerminalSetItem* rbracket #[inline] @@ -1561,7 +1561,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1604,7 +1604,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack8.push(__res); } - Ok(true) + Ok(()) } ///TerminalSet -> dot #[inline] @@ -1616,7 +1616,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1644,7 +1644,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack8.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> ident #[inline] @@ -1656,7 +1656,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1681,7 +1681,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern plus #[inline] @@ -1693,7 +1693,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1724,7 +1724,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern star #[inline] @@ -1736,7 +1736,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1764,7 +1764,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern question #[inline] @@ -1776,7 +1776,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1804,7 +1804,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern exclamation #[inline] @@ -1816,7 +1816,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1847,7 +1847,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> TerminalSet #[inline] @@ -1859,7 +1859,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1879,7 +1879,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern slash Pattern #[inline] @@ -1891,7 +1891,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1921,7 +1921,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> lparen $sep(Pattern*, pipe, +) rparen #[inline] @@ -1933,7 +1933,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -1970,7 +1970,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> lparen error rparen #[inline] @@ -1982,7 +1982,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2021,7 +2021,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> literal #[inline] @@ -2033,7 +2033,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2058,7 +2058,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> Pattern minus Pattern #[inline] @@ -2070,7 +2070,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2100,7 +2100,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma? rparen #[inline] @@ -2112,7 +2112,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2180,7 +2180,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma plus rparen #[inline] @@ -2192,7 +2192,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2264,7 +2264,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma star rparen #[inline] @@ -2276,7 +2276,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2348,7 +2348,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> dollar ident lparen Pattern comma Pattern error rparen #[inline] @@ -2360,7 +2360,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2437,7 +2437,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Pattern -> dollar ident lparen Pattern comma Pattern comma error rparen #[inline] @@ -2449,7 +2449,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2530,7 +2530,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack9.push(__res); } - Ok(true) + Ok(()) } ///Action -> bracegroup #[inline] @@ -2542,7 +2542,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2567,7 +2567,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///Action -> #[inline] @@ -2579,7 +2579,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack2); @@ -2590,7 +2590,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///IdentOrLiteral -> ident #[inline] @@ -2602,7 +2602,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2627,7 +2627,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack10.push(__res); } - Ok(true) + Ok(()) } ///IdentOrLiteral -> literal #[inline] @@ -2639,7 +2639,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2664,7 +2664,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack10.push(__res); } - Ok(true) + Ok(()) } ///Directive -> percent token ident [^semicolon]+ semicolon #[inline] @@ -2676,7 +2676,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2718,7 +2718,7 @@ impl GrammarDataStack { }; data.terminals.push((ident, RustCode)); }; - Ok(false) + Ok(()) } ///Directive -> percent token ident semicolon #[inline] @@ -2730,7 +2730,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2765,7 +2765,7 @@ impl GrammarDataStack { span: __rustylr_location_ident, }); }; - Ok(false) + Ok(()) } ///Directive -> percent token error semicolon #[inline] @@ -2777,7 +2777,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2812,7 +2812,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent start ident semicolon #[inline] @@ -2824,7 +2824,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2855,7 +2855,7 @@ impl GrammarDataStack { }; data.start_rule_name.push(ident); }; - Ok(false) + Ok(()) } ///Directive -> percent start error semicolon #[inline] @@ -2867,7 +2867,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2902,7 +2902,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent tokentype [^semicolon]+ semicolon #[inline] @@ -2914,7 +2914,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2950,7 +2950,7 @@ impl GrammarDataStack { { data.token_typename.push((__rustylr_location_tokentype.span(), RustCode)); }; - Ok(false) + Ok(()) } ///Directive -> percent tokentype semicolon #[inline] @@ -2962,7 +2962,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -2993,7 +2993,7 @@ impl GrammarDataStack { span: __rustylr_location_tokentype, }); }; - Ok(false) + Ok(()) } ///Directive -> percent userdata [^semicolon]+ semicolon #[inline] @@ -3005,7 +3005,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3041,7 +3041,7 @@ impl GrammarDataStack { { data.userdata_typename.push((__rustylr_location_userdata.span(), RustCode)); }; - Ok(false) + Ok(()) } ///Directive -> percent userdata semicolon #[inline] @@ -3053,7 +3053,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3084,7 +3084,7 @@ impl GrammarDataStack { span: __rustylr_location_userdata, }); }; - Ok(false) + Ok(()) } ///Directive -> percent left IdentOrLiteral+ semicolon #[inline] @@ -3096,7 +3096,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3131,7 +3131,7 @@ impl GrammarDataStack { IdentOrLiteral, )); }; - Ok(false) + Ok(()) } ///Directive -> percent left error semicolon #[inline] @@ -3143,7 +3143,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3178,7 +3178,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent right IdentOrLiteral+ semicolon #[inline] @@ -3190,7 +3190,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3225,7 +3225,7 @@ impl GrammarDataStack { IdentOrLiteral, )); }; - Ok(false) + Ok(()) } ///Directive -> percent right error semicolon #[inline] @@ -3237,7 +3237,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3272,7 +3272,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent precedence IdentOrLiteral+ semicolon #[inline] @@ -3284,7 +3284,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3315,7 +3315,7 @@ impl GrammarDataStack { data.precedences .push((__rustylr_location_precedence.span(), None, IdentOrLiteral)); }; - Ok(false) + Ok(()) } ///Directive -> percent precedence error semicolon #[inline] @@ -3327,7 +3327,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3362,7 +3362,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent errortype [^semicolon]+ semicolon #[inline] @@ -3374,7 +3374,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3410,7 +3410,7 @@ impl GrammarDataStack { { data.error_typename.push((__rustylr_location_errortype.span(), RustCode)); }; - Ok(false) + Ok(()) } ///Directive -> percent errortype semicolon #[inline] @@ -3422,7 +3422,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3453,7 +3453,7 @@ impl GrammarDataStack { span: __rustylr_location_errortype, }); }; - Ok(false) + Ok(()) } ///Directive -> percent moduleprefix [^semicolon]+ semicolon #[inline] @@ -3465,7 +3465,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3501,7 +3501,7 @@ impl GrammarDataStack { { data.module_prefix.push((__rustylr_location_moduleprefix.span(), RustCode)); }; - Ok(false) + Ok(()) } ///Directive -> percent moduleprefix semicolon #[inline] @@ -3513,7 +3513,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3544,7 +3544,7 @@ impl GrammarDataStack { span: __rustylr_location_moduleprefix, }); }; - Ok(false) + Ok(()) } ///Directive -> percent glr semicolon #[inline] @@ -3556,7 +3556,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3580,7 +3580,7 @@ impl GrammarDataStack { { data.glr = true; }; - Ok(false) + Ok(()) } ///Directive -> percent glr error semicolon #[inline] @@ -3592,7 +3592,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3627,7 +3627,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent lalr semicolon #[inline] @@ -3639,7 +3639,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3663,7 +3663,7 @@ impl GrammarDataStack { { data.lalr = true; }; - Ok(false) + Ok(()) } ///Directive -> percent lalr error semicolon #[inline] @@ -3675,7 +3675,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3710,7 +3710,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent nooptim semicolon #[inline] @@ -3722,7 +3722,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3745,7 +3745,7 @@ impl GrammarDataStack { { data.no_optim = true; }; - Ok(false) + Ok(()) } ///Directive -> percent nooptim error semicolon #[inline] @@ -3757,7 +3757,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3792,7 +3792,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent dense semicolon #[inline] @@ -3804,7 +3804,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3828,7 +3828,7 @@ impl GrammarDataStack { { data.dense = true; }; - Ok(false) + Ok(()) } ///Directive -> percent dense error semicolon #[inline] @@ -3840,7 +3840,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3875,7 +3875,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent trace ident* semicolon #[inline] @@ -3887,7 +3887,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3923,7 +3923,7 @@ impl GrammarDataStack { }); data.traces.extend(idents); }; - Ok(false) + Ok(()) } ///Directive -> percent trace error semicolon #[inline] @@ -3935,7 +3935,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -3970,7 +3970,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///Directive -> percent filter [^semicolon]+ semicolon #[inline] @@ -3982,7 +3982,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4017,7 +4017,7 @@ impl GrammarDataStack { { data.filter = Some(RustCode); }; - Ok(false) + Ok(()) } ///Directive -> percent filter semicolon #[inline] @@ -4029,7 +4029,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4060,7 +4060,7 @@ impl GrammarDataStack { span: __rustylr_location_filter, }); }; - Ok(false) + Ok(()) } ///Directive -> percent location [^semicolon]+ semicolon #[inline] @@ -4072,7 +4072,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4106,7 +4106,7 @@ impl GrammarDataStack { { data.location_typename = Some(RustCode); }; - Ok(false) + Ok(()) } ///Directive -> percent location semicolon #[inline] @@ -4118,7 +4118,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4149,7 +4149,7 @@ impl GrammarDataStack { span: __rustylr_location_location, }); }; - Ok(false) + Ok(()) } ///Directive -> percent error semicolon #[inline] @@ -4161,7 +4161,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4192,7 +4192,7 @@ impl GrammarDataStack { span: __rustylr_location_error, }); }; - Ok(false) + Ok(()) } ///GrammarLine -> Rule #[inline] @@ -4204,7 +4204,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4219,7 +4219,7 @@ impl GrammarDataStack { { data.rules.push(Rule); }; - Ok(false) + Ok(()) } ///TokenMapped+ -> TokenMapped #[inline] @@ -4231,7 +4231,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4251,7 +4251,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack11.push(__res); } - Ok(true) + Ok(()) } ///TokenMapped+ -> TokenMapped+ TokenMapped #[inline] @@ -4263,7 +4263,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4291,7 +4291,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack11.push(__res); } - Ok(true) + Ok(()) } ///TokenMapped* -> TokenMapped+ #[inline] @@ -4303,7 +4303,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4321,7 +4321,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack11.push(__res); } - Ok(true) + Ok(()) } ///TokenMapped* -> #[inline] @@ -4333,7 +4333,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack11); @@ -4344,7 +4344,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack11.push(__res); } - Ok(true) + Ok(()) } ///PrecDef+ -> PrecDef #[inline] @@ -4356,7 +4356,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4376,7 +4376,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack12.push(__res); } - Ok(true) + Ok(()) } ///PrecDef+ -> PrecDef+ PrecDef #[inline] @@ -4388,7 +4388,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4416,7 +4416,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack12.push(__res); } - Ok(true) + Ok(()) } ///PrecDef* -> PrecDef+ #[inline] @@ -4428,7 +4428,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4446,7 +4446,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack12.push(__res); } - Ok(true) + Ok(()) } ///PrecDef* -> #[inline] @@ -4458,7 +4458,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack12); @@ -4469,7 +4469,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack12.push(__res); } - Ok(true) + Ok(()) } ///caret? -> caret #[inline] @@ -4481,7 +4481,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4501,7 +4501,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack13.push(__res); } - Ok(true) + Ok(()) } ///caret? -> #[inline] @@ -4513,7 +4513,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack13); @@ -4524,7 +4524,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack13.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem+ -> TerminalSetItem #[inline] @@ -4536,7 +4536,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4556,7 +4556,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack14.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem+ -> TerminalSetItem+ TerminalSetItem #[inline] @@ -4568,7 +4568,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4596,7 +4596,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack14.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem* -> TerminalSetItem+ #[inline] @@ -4608,7 +4608,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4626,7 +4626,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack14.push(__res); } - Ok(true) + Ok(()) } ///TerminalSetItem* -> #[inline] @@ -4638,7 +4638,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack14); @@ -4649,7 +4649,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack14.push(__res); } - Ok(true) + Ok(()) } ///Pattern+ -> Pattern #[inline] @@ -4661,7 +4661,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4681,7 +4681,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack15.push(__res); } - Ok(true) + Ok(()) } ///Pattern+ -> Pattern+ Pattern #[inline] @@ -4693,7 +4693,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4721,7 +4721,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack15.push(__res); } - Ok(true) + Ok(()) } ///Pattern* -> Pattern+ #[inline] @@ -4733,7 +4733,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4751,7 +4751,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack15.push(__res); } - Ok(true) + Ok(()) } ///Pattern* -> #[inline] @@ -4763,7 +4763,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack15); @@ -4774,7 +4774,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack15.push(__res); } - Ok(true) + Ok(()) } ///$sep(Pattern*, pipe, +) -> Pattern* #[inline] @@ -4786,7 +4786,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4806,7 +4806,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack16.push(__res); } - Ok(true) + Ok(()) } ///$sep(Pattern*, pipe, +) -> $sep(Pattern*, pipe, +) pipe Pattern* #[inline] @@ -4818,7 +4818,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4851,7 +4851,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack16.push(__res); } - Ok(true) + Ok(()) } ///comma? -> comma #[inline] @@ -4863,7 +4863,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4875,7 +4875,7 @@ impl GrammarDataStack { __data_stack.__tags.push(GrammarTags::Empty); __data_stack.__terminals.truncate(__data_stack.__terminals.len() - 1usize); __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///comma? -> #[inline] @@ -4887,10 +4887,10 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __data_stack.__tags.push(GrammarTags::Empty); - Ok(false) + Ok(()) } ///[^semicolon]+ -> [^semicolon] #[inline] @@ -4902,7 +4902,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4922,7 +4922,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///[^semicolon]+ -> [^semicolon]+ [^semicolon] #[inline] @@ -4934,7 +4934,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4962,7 +4962,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///IdentOrLiteral+ -> IdentOrLiteral #[inline] @@ -4974,7 +4974,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -4994,7 +4994,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack18.push(__res); } - Ok(true) + Ok(()) } ///IdentOrLiteral+ -> IdentOrLiteral+ IdentOrLiteral #[inline] @@ -5006,7 +5006,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5034,7 +5034,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack18.push(__res); } - Ok(true) + Ok(()) } ///ident+ -> ident #[inline] @@ -5046,7 +5046,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5066,7 +5066,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///ident+ -> ident+ ident #[inline] @@ -5078,7 +5078,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5106,7 +5106,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///ident* -> ident+ #[inline] @@ -5118,7 +5118,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5136,7 +5136,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///ident* -> #[inline] @@ -5148,7 +5148,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] {} if __push_data { __data_stack.__tags.push(GrammarTags::__stack17); @@ -5159,7 +5159,7 @@ impl GrammarDataStack { if __push_data { __data_stack.__stack17.push(__res); } - Ok(true) + Ok(()) } ///GrammarLine+ -> GrammarLine #[inline] @@ -5171,7 +5171,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5180,7 +5180,7 @@ impl GrammarDataStack { ); } __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///GrammarLine+ -> GrammarLine GrammarLine+ #[inline] @@ -5192,7 +5192,7 @@ impl GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, data: &mut GrammarArgs, __rustylr_location0: &mut SpanPair, - ) -> Result { + ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -5206,7 +5206,7 @@ impl GrammarDataStack { } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } } #[allow( @@ -5439,7 +5439,7 @@ impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack { lookahead: &::rusty_lr_core::TerminalSymbol, user_data: &mut Self::UserData, location0: &mut Self::Location, - ) -> Result { + ) -> Result<(), Self::ReduceActionError> { match rule_index { 0usize => { Self::reduce_Rule_0( diff --git a/scripts/diff/calculator.rs b/scripts/diff/calculator.rs index 1f2bf49..a2fd1f7 100644 --- a/scripts/diff/calculator.rs +++ b/scripts/diff/calculator.rs @@ -243,7 +243,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -277,7 +277,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///A -> M #[inline] @@ -289,7 +289,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -307,7 +307,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///M -> M star M #[inline] @@ -319,7 +319,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -360,7 +360,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///P -> num #[inline] @@ -372,7 +372,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -398,7 +398,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///P -> lparen E rparen #[inline] @@ -410,7 +410,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -438,7 +438,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///E -> A #[inline] @@ -450,7 +450,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), String> { #[cfg(debug_assertions)] { debug_assert!( @@ -468,7 +468,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } } #[allow( @@ -548,7 +548,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { lookahead: &::rusty_lr::TerminalSymbol, user_data: &mut Self::UserData, location0: &mut Self::Location, - ) -> Result { + ) -> Result<(), Self::ReduceActionError> { match rule_index { 0usize => { Self::reduce_A_0( diff --git a/scripts/diff/calculator_u8.rs b/scripts/diff/calculator_u8.rs index f23dc43..c6d4715 100644 --- a/scripts/diff/calculator_u8.rs +++ b/scripts/diff/calculator_u8.rs @@ -271,7 +271,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -288,7 +288,7 @@ impl EDataStack { if __push_data { __data_stack.__terminals.push(__res); } - Ok(true) + Ok(()) } ///Number -> ' '* Digit+ ' '* #[inline] @@ -300,7 +300,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -328,7 +328,7 @@ impl EDataStack { if __push_data { __data_stack.__stack1.push(__res); } - Ok(true) + Ok(()) } ///P -> Number #[inline] @@ -340,7 +340,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -360,7 +360,7 @@ impl EDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///P -> ' '* '(' E ')' ' '* #[inline] @@ -372,7 +372,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -408,7 +408,7 @@ impl EDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///E -> E Op E #[inline] @@ -420,7 +420,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -458,7 +458,7 @@ impl EDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///E -> ' '* '-' E #[inline] @@ -470,7 +470,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -498,7 +498,7 @@ impl EDataStack { if __push_data { __data_stack.__stack2.push(__res); } - Ok(true) + Ok(()) } ///' '+ -> ' '+ ' ' #[inline] @@ -510,7 +510,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -524,7 +524,7 @@ impl EDataStack { } __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize); __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///' '* -> ' '+ #[inline] @@ -536,7 +536,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -545,7 +545,7 @@ impl EDataStack { ); } __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///' '* -> #[inline] @@ -557,10 +557,10 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __data_stack.__tags.push(ETags::Empty); - Ok(false) + Ok(()) } ///Digit+ -> Digit #[inline] @@ -572,7 +572,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -592,7 +592,7 @@ impl EDataStack { if __push_data { __data_stack.__stack3.push(__res); } - Ok(true) + Ok(()) } ///Digit+ -> Digit+ Digit #[inline] @@ -604,7 +604,7 @@ impl EDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut i32, __rustylr_location0: &mut ::rusty_lr::DefaultLocation, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] { debug_assert!( @@ -632,7 +632,7 @@ impl EDataStack { if __push_data { __data_stack.__stack3.push(__res); } - Ok(true) + Ok(()) } } #[allow( @@ -730,7 +730,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for EDataStack { lookahead: &::rusty_lr::TerminalSymbol, user_data: &mut Self::UserData, location0: &mut Self::Location, - ) -> Result { + ) -> Result<(), Self::ReduceActionError> { match rule_index { 0usize => { Self::reduce_Digit_0( diff --git a/scripts/diff/json.rs b/scripts/diff/json.rs index fb4213b..d4c9028 100644 --- a/scripts/diff/json.rs +++ b/scripts/diff/json.rs @@ -524,10 +524,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Object -> '{' Members '}' #[inline] @@ -539,10 +539,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Object -> '{' error '}' #[inline] @@ -554,7 +554,7 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); let mut __rustylr_location_error = __location_stack.pop().unwrap(); @@ -564,7 +564,7 @@ impl JsonDataStack { let end = __rustylr_location_error.end; println!("Error recovered with '}}' at {start}..{end}"); }; - Ok(false) + Ok(()) } ///Members -> Member #[inline] @@ -576,10 +576,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///Members -> Member ',' Members #[inline] @@ -591,10 +591,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Member -> WS String WS ':' Element #[inline] @@ -606,10 +606,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 5usize); - Ok(false) + Ok(()) } ///Array -> '[' $sep(Element, ',', *) ']' #[inline] @@ -621,10 +621,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Element -> WS Value WS #[inline] @@ -636,10 +636,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///String -> '"' Character* '"' #[inline] @@ -651,10 +651,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Character -> '\\' Escape #[inline] @@ -666,10 +666,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///Escape -> 'u' Hex Hex Hex Hex #[inline] @@ -681,10 +681,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 5usize); - Ok(false) + Ok(()) } ///Number -> Integer ('.', Digits)? Exponent #[inline] @@ -696,10 +696,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Integer -> ['1'-'9'] Digit+ #[inline] @@ -711,10 +711,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///Integer -> '-' ['0'-'9'] #[inline] @@ -726,10 +726,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///Integer -> '-' ['1'-'9'] Digit+ #[inline] @@ -741,10 +741,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Exponent -> 'E' Sign Digit+ #[inline] @@ -756,10 +756,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///Exponent -> 'e' Sign Digit+ #[inline] @@ -771,10 +771,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///WS -> ' ' WS #[inline] @@ -786,10 +786,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///WS -> ['\t', '\n', '\r'] WS #[inline] @@ -801,10 +801,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///"true" -> 't' 'r' 'u' 'e' #[inline] @@ -816,10 +816,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 4usize); - Ok(false) + Ok(()) } ///"false" -> 'f' 'a' 'l' 's' 'e' #[inline] @@ -831,10 +831,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 5usize); - Ok(false) + Ok(()) } ///"null" -> 'n' 'u' 'l' 'l' #[inline] @@ -846,10 +846,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 4usize); - Ok(false) + Ok(()) } ///$sep(Element, ',', +) -> Element #[inline] @@ -861,10 +861,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///$sep(Element, ',', +) -> Element ',' $sep(Element, ',', +) #[inline] @@ -876,10 +876,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 3usize); - Ok(false) + Ok(()) } ///$sep(Element, ',', *) -> #[inline] @@ -891,9 +891,9 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} - Ok(false) + Ok(()) } ///Character+ -> Character #[inline] @@ -905,10 +905,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///Character+ -> Character Character+ #[inline] @@ -920,10 +920,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///Character* -> #[inline] @@ -935,9 +935,9 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} - Ok(false) + Ok(()) } ///Digit+ -> ['0'-'9'] #[inline] @@ -949,10 +949,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///Digit+ -> ['0'-'9'] Digit+ #[inline] @@ -964,10 +964,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///['0'-'9'] -> ['1'-'9'] #[inline] @@ -979,10 +979,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 1usize); - Ok(false) + Ok(()) } ///('.', Digits) -> '.' Digit+ #[inline] @@ -994,10 +994,10 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} __location_stack.truncate(__location_stack.len() - 2usize); - Ok(false) + Ok(()) } ///('.', Digits)? -> #[inline] @@ -1009,9 +1009,9 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} - Ok(false) + Ok(()) } ///"" -> #[inline] @@ -1023,9 +1023,9 @@ impl JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, data: &mut (), __rustylr_location0: &mut std::ops::Range, - ) -> Result { + ) -> Result<(), ::rusty_lr::DefaultReduceActionError> { #[cfg(debug_assertions)] {} - Ok(false) + Ok(()) } } #[allow( @@ -1065,7 +1065,7 @@ impl ::rusty_lr::parser::data_stack::DataStack for JsonDataStack { lookahead: &::rusty_lr::TerminalSymbol, user_data: &mut Self::UserData, location0: &mut Self::Location, - ) -> Result { + ) -> Result<(), Self::ReduceActionError> { match rule_index { 8usize => { Self::reduce_Object_0(