diff --git a/README.md b/README.md index 5da5ce2..f951c75 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ yacc-like LR(1) and LALR(1) Deterministic Finite Automata (DFA) generator from C ``` [dependencies] -rusty_lr = "1.4.0" +rusty_lr = "1.5.0" ``` ## Features diff --git a/rusty_lr/Cargo.toml b/rusty_lr/Cargo.toml index fa5bb94..32e3d48 100644 --- a/rusty_lr/Cargo.toml +++ b/rusty_lr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty_lr" -version = "1.4.0" +version = "1.5.0" edition = "2021" license = "MIT" description = "yacc-like, proc-macro based LR(1) and LALR(1) parser generator and code generation" @@ -10,7 +10,7 @@ keywords = ["parser", "yacc", "context-free-grammar", "lr", "compiler"] categories = ["parsing"] [dependencies] -rusty_lr_core = "1.2" +rusty_lr_core = "1.3" rusty_lr_derive = "1.2" # rusty_lr_core = { path = "../rusty_lr_core" } # rusty_lr_derive = { path = "../rusty_lr_derive" } diff --git a/rusty_lr_core/Cargo.toml b/rusty_lr_core/Cargo.toml index 3e36184..8d01668 100644 --- a/rusty_lr_core/Cargo.toml +++ b/rusty_lr_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty_lr_core" -version = "1.2.0" +version = "1.3.0" edition = "2021" license = "MIT" description = "yacc-like, proc-macro based LR(1) and LALR(1) parser generator and code generation" diff --git a/rusty_lr_core/src/grammar/grammar.rs b/rusty_lr_core/src/grammar/grammar.rs index 8c6c6f4..12bf47e 100644 --- a/rusty_lr_core/src/grammar/grammar.rs +++ b/rusty_lr_core/src/grammar/grammar.rs @@ -45,10 +45,7 @@ impl Grammar { NonTerm: Clone + Hash + Eq, { let id = self.rules.len(); - self.rules_map - .entry(name.clone()) - .or_insert_with(Vec::new) - .push(id); + self.rules_map.entry(name.clone()).or_default().push(id); let rule = ProductionRule { name, rule }; self.rules.push(rule); id @@ -502,7 +499,7 @@ impl Grammar { states[new_state_id] .ruleset .rules - .insert(shifted_rule.clone(), BTreeSet::new()); + .insert(*shifted_rule, BTreeSet::new()); } new_state_id }); @@ -676,3 +673,9 @@ impl Display for Grammar { Ok(()) } } + +impl Default for Grammar { + fn default() -> Self { + Self::new() + } +} diff --git a/rusty_lr_core/src/parser/context.rs b/rusty_lr_core/src/parser/context.rs index b69ed3a..0063d0f 100644 --- a/rusty_lr_core/src/parser/context.rs +++ b/rusty_lr_core/src/parser/context.rs @@ -12,3 +12,9 @@ impl Context { } } } + +impl Default for Context { + fn default() -> Self { + Self::new() + } +} diff --git a/rusty_lr_core/src/parser/error.rs b/rusty_lr_core/src/parser/error.rs index 9efce2b..c54e90a 100644 --- a/rusty_lr_core/src/parser/error.rs +++ b/rusty_lr_core/src/parser/error.rs @@ -3,7 +3,7 @@ use std::fmt::Debug; use std::fmt::Display; use std::hash::Hash; -use crate::rule::ShiftedRule; +use crate::rule::ShiftedRuleRef2; use crate::state::State; use crate::ProductionRule; use crate::ShiftedRuleRef; @@ -48,75 +48,64 @@ impl<'a, Term, NonTerm, CallbackError, ReduceActionError> state_stack: &[usize], ) -> Vec> where - NonTerm: Eq, + NonTerm: PartialEq, { let mut backtrace = Vec::with_capacity(state_stack.len()); - // if it is on first state, print all rules - if state_stack.len() == 1 { - backtrace.push(states[0].ruleset.rules.keys().copied().collect()); - return backtrace; - } else { - let state = &states[*state_stack.last().unwrap()]; - let mut cur_rules = BTreeSet::new(); - for (rule, _) in state.ruleset.rules.iter() { - if rule.shifted > 0 { - cur_rules.insert(*rule); - } - } - for prev_state in state_stack.iter().rev().skip(1) { - backtrace.push(cur_rules.clone()); + let state = &states[*state_stack.last().unwrap()]; + let mut cur_rules: BTreeSet = state.ruleset.rules.keys().copied().collect(); + for prev_state in state_stack.iter().rev().skip(1) { + backtrace.push(cur_rules.clone()); - // prepare for next iteration - let mut prev_rules = BTreeSet::new(); - for mut r in cur_rules.into_iter() { - match r.shifted { - 0 => {} + // prepare for next iteration + let mut prev_rules = BTreeSet::new(); + for mut r in cur_rules.into_iter() { + match r.shifted { + 0 => {} - _ => { - r.shifted -= 1; - prev_rules.insert(r); - } + _ => { + r.shifted -= 1; + prev_rules.insert(r); } } + } - loop { - let mut add_rules = BTreeSet::new(); - for r in prev_rules.iter() { - // this rule's shift == 0, - // it must be added by other rule start with this rule's non-terminal - if r.shifted == 0 { - let rule_name = &rules[r.rule].name; - for (rule, _) in states[*prev_state].ruleset.rules.iter() { - if let Some(Token::NonTerm(next_token)) = - rules[rule.rule].rule.get(rule.shifted) - { - if next_token == rule_name { - add_rules.insert(*rule); - } + loop { + let mut add_rules = BTreeSet::new(); + for r in prev_rules.iter() { + // this rule's shift == 0, + // it must be added by other rule start with this rule's non-terminal + if r.shifted == 0 { + let rule_name = &rules[r.rule].name; + for (rule, _) in states[*prev_state].ruleset.rules.iter() { + if let Some(Token::NonTerm(next_token)) = + rules[rule.rule].rule.get(rule.shifted) + { + if next_token == rule_name { + add_rules.insert(*rule); } } } } - let len0 = prev_rules.len(); - prev_rules.append(&mut add_rules); - if prev_rules.len() == len0 { - break; - } } - - cur_rules = prev_rules; + let len0 = prev_rules.len(); + prev_rules.append(&mut add_rules); + if prev_rules.len() == len0 { + break; + } } - backtrace.push(cur_rules); - backtrace + + cur_rules = prev_rules; } + backtrace.push(cur_rules); + backtrace } } impl< 'a, - Term: Display + Clone + Ord + Hash + Eq, - NonTerm: Display + Clone + Eq, + Term: Display + Hash + Eq, + NonTerm: Display + PartialEq, CallbackError: Display, ReduceActionError: Display, > Display for ParseError<'a, Term, NonTerm, CallbackError, ReduceActionError> @@ -129,7 +118,7 @@ impl< writeln!(f, "Invalid NonTerminal: {}", nonterm)?; let state = &states[*state_stack.last().unwrap()]; - let expected: BTreeSet = state.expected().into_iter().collect(); + let expected = state.expected(); if expected.is_empty() { writeln!(f, "No expected token")?; } else { @@ -153,8 +142,8 @@ impl< writeln!(f, "{:-^80}", "Prev state")?; } for rule in ruleset.iter() { - let shifted = ShiftedRule { - rule: rules[rule.rule].clone(), + let shifted = ShiftedRuleRef2 { + rule: &rules[rule.rule], shifted: rule.shifted, }; writeln!(f, "{}", shifted)?; @@ -165,7 +154,7 @@ impl< writeln!(f, "Invalid Terminal: {}", term,)?; let state = &states[*state_stack.last().unwrap()]; - let expected: BTreeSet = state.expected().into_iter().collect(); + let expected = state.expected(); if expected.is_empty() { writeln!(f, "No expected token")?; } else { @@ -189,8 +178,8 @@ impl< writeln!(f, "{:-^80}", "Prev state")?; } for rule in ruleset.iter() { - let shifted = ShiftedRule { - rule: rules[rule.rule].clone(), + let shifted = ShiftedRuleRef2 { + rule: &rules[rule.rule], shifted: rule.shifted, }; writeln!(f, "{}", shifted)?; @@ -209,8 +198,8 @@ impl< } impl< 'a, - Term: Debug + Clone + Ord + Hash + Eq, - NonTerm: Debug + Clone + Eq, + Term: Debug + Hash + Eq, + NonTerm: Debug + PartialEq, CallbackError: Debug, ReduceActionError: Debug, > Debug for ParseError<'a, Term, NonTerm, CallbackError, ReduceActionError> @@ -223,7 +212,7 @@ impl< writeln!(f, "Invalid NonTerminal: {:?}", nonterm)?; let state = &states[*state_stack.last().unwrap()]; - let expected: BTreeSet = state.expected().into_iter().collect(); + let expected = state.expected(); if expected.is_empty() { writeln!(f, "No expected token")?; } else { @@ -247,8 +236,8 @@ impl< writeln!(f, "{:-^80}", "Prev state")?; } for rule in ruleset.iter() { - let shifted = ShiftedRule { - rule: rules[rule.rule].clone(), + let shifted = ShiftedRuleRef2 { + rule: &rules[rule.rule], shifted: rule.shifted, }; writeln!(f, "{:?}", shifted)?; @@ -259,7 +248,7 @@ impl< writeln!(f, "Invalid Terminal: {:?}", term,)?; let state = &states[*state_stack.last().unwrap()]; - let expected: BTreeSet = state.expected().into_iter().collect(); + let expected = state.expected(); if expected.is_empty() { writeln!(f, "No expected token")?; } else { @@ -283,8 +272,8 @@ impl< writeln!(f, "{:-^80}", "Prev state")?; } for rule in ruleset.iter() { - let shifted = ShiftedRule { - rule: rules[rule.rule].clone(), + let shifted = ShiftedRuleRef2 { + rule: &rules[rule.rule], shifted: rule.shifted, }; writeln!(f, "{:?}", shifted)?; diff --git a/rusty_lr_core/src/rule.rs b/rusty_lr_core/src/rule.rs index 3363b92..542b83c 100644 --- a/rusty_lr_core/src/rule.rs +++ b/rusty_lr_core/src/rule.rs @@ -75,6 +75,49 @@ pub struct ShiftedRuleRef { /// name -> Token1 Token2 . Token3 /// /// ^^^^^^^^^^^^^ shifted = 2 +/// This struct is only for Display purpose. +#[derive(Clone)] +pub(crate) struct ShiftedRuleRef2<'a, Term, NonTerm> { + pub rule: &'a ProductionRule, + pub shifted: usize, +} +impl<'a, Term: Display, NonTerm: Display> Display for ShiftedRuleRef2<'a, Term, NonTerm> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{} -> ", self.rule.name)?; + for (id, token) in self.rule.rule.iter().enumerate() { + if id == self.shifted { + write!(f, "• ")?; + } + write!(f, "{}", token)?; + if id < self.rule.rule.len() - 1 { + write!(f, " ")?; + } + } + if self.shifted == self.rule.rule.len() { + write!(f, " •")?; + } + Ok(()) + } +} +impl<'a, Term: Debug, NonTerm: Debug> Debug for ShiftedRuleRef2<'a, Term, NonTerm> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?} -> ", self.rule.name)?; + for (id, token) in self.rule.rule.iter().enumerate() { + if id == self.shifted { + write!(f, "• ")?; + } + write!(f, "{:?}", token)?; + if id < self.rule.rule.len() - 1 { + write!(f, " ")?; + } + } + if self.shifted == self.rule.rule.len() { + write!(f, " •")?; + } + Ok(()) + } +} + #[derive(Clone)] pub struct ShiftedRule { pub rule: ProductionRule, diff --git a/rusty_lr_core/src/state.rs b/rusty_lr_core/src/state.rs index 05aaa8d..fd19d28 100644 --- a/rusty_lr_core/src/state.rs +++ b/rusty_lr_core/src/state.rs @@ -53,15 +53,14 @@ impl State { } /// get expected terms set - pub fn expected(&self) -> HashSet + pub fn expected<'a>(&'a self) -> HashSet<&Term> where - Term: Clone + Hash + Eq, + Term: Hash + Eq, { HashSet::from_iter( self.shift_goto_map_term .keys() - .chain(self.reduce_map.keys()) - .cloned(), + .chain(self.reduce_map.keys()), ) } } @@ -82,3 +81,9 @@ impl Display for State { Ok(()) } } + +impl Default for State { + fn default() -> Self { + Self::new() + } +} diff --git a/rusty_lr_executable/Cargo.toml b/rusty_lr_executable/Cargo.toml index e831138..8c40530 100644 --- a/rusty_lr_executable/Cargo.toml +++ b/rusty_lr_executable/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustylr" -version = "0.3.0" +version = "0.3.1" edition = "2021" license = "MIT" description = "LR(1), LALR(1) parser code generation with rusty_lr" @@ -16,4 +16,4 @@ clap = { version = "4.5.7", features = ["derive"] } # rusty_lr_parser = { path = "../rusty_lr_parser" } rusty_lr_parser = "2.1" # rusty_lr_core = { path = "../rusty_lr_core", features = ["fxhash"] } -rusty_lr_core = { version = "1.2", features = ["fxhash"] } +rusty_lr_core = { version = "1.3", features = ["fxhash"] } diff --git a/rusty_lr_executable/src/main.rs b/rusty_lr_executable/src/main.rs index d7170b1..c6cd127 100644 --- a/rusty_lr_executable/src/main.rs +++ b/rusty_lr_executable/src/main.rs @@ -110,6 +110,8 @@ fn main() { }; // this comments will be printed to the output file + // build again here whether it was built before + // since many informations are removed in the rusty_lr_parser output let mut debug_comments = String::new(); { let parser = match grammar.create_grammar() { @@ -180,22 +182,22 @@ fn main() { if !reduce_first.is_empty() { debug_comments.push_str("Tokens for reduce: "); for (id, token) in reduce_first.iter().enumerate() { - debug_comments.push_str(format!("{}", token).as_str()); + debug_comments.push_str(&token.to_string()); if id < reduce_first.len() - 1 { debug_comments.push_str(", "); } } - debug_comments.push_str("\n"); + debug_comments.push('\n'); } if !shift_first.is_empty() { debug_comments.push_str("Tokens for shift: "); for (id, token) in shift_first.iter().enumerate() { - debug_comments.push_str(format!("{}", token).as_str()); + debug_comments.push_str(&token.to_string()); if id < shift_first.len() - 1 { debug_comments.push_str(", "); } } - debug_comments.push_str("\n"); + debug_comments.push('\n'); } } } diff --git a/rusty_lr_parser/Cargo.toml b/rusty_lr_parser/Cargo.toml index 96ad573..2690903 100644 --- a/rusty_lr_parser/Cargo.toml +++ b/rusty_lr_parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty_lr_parser" -version = "2.1.2" +version = "2.1.3" edition = "2021" license = "MIT" description = "macro line parser for rusty_lr" @@ -12,5 +12,5 @@ categories = ["parsing"] [dependencies] proc-macro2 = "1.0.86" quote = "1.0" -rusty_lr_core = { version = "1.2", features = ["fxhash"] } +rusty_lr_core = { version = "1.3", features = ["fxhash"] } # rusty_lr_core = { path = "../rusty_lr_core", features = ["fxhash"] } diff --git a/rusty_lr_parser/src/emit.rs b/rusty_lr_parser/src/emit.rs index ca9687a..e86d9d9 100644 --- a/rusty_lr_parser/src/emit.rs +++ b/rusty_lr_parser/src/emit.rs @@ -127,10 +127,12 @@ impl Grammar { // =========================Writing States============================== // ===================================================================== - let mut lookaheads_definition_stream = TokenStream::new(); - let mut lookaheads_map: BTreeMap<_, Ident> = BTreeMap::new(); let mut write_states = TokenStream::new(); + // writing lookaheads are removed + // since it is not used in runtime + // and it takes too much space + { let state_len = parser.states.len(); write_states.extend(quote! { @@ -195,34 +197,7 @@ impl Grammar { } let mut comma_separated_ruleset = quote! {}; - for (rule, lookaheads) in state.ruleset.rules.iter() { - let lookaheads_ident = if let Some(lookaheads_ident) = - lookaheads_map.get(lookaheads) - { - lookaheads_ident.clone() - } else { - let new_ident = - format_ident!("rustylr_macrogenerated_lookaheads_{}", lookaheads_map.len()); - lookaheads_map.insert(lookaheads.clone(), new_ident.clone()); - - let mut comma_separated_lookaheads = TokenStream::new(); - for lookahead_name in lookaheads.iter() { - let (_, term_stream) = self - .terminals - .get(&Ident::new(lookahead_name, Span::call_site())) - .unwrap(); - comma_separated_lookaheads.extend(quote! {#term_stream,}); - } - - lookaheads_definition_stream.extend(quote! { - let #new_ident = std::collections::BTreeSet::from( - [ #comma_separated_lookaheads ] - ); - }); - - new_ident - }; - + for (rule, _lookaheads) in state.ruleset.rules.iter() { let rule_id = rule.rule; let shifted = rule.shifted; comma_separated_ruleset.extend(quote! { @@ -231,7 +206,7 @@ impl Grammar { rule: #rule_id, shifted: #shifted, }, - #lookaheads_ident.clone(), + Default::default(), ), }); } @@ -259,7 +234,6 @@ impl Grammar { Ok(quote! { #write_rules - #lookaheads_definition_stream #write_states }) } @@ -402,7 +376,7 @@ impl Grammar { // TokenStream to define reduce function for each production rule let mut fn_reduce_for_each_rule_stream = TokenStream::new(); - for (name_ident, rules) in self.rules.iter() { + for (name, rules) in self.rules.iter() { for (rule_local_id, rule) in rules.rule_lines.iter().enumerate() { let mut token_pop_stream = TokenStream::new(); for token in rule.tokens.iter().rev() { @@ -429,7 +403,7 @@ impl Grammar { } } - let reduce_fn_ident = format_ident!("reduce_{}_{}", name_ident, rule_local_id); + let reduce_fn_ident = format_ident!("reduce_{}_{}", name, rule_local_id); case_streams.extend(quote! { #ruleid => { @@ -439,10 +413,10 @@ impl Grammar { // if typename is defined for this rule, push result of action to stack // else, just execute action - let typename = self.nonterm_typenames.get(&name_ident).unwrap(); + let typename = self.nonterm_typenames.get(name).unwrap(); if typename.is_some() { // push result to this stack - let stack_name = utils::generate_stack_name(name_ident); + let stack_name = utils::generate_stack_name(name); // typename is defined, reduce action must be defined if let Some(action) = &rule.reduce_action { @@ -481,7 +455,7 @@ impl Grammar { }); } else { return Err(ParseError::RuleTypeDefinedButActionNotDefined( - name_ident.clone(), + name.clone(), )); } } @@ -514,7 +488,7 @@ impl Grammar { // and pop from start rule stack let start_rule_name = &self.start_rule_name; let (start_rule_typename, pop_from_start_rule_stack) = { - if let Some(start_typename) = &self.nonterm_typenames.get(&start_rule_name).unwrap() { + if let Some(start_typename) = &self.nonterm_typenames.get(start_rule_name).unwrap() { let start_rule_stack_name = utils::generate_stack_name(start_rule_name); ( start_typename.clone(), @@ -644,10 +618,10 @@ impl Grammar { self.rules[reduce_rule].rule.len(), reduce_rule, #user_data_var - ).map_err(|e| #module_prefix::ParseError::ReduceAction(e))?; + ).map_err(#module_prefix::ParseError::ReduceAction)?; callback .reduce(&self.rules, &self.states, &context.state_stack, reduce_rule) - .map_err(|e| #module_prefix::ParseError::Callback(e))?; + .map_err(#module_prefix::ParseError::Callback)?; // feed reduced token @@ -688,7 +662,7 @@ impl Grammar { context.state_stack.push(next_state_id); callback .shift_and_goto(&self.rules, &self.states, &context.state_stack, &term) - .map_err(|e| #module_prefix::ParseError::Callback(e))?; + .map_err(#module_prefix::ParseError::Callback)?; context.push( term ); @@ -719,7 +693,7 @@ impl Grammar { context.state_stack.push(next_state_id); callback .shift_and_goto_nonterm(&self.rules, &self.states, &context.state_stack, nonterm) - .map_err(|e| #module_prefix::ParseError::Callback(e))?; + .map_err(#module_prefix::ParseError::Callback)?; Ok(()) }else { Err(#module_prefix::ParseError::InvalidNonTerminal( diff --git a/rusty_lr_parser/src/grammar.rs b/rusty_lr_parser/src/grammar.rs index 5863ffe..3ad0998 100644 --- a/rusty_lr_parser/src/grammar.rs +++ b/rusty_lr_parser/src/grammar.rs @@ -47,7 +47,7 @@ impl Grammar { } else { self.nonterm_typenames .get(ident) - .expect(&format!("get_typename: {}", ident)) + .unwrap_or_else(|| panic!("get_typename: {}", ident)) .as_ref() } } diff --git a/rusty_lr_parser/src/parser/lexer.rs b/rusty_lr_parser/src/parser/lexer.rs index 63b6043..ea5fec7 100644 --- a/rusty_lr_parser/src/parser/lexer.rs +++ b/rusty_lr_parser/src/parser/lexer.rs @@ -54,45 +54,6 @@ pub enum Lexed { Eof, } impl Lexed { - pub fn enum_index(&self) -> usize { - match self { - Lexed::Ident(_) => 0, - Lexed::Colon(_) => 1, - Lexed::Semicolon(_) => 2, - Lexed::Pipe(_) => 3, - Lexed::Percent(_) => 4, - Lexed::Literal(_) => 5, - Lexed::Equal(_) => 6, - Lexed::Plus(_) => 7, - Lexed::Star(_) => 8, - Lexed::Question(_) => 9, - Lexed::Caret(_) => 10, - Lexed::Minus(_) => 11, - Lexed::OtherPunct(_) => 12, - - Lexed::ParenGroup(_) => 13, - Lexed::BraceGroup(_) => 14, - Lexed::BracketGroup(_) => 15, - Lexed::NoneGroup(_) => 16, - Lexed::LParen(_) => 17, - Lexed::RParen(_) => 18, - Lexed::LBrace(_) => 19, - Lexed::RBrace(_) => 20, - Lexed::LBracket(_) => 21, - Lexed::RBracket(_) => 22, - - Lexed::Left(_) => 23, - Lexed::Right(_) => 24, - Lexed::Token(_) => 25, - Lexed::Start(_) => 26, - Lexed::EofDef(_) => 27, - Lexed::TokenType(_) => 28, - Lexed::UserData(_) => 29, - Lexed::ErrorType(_) => 30, - Lexed::ModulePrefix(_) => 31, - Lexed::Eof => 32, - } - } pub fn stream(self) -> TokenStream { match self { Lexed::Ident(ident) => ident.unwrap().to_token_stream(), @@ -247,25 +208,15 @@ impl std::fmt::Display for Lexed { } impl std::hash::Hash for Lexed { fn hash(&self, state: &mut H) { - self.enum_index().hash(state); + std::mem::discriminant(self).hash(state); } } impl PartialEq for Lexed { fn eq(&self, other: &Self) -> bool { - self.enum_index() == other.enum_index() + std::mem::discriminant(self).eq(&std::mem::discriminant(other)) } } impl Eq for Lexed {} -impl std::cmp::PartialOrd for Lexed { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} -impl std::cmp::Ord for Lexed { - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.enum_index().cmp(&other.enum_index()) - } -} /// lex & feed stream to parser /// For '%' directives and 'Group' variants, diff --git a/rusty_lr_parser/src/parser/parser_expanded.rs b/rusty_lr_parser/src/parser/parser_expanded.rs index f0a7b53..4df0992 100644 --- a/rusty_lr_parser/src/parser/parser_expanded.rs +++ b/rusty_lr_parser/src/parser/parser_expanded.rs @@ -1,4 +1,4 @@ -// This file was generated by rustylr 0.2.1 +// This file was generated by rustylr 0.3.1 // // Input file: ../rusty_lr_parser/src/parser/parser.rs // Output file: parser_expanded.rs @@ -1952,73 +1952,6 @@ impl GrammarParser { ], }, ]; - let rustylr_macrogenerated_lookaheads_0 = std::collections::BTreeSet::from([ - Lexed::Eof, - Lexed::EofDef(None), - Lexed::ErrorType(None), - Lexed::Ident(None), - Lexed::Left(None), - Lexed::ModulePrefix(None), - Lexed::Right(None), - Lexed::Start(None), - Lexed::Token(None), - Lexed::TokenType(None), - Lexed::UserData(None), - ]); - let rustylr_macrogenerated_lookaheads_1 = - std::collections::BTreeSet::from([Lexed::Ident(None), Lexed::LBracket(None)]); - let rustylr_macrogenerated_lookaheads_2 = std::collections::BTreeSet::from([]); - let rustylr_macrogenerated_lookaheads_3 = - std::collections::BTreeSet::from([Lexed::Semicolon(None)]); - let rustylr_macrogenerated_lookaheads_4 = std::collections::BTreeSet::from([ - Lexed::BraceGroup(None), - Lexed::BracketGroup(None), - Lexed::Caret(None), - Lexed::Colon(None), - Lexed::Equal(None), - Lexed::Ident(None), - Lexed::Literal(None), - Lexed::Minus(None), - Lexed::NoneGroup(None), - Lexed::OtherPunct(None), - Lexed::ParenGroup(None), - Lexed::Percent(None), - Lexed::Pipe(None), - Lexed::Plus(None), - Lexed::Question(None), - Lexed::Semicolon(None), - Lexed::Star(None), - ]); - let rustylr_macrogenerated_lookaheads_5 = - std::collections::BTreeSet::from([Lexed::Colon(None)]); - let rustylr_macrogenerated_lookaheads_6 = std::collections::BTreeSet::from([ - Lexed::BraceGroup(None), - Lexed::Ident(None), - Lexed::LBracket(None), - Lexed::Pipe(None), - Lexed::Plus(None), - Lexed::Question(None), - Lexed::Semicolon(None), - Lexed::Star(None), - ]); - let rustylr_macrogenerated_lookaheads_7 = - std::collections::BTreeSet::from([Lexed::Pipe(None), Lexed::Semicolon(None)]); - let rustylr_macrogenerated_lookaheads_8 = std::collections::BTreeSet::from([ - Lexed::BraceGroup(None), - Lexed::Ident(None), - Lexed::LBracket(None), - Lexed::Pipe(None), - Lexed::Semicolon(None), - ]); - let rustylr_macrogenerated_lookaheads_9 = std::collections::BTreeSet::from([ - Lexed::BraceGroup(None), - Lexed::Pipe(None), - Lexed::Semicolon(None), - ]); - let rustylr_macrogenerated_lookaheads_10 = - std::collections::BTreeSet::from([Lexed::Ident(None)]); - let rustylr_macrogenerated_lookaheads_11 = - std::collections::BTreeSet::from([Lexed::Ident(None), Lexed::RBracket(None)]); let mut states = Vec::with_capacity(107usize); { let mut shift_goto_map_term = ::rusty_lr_core::HashMap::default(); @@ -2055,217 +1988,217 @@ impl GrammarParser { rule: 2usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 3usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 4usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 5usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 6usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 7usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 8usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 9usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 10usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 11usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 12usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 13usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 14usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 15usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 16usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 17usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 18usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 19usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 20usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 21usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 22usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 28usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 29usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 30usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 31usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 32usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 39usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 43usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 46usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 47usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 74usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_2.clone(), + Default::default(), ), ]), }; @@ -2310,140 +2243,140 @@ impl GrammarParser { rule: 2usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -2485,7 +2418,7 @@ impl GrammarParser { rule: 58usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2526,7 +2459,7 @@ impl GrammarParser { rule: 59usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2567,7 +2500,7 @@ impl GrammarParser { rule: 60usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2608,7 +2541,7 @@ impl GrammarParser { rule: 61usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2649,7 +2582,7 @@ impl GrammarParser { rule: 62usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2690,7 +2623,7 @@ impl GrammarParser { rule: 63usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2731,7 +2664,7 @@ impl GrammarParser { rule: 64usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2772,7 +2705,7 @@ impl GrammarParser { rule: 65usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2813,7 +2746,7 @@ impl GrammarParser { rule: 66usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2854,7 +2787,7 @@ impl GrammarParser { rule: 67usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2895,7 +2828,7 @@ impl GrammarParser { rule: 68usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2936,7 +2869,7 @@ impl GrammarParser { rule: 69usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -2977,7 +2910,7 @@ impl GrammarParser { rule: 70usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3018,7 +2951,7 @@ impl GrammarParser { rule: 71usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3059,7 +2992,7 @@ impl GrammarParser { rule: 72usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3100,7 +3033,7 @@ impl GrammarParser { rule: 73usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3125,7 +3058,7 @@ impl GrammarParser { rule: 2usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3160,7 +3093,7 @@ impl GrammarParser { rule: 2usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3203,126 +3136,126 @@ impl GrammarParser { rule: 38usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -3364,7 +3297,7 @@ impl GrammarParser { rule: 57usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3405,7 +3338,7 @@ impl GrammarParser { rule: 56usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3449,140 +3382,140 @@ impl GrammarParser { rule: 3usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -3608,7 +3541,7 @@ impl GrammarParser { rule: 3usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3643,7 +3576,7 @@ impl GrammarParser { rule: 3usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3671,21 +3604,21 @@ impl GrammarParser { rule: 32usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 36usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_5.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 37usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_5.clone(), + Default::default(), ), ]), }; @@ -3711,7 +3644,7 @@ impl GrammarParser { rule: 36usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_5.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3736,7 +3669,7 @@ impl GrammarParser { rule: 32usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -3773,112 +3706,112 @@ impl GrammarParser { rule: 23usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 24usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 27usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 32usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 33usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 34usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 35usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 40usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 44usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 48usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_9.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 49usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_9.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 50usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 51usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -3913,14 +3846,14 @@ impl GrammarParser { rule: 23usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -3950,49 +3883,49 @@ impl GrammarParser { rule: 23usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 24usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 27usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 40usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -4025,7 +3958,7 @@ impl GrammarParser { rule: 23usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4053,21 +3986,21 @@ impl GrammarParser { rule: 40usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 52usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_10.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 53usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_10.clone(), + Default::default(), ), ]), }; @@ -4093,7 +4026,7 @@ impl GrammarParser { rule: 52usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_10.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4121,35 +4054,35 @@ impl GrammarParser { rule: 40usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 41usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 42usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 54usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 55usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ]), }; @@ -4178,14 +4111,14 @@ impl GrammarParser { rule: 41usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 42usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ]), }; @@ -4211,7 +4144,7 @@ impl GrammarParser { rule: 42usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4237,7 +4170,7 @@ impl GrammarParser { rule: 42usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4263,7 +4196,7 @@ impl GrammarParser { rule: 54usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4291,28 +4224,28 @@ impl GrammarParser { rule: 40usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 41usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 42usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 55usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ]), }; @@ -4345,7 +4278,7 @@ impl GrammarParser { rule: 40usize, shifted: 4usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4371,7 +4304,7 @@ impl GrammarParser { rule: 55usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4404,28 +4337,28 @@ impl GrammarParser { rule: 24usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -4458,7 +4391,7 @@ impl GrammarParser { rule: 24usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4490,7 +4423,7 @@ impl GrammarParser { rule: 26usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4522,7 +4455,7 @@ impl GrammarParser { rule: 25usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4554,7 +4487,7 @@ impl GrammarParser { rule: 27usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4587,28 +4520,28 @@ impl GrammarParser { rule: 24usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 44usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -4635,7 +4568,7 @@ impl GrammarParser { rule: 35usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4662,14 +4595,14 @@ impl GrammarParser { rule: 32usize, shifted: 4usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 34usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ]), }; @@ -4706,98 +4639,98 @@ impl GrammarParser { rule: 23usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 24usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 27usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 33usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 34usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 40usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 44usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 48usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_9.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 49usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_9.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 50usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 51usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -4824,7 +4757,7 @@ impl GrammarParser { rule: 34usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4853,7 +4786,7 @@ impl GrammarParser { rule: 50usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4882,21 +4815,21 @@ impl GrammarParser { rule: 0usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 1usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 33usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), ), ]), }; @@ -4923,7 +4856,7 @@ impl GrammarParser { rule: 0usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4949,7 +4882,7 @@ impl GrammarParser { rule: 33usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_7.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -4982,70 +4915,70 @@ impl GrammarParser { rule: 23usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 24usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 25usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 26usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 27usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 40usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_6.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 44usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 45usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 48usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_9.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 51usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), ), ]), }; @@ -5075,7 +5008,7 @@ impl GrammarParser { rule: 51usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_8.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5110,7 +5043,7 @@ impl GrammarParser { rule: 32usize, shifted: 5usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5136,7 +5069,7 @@ impl GrammarParser { rule: 30usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5180,140 +5113,140 @@ impl GrammarParser { rule: 22usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -5339,7 +5272,7 @@ impl GrammarParser { rule: 22usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5374,7 +5307,7 @@ impl GrammarParser { rule: 22usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5400,7 +5333,7 @@ impl GrammarParser { rule: 31usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5425,7 +5358,7 @@ impl GrammarParser { rule: 39usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5450,7 +5383,7 @@ impl GrammarParser { rule: 39usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5485,7 +5418,7 @@ impl GrammarParser { rule: 39usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5510,7 +5443,7 @@ impl GrammarParser { rule: 43usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5554,140 +5487,140 @@ impl GrammarParser { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 43usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -5713,7 +5646,7 @@ impl GrammarParser { rule: 43usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5748,7 +5681,7 @@ impl GrammarParser { rule: 43usize, shifted: 4usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5792,140 +5725,140 @@ impl GrammarParser { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 46usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -5951,7 +5884,7 @@ impl GrammarParser { rule: 46usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -5986,7 +5919,7 @@ impl GrammarParser { rule: 46usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6030,140 +5963,140 @@ impl GrammarParser { rule: 38usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 47usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 56usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 57usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 58usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 59usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 60usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 61usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 62usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 63usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 64usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 65usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 66usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 67usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 68usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 69usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 70usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 71usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 72usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 73usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_4.clone(), + Default::default(), ), ]), }; @@ -6189,7 +6122,7 @@ impl GrammarParser { rule: 47usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6224,7 +6157,7 @@ impl GrammarParser { rule: 47usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6259,7 +6192,7 @@ impl GrammarParser { rule: 11usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6294,7 +6227,7 @@ impl GrammarParser { rule: 19usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6340,154 +6273,154 @@ impl GrammarParser { rule: 2usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 3usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 4usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 6usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 8usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 10usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 12usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 14usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 16usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 18usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 20usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 22usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 28usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 29usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 30usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 31usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_1.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 32usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 39usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 43usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 46usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 47usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 74usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_2.clone(), + Default::default(), ), ]), }; @@ -6512,7 +6445,7 @@ impl GrammarParser { rule: 74usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_2.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6547,7 +6480,7 @@ impl GrammarParser { rule: 10usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6582,7 +6515,7 @@ impl GrammarParser { rule: 18usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6617,7 +6550,7 @@ impl GrammarParser { rule: 20usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6652,7 +6585,7 @@ impl GrammarParser { rule: 16usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6680,21 +6613,21 @@ impl GrammarParser { rule: 28usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 29usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 40usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ]), }; @@ -6720,7 +6653,7 @@ impl GrammarParser { rule: 28usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6755,7 +6688,7 @@ impl GrammarParser { rule: 28usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6783,21 +6716,21 @@ impl GrammarParser { rule: 40usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 52usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_10.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 53usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_10.clone(), + Default::default(), ), ]), }; @@ -6826,35 +6759,35 @@ impl GrammarParser { rule: 40usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 41usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 42usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 54usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 55usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ]), }; @@ -6883,28 +6816,28 @@ impl GrammarParser { rule: 40usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 41usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 42usize, shifted: 0usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ( ::rusty_lr_core::ShiftedRuleRef { rule: 55usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_11.clone(), + Default::default(), ), ]), }; @@ -6930,7 +6863,7 @@ impl GrammarParser { rule: 40usize, shifted: 4usize, }, - rustylr_macrogenerated_lookaheads_3.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6955,7 +6888,7 @@ impl GrammarParser { rule: 29usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -6990,7 +6923,7 @@ impl GrammarParser { rule: 29usize, shifted: 3usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7025,7 +6958,7 @@ impl GrammarParser { rule: 4usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7060,7 +6993,7 @@ impl GrammarParser { rule: 8usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7095,7 +7028,7 @@ impl GrammarParser { rule: 6usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7130,7 +7063,7 @@ impl GrammarParser { rule: 12usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7165,7 +7098,7 @@ impl GrammarParser { rule: 14usize, shifted: 2usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7200,7 +7133,7 @@ impl GrammarParser { rule: 21usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7235,7 +7168,7 @@ impl GrammarParser { rule: 17usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7270,7 +7203,7 @@ impl GrammarParser { rule: 5usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7305,7 +7238,7 @@ impl GrammarParser { rule: 9usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7340,7 +7273,7 @@ impl GrammarParser { rule: 7usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7375,7 +7308,7 @@ impl GrammarParser { rule: 13usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7410,7 +7343,7 @@ impl GrammarParser { rule: 15usize, shifted: 1usize, }, - rustylr_macrogenerated_lookaheads_0.clone(), + Default::default(), )]), }; let state = ::rusty_lr_core::State { @@ -7448,10 +7381,10 @@ impl GrammarParser { .truncate(context.state_stack.len() - rule.rule.len()); context .reduce(self.rules[reduce_rule].rule.len(), reduce_rule) - .map_err(|e| ::rusty_lr_core::ParseError::ReduceAction(e))?; + .map_err(::rusty_lr_core::ParseError::ReduceAction)?; callback .reduce(&self.rules, &self.states, &context.state_stack, reduce_rule) - .map_err(|e| ::rusty_lr_core::ParseError::Callback(e))?; + .map_err(::rusty_lr_core::ParseError::Callback)?; self.feed_nonterm(context, callback, &rule.name)?; self.lookahead(context, callback, term)?; } @@ -7483,7 +7416,7 @@ impl GrammarParser { context.state_stack.push(next_state_id); callback .shift_and_goto(&self.rules, &self.states, &context.state_stack, &term) - .map_err(|e| ::rusty_lr_core::ParseError::Callback(e))?; + .map_err(::rusty_lr_core::ParseError::Callback)?; context.push(term); Ok(()) } else { @@ -7511,7 +7444,7 @@ impl GrammarParser { context.state_stack.push(next_state_id); callback .shift_and_goto_nonterm(&self.rules, &self.states, &context.state_stack, nonterm) - .map_err(|e| ::rusty_lr_core::ParseError::Callback(e))?; + .map_err(::rusty_lr_core::ParseError::Callback)?; Ok(()) } else { Err(::rusty_lr_core::ParseError::InvalidNonTerminal( diff --git a/rusty_lr_parser/src/utils.rs b/rusty_lr_parser/src/utils.rs index 22f92d4..a455efb 100644 --- a/rusty_lr_parser/src/utils.rs +++ b/rusty_lr_parser/src/utils.rs @@ -23,10 +23,10 @@ pub(crate) fn generate_enum_name(rule_name: &Ident) -> Ident { /// check if the given identifier is reserved name pub(crate) fn check_reserved_name(ident: &Ident) -> Result<(), ParseError> { - if ident.to_string() == AUGMENTED_NAME { + if ident == AUGMENTED_NAME { return Err(ParseError::AugmentedDefined(ident.clone())); } - if ident.to_string() == EOF_NAME { + if ident == EOF_NAME { return Err(ParseError::EofDefined(ident.clone())); } Ok(())