diff --git a/rusty_lr_parser/Cargo.toml b/rusty_lr_parser/Cargo.toml index c2cf0de..41d3a83 100644 --- a/rusty_lr_parser/Cargo.toml +++ b/rusty_lr_parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty_lr_parser" -version = "3.4.1" +version = "3.4.2" edition = "2021" license = "MIT" description = "macro line parser for rusty_lr" diff --git a/rusty_lr_parser/src/emit.rs b/rusty_lr_parser/src/emit.rs index 1c7854d..e4a282f 100644 --- a/rusty_lr_parser/src/emit.rs +++ b/rusty_lr_parser/src/emit.rs @@ -86,6 +86,7 @@ impl Grammar { } } } + // build grammar at compile time fn emit_grammar_compiletime(&self, lalr: bool) -> Result> { let mut grammar = self.create_grammar(); @@ -153,19 +154,35 @@ impl Grammar { comma_separated_terminals }; + let (rules, states) = { + let term_mapper = |term: Ident| self.terminals.get(&term).unwrap().0; + let nonterm_mapper = |nonterm: Ident| nonterm; + let rules: Vec<_> = grammar + .rules + .into_iter() + .map(|r| r.map(term_mapper, nonterm_mapper)) + .collect(); + let states: Vec<_> = dfa + .states + .into_iter() + .map(|s| s.to_export().map(term_mapper, nonterm_mapper)) + .collect(); + (rules, states) + }; + // ===================================================================== // ==================Writing Production Rules=========================== // ===================================================================== - let comma_separated_rules_initializer = { - let mut comma_separated_rules_initializer = TokenStream::new(); - for rule in grammar.rules.iter() { + let (comma_separated_rule_names, comma_separated_rule_tokens) = { + let mut comma_separated_rule_names = TokenStream::new(); + let mut comma_separated_rule_tokens = TokenStream::new(); + for rule in rules.into_iter() { let mut comma_separated_tokens = TokenStream::new(); - for token in rule.rule.iter() { + for token in rule.rule.into_iter() { match token { rlr::Token::Term(term) => { - let term_idx = self.terminals.get(term).unwrap().0; comma_separated_tokens - .extend(quote! {#module_prefix::Token::Term(#term_idx),}); + .extend(quote! {#module_prefix::Token::Term(#term),}); } rlr::Token::NonTerm(nonterm) => { comma_separated_tokens @@ -175,11 +192,14 @@ impl Grammar { } let nonterm_name = &rule.name; - comma_separated_rules_initializer.extend(quote! { - ( #nonterminals_enum_name::#nonterm_name, vec![ #comma_separated_tokens ] ), + comma_separated_rule_names.extend(quote! { + #nonterminals_enum_name::#nonterm_name, + }); + comma_separated_rule_tokens.extend(quote! { + vec![ #comma_separated_tokens ], }); } - comma_separated_rules_initializer + (comma_separated_rule_names, comma_separated_rule_tokens) }; // ===================================================================== @@ -187,32 +207,39 @@ impl Grammar { // ===================================================================== let mut comma_separated_reduce_terminal_sets = TokenStream::new(); - let comma_separated_states_initializer = { - let mut comma_separated_states_initializer = TokenStream::new(); - + let ( + shift_term_initializer, + shift_nonterm_initializer, + reduce_map_initializer, + ruleset_initializer, + ) = { // when generating code for 'inserting tokens to reduce_map', // there could be multiple lookahead tokens for one rule // inserting all of them one by one is inefficient let mut reduce_terminals_map = BTreeMap::new(); - for state in dfa.states.into_iter() { + let mut shift_term_initializer = TokenStream::new(); + let mut shift_nonterm_initializer = TokenStream::new(); + let mut reduce_map_initializer = TokenStream::new(); + let mut ruleset_initializer = TokenStream::new(); + + for state in states.into_iter() { // use BTreeMap to sort keys, for consistent output - let shift_term_initializer = { + let shift_term = { let mut term_state_comma_separated = TokenStream::new(); let shift_goto_map_term: BTreeMap<_, _> = state.shift_goto_map_term.into_iter().collect(); for (term, goto) in shift_goto_map_term.into_iter() { - let term_idx = self.terminals.get(&term).unwrap().0; term_state_comma_separated.extend(quote! { - (#term_idx, #goto), + (#term, #goto), }); } quote! { - vec![#term_state_comma_separated] + vec![#term_state_comma_separated], } }; - let shift_nonterm_initializer = { + let shift_nonterm = { let mut nonterm_state_comma_separated = TokenStream::new(); let shift_goto_map_nonterm: BTreeMap<_, _> = state.shift_goto_map_nonterm.into_iter().collect(); @@ -222,11 +249,10 @@ impl Grammar { }); } quote! { - vec![#nonterm_state_comma_separated] + vec![#nonterm_state_comma_separated], } }; - // use BTreeMap to sort keys, for consistent output let mut reduce_map_by_rule_id = BTreeMap::new(); for (term, ruleid) in state.reduce_map.into_iter() { reduce_map_by_rule_id @@ -234,8 +260,7 @@ impl Grammar { .or_insert_with(BTreeSet::new) .insert(term); } - - let reduce_map_initializer = { + let reduce_map = { let mut init_reduce_comma_separated_terminals_rules = TokenStream::new(); for (ruleid, tokens) in reduce_map_by_rule_id.into_iter() { let terminal_set_num = if let Some(id) = reduce_terminals_map.get(&tokens) { @@ -245,10 +270,9 @@ impl Grammar { reduce_terminals_map.insert(tokens.clone(), len); let mut init_terminals_comma_separated = TokenStream::new(); - for term_name in tokens.into_iter() { - let term_idx = self.terminals.get(&term_name).unwrap().0; + for term in tokens.into_iter() { init_terminals_comma_separated.extend(quote! { - #term_idx, + #term, }); } @@ -264,12 +288,12 @@ impl Grammar { }); } quote! { - vec![#init_reduce_comma_separated_terminals_rules] + vec![#init_reduce_comma_separated_terminals_rules], } }; - let ruleset_initializer = { + let ruleset = { let mut comma_separated_rules = TokenStream::new(); - for rule in state.ruleset.rules.into_keys() { + for rule in state.ruleset.into_iter() { let ruleid = rule.rule; let shifted = rule.shifted; comma_separated_rules.extend(quote! { @@ -277,21 +301,30 @@ impl Grammar { }); } quote! { - vec![#comma_separated_rules] + vec![#comma_separated_rules], } }; - comma_separated_states_initializer.extend(quote! { - ( #shift_term_initializer, #shift_nonterm_initializer, #reduce_map_initializer, #ruleset_initializer), - }); + shift_term_initializer.extend(shift_term); + shift_nonterm_initializer.extend(shift_nonterm); + reduce_map_initializer.extend(reduce_map); + ruleset_initializer.extend(ruleset); } - comma_separated_states_initializer + + ( + shift_term_initializer, + shift_nonterm_initializer, + reduce_map_initializer, + ruleset_initializer, + ) }; Ok(quote! { let __rustylr_terminals = vec![#comma_separated_terminals]; - let rules:Vec<#rule_typename> = [#comma_separated_rules_initializer].into_iter().map( + let rules:Vec<#rule_typename> = [#comma_separated_rule_names].into_iter().zip( + [#comma_separated_rule_tokens] + ).map( | (name, tokens) | { #rule_typename { name, @@ -309,8 +342,14 @@ impl Grammar { let __rustylr_reduce_terminals = vec![#comma_separated_reduce_terminal_sets]; - let states:Vec<#state_typename> = [#comma_separated_states_initializer].into_iter().map( - | (shift_goto_map_term, shift_goto_map_nonterm, reduce_map_init, ruleset) | { + let states:Vec<#state_typename> = [#shift_term_initializer].into_iter().zip( + [#shift_nonterm_initializer].into_iter().zip( + [#reduce_map_initializer].into_iter().zip( + [#ruleset_initializer] + ) + ) + ).map( + | (shift_goto_map_term, (shift_goto_map_nonterm, (reduce_map_init, ruleset))) | { let mut reduce_map = #module_prefix::HashMap::default(); for (terminal_set_id, ruleid) in reduce_map_init.into_iter() { for term_idx in __rustylr_reduce_terminals[terminal_set_id].iter() { diff --git a/rusty_lr_parser/src/parser/parser_expanded.rs b/rusty_lr_parser/src/parser/parser_expanded.rs index c0fe650..297fe25 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.7.1 +// This file was generated by rustylr 0.7.2 // // Input file: ../rusty_lr_parser/src/parser/parser.rs // Output file: parser_expanded.rs @@ -1304,455 +1304,314 @@ impl GrammarParser { Lexed::Eof, ]; let rules: Vec = [ - ( - GrammarNonTerminals::Rule, - vec![ - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleType), - ::rusty_lr_core::Token::Term(1usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLines), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( - GrammarNonTerminals::RuleType, - vec![::rusty_lr_core::Token::Term(14usize)], - ), - (GrammarNonTerminals::RuleType, vec![]), - ( - GrammarNonTerminals::RuleLines, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLines), - ::rusty_lr_core::Token::Term(3usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLine), - ], - ), - ( - GrammarNonTerminals::RuleLines, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::RuleLine, - )], - ), - ( + GrammarNonTerminals::Rule, + GrammarNonTerminals::RuleType, + GrammarNonTerminals::RuleType, + GrammarNonTerminals::RuleLines, + GrammarNonTerminals::RuleLines, + GrammarNonTerminals::RuleLine, + GrammarNonTerminals::_RustyLRGenerated1, + GrammarNonTerminals::_RustyLRGenerated1, + GrammarNonTerminals::_RustyLRGenerated0, + GrammarNonTerminals::_RustyLRGenerated0, + GrammarNonTerminals::TokenMapped, + GrammarNonTerminals::TokenMapped, + GrammarNonTerminals::TerminalSetItem, + GrammarNonTerminals::TerminalSetItem, + GrammarNonTerminals::TerminalSet, + GrammarNonTerminals::_RustyLRGenerated2, + GrammarNonTerminals::_RustyLRGenerated2, + GrammarNonTerminals::_RustyLRGenerated4, + GrammarNonTerminals::_RustyLRGenerated4, + GrammarNonTerminals::_RustyLRGenerated3, + GrammarNonTerminals::_RustyLRGenerated3, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Pattern, + GrammarNonTerminals::Action, + GrammarNonTerminals::Action, + GrammarNonTerminals::TokenDef, + GrammarNonTerminals::RustCode, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated6, + GrammarNonTerminals::_RustyLRGenerated5, + GrammarNonTerminals::_RustyLRGenerated5, + GrammarNonTerminals::StartDef, + GrammarNonTerminals::EofDef, + GrammarNonTerminals::TokenTypeDef, + GrammarNonTerminals::UserDataDef, + GrammarNonTerminals::ReduceType, + GrammarNonTerminals::ReduceType, + GrammarNonTerminals::ReduceDef, + GrammarNonTerminals::ReduceDef, + GrammarNonTerminals::ErrorDef, + GrammarNonTerminals::ModulePrefixDef, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Grammar, + GrammarNonTerminals::Augmented, + ] + .into_iter() + .zip([ + vec![ + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleType), + ::rusty_lr_core::Token::Term(1usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLines), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![::rusty_lr_core::Token::Term(14usize)], + vec![], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLines), + ::rusty_lr_core::Token::Term(3usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RuleLine), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::RuleLine, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated0), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Action), - ], - ), - ( - GrammarNonTerminals::_RustyLRGenerated1, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::TokenMapped, - )], - ), - ( - GrammarNonTerminals::_RustyLRGenerated1, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated1), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenMapped), - ], - ), - ( - GrammarNonTerminals::_RustyLRGenerated0, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::_RustyLRGenerated1, - )], - ), - (GrammarNonTerminals::_RustyLRGenerated0, vec![]), - ( - GrammarNonTerminals::TokenMapped, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::Pattern, - )], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated0), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Action), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::TokenMapped, - vec![ - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::Term(5usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), - ], - ), - ( - GrammarNonTerminals::TerminalSetItem, - vec![::rusty_lr_core::Token::Term(0usize)], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated1), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenMapped), + ], + vec![::rusty_lr_core::Token::NonTerm( + GrammarNonTerminals::_RustyLRGenerated1, + )], + vec![], + vec![::rusty_lr_core::Token::NonTerm( + GrammarNonTerminals::Pattern, + )], + vec![ + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::Term(5usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), + ], + vec![::rusty_lr_core::Token::Term(0usize)], + vec![ + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::Term(10usize), + ::rusty_lr_core::Token::Term(0usize), + ], + vec![ + ::rusty_lr_core::Token::Term(22usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated2), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated3), + ::rusty_lr_core::Token::Term(23usize), + ], + vec![::rusty_lr_core::Token::Term(9usize)], + vec![], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::TerminalSetItem, - vec![ - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::Term(10usize), - ::rusty_lr_core::Token::Term(0usize), - ], - ), - ( - GrammarNonTerminals::TerminalSet, - vec![ - ::rusty_lr_core::Token::Term(22usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated2), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated3), - ::rusty_lr_core::Token::Term(23usize), - ], - ), - ( - GrammarNonTerminals::_RustyLRGenerated2, - vec![::rusty_lr_core::Token::Term(9usize)], - ), - (GrammarNonTerminals::_RustyLRGenerated2, vec![]), - ( - GrammarNonTerminals::_RustyLRGenerated4, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::TerminalSetItem, - )], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated4), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TerminalSetItem), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::_RustyLRGenerated4, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated4), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TerminalSetItem), - ], - ), - ( - GrammarNonTerminals::_RustyLRGenerated3, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::_RustyLRGenerated4, - )], - ), - (GrammarNonTerminals::_RustyLRGenerated3, vec![]), - ( - GrammarNonTerminals::Pattern, - vec![::rusty_lr_core::Token::Term(0usize)], - ), - ( - GrammarNonTerminals::Pattern, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), - ::rusty_lr_core::Token::Term(6usize), - ], - ), - ( - GrammarNonTerminals::Pattern, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), - ::rusty_lr_core::Token::Term(7usize), - ], - ), - ( - GrammarNonTerminals::Pattern, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), - ::rusty_lr_core::Token::Term(8usize), - ], - ), - ( - GrammarNonTerminals::Pattern, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), - ::rusty_lr_core::Token::Term(11usize), - ], - ), - ( - GrammarNonTerminals::Pattern, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::TerminalSet, - )], - ), - ( - GrammarNonTerminals::Action, - vec![::rusty_lr_core::Token::Term(15usize)], - ), - (GrammarNonTerminals::Action, vec![]), - ( - GrammarNonTerminals::TokenDef, - vec![ - ::rusty_lr_core::Token::Term(26usize), - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( - GrammarNonTerminals::RustCode, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::_RustyLRGenerated5, - )], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(15usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(16usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(9usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(1usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(5usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(11usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(0usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(13usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(10usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(17usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(12usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(14usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(4usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(3usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(6usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(8usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated6, - vec![::rusty_lr_core::Token::Term(7usize)], - ), - ( - GrammarNonTerminals::_RustyLRGenerated5, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::_RustyLRGenerated6, - )], - ), - ( + )], + vec![], + vec![::rusty_lr_core::Token::Term(0usize)], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), + ::rusty_lr_core::Token::Term(6usize), + ], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), + ::rusty_lr_core::Token::Term(7usize), + ], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), + ::rusty_lr_core::Token::Term(8usize), + ], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Pattern), + ::rusty_lr_core::Token::Term(11usize), + ], + vec![::rusty_lr_core::Token::NonTerm( + GrammarNonTerminals::TerminalSet, + )], + vec![::rusty_lr_core::Token::Term(15usize)], + vec![], + vec![ + ::rusty_lr_core::Token::Term(26usize), + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::_RustyLRGenerated5, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated5), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated6), - ], - ), - ( + )], + vec![::rusty_lr_core::Token::Term(15usize)], + vec![::rusty_lr_core::Token::Term(16usize)], + vec![::rusty_lr_core::Token::Term(9usize)], + vec![::rusty_lr_core::Token::Term(1usize)], + vec![::rusty_lr_core::Token::Term(5usize)], + vec![::rusty_lr_core::Token::Term(11usize)], + vec![::rusty_lr_core::Token::Term(0usize)], + vec![::rusty_lr_core::Token::Term(13usize)], + vec![::rusty_lr_core::Token::Term(10usize)], + vec![::rusty_lr_core::Token::Term(17usize)], + vec![::rusty_lr_core::Token::Term(12usize)], + vec![::rusty_lr_core::Token::Term(14usize)], + vec![::rusty_lr_core::Token::Term(4usize)], + vec![::rusty_lr_core::Token::Term(3usize)], + vec![::rusty_lr_core::Token::Term(6usize)], + vec![::rusty_lr_core::Token::Term(8usize)], + vec![::rusty_lr_core::Token::Term(7usize)], + vec![::rusty_lr_core::Token::NonTerm( + GrammarNonTerminals::_RustyLRGenerated6, + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated5), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::_RustyLRGenerated6), + ], + vec![ + ::rusty_lr_core::Token::Term(27usize), + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::Term(28usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::Term(29usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::Term(30usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![::rusty_lr_core::Token::Term(24usize)], + vec![::rusty_lr_core::Token::Term(25usize)], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceType), + ::rusty_lr_core::Token::Term(0usize), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceType), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TerminalSet), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::Term(31usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::Term(32usize), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), + ::rusty_lr_core::Token::Term(2usize), + ], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Rule), + ], + vec![::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Rule)], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenDef), + ], + vec![::rusty_lr_core::Token::NonTerm( + GrammarNonTerminals::TokenDef, + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::StartDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::StartDef, - vec![ - ::rusty_lr_core::Token::Term(27usize), - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( - GrammarNonTerminals::EofDef, - vec![ - ::rusty_lr_core::Token::Term(28usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::EofDef), + ], + vec![::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::EofDef)], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenTypeDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::TokenTypeDef, - vec![ - ::rusty_lr_core::Token::Term(29usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::UserDataDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::UserDataDef, - vec![ - ::rusty_lr_core::Token::Term(30usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( - GrammarNonTerminals::ReduceType, - vec![::rusty_lr_core::Token::Term(24usize)], - ), - ( - GrammarNonTerminals::ReduceType, - vec![::rusty_lr_core::Token::Term(25usize)], - ), - ( - GrammarNonTerminals::ReduceDef, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceType), - ::rusty_lr_core::Token::Term(0usize), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::ReduceDef, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceType), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TerminalSet), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ErrorDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::ErrorDef, - vec![ - ::rusty_lr_core::Token::Term(31usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ModulePrefixDef), + ], + vec![::rusty_lr_core::Token::NonTerm( GrammarNonTerminals::ModulePrefixDef, - vec![ - ::rusty_lr_core::Token::Term(32usize), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::RustCode), - ::rusty_lr_core::Token::Term(2usize), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Rule), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Rule)], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::TokenDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::StartDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::StartDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::EofDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::EofDef)], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::TokenTypeDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::TokenTypeDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::UserDataDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::UserDataDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ReduceDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::ReduceDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ErrorDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::ErrorDef, - )], - ), - ( - GrammarNonTerminals::Grammar, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::ModulePrefixDef), - ], - ), - ( - GrammarNonTerminals::Grammar, - vec![::rusty_lr_core::Token::NonTerm( - GrammarNonTerminals::ModulePrefixDef, - )], - ), - ( - GrammarNonTerminals::Augmented, - vec![ - ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), - ::rusty_lr_core::Token::Term(33usize), - ], - ), - ] - .into_iter() + )], + vec![ + ::rusty_lr_core::Token::NonTerm(GrammarNonTerminals::Grammar), + ::rusty_lr_core::Token::Term(33usize), + ], + ]) .map(|(name, tokens)| GrammarRule { name, rule: tokens @@ -1770,39 +1629,299 @@ impl GrammarParser { .collect(); let __rustylr_reduce_terminals = vec![ vec![ - 15usize, 16usize, 9usize, 1usize, 5usize, 11usize, 0usize, 13usize, 10usize, - 17usize, 12usize, 14usize, 4usize, 3usize, 6usize, 8usize, 2usize, 7usize, + 0usize, 1usize, 2usize, 3usize, 4usize, 5usize, 6usize, 7usize, 8usize, 9usize, + 10usize, 11usize, 12usize, 13usize, 14usize, 15usize, 16usize, 17usize, ], vec![ - 33usize, 28usize, 31usize, 0usize, 24usize, 32usize, 25usize, 27usize, 26usize, - 29usize, 30usize, + 0usize, 24usize, 25usize, 26usize, 27usize, 28usize, 29usize, 30usize, 31usize, + 32usize, 33usize, ], vec![2usize], vec![1usize], - vec![15usize, 3usize, 2usize], + vec![2usize, 3usize, 15usize], vec![ - 15usize, 11usize, 0usize, 22usize, 3usize, 6usize, 8usize, 2usize, 7usize, + 0usize, 2usize, 3usize, 6usize, 7usize, 8usize, 11usize, 15usize, 22usize, ], vec![0usize, 23usize], vec![23usize], - vec![15usize, 0usize, 22usize, 3usize, 2usize], - vec![3usize, 2usize], + vec![0usize, 2usize, 3usize, 15usize, 22usize], + vec![2usize, 3usize], vec![0usize, 22usize], ]; let states: Vec = [ - ( - vec![ - (28usize, 1usize), - (31usize, 24usize), - (0usize, 27usize), - (24usize, 63usize), - (32usize, 64usize), - (25usize, 67usize), - (27usize, 68usize), - (26usize, 71usize), - (29usize, 75usize), - (30usize, 78usize), - ], + vec![ + (0usize, 27usize), + (24usize, 63usize), + (25usize, 67usize), + (26usize, 71usize), + (27usize, 68usize), + (28usize, 1usize), + (29usize, 75usize), + (30usize, 78usize), + (31usize, 24usize), + (32usize, 64usize), + ], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![(2usize, 20usize)], + vec![], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![], + vec![], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![(2usize, 26usize)], + vec![], + vec![(14usize, 28usize)], + vec![], + vec![(1usize, 30usize)], + vec![(0usize, 31usize), (22usize, 34usize)], + vec![(5usize, 32usize)], + vec![(0usize, 33usize), (22usize, 34usize)], + vec![], + vec![(9usize, 35usize)], + vec![], + vec![(0usize, 37usize)], + vec![(10usize, 38usize)], + vec![(0usize, 39usize)], + vec![], + vec![], + vec![(23usize, 42usize)], + vec![], + vec![(0usize, 37usize)], + vec![], + vec![ + (6usize, 47usize), + (7usize, 49usize), + (8usize, 48usize), + (11usize, 46usize), + ], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![ + (6usize, 47usize), + (7usize, 49usize), + (8usize, 48usize), + (11usize, 46usize), + ], + vec![], + vec![(2usize, 62usize), (3usize, 54usize)], + vec![(0usize, 31usize), (22usize, 34usize)], + vec![], + vec![], + vec![(15usize, 58usize)], + vec![], + vec![], + vec![(0usize, 31usize), (22usize, 34usize)], + vec![], + vec![], + vec![], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![(2usize, 66usize)], + vec![], + vec![], + vec![(0usize, 69usize)], + vec![(2usize, 70usize)], + vec![], + vec![(0usize, 72usize)], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![(2usize, 74usize)], + vec![], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![(2usize, 77usize)], + vec![], + vec![ + (0usize, 8usize), + (1usize, 5usize), + (3usize, 15usize), + (4usize, 14usize), + (5usize, 6usize), + (6usize, 16usize), + (7usize, 18usize), + (8usize, 17usize), + (9usize, 4usize), + (10usize, 10usize), + (11usize, 7usize), + (12usize, 12usize), + (13usize, 9usize), + (14usize, 13usize), + (15usize, 2usize), + (16usize, 3usize), + (17usize, 11usize), + ], + vec![(2usize, 80usize)], + vec![], + vec![], + vec![], + vec![ + (0usize, 27usize), + (24usize, 63usize), + (25usize, 67usize), + (26usize, 71usize), + (27usize, 68usize), + (28usize, 1usize), + (29usize, 75usize), + (30usize, 78usize), + (31usize, 24usize), + (32usize, 64usize), + (33usize, 84usize), + ], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![(0usize, 90usize), (22usize, 92usize)], + vec![(2usize, 91usize)], + vec![], + vec![(9usize, 35usize)], + vec![(0usize, 37usize)], + vec![(23usize, 95usize)], + vec![], + vec![(2usize, 97usize)], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + vec![], + ] + .into_iter() + .zip( + [ vec![ (GrammarNonTerminals::EofDef, 81usize), (GrammarNonTerminals::ErrorDef, 82usize), @@ -1814,345 +1933,45 @@ impl GrammarParser { (GrammarNonTerminals::StartDef, 106usize), (GrammarNonTerminals::TokenDef, 107usize), (GrammarNonTerminals::TokenTypeDef, 108usize), - (GrammarNonTerminals::UserDataDef, 109usize), - ], - vec![], - vec![ - (0usize, 0usize), - (29usize, 0usize), - (50usize, 0usize), - (51usize, 0usize), - (52usize, 0usize), - (53usize, 0usize), - (54usize, 0usize), - (55usize, 0usize), - (56usize, 0usize), - (57usize, 0usize), - (58usize, 0usize), - (59usize, 0usize), - (60usize, 0usize), - (61usize, 0usize), - (62usize, 0usize), - (63usize, 0usize), - (64usize, 0usize), - (65usize, 0usize), - (66usize, 0usize), - (67usize, 0usize), - (68usize, 0usize), - (69usize, 0usize), - (70usize, 0usize), - (71usize, 0usize), - (72usize, 0usize), - (73usize, 0usize), - (74usize, 0usize), - (75usize, 0usize), - (76usize, 0usize), - (77usize, 0usize), - (78usize, 0usize), - ], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), + (GrammarNonTerminals::UserDataDef, 109usize), ], vec![ (GrammarNonTerminals::RustCode, 19usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], - vec![], - vec![ - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - (51usize, 1usize), - ], - ), - ( - vec![], - vec![], - vec![(0usize, 31usize)], - vec![(31usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 32usize)], - vec![(32usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 33usize)], - vec![(33usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 34usize)], - vec![(34usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 35usize)], - vec![(35usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 36usize)], - vec![(36usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 37usize)], - vec![(37usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 38usize)], - vec![(38usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 39usize)], - vec![(39usize, 1usize)], - ), - ( vec![], - vec![], - vec![(0usize, 40usize)], - vec![(40usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 41usize)], - vec![(41usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 42usize)], - vec![(42usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 43usize)], - vec![(43usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 44usize)], - vec![(44usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 45usize)], - vec![(45usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 46usize)], - vec![(46usize, 1usize)], - ), - ( vec![], vec![], - vec![(0usize, 47usize)], - vec![(47usize, 1usize)], - ), - ( - vec![(2usize, 20usize)], vec![], vec![], - vec![(51usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 51usize)], - vec![(51usize, 3usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![(GrammarNonTerminals::_RustyLRGenerated6, 22usize)], - vec![(2usize, 30usize)], - vec![ - (30usize, 1usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (49usize, 1usize), - ], - ), - ( vec![], vec![], - vec![(0usize, 49usize)], - vec![(49usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(0usize, 48usize)], - vec![(48usize, 1usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![ (GrammarNonTerminals::RustCode, 25usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], - vec![], - vec![ - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - (58usize, 1usize), - ], - ), - ( - vec![(2usize, 26usize)], - vec![], - vec![], - vec![(58usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 58usize)], - vec![(58usize, 3usize)], - ), - ( - vec![(14usize, 28usize)], vec![(GrammarNonTerminals::RuleType, 29usize)], - vec![(3usize, 2usize)], - vec![(0usize, 1usize), (1usize, 0usize), (2usize, 0usize)], - ), - ( - vec![], - vec![], - vec![(3usize, 1usize)], - vec![(1usize, 1usize)], - ), - ( - vec![(1usize, 30usize)], vec![], vec![], - vec![(0usize, 2usize)], - ), - ( - vec![(0usize, 31usize), (22usize, 34usize)], vec![ (GrammarNonTerminals::Pattern, 51usize), (GrammarNonTerminals::RuleLine, 52usize), @@ -2162,218 +1981,36 @@ impl GrammarParser { (GrammarNonTerminals::_RustyLRGenerated0, 57usize), (GrammarNonTerminals::_RustyLRGenerated1, 60usize), ], - vec![(4usize, 9usize)], - vec![ - (0usize, 3usize), - (3usize, 0usize), - (4usize, 0usize), - (5usize, 0usize), - (6usize, 0usize), - (7usize, 0usize), - (8usize, 0usize), - (9usize, 0usize), - (10usize, 0usize), - (11usize, 0usize), - (14usize, 0usize), - (21usize, 0usize), - (22usize, 0usize), - (23usize, 0usize), - (24usize, 0usize), - (25usize, 0usize), - (26usize, 0usize), - ], - ), - ( - vec![(5usize, 32usize)], vec![], - vec![(5usize, 21usize)], - vec![(11usize, 1usize), (21usize, 1usize)], - ), - ( - vec![(0usize, 33usize), (22usize, 34usize)], vec![ (GrammarNonTerminals::Pattern, 45usize), (GrammarNonTerminals::TerminalSet, 50usize), ], vec![], - vec![ - (11usize, 2usize), - (14usize, 0usize), - (21usize, 0usize), - (22usize, 0usize), - (23usize, 0usize), - (24usize, 0usize), - (25usize, 0usize), - (26usize, 0usize), - ], - ), - ( - vec![], - vec![], - vec![(5usize, 21usize)], - vec![(21usize, 1usize)], - ), - ( - vec![(9usize, 35usize)], vec![(GrammarNonTerminals::_RustyLRGenerated2, 36usize)], - vec![(6usize, 16usize)], - vec![(14usize, 1usize), (15usize, 0usize), (16usize, 0usize)], - ), - ( vec![], - vec![], - vec![(6usize, 15usize)], - vec![(15usize, 1usize)], - ), - ( - vec![(0usize, 37usize)], vec![ (GrammarNonTerminals::TerminalSetItem, 40usize), (GrammarNonTerminals::_RustyLRGenerated3, 41usize), (GrammarNonTerminals::_RustyLRGenerated4, 43usize), ], - vec![(7usize, 20usize)], - vec![ - (12usize, 0usize), - (13usize, 0usize), - (14usize, 2usize), - (17usize, 0usize), - (18usize, 0usize), - (19usize, 0usize), - (20usize, 0usize), - ], - ), - ( - vec![(10usize, 38usize)], - vec![], - vec![(6usize, 12usize)], - vec![(12usize, 1usize), (13usize, 1usize)], - ), - ( - vec![(0usize, 39usize)], - vec![], - vec![], - vec![(13usize, 2usize)], - ), - ( vec![], vec![], - vec![(6usize, 13usize)], - vec![(13usize, 3usize)], - ), - ( - vec![], - vec![], - vec![(6usize, 17usize)], - vec![(17usize, 1usize)], - ), - ( - vec![(23usize, 42usize)], vec![], vec![], - vec![(14usize, 3usize)], - ), - ( vec![], vec![], - vec![(5usize, 14usize)], - vec![(14usize, 4usize)], - ), - ( - vec![(0usize, 37usize)], vec![(GrammarNonTerminals::TerminalSetItem, 44usize)], - vec![(7usize, 19usize)], - vec![ - (12usize, 0usize), - (13usize, 0usize), - (18usize, 1usize), - (19usize, 1usize), - ], - ), - ( - vec![], - vec![], - vec![(6usize, 18usize)], - vec![(18usize, 2usize)], - ), - ( - vec![ - (11usize, 46usize), - (6usize, 47usize), - (8usize, 48usize), - (7usize, 49usize), - ], - vec![], - vec![(8usize, 11usize)], - vec![ - (11usize, 3usize), - (22usize, 1usize), - (23usize, 1usize), - (24usize, 1usize), - (25usize, 1usize), - ], - ), - ( - vec![], - vec![], - vec![(5usize, 25usize)], - vec![(25usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(5usize, 22usize)], - vec![(22usize, 2usize)], - ), - ( vec![], - vec![], - vec![(5usize, 24usize)], - vec![(24usize, 2usize)], - ), - ( vec![], vec![], - vec![(5usize, 23usize)], - vec![(23usize, 2usize)], - ), - ( vec![], vec![], - vec![(5usize, 26usize)], - vec![(26usize, 1usize)], - ), - ( - vec![ - (11usize, 46usize), - (6usize, 47usize), - (8usize, 48usize), - (7usize, 49usize), - ], vec![], - vec![(8usize, 10usize)], - vec![ - (10usize, 1usize), - (22usize, 1usize), - (23usize, 1usize), - (24usize, 1usize), - (25usize, 1usize), - ], - ), - ( vec![], vec![], - vec![(9usize, 4usize)], - vec![(4usize, 1usize)], - ), - ( - vec![(3usize, 54usize), (2usize, 62usize)], vec![], vec![], - vec![(0usize, 4usize), (3usize, 1usize)], - ), - ( - vec![(0usize, 31usize), (22usize, 34usize)], vec![ (GrammarNonTerminals::Pattern, 51usize), (GrammarNonTerminals::RuleLine, 55usize), @@ -2382,399 +2019,54 @@ impl GrammarParser { (GrammarNonTerminals::_RustyLRGenerated0, 57usize), (GrammarNonTerminals::_RustyLRGenerated1, 60usize), ], - vec![(4usize, 9usize)], - vec![ - (3usize, 2usize), - (5usize, 0usize), - (6usize, 0usize), - (7usize, 0usize), - (8usize, 0usize), - (9usize, 0usize), - (10usize, 0usize), - (11usize, 0usize), - (14usize, 0usize), - (21usize, 0usize), - (22usize, 0usize), - (23usize, 0usize), - (24usize, 0usize), - (25usize, 0usize), - (26usize, 0usize), - ], - ), - ( - vec![], - vec![], - vec![(9usize, 3usize)], - vec![(3usize, 3usize)], - ), - ( vec![], vec![], - vec![(8usize, 6usize)], - vec![(6usize, 1usize)], - ), - ( - vec![(15usize, 58usize)], vec![(GrammarNonTerminals::Action, 59usize)], - vec![(9usize, 28usize)], - vec![(5usize, 1usize), (27usize, 0usize), (28usize, 0usize)], - ), - ( - vec![], - vec![], - vec![(9usize, 27usize)], - vec![(27usize, 1usize)], - ), - ( vec![], vec![], - vec![(9usize, 5usize)], - vec![(5usize, 2usize)], - ), - ( - vec![(0usize, 31usize), (22usize, 34usize)], vec![ (GrammarNonTerminals::Pattern, 51usize), (GrammarNonTerminals::TerminalSet, 50usize), (GrammarNonTerminals::TokenMapped, 61usize), ], - vec![(4usize, 8usize)], - vec![ - (7usize, 1usize), - (8usize, 1usize), - (10usize, 0usize), - (11usize, 0usize), - (14usize, 0usize), - (21usize, 0usize), - (22usize, 0usize), - (23usize, 0usize), - (24usize, 0usize), - (25usize, 0usize), - (26usize, 0usize), - ], - ), - ( - vec![], - vec![], - vec![(8usize, 7usize)], - vec![(7usize, 2usize)], - ), - ( - vec![], vec![], - vec![(1usize, 0usize)], - vec![(0usize, 5usize)], - ), - ( vec![], vec![], - vec![(10usize, 54usize)], - vec![(54usize, 1usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![ (GrammarNonTerminals::RustCode, 65usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], vec![], - vec![ - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - (59usize, 1usize), - ], - ), - ( - vec![(2usize, 66usize)], - vec![], - vec![], - vec![(59usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 59usize)], - vec![(59usize, 3usize)], - ), - ( - vec![], - vec![], - vec![(10usize, 55usize)], - vec![(55usize, 1usize)], - ), - ( - vec![(0usize, 69usize)], - vec![], - vec![], - vec![(50usize, 1usize)], - ), - ( - vec![(2usize, 70usize)], vec![], vec![], - vec![(50usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 50usize)], - vec![(50usize, 3usize)], - ), - ( - vec![(0usize, 72usize)], vec![], vec![], - vec![(29usize, 1usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![ (GrammarNonTerminals::RustCode, 73usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], - vec![], - vec![ - (29usize, 2usize), - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - ], - ), - ( - vec![(2usize, 74usize)], - vec![], - vec![], - vec![(29usize, 3usize)], - ), - ( vec![], vec![], - vec![(1usize, 29usize)], - vec![(29usize, 4usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![ (GrammarNonTerminals::RustCode, 76usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], vec![], - vec![ - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - (52usize, 1usize), - ], - ), - ( - vec![(2usize, 77usize)], - vec![], vec![], - vec![(52usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 52usize)], - vec![(52usize, 3usize)], - ), - ( - vec![ - (15usize, 2usize), - (16usize, 3usize), - (9usize, 4usize), - (1usize, 5usize), - (5usize, 6usize), - (11usize, 7usize), - (0usize, 8usize), - (13usize, 9usize), - (10usize, 10usize), - (17usize, 11usize), - (12usize, 12usize), - (14usize, 13usize), - (4usize, 14usize), - (3usize, 15usize), - (6usize, 16usize), - (8usize, 17usize), - (7usize, 18usize), - ], vec![ (GrammarNonTerminals::RustCode, 79usize), (GrammarNonTerminals::_RustyLRGenerated5, 21usize), (GrammarNonTerminals::_RustyLRGenerated6, 23usize), ], - vec![], - vec![ - (30usize, 0usize), - (31usize, 0usize), - (32usize, 0usize), - (33usize, 0usize), - (34usize, 0usize), - (35usize, 0usize), - (36usize, 0usize), - (37usize, 0usize), - (38usize, 0usize), - (39usize, 0usize), - (40usize, 0usize), - (41usize, 0usize), - (42usize, 0usize), - (43usize, 0usize), - (44usize, 0usize), - (45usize, 0usize), - (46usize, 0usize), - (47usize, 0usize), - (48usize, 0usize), - (49usize, 0usize), - (53usize, 1usize), - ], - ), - ( - vec![(2usize, 80usize)], - vec![], - vec![], - vec![(53usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 53usize)], - vec![(53usize, 3usize)], - ), - ( vec![], vec![], - vec![(1usize, 67usize)], - vec![(67usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 75usize)], - vec![(75usize, 1usize)], - ), - ( - vec![ - (33usize, 84usize), - (28usize, 1usize), - (31usize, 24usize), - (0usize, 27usize), - (24usize, 63usize), - (32usize, 64usize), - (25usize, 67usize), - (27usize, 68usize), - (26usize, 71usize), - (29usize, 75usize), - (30usize, 78usize), - ], vec![ (GrammarNonTerminals::EofDef, 85usize), (GrammarNonTerminals::ErrorDef, 86usize), @@ -2788,198 +2080,562 @@ impl GrammarParser { (GrammarNonTerminals::UserDataDef, 102usize), ], vec![], - vec![ - (0usize, 0usize), - (29usize, 0usize), - (50usize, 0usize), - (51usize, 0usize), - (52usize, 0usize), - (53usize, 0usize), - (54usize, 0usize), - (55usize, 0usize), - (56usize, 0usize), - (57usize, 0usize), - (58usize, 0usize), - (59usize, 0usize), - (60usize, 1usize), - (62usize, 1usize), - (64usize, 1usize), - (66usize, 1usize), - (68usize, 1usize), - (70usize, 1usize), - (72usize, 1usize), - (74usize, 1usize), - (76usize, 1usize), - (78usize, 1usize), - ], - ), - (vec![], vec![], vec![], vec![(78usize, 2usize)]), - ( - vec![], - vec![], - vec![(1usize, 66usize)], - vec![(66usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 74usize)], - vec![(74usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 76usize)], - vec![(76usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 72usize)], - vec![(72usize, 2usize)], - ), - ( - vec![(0usize, 90usize), (22usize, 92usize)], vec![(GrammarNonTerminals::TerminalSet, 96usize)], - vec![], - vec![(14usize, 0usize), (56usize, 1usize), (57usize, 1usize)], - ), - ( - vec![(2usize, 91usize)], - vec![], - vec![], - vec![(56usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 56usize)], - vec![(56usize, 3usize)], - ), - ( - vec![(9usize, 35usize)], vec![(GrammarNonTerminals::_RustyLRGenerated2, 93usize)], - vec![(6usize, 16usize)], - vec![(14usize, 1usize), (15usize, 0usize), (16usize, 0usize)], - ), - ( - vec![(0usize, 37usize)], vec![ (GrammarNonTerminals::TerminalSetItem, 40usize), (GrammarNonTerminals::_RustyLRGenerated3, 94usize), (GrammarNonTerminals::_RustyLRGenerated4, 43usize), ], - vec![(7usize, 20usize)], - vec![ - (12usize, 0usize), - (13usize, 0usize), - (14usize, 2usize), - (17usize, 0usize), - (18usize, 0usize), - (19usize, 0usize), - (20usize, 0usize), - ], - ), - ( - vec![(23usize, 95usize)], - vec![], - vec![], - vec![(14usize, 3usize)], - ), - ( vec![], vec![], - vec![(2usize, 14usize)], - vec![(14usize, 4usize)], - ), - ( - vec![(2usize, 97usize)], - vec![], - vec![], - vec![(57usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 57usize)], - vec![(57usize, 3usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 60usize)], - vec![(60usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 64usize)], - vec![(64usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 62usize)], - vec![(62usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 68usize)], - vec![(68usize, 2usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 70usize)], - vec![(70usize, 2usize)], - ), - ( vec![], vec![], - vec![(1usize, 77usize)], - vec![(77usize, 1usize)], - ), - ( - vec![], - vec![], - vec![(1usize, 73usize)], - vec![(73usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 61usize)], - vec![(61usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 65usize)], - vec![(65usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 63usize)], - vec![(63usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 69usize)], - vec![(69usize, 1usize)], - ), - ( vec![], vec![], - vec![(1usize, 71usize)], - vec![(71usize, 1usize)], + ] + .into_iter() + .zip( + [ + vec![], + vec![], + vec![(0usize, 31usize)], + vec![(0usize, 32usize)], + vec![(0usize, 33usize)], + vec![(0usize, 34usize)], + vec![(0usize, 35usize)], + vec![(0usize, 36usize)], + vec![(0usize, 37usize)], + vec![(0usize, 38usize)], + vec![(0usize, 39usize)], + vec![(0usize, 40usize)], + vec![(0usize, 41usize)], + vec![(0usize, 42usize)], + vec![(0usize, 43usize)], + vec![(0usize, 44usize)], + vec![(0usize, 45usize)], + vec![(0usize, 46usize)], + vec![(0usize, 47usize)], + vec![], + vec![(1usize, 51usize)], + vec![(2usize, 30usize)], + vec![(0usize, 49usize)], + vec![(0usize, 48usize)], + vec![], + vec![], + vec![(1usize, 58usize)], + vec![(3usize, 2usize)], + vec![(3usize, 1usize)], + vec![], + vec![(4usize, 9usize)], + vec![(5usize, 21usize)], + vec![], + vec![(5usize, 21usize)], + vec![(6usize, 16usize)], + vec![(6usize, 15usize)], + vec![(7usize, 20usize)], + vec![(6usize, 12usize)], + vec![], + vec![(6usize, 13usize)], + vec![(6usize, 17usize)], + vec![], + vec![(5usize, 14usize)], + vec![(7usize, 19usize)], + vec![(6usize, 18usize)], + vec![(8usize, 11usize)], + vec![(5usize, 25usize)], + vec![(5usize, 22usize)], + vec![(5usize, 24usize)], + vec![(5usize, 23usize)], + vec![(5usize, 26usize)], + vec![(8usize, 10usize)], + vec![(9usize, 4usize)], + vec![], + vec![(4usize, 9usize)], + vec![(9usize, 3usize)], + vec![(8usize, 6usize)], + vec![(9usize, 28usize)], + vec![(9usize, 27usize)], + vec![(9usize, 5usize)], + vec![(4usize, 8usize)], + vec![(8usize, 7usize)], + vec![(1usize, 0usize)], + vec![(10usize, 54usize)], + vec![], + vec![], + vec![(1usize, 59usize)], + vec![(10usize, 55usize)], + vec![], + vec![], + vec![(1usize, 50usize)], + vec![], + vec![], + vec![], + vec![(1usize, 29usize)], + vec![], + vec![], + vec![(1usize, 52usize)], + vec![], + vec![], + vec![(1usize, 53usize)], + vec![(1usize, 67usize)], + vec![(1usize, 75usize)], + vec![], + vec![], + vec![(1usize, 66usize)], + vec![(1usize, 74usize)], + vec![(1usize, 76usize)], + vec![(1usize, 72usize)], + vec![], + vec![], + vec![(1usize, 56usize)], + vec![(6usize, 16usize)], + vec![(7usize, 20usize)], + vec![], + vec![(2usize, 14usize)], + vec![], + vec![(1usize, 57usize)], + vec![(1usize, 60usize)], + vec![(1usize, 64usize)], + vec![(1usize, 62usize)], + vec![(1usize, 68usize)], + vec![(1usize, 70usize)], + vec![(1usize, 77usize)], + vec![(1usize, 73usize)], + vec![(1usize, 61usize)], + vec![(1usize, 65usize)], + vec![(1usize, 63usize)], + vec![(1usize, 69usize)], + vec![(1usize, 71usize)], + ] + .into_iter() + .zip([ + vec![ + (0usize, 0usize), + (29usize, 0usize), + (50usize, 0usize), + (51usize, 0usize), + (52usize, 0usize), + (53usize, 0usize), + (54usize, 0usize), + (55usize, 0usize), + (56usize, 0usize), + (57usize, 0usize), + (58usize, 0usize), + (59usize, 0usize), + (60usize, 0usize), + (61usize, 0usize), + (62usize, 0usize), + (63usize, 0usize), + (64usize, 0usize), + (65usize, 0usize), + (66usize, 0usize), + (67usize, 0usize), + (68usize, 0usize), + (69usize, 0usize), + (70usize, 0usize), + (71usize, 0usize), + (72usize, 0usize), + (73usize, 0usize), + (74usize, 0usize), + (75usize, 0usize), + (76usize, 0usize), + (77usize, 0usize), + (78usize, 0usize), + ], + vec![ + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + (51usize, 1usize), + ], + vec![(31usize, 1usize)], + vec![(32usize, 1usize)], + vec![(33usize, 1usize)], + vec![(34usize, 1usize)], + vec![(35usize, 1usize)], + vec![(36usize, 1usize)], + vec![(37usize, 1usize)], + vec![(38usize, 1usize)], + vec![(39usize, 1usize)], + vec![(40usize, 1usize)], + vec![(41usize, 1usize)], + vec![(42usize, 1usize)], + vec![(43usize, 1usize)], + vec![(44usize, 1usize)], + vec![(45usize, 1usize)], + vec![(46usize, 1usize)], + vec![(47usize, 1usize)], + vec![(51usize, 2usize)], + vec![(51usize, 3usize)], + vec![ + (30usize, 1usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (49usize, 1usize), + ], + vec![(49usize, 2usize)], + vec![(48usize, 1usize)], + vec![ + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + (58usize, 1usize), + ], + vec![(58usize, 2usize)], + vec![(58usize, 3usize)], + vec![(0usize, 1usize), (1usize, 0usize), (2usize, 0usize)], + vec![(1usize, 1usize)], + vec![(0usize, 2usize)], + vec![ + (0usize, 3usize), + (3usize, 0usize), + (4usize, 0usize), + (5usize, 0usize), + (6usize, 0usize), + (7usize, 0usize), + (8usize, 0usize), + (9usize, 0usize), + (10usize, 0usize), + (11usize, 0usize), + (14usize, 0usize), + (21usize, 0usize), + (22usize, 0usize), + (23usize, 0usize), + (24usize, 0usize), + (25usize, 0usize), + (26usize, 0usize), + ], + vec![(11usize, 1usize), (21usize, 1usize)], + vec![ + (11usize, 2usize), + (14usize, 0usize), + (21usize, 0usize), + (22usize, 0usize), + (23usize, 0usize), + (24usize, 0usize), + (25usize, 0usize), + (26usize, 0usize), + ], + vec![(21usize, 1usize)], + vec![(14usize, 1usize), (15usize, 0usize), (16usize, 0usize)], + vec![(15usize, 1usize)], + vec![ + (12usize, 0usize), + (13usize, 0usize), + (14usize, 2usize), + (17usize, 0usize), + (18usize, 0usize), + (19usize, 0usize), + (20usize, 0usize), + ], + vec![(12usize, 1usize), (13usize, 1usize)], + vec![(13usize, 2usize)], + vec![(13usize, 3usize)], + vec![(17usize, 1usize)], + vec![(14usize, 3usize)], + vec![(14usize, 4usize)], + vec![ + (12usize, 0usize), + (13usize, 0usize), + (18usize, 1usize), + (19usize, 1usize), + ], + vec![(18usize, 2usize)], + vec![ + (11usize, 3usize), + (22usize, 1usize), + (23usize, 1usize), + (24usize, 1usize), + (25usize, 1usize), + ], + vec![(25usize, 2usize)], + vec![(22usize, 2usize)], + vec![(24usize, 2usize)], + vec![(23usize, 2usize)], + vec![(26usize, 1usize)], + vec![ + (10usize, 1usize), + (22usize, 1usize), + (23usize, 1usize), + (24usize, 1usize), + (25usize, 1usize), + ], + vec![(4usize, 1usize)], + vec![(0usize, 4usize), (3usize, 1usize)], + vec![ + (3usize, 2usize), + (5usize, 0usize), + (6usize, 0usize), + (7usize, 0usize), + (8usize, 0usize), + (9usize, 0usize), + (10usize, 0usize), + (11usize, 0usize), + (14usize, 0usize), + (21usize, 0usize), + (22usize, 0usize), + (23usize, 0usize), + (24usize, 0usize), + (25usize, 0usize), + (26usize, 0usize), + ], + vec![(3usize, 3usize)], + vec![(6usize, 1usize)], + vec![(5usize, 1usize), (27usize, 0usize), (28usize, 0usize)], + vec![(27usize, 1usize)], + vec![(5usize, 2usize)], + vec![ + (7usize, 1usize), + (8usize, 1usize), + (10usize, 0usize), + (11usize, 0usize), + (14usize, 0usize), + (21usize, 0usize), + (22usize, 0usize), + (23usize, 0usize), + (24usize, 0usize), + (25usize, 0usize), + (26usize, 0usize), + ], + vec![(7usize, 2usize)], + vec![(0usize, 5usize)], + vec![(54usize, 1usize)], + vec![ + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + (59usize, 1usize), + ], + vec![(59usize, 2usize)], + vec![(59usize, 3usize)], + vec![(55usize, 1usize)], + vec![(50usize, 1usize)], + vec![(50usize, 2usize)], + vec![(50usize, 3usize)], + vec![(29usize, 1usize)], + vec![ + (29usize, 2usize), + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + ], + vec![(29usize, 3usize)], + vec![(29usize, 4usize)], + vec![ + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + (52usize, 1usize), + ], + vec![(52usize, 2usize)], + vec![(52usize, 3usize)], + vec![ + (30usize, 0usize), + (31usize, 0usize), + (32usize, 0usize), + (33usize, 0usize), + (34usize, 0usize), + (35usize, 0usize), + (36usize, 0usize), + (37usize, 0usize), + (38usize, 0usize), + (39usize, 0usize), + (40usize, 0usize), + (41usize, 0usize), + (42usize, 0usize), + (43usize, 0usize), + (44usize, 0usize), + (45usize, 0usize), + (46usize, 0usize), + (47usize, 0usize), + (48usize, 0usize), + (49usize, 0usize), + (53usize, 1usize), + ], + vec![(53usize, 2usize)], + vec![(53usize, 3usize)], + vec![(67usize, 1usize)], + vec![(75usize, 1usize)], + vec![ + (0usize, 0usize), + (29usize, 0usize), + (50usize, 0usize), + (51usize, 0usize), + (52usize, 0usize), + (53usize, 0usize), + (54usize, 0usize), + (55usize, 0usize), + (56usize, 0usize), + (57usize, 0usize), + (58usize, 0usize), + (59usize, 0usize), + (60usize, 1usize), + (62usize, 1usize), + (64usize, 1usize), + (66usize, 1usize), + (68usize, 1usize), + (70usize, 1usize), + (72usize, 1usize), + (74usize, 1usize), + (76usize, 1usize), + (78usize, 1usize), + ], + vec![(78usize, 2usize)], + vec![(66usize, 2usize)], + vec![(74usize, 2usize)], + vec![(76usize, 2usize)], + vec![(72usize, 2usize)], + vec![(14usize, 0usize), (56usize, 1usize), (57usize, 1usize)], + vec![(56usize, 2usize)], + vec![(56usize, 3usize)], + vec![(14usize, 1usize), (15usize, 0usize), (16usize, 0usize)], + vec![ + (12usize, 0usize), + (13usize, 0usize), + (14usize, 2usize), + (17usize, 0usize), + (18usize, 0usize), + (19usize, 0usize), + (20usize, 0usize), + ], + vec![(14usize, 3usize)], + vec![(14usize, 4usize)], + vec![(57usize, 2usize)], + vec![(57usize, 3usize)], + vec![(60usize, 2usize)], + vec![(64usize, 2usize)], + vec![(62usize, 2usize)], + vec![(68usize, 2usize)], + vec![(70usize, 2usize)], + vec![(77usize, 1usize)], + vec![(73usize, 1usize)], + vec![(61usize, 1usize)], + vec![(65usize, 1usize)], + vec![(63usize, 1usize)], + vec![(69usize, 1usize)], + vec![(71usize, 1usize)], + ]), ), - ] - .into_iter() + ) .map( - |(shift_goto_map_term, shift_goto_map_nonterm, reduce_map_init, ruleset)| { + |(shift_goto_map_term, (shift_goto_map_nonterm, (reduce_map_init, ruleset)))| { let mut reduce_map = ::rusty_lr_core::HashMap::default(); for (terminal_set_id, ruleid) in reduce_map_init.into_iter() { for term_idx in __rustylr_reduce_terminals[terminal_set_id].iter() {