diff --git a/rusty_lr_core/src/nonterminal.rs b/rusty_lr_core/src/nonterminal.rs
index 2a158653..0eb55865 100644
--- a/rusty_lr_core/src/nonterminal.rs
+++ b/rusty_lr_core/src/nonterminal.rs
@@ -51,52 +51,3 @@ pub enum NonTerminalType {
     /// "abc" or b"abc"
     LiteralString,
 }
-
-/// A trait for token that holds data.
-/// This will be used for data stack in the parser.
-pub trait TokenData: Sized {
-    /// Type for terminal symbols
-    type Term;
-    /// Type for non-terminal symbols - this must be enum type that was auto-generated by rusty_lr
-    type NonTerm;
-    /// Type for user data that is passed to the parser from the user.
-    type UserData;
-    /// Type for `Err` variant returned by reduce action
-    type ReduceActionError;
-    /// The value of the start symbol
-    type StartType;
-    /// Type for location of the token
-    type Location: crate::Location;
-
-    /// performs a reduce action with the given rule index
-    fn reduce_action(
-        // the child tokens for the reduction
-        // the caller (usually from generated code) must pops all of the tokens used for this reduce_action
-        data_stack: &mut Vec<Self>,
-        location_stack: &mut Vec<Self::Location>,
-
-        // the index of the production rule to reduce
-        rule_index: usize,
-
-        // for runtime-conflict-resolve.
-        // if this variable is set to false in the action, the shift action will not be performed. (GLR parser)
-        shift: &mut bool,
-        // the lookahead token that caused this reduce action
-        lookahead: &crate::TerminalSymbol<Self::Term>,
-        // user input data
-        userdata: &mut Self::UserData,
-        // location of this non-terminal, e.g. `@$`
-        location0: &mut Self::Location,
-    ) -> Result<Self, Self::ReduceActionError>;
-
-    /// create new token data for error recovery
-    fn new_error() -> Self;
-
-    /// create new token data that is empty.
-    fn new_empty() -> Self {
-        Self::new_error()
-    }
-
-    /// create new terminal variant
-    fn new_terminal(term: Self::Term) -> Self;
-}
diff --git a/rusty_lr_core/src/parser/data_stack.rs b/rusty_lr_core/src/parser/data_stack.rs
new file mode 100644
index 00000000..96e55298
--- /dev/null
+++ b/rusty_lr_core/src/parser/data_stack.rs
@@ -0,0 +1,58 @@
+/// A trait for data stack in the parser.
+///
+/// Since each non-terminal could have different ruletypes,
+/// this effectively handles those rule types into separated `Vec` stack,
+/// instead of using enum of rule types (since it would be costful at memory aspects if the size differs significantly).
+/// For people who is curious about the implementation details,
+/// you should see the actual generated `DataStack` structs, like `GrammarDataStack` in `rusty_lr_parser/src/parser/parser_expanded.rs`.
+pub trait DataStack: Sized + Default {
+    /// Type for terminal symbols
+    type Term;
+    /// Type for non-terminal symbols - this must be enum type that was auto-generated by rusty_lr
+    type NonTerm;
+    /// Type for user data that is passed to the parser from the user.
+    type UserData;
+    /// Type for `Err` variant returned by reduce action
+    type ReduceActionError;
+    /// The value of the start symbol
+    type StartType;
+    /// Type for location of the token
+    type Location: crate::Location;
+
+    fn pop_start(&mut self) -> Option<Self::StartType>;
+    fn pop(&mut self);
+    fn push_terminal(&mut self, term: Self::Term);
+    fn push_empty(&mut self);
+
+    fn clear(&mut self);
+    fn reserve(&mut self, additional: usize);
+    fn with_capacity(capacity: usize) -> Self {
+        let mut self_: Self = Default::default();
+        self_.reserve(capacity);
+        self_
+    }
+
+    fn split_off(&mut self, at: usize) -> Self;
+    fn append(&mut self, other: &mut Self);
+
+    /// performs a reduce action with the given rule index
+    fn reduce_action(
+        // the child tokens for the reduction
+        // the caller (usually from generated code) must pops all of the tokens used for this reduce_action
+        data_stack: &mut Self,
+        location_stack: &mut Vec<Self::Location>,
+
+        // the index of the production rule to reduce
+        rule_index: usize,
+
+        // for runtime-conflict-resolve.
+        // if this variable is set to false in the action, the shift action will not be performed. (GLR parser)
+        shift: &mut bool,
+        // the lookahead token that caused this reduce action
+        lookahead: &crate::TerminalSymbol<Self::Term>,
+        // user input data
+        userdata: &mut Self::UserData,
+        // location of this non-terminal, e.g. `@$`
+        location0: &mut Self::Location,
+    ) -> Result<(), Self::ReduceActionError>;
+}
diff --git a/rusty_lr_core/src/parser/deterministic/context.rs b/rusty_lr_core/src/parser/deterministic/context.rs
index 9245eb2d..09191d54 100644
--- a/rusty_lr_core/src/parser/deterministic/context.rs
+++ b/rusty_lr_core/src/parser/deterministic/context.rs
@@ -4,7 +4,7 @@ use std::hash::Hash;
 use super::ParseError;
 
 use crate::nonterminal::NonTerminal;
-use crate::nonterminal::TokenData;
+use crate::parser::data_stack::DataStack;
 use crate::parser::state::Index;
 use crate::parser::Parser;
 use crate::parser::Precedence;
@@ -12,10 +12,10 @@ use crate::parser::State;
 use crate::TerminalSymbol;
 
 /// A struct that maintains the current state and the values associated with each symbol.
-pub struct Context<Data: TokenData, StateIndex> {
+pub struct Context<Data: DataStack, StateIndex> {
     /// stacks hold the values associated with each shifted symbol.
     pub state_stack: Vec<StateIndex>,
-    pub(crate) data_stack: Vec<Data>,
+    pub(crate) data_stack: Data,
     pub(crate) location_stack: Vec<Data::Location>,
     pub(crate) precedence_stack: Vec<Precedence>,
     /// Tree stack for tree representation of the parse.
@@ -23,14 +23,14 @@ pub struct Context<Data: TokenData, StateIndex> {
     pub(crate) tree_stack: crate::tree::TreeList<Data::Term, Data::NonTerm>,
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> Context<Data, StateIndex> {
     /// Create a new context.
     /// `state_stack` is initialized with [0] (root state).
     pub fn new() -> Self {
         Context {
             state_stack: vec![StateIndex::from_usize_unchecked(0)],
 
-            data_stack: Vec::new(),
+            data_stack: Default::default(),
             location_stack: Vec::new(),
             precedence_stack: Vec::new(),
 
@@ -48,7 +48,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
         Context {
             state_stack,
 
-            data_stack: Vec::with_capacity(capacity),
+            data_stack: Data::with_capacity(capacity),
             location_stack: Vec::with_capacity(capacity),
             precedence_stack: Vec::with_capacity(capacity),
 
@@ -63,19 +63,14 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
         userdata: &mut Data::UserData,
     ) -> Result<Data::StartType, ParseError<Data>>
     where
-        Data: TryInto<Data::StartType>,
         Data::Term: Clone,
         Data::NonTerm: Hash + Eq + Copy + NonTerminal,
     {
         self.feed_eof(parser, userdata)?;
 
         // data_stack must be <Start> <EOF> in this point
-        self.data_stack.pop();
-        if let Ok(start) = self.data_stack.pop().unwrap().try_into() {
-            Ok(start)
-        } else {
-            unreachable!("data stack must have start symbol at this point");
-        }
+        // Since <EOF> does not have ruletype, no need to pop
+        Ok(self.data_stack.pop_start().unwrap())
     }
 
     /// Check if current context can be terminated and get the value of the start symbol.
@@ -289,8 +284,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
                         .push(crate::tree::Tree::new_terminal(term.clone()));
 
                     // shift with `error` token
-                    self.data_stack
-                        .push(Data::new_terminal(term.into_term().unwrap()));
+                    self.data_stack.push_terminal(term.into_term().unwrap());
                     self.location_stack.push(location.unwrap());
                     self.precedence_stack.push(shift_prec);
                     self.state_stack
@@ -406,7 +400,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
                     Data::Location::new(self.location_stack.iter().rev(), tokens_len);
 
                 // call reduce action
-                let new_data = match Data::reduce_action(
+                match Data::reduce_action(
                     &mut self.data_stack,
                     &mut self.location_stack,
                     reduce_rule,
@@ -415,12 +409,11 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
                     userdata,
                     &mut new_location,
                 ) {
-                    Ok(new_data) => new_data,
+                    Ok(_) => {}
                     Err(err) => {
                         return Err(ParseError::ReduceAction(term, location, err));
                     }
                 };
-                self.data_stack.push(new_data);
                 self.location_stack.push(new_location);
 
                 // construct tree
@@ -463,12 +456,15 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
             self.tree_stack
                 .push(crate::tree::Tree::new_terminal(term.clone()));
 
-            let data = match term {
-                TerminalSymbol::Term(term) => Data::new_terminal(term),
-                TerminalSymbol::Error => Data::new_error(),
-                TerminalSymbol::Eof => Data::new_empty(),
-            };
-            self.data_stack.push(data);
+            match term {
+                TerminalSymbol::Term(term) => {
+                    self.data_stack.push_terminal(term);
+                }
+                TerminalSymbol::Error | TerminalSymbol::Eof => {
+                    self.data_stack.push_empty();
+                }
+            }
+            // location is `Some` if it is not `Eof`
             if let Some(location) = location {
                 self.location_stack.push(location);
             }
@@ -859,13 +855,13 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
     }
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Default for Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> Default for Context<Data, StateIndex> {
     fn default() -> Self {
         Self::new()
     }
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Clone for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> Clone for Context<Data, StateIndex>
 where
     Data: Clone,
     Data::Term: Clone,
@@ -885,7 +881,7 @@ where
 }
 
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::fmt::Display for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> std::fmt::Display for Context<Data, StateIndex>
 where
     Data::Term: std::fmt::Display + Clone,
     Data::NonTerm: std::fmt::Display + Clone + crate::nonterminal::NonTerminal,
@@ -895,7 +891,7 @@ where
     }
 }
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::fmt::Debug for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> std::fmt::Debug for Context<Data, StateIndex>
 where
     Data::Term: std::fmt::Debug + Clone,
     Data::NonTerm: std::fmt::Debug + Clone + crate::nonterminal::NonTerminal,
@@ -906,7 +902,7 @@ where
 }
 
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::ops::Deref for Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> std::ops::Deref for Context<Data, StateIndex> {
     type Target = crate::tree::TreeList<Data::Term, Data::NonTerm>;
     fn deref(&self) -> &Self::Target {
         &self.tree_stack
@@ -914,7 +910,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> std::ops::Deref for Context<Data
 }
 
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::ops::DerefMut for Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> std::ops::DerefMut for Context<Data, StateIndex> {
     fn deref_mut(&mut self) -> &mut Self::Target {
         &mut self.tree_stack
     }
diff --git a/rusty_lr_core/src/parser/deterministic/error.rs b/rusty_lr_core/src/parser/deterministic/error.rs
index 48979832..2de61a92 100644
--- a/rusty_lr_core/src/parser/deterministic/error.rs
+++ b/rusty_lr_core/src/parser/deterministic/error.rs
@@ -1,12 +1,12 @@
 use std::fmt::Debug;
 use std::fmt::Display;
 
-use crate::nonterminal::TokenData;
+use crate::parser::data_stack::DataStack;
 use crate::TerminalSymbol;
 
 /// Error type for feed()
 #[derive(Clone)]
-pub enum ParseError<Data: TokenData> {
+pub enum ParseError<Data: DataStack> {
     /// No action defined for the given terminal in the parser table.
     /// location will be `None` if the terminal was eof.
     NoAction(TerminalSymbol<Data::Term>, Option<Data::Location>),
@@ -25,7 +25,7 @@ pub enum ParseError<Data: TokenData> {
     NoPrecedence(TerminalSymbol<Data::Term>, Option<Data::Location>, usize),
 }
 
-impl<Data: TokenData> ParseError<Data> {
+impl<Data: DataStack> ParseError<Data> {
     /// location will be `None` if the terminal was eof.
     pub fn location(&self) -> &Option<Data::Location> {
         match self {
@@ -44,7 +44,7 @@ impl<Data: TokenData> ParseError<Data> {
     }
 }
 
-impl<Data: TokenData> Display for ParseError<Data>
+impl<Data: DataStack> Display for ParseError<Data>
 where
     Data::Term: Display,
     Data::ReduceActionError: Display,
@@ -64,7 +64,7 @@ where
     }
 }
 
-impl<Data: TokenData> Debug for ParseError<Data>
+impl<Data: DataStack> Debug for ParseError<Data>
 where
     Data::Term: Debug,
     Data::ReduceActionError: Debug,
diff --git a/rusty_lr_core/src/parser/mod.rs b/rusty_lr_core/src/parser/mod.rs
index 3b19372b..8ffc46de 100644
--- a/rusty_lr_core/src/parser/mod.rs
+++ b/rusty_lr_core/src/parser/mod.rs
@@ -4,6 +4,8 @@ pub mod deterministic;
 /// Core parser functionality for non-deterministic parsers
 pub mod nondeterministic;
 
+pub mod data_stack;
+
 pub mod state;
 pub use state::State;
 
diff --git a/rusty_lr_core/src/parser/nondeterministic/context.rs b/rusty_lr_core/src/parser/nondeterministic/context.rs
index f9c01cc5..c2a2c8c2 100644
--- a/rusty_lr_core/src/parser/nondeterministic/context.rs
+++ b/rusty_lr_core/src/parser/nondeterministic/context.rs
@@ -4,7 +4,7 @@ use super::Node;
 use super::ParseError;
 
 use crate::nonterminal::NonTerminal;
-use crate::nonterminal::TokenData;
+use crate::parser::data_stack::DataStack;
 use crate::parser::state::Index;
 use crate::parser::Parser;
 use crate::parser::Precedence;
@@ -16,11 +16,11 @@ type SmallVecNode = smallvec::SmallVec<[usize; 3]>;
 /// Iterator for traverse node to root.
 /// Note that root node is not included in this iterator.
 #[derive(Clone)]
-pub struct NodeRefIterator<'a, Data: TokenData, StateIndex> {
+pub struct NodeRefIterator<'a, Data: DataStack, StateIndex> {
     context: &'a Context<Data, StateIndex>,
     node: Option<usize>,
 }
-impl<'a, Data: TokenData, StateIndex: Index + Copy> Iterator
+impl<'a, Data: DataStack, StateIndex: Index + Copy> Iterator
     for NodeRefIterator<'a, Data, StateIndex>
 {
     type Item = &'a Node<Data, StateIndex>;
@@ -34,7 +34,7 @@ impl<'a, Data: TokenData, StateIndex: Index + Copy> Iterator
 
 /// A struct that maintains the current state and the values associated with each symbol.
 /// This handles the divergence and merging of the parser.
-pub struct Context<Data: TokenData, StateIndex> {
+pub struct Context<Data: DataStack, StateIndex> {
     pub(crate) nodes_pool: Vec<Node<Data, StateIndex>>,
     pub(crate) empty_node_indices: std::collections::BTreeSet<usize>,
 
@@ -56,7 +56,7 @@ pub struct Context<Data: TokenData, StateIndex> {
     pub(crate) no_precedences: Vec<usize>,
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> Context<Data, StateIndex> {
     /// Create a new context.
     /// `current_nodes` is initialized with a root node.
     pub fn new() -> Self {
@@ -453,13 +453,12 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
             userdata,
             &mut new_location,
         ) {
-            Ok(new_data) => {
+            Ok(_) => {
                 if let Some(nonterm_shift_state) =
                     parser.get_states()[state].shift_goto_nonterm(&rule.name)
                 {
                     node.state_stack
                         .push(StateIndex::from_usize_unchecked(nonterm_shift_state));
-                    node.data_stack.push(new_data);
                     node.location_stack.push(new_location);
                     node.precedence_stack.push(precedence);
                     #[cfg(feature = "tree")]
@@ -504,7 +503,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
         userdata: &mut Data::UserData,
     ) -> Result<impl Iterator<Item = Data::StartType>, ParseError<Data>>
     where
-        Data: Clone + TryInto<Data::StartType>,
+        Data: Clone,
         P::Term: Clone,
         P::NonTerm: Hash + Eq + Clone + std::fmt::Debug + NonTerminal,
     {
@@ -515,12 +514,8 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
         let nodes = std::mem::take(&mut self.current_nodes);
         Ok(nodes.into_iter().map(move |eof_node| {
             let node = self.pop(eof_node).unwrap();
-            let data = self.nodes_pool[node].data_stack.pop().unwrap();
-
-            match data.try_into() {
-                Ok(start) => start,
-                Err(_) => unreachable!("data stack must have start symbol at this point"),
-            }
+            // Since <EOF> does not have ruletype, no need to pop
+            self.nodes_pool[node].data_stack.pop_start().unwrap()
         }))
     }
 
@@ -1065,11 +1060,15 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
                 node_
                     .tree_stack
                     .push(crate::tree::Tree::new_terminal(term.clone()));
-                node_.data_stack.push(match term {
-                    TerminalSymbol::Term(term) => Data::new_terminal(term),
-                    TerminalSymbol::Eof => Data::new_empty(),
-                    TerminalSymbol::Error => Data::new_error(),
-                });
+
+                match term {
+                    TerminalSymbol::Term(term) => {
+                        node_.data_stack.push_terminal(term);
+                    }
+                    TerminalSymbol::Eof | TerminalSymbol::Error => {
+                        node_.data_stack.push_empty();
+                    }
+                }
 
                 self.next_nodes.push(node);
                 Ok(())
@@ -1093,11 +1092,15 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
             node_
                 .tree_stack
                 .push(crate::tree::Tree::new_terminal(term.clone()));
-            node_.data_stack.push(match term {
-                TerminalSymbol::Term(term) => Data::new_terminal(term),
-                TerminalSymbol::Eof => Data::new_empty(),
-                TerminalSymbol::Error => Data::new_error(),
-            });
+
+            match term {
+                TerminalSymbol::Term(term) => {
+                    node_.data_stack.push_terminal(term);
+                }
+                TerminalSymbol::Eof | TerminalSymbol::Error => {
+                    node_.data_stack.push_empty();
+                }
+            }
 
             self.next_nodes.push(node);
             Ok(())
@@ -1247,7 +1250,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
                         node.tree_stack.push(crate::tree::Tree::new_terminal(
                             TerminalSymbol::Term(term.clone()),
                         ));
-                        node.data_stack.push(Data::new_terminal(term.clone()));
+                        node.data_stack.push_terminal(term.clone());
 
                         self.current_nodes.push(error_node);
                     } else {
@@ -1458,7 +1461,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Context<Data, StateIndex> {
     }
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Default for Context<Data, StateIndex> {
+impl<Data: DataStack, StateIndex: Index + Copy> Default for Context<Data, StateIndex> {
     fn default() -> Self {
         let mut context = Context {
             nodes_pool: Default::default(),
@@ -1475,7 +1478,7 @@ impl<Data: TokenData, StateIndex: Index + Copy> Default for Context<Data, StateI
     }
 }
 
-impl<Data: TokenData, StateIndex: Index + Copy> Clone for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> Clone for Context<Data, StateIndex>
 where
     Node<Data, StateIndex>: Clone,
 {
@@ -1490,7 +1493,7 @@ where
 }
 
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::fmt::Display for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> std::fmt::Display for Context<Data, StateIndex>
 where
     Data::Term: std::fmt::Display + Clone,
     Data::NonTerm: std::fmt::Display + Clone + crate::nonterminal::NonTerminal,
@@ -1504,7 +1507,7 @@ where
     }
 }
 #[cfg(feature = "tree")]
-impl<Data: TokenData, StateIndex: Index + Copy> std::fmt::Debug for Context<Data, StateIndex>
+impl<Data: DataStack, StateIndex: Index + Copy> std::fmt::Debug for Context<Data, StateIndex>
 where
     Data::Term: std::fmt::Debug + Clone,
     Data::NonTerm: std::fmt::Debug + Clone + crate::nonterminal::NonTerminal,
diff --git a/rusty_lr_core/src/parser/nondeterministic/error.rs b/rusty_lr_core/src/parser/nondeterministic/error.rs
index e09aebb9..f7a4b07c 100644
--- a/rusty_lr_core/src/parser/nondeterministic/error.rs
+++ b/rusty_lr_core/src/parser/nondeterministic/error.rs
@@ -1,11 +1,11 @@
 use std::fmt::Debug;
 use std::fmt::Display;
 
-use crate::nonterminal::TokenData;
+use crate::parser::data_stack::DataStack;
 
 /// Error type for feed()
 #[derive(Clone)]
-pub struct ParseError<Data: TokenData> {
+pub struct ParseError<Data: DataStack> {
     /// The terminal symbol that caused the error.
     pub term: crate::TerminalSymbol<Data::Term>,
     /// Location of the terminal symbol.
@@ -18,7 +18,7 @@ pub struct ParseError<Data: TokenData> {
     pub no_precedences: Vec<usize>,
 }
 
-impl<Data: TokenData> ParseError<Data> {
+impl<Data: DataStack> ParseError<Data> {
     /// location will be `None` if the terminal was eof.
     pub fn location(&self) -> &Option<Data::Location> {
         &self.location
@@ -28,7 +28,7 @@ impl<Data: TokenData> ParseError<Data> {
     }
 }
 
-impl<Data: TokenData> Display for ParseError<Data>
+impl<Data: DataStack> Display for ParseError<Data>
 where
     Data::Term: Display,
     Data::ReduceActionError: Display,
@@ -38,7 +38,7 @@ where
     }
 }
 
-impl<Data: TokenData> Debug for ParseError<Data>
+impl<Data: DataStack> Debug for ParseError<Data>
 where
     Data::Term: Debug,
     Data::ReduceActionError: Debug,
diff --git a/rusty_lr_core/src/parser/nondeterministic/node.rs b/rusty_lr_core/src/parser/nondeterministic/node.rs
index bd8e73ae..1fe1c063 100644
--- a/rusty_lr_core/src/parser/nondeterministic/node.rs
+++ b/rusty_lr_core/src/parser/nondeterministic/node.rs
@@ -1,11 +1,11 @@
-use crate::nonterminal::TokenData;
+use crate::parser::data_stack::DataStack;
 use crate::parser::Precedence;
 
 /// To handle multiple paths in the non-deterministic GLR parsing,
 /// this node represents a subrange in stack of the parser.
 /// this constructs LinkedList tree of nodes, where parent node is the previous token in the parse tree.
 #[derive(Clone)]
-pub struct Node<Data: TokenData, StateIndex> {
+pub struct Node<Data: DataStack, StateIndex> {
     /// parent node
     pub parent: Option<usize>,
 
@@ -13,20 +13,20 @@ pub struct Node<Data: TokenData, StateIndex> {
 
     /// index of state in parser
     pub state_stack: Vec<StateIndex>,
-    pub data_stack: Vec<Data>,
+    pub data_stack: Data,
     pub location_stack: Vec<Data::Location>,
     pub precedence_stack: Vec<Precedence>,
     #[cfg(feature = "tree")]
     pub(crate) tree_stack: Vec<crate::tree::Tree<Data::Term, Data::NonTerm>>,
 }
 
-impl<Data: TokenData, StateIndex> Default for Node<Data, StateIndex> {
+impl<Data: DataStack, StateIndex> Default for Node<Data, StateIndex> {
     fn default() -> Self {
         Node {
             parent: None,
             child_count: 0,
             state_stack: Vec::new(),
-            data_stack: Vec::new(),
+            data_stack: Data::default(),
             location_stack: Vec::new(),
             precedence_stack: Vec::new(),
             #[cfg(feature = "tree")]
@@ -35,7 +35,7 @@ impl<Data: TokenData, StateIndex> Default for Node<Data, StateIndex> {
     }
 }
 
-impl<Data: TokenData, StateIndex> Node<Data, StateIndex> {
+impl<Data: DataStack, StateIndex> Node<Data, StateIndex> {
     /// Clear this node to `Default::default()`.
     pub fn clear(&mut self) {
         self.parent = None;
@@ -48,7 +48,7 @@ impl<Data: TokenData, StateIndex> Node<Data, StateIndex> {
         self.tree_stack.clear();
     }
     pub fn len(&self) -> usize {
-        self.data_stack.len()
+        self.state_stack.len()
     }
     pub fn is_leaf(&self) -> bool {
         self.child_count == 0
@@ -59,7 +59,7 @@ impl<Data: TokenData, StateIndex> Node<Data, StateIndex> {
             parent: None,
             child_count: 0,
             state_stack: Vec::with_capacity(capacity),
-            data_stack: Vec::with_capacity(capacity),
+            data_stack: Data::with_capacity(capacity),
             location_stack: Vec::with_capacity(capacity),
             precedence_stack: Vec::with_capacity(capacity),
             #[cfg(feature = "tree")]
diff --git a/rusty_lr_parser/src/emit.rs b/rusty_lr_parser/src/emit.rs
index ec54687d..da2b3371 100644
--- a/rusty_lr_parser/src/emit.rs
+++ b/rusty_lr_parser/src/emit.rs
@@ -20,7 +20,7 @@ impl Grammar {
         let enum_name = format_ident!("{}NonTerminals", start_rule_name);
         let parse_error_typename = format_ident!("{}ParseError", start_rule_name);
         let context_struct_name = format_ident!("{}Context", start_rule_name);
-        let token_data_typename = format_ident!("{}TokenData", start_rule_name);
+        let data_stack_typename = format_ident!("{}DataStack", start_rule_name);
 
         let state_structname = if self.emit_dense {
             format_ident!("DenseState")
@@ -63,7 +63,7 @@ impl Grammar {
             quote! {
                     /// type alias for `Context`
                     #[allow(non_camel_case_types,dead_code)]
-                    pub type #context_struct_name = #module_prefix::parser::nondeterministic::Context<#token_data_typename, #state_index_typename>;
+                    pub type #context_struct_name = #module_prefix::parser::nondeterministic::Context<#data_stack_typename, #state_index_typename>;
                     /// type alias for CFG production rule
                     #[allow(non_camel_case_types,dead_code)]
                     pub type #rule_typename = #module_prefix::rule::ProductionRule<&'static str, #enum_name>;
@@ -72,7 +72,7 @@ impl Grammar {
                     pub type #state_typename = #module_prefix::parser::state::#state_structname<#class_index_typename, #enum_name, #rule_container_type, #state_index_typename>;
                     /// type alias for `InvalidTerminalError`
                     #[allow(non_camel_case_types,dead_code)]
-                    pub type #parse_error_typename = #module_prefix::parser::nondeterministic::ParseError<#token_data_typename>;
+                    pub type #parse_error_typename = #module_prefix::parser::nondeterministic::ParseError<#data_stack_typename>;
                 }
             );
         } else {
@@ -80,7 +80,7 @@ impl Grammar {
         quote! {
                 /// type alias for `Context`
                 #[allow(non_camel_case_types,dead_code)]
-                pub type #context_struct_name = #module_prefix::parser::deterministic::Context<#token_data_typename, #state_index_typename>;
+                pub type #context_struct_name = #module_prefix::parser::deterministic::Context<#data_stack_typename, #state_index_typename>;
                 /// type alias for CFG production rule
                 #[allow(non_camel_case_types,dead_code)]
                 pub type #rule_typename = #module_prefix::rule::ProductionRule<&'static str, #enum_name>;
@@ -89,7 +89,7 @@ impl Grammar {
                 pub type #state_typename = #module_prefix::parser::state::#state_structname<#class_index_typename, #enum_name, usize, #state_index_typename>;
                 /// type alias for `ParseError`
                 #[allow(non_camel_case_types,dead_code)]
-                pub type #parse_error_typename = #module_prefix::parser::deterministic::ParseError<#token_data_typename>;
+                pub type #parse_error_typename = #module_prefix::parser::deterministic::ParseError<#data_stack_typename>;
             }
             );
         }
@@ -1150,11 +1150,11 @@ impl Grammar {
         }
     }
 
-    fn emit_token_data(&self, stream: &mut TokenStream) {
+    fn emit_data_stack(&self, stream: &mut TokenStream) {
         let module_prefix = &self.module_prefix;
         let nonterminals_enum_name = format_ident!("{}NonTerminals", &self.start_rule_name);
         let reduce_error_typename = &self.error_typename;
-        let token_data_typename = format_ident!("{}TokenData", self.start_rule_name);
+        let data_stack_typename = format_ident!("{}DataStack", self.start_rule_name);
         let token_typename = &self.token_typename;
         let user_data_parameter_name =
             Ident::new(utils::USER_DATA_PARAMETER_NAME, Span::call_site());
@@ -1165,31 +1165,35 @@ impl Grammar {
             .cloned()
             .unwrap_or_else(|| quote! { #module_prefix::DefaultLocation });
 
-        // variant name for terminal symbol
-        let terminal_variant_name = Ident::new("Terminals", Span::call_site());
-        // enum variant name for each non-terminal
-        let mut variant_names_for_nonterm = Vec::with_capacity(self.nonterminals.len());
+        // stack name for tags
+        let tag_stack_name = format_ident!("__tags");
+        let tag_enum_name = format_ident!("{}Tags", &self.start_rule_name);
 
-        // (<RuleType as ToString>, variant_name) map
-        let mut ruletype_variant_map: rusty_lr_core::hash::HashMap<String, Ident> =
+        // empty tag
+        let empty_tag_name = format_ident!("Empty");
+
+        // stack name for terminal symbol
+        let terminal_stack_name = format_ident!("__terminals");
+        // stack name for each non-terminal
+        let mut stack_names_for_nonterm = Vec::with_capacity(self.nonterminals.len());
+
+        // (<RuleType as ToString>, stack_name) map
+        let mut ruletype_stack_map: rusty_lr_core::hash::HashMap<String, Option<Ident>> =
             Default::default();
 
-        // (variant_name, TokenStream for typename) sorted in insertion order
+        // (stack_name, TokenStream for typename) sorted in insertion order
         // for consistent output
-        let mut variant_names_in_order = Vec::new();
+        let mut stack_names_in_order = Vec::new();
 
-        // insert variant for terminal token type
-        ruletype_variant_map.insert(
+        // insert stack for empty
+        ruletype_stack_map.insert("".to_string(), None);
+
+        // insert stack for terminal token type
+        ruletype_stack_map.insert(
             self.token_typename.to_string(),
-            terminal_variant_name.clone(),
+            Some(terminal_stack_name.clone()),
         );
-        variant_names_in_order.push((terminal_variant_name.clone(), self.token_typename.clone()));
-
-        // insert variant for empty-ruletype
-        let empty_ruletype_variant_name = Ident::new("Empty", Span::call_site());
-        ruletype_variant_map.insert("".to_string(), empty_ruletype_variant_name.clone());
-        // ruletype_variant_map.insert(quote! {()}.to_string(), empty_ruletype_variant_name.clone());
-        variant_names_in_order.push((empty_ruletype_variant_name.clone(), quote! {}));
+        stack_names_in_order.push((terminal_stack_name.clone(), self.token_typename.clone()));
 
         fn remove_whitespaces(s: String) -> String {
             s.chars().filter(|c| !c.is_whitespace()).collect()
@@ -1198,20 +1202,17 @@ impl Grammar {
         for nonterm in self.nonterminals.iter() {
             let ruletype_stream = nonterm.ruletype.as_ref().cloned().unwrap_or_default();
 
-            let cur_len = ruletype_variant_map.len();
-            let variant_name = ruletype_variant_map
+            let cur_len = ruletype_stack_map.len();
+            let stack_name = ruletype_stack_map
                 .entry(remove_whitespaces(ruletype_stream.to_string()))
                 .or_insert_with(|| {
-                    let new_variant_name =
-                        Ident::new(&format!("Variant{}", cur_len), Span::call_site());
-                    variant_names_in_order
-                        .push((new_variant_name.clone(), ruletype_stream.clone()));
-                    new_variant_name
+                    let new_stack_name = format_ident!("__stack{}", cur_len);
+                    stack_names_in_order.push((new_stack_name.clone(), ruletype_stream.clone()));
+                    Some(new_stack_name)
                 })
                 .clone();
-            variant_names_for_nonterm.push(variant_name);
+            stack_names_for_nonterm.push(stack_name);
         }
-        drop(ruletype_variant_map);
 
         let mut case_streams = quote! {};
 
@@ -1244,8 +1245,10 @@ impl Grammar {
 
                 match &rule.reduce_action {
                     Some(ReduceAction::Custom(reduce_action)) => {
-                        let mut extract_token_data_from_args = TokenStream::new();
-                        for token in rule.tokens.iter().rev() {
+                        let mut debug_tag_check_stream = TokenStream::new();
+                        let mut extract_location_stream = TokenStream::new();
+                        let mut stack_mapto_map = std::collections::BTreeMap::new();
+                        for (token_index_from_end, token) in rule.tokens.iter().rev().enumerate() {
                             match &token.token {
                                 Token::Term(term) => match &token.mapto {
                                     Some(mapto) => {
@@ -1254,18 +1257,32 @@ impl Grammar {
 
                                         match term {
                                             TerminalSymbol::Term(_) => {
-                                                extract_token_data_from_args.extend(quote! {
-                                                let #token_data_typename::#terminal_variant_name(mut #mapto) = __data_stack.pop().unwrap() else {
-                                                    unreachable!()
-                                                };
-                                                let #location_varname = __location_stack.pop().unwrap();
-                                            });
+                                                stack_mapto_map
+                                                    .entry(&terminal_stack_name)
+                                                    .or_insert_with(Vec::new)
+                                                    .push(Some(mapto.clone()));
+                                                extract_location_stream.extend(quote! {
+                                                    let #location_varname = __location_stack.pop().unwrap();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#terminal_stack_name )
+                                                    );
+                                                });
                                             }
                                             TerminalSymbol::Error => {
-                                                extract_token_data_from_args.extend(quote! {
-                                                __data_stack.pop();
-                                                let #location_varname = __location_stack.pop().unwrap();
-                                            });
+                                                extract_location_stream.extend(quote! {
+                                                    let #location_varname = __location_stack.pop().unwrap();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#empty_tag_name )
+                                                    );
+                                                });
                                             }
                                             TerminalSymbol::Eof => {
                                                 unreachable!(
@@ -1275,148 +1292,354 @@ impl Grammar {
                                         }
                                     }
                                     None => {
-                                        extract_token_data_from_args.extend(quote! {
-                                            __data_stack.pop();
+                                        stack_mapto_map
+                                            .entry(&terminal_stack_name)
+                                            .or_insert_with(Vec::new)
+                                            .push(None);
+                                        extract_location_stream.extend(quote! {
                                             __location_stack.pop();
                                         });
+                                        debug_tag_check_stream.extend(quote! {
+                                            debug_assert!(
+                                                __data_stack.#tag_stack_name.get(
+                                                    __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                ) == Some( &#tag_enum_name::#terminal_stack_name )
+                                            );
+                                        });
                                     }
                                 },
                                 Token::NonTerm(nonterm_idx) => {
+                                    let stack_name = stack_names_for_nonterm[*nonterm_idx].as_ref();
+
                                     match &token.mapto {
                                         Some(mapto) => {
                                             let location_varname =
                                                 format_ident!("__rustylr_location_{}", mapto);
-                                            let variant_name =
-                                                &variant_names_for_nonterm[*nonterm_idx];
-                                            if variant_name == &empty_ruletype_variant_name {
-                                                extract_token_data_from_args.extend(quote! {
-                                                __data_stack.pop();
-                                                let #location_varname = __location_stack.pop().unwrap();
-                                            });
-                                            } else {
+
+                                            if let Some(stack_name) = stack_name {
                                                 // extract token data from args
-                                                extract_token_data_from_args.extend(quote! {
-                                                let #token_data_typename::#variant_name(mut #mapto) = __data_stack.pop().unwrap() else {
-                                                    unreachable!()
-                                                };
-                                                let #location_varname = __location_stack.pop().unwrap();
-                                            });
+                                                stack_mapto_map
+                                                    .entry(&stack_name)
+                                                    .or_insert_with(Vec::new)
+                                                    .push(Some(mapto.clone()));
+                                                extract_location_stream.extend(quote! {
+                                                    let #location_varname = __location_stack.pop().unwrap();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#stack_name )
+                                                    );
+                                                });
+                                            } else {
+                                                extract_location_stream.extend(quote! {
+                                                    let #location_varname = __location_stack.pop().unwrap();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#empty_tag_name )
+                                                    );
+                                                });
                                             }
                                         }
                                         None => {
-                                            extract_token_data_from_args.extend(quote! {
-                                                __data_stack.pop();
-                                                __location_stack.pop();
-                                            });
+                                            if let Some(stack_name) = stack_name {
+                                                stack_mapto_map
+                                                    .entry(&stack_name)
+                                                    .or_insert_with(Vec::new)
+                                                    .push(None);
+                                                extract_location_stream.extend(quote! {
+                                                    __location_stack.pop();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#stack_name )
+                                                    );
+                                                });
+                                            } else {
+                                                extract_location_stream.extend(quote! {
+                                                    __location_stack.pop();
+                                                });
+                                                debug_tag_check_stream.extend(quote! {
+                                                    debug_assert!(
+                                                        __data_stack.#tag_stack_name.get(
+                                                            __data_stack.#tag_stack_name.len()-1-#token_index_from_end
+                                                        ) == Some( &#tag_enum_name::#empty_tag_name )
+                                                    );
+                                                });
+                                            }
                                         }
                                     }
                                 }
                             }
                         }
 
+                        let mut truncate_tag_stream = TokenStream::new();
+                        if rule.tokens.len() > 0 {
+                            let len = rule.tokens.len();
+                            truncate_tag_stream.extend(quote! {
+                                __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len);
+                            });
+                        }
+
+                        let mut extract_data_stream = TokenStream::new();
+                        for (stack_name, maptos) in stack_mapto_map {
+                            for mapto in maptos {
+                                match mapto {
+                                    Some(mapto) => {
+                                        extract_data_stream.extend(quote! {
+                                            let mut #mapto = __data_stack.#stack_name.pop().unwrap();
+                                        });
+                                    }
+                                    None => {
+                                        extract_data_stream.extend(quote! {
+                                                __data_stack.#stack_name.pop();
+                                        });
+                                    }
+                                }
+                            }
+                        }
+
+                        let extract_token_data_from_args = quote! {
+                            #[cfg(debug_assertions)]
+                            {
+                                #debug_tag_check_stream
+                            }
+                            #truncate_tag_stream
+                            #extract_data_stream
+                            #extract_location_stream
+                        };
+
                         case_streams.extend(quote! {
                             #rule_index => Self::#reduce_fn_ident( data_stack, location_stack, shift, lookahead, user_data, location0 ),
                         });
 
-                        // if typename is defined for this rule, push result of action to stack
-                        // else, just execute action
-                        if nonterm.ruletype.is_some() {
-                            // typename is defined, reduce action must be defined
-                            let variant_name = &variant_names_for_nonterm[nonterm_idx];
+                        // typename is defined, reduce action must be defined
+                        if let Some(stack_name) = &stack_names_for_nonterm[nonterm_idx] {
                             fn_reduce_for_each_rule_stream.extend(quote! {
                                 #[doc = #rule_debug_str]
                                 #[inline]
                                 fn #reduce_fn_ident(
-                                    __data_stack: &mut Vec<Self>,
+                                    __data_stack: &mut Self,
                                     __location_stack: &mut Vec<#location_typename>,
                                     shift: &mut bool,
                                     lookahead: &#module_prefix::TerminalSymbol<#token_typename>,
                                     #user_data_parameter_name: &mut #user_data_typename,
                                     __rustylr_location0: &mut #location_typename,
-                                ) -> Result<#token_data_typename, #reduce_error_typename> {
+                                ) -> Result<(), #reduce_error_typename> {
                                     #extract_token_data_from_args
 
-                                    Ok( #token_data_typename::#variant_name(#reduce_action) )
+                                    let __res = #reduce_action ;
+                                    __data_stack.#stack_name.push(__res);
+                                    __data_stack.#tag_stack_name.push(#tag_enum_name::#stack_name);
+
+                                    Ok(())
                                 }
                             });
                         } else {
-                            // <RuleType> is not defined,
-                            // just execute action
-
-                            let variant_name = &variant_names_for_nonterm[nonterm_idx];
                             fn_reduce_for_each_rule_stream.extend(quote! {
                                 #[doc = #rule_debug_str]
                                 #[inline]
                                 fn #reduce_fn_ident(
-                                    __data_stack: &mut Vec<Self>,
+                                    __data_stack: &mut Self,
                                     __location_stack: &mut Vec<#location_typename>,
                                     shift: &mut bool,
                                     lookahead: &#module_prefix::TerminalSymbol<#token_typename>,
                                     #user_data_parameter_name: &mut #user_data_typename,
                                     __rustylr_location0: &mut #location_typename,
-                                ) -> Result<#token_data_typename, #reduce_error_typename> {
+                                ) -> Result<(), #reduce_error_typename> {
                                     #extract_token_data_from_args
+
                                     #reduce_action
+                                    __data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name);
 
-                                    Ok( #token_data_typename::#variant_name )
+                                    Ok(())
                                 }
                             });
                         }
                     }
                     &Some(ReduceAction::Identity(identity_token_idx)) => {
                         case_streams.extend(quote! {
-                            #rule_index => Ok(Self::#reduce_fn_ident( data_stack, location_stack )),
+                            #rule_index => { Self::#reduce_fn_ident( data_stack, location_stack ); Ok(()) }
                         });
 
-                        let tokens_len = rule.tokens.len();
+                        let mut stack_count_map = std::collections::BTreeMap::new();
+                        let mut pop_stack_idx_pair = None;
+                        for (token_idx, token) in rule.tokens.iter().enumerate().rev() {
+                            let token = token.token;
+                            if token_idx == identity_token_idx {
+                                match token {
+                                    Token::Term(TerminalSymbol::Term(_)) => {
+                                        let idx_from_back = stack_count_map
+                                            .get(&terminal_stack_name)
+                                            .copied()
+                                            .unwrap_or(0);
+                                        pop_stack_idx_pair =
+                                            Some((&terminal_stack_name, idx_from_back));
+                                    }
+                                    Token::Term(TerminalSymbol::Error) => {}
+                                    Token::Term(TerminalSymbol::Eof) => {}
+                                    Token::NonTerm(nonterm_idx) => {
+                                        if let Some(stack_name) =
+                                            &stack_names_for_nonterm[nonterm_idx]
+                                        {
+                                            let idx_from_back = stack_count_map
+                                                .get(stack_name)
+                                                .copied()
+                                                .unwrap_or(0);
+                                            pop_stack_idx_pair = Some((stack_name, idx_from_back));
+                                        }
+                                    }
+                                }
+                            } else {
+                                match token {
+                                    Token::Term(TerminalSymbol::Term(_)) => {
+                                        *stack_count_map
+                                            .entry(&terminal_stack_name)
+                                            .or_insert(0usize) += 1;
+                                    }
+                                    Token::Term(TerminalSymbol::Error) => {}
+                                    Token::Term(TerminalSymbol::Eof) => {}
+                                    Token::NonTerm(nonterm_idx) => {
+                                        if let Some(stack_name) =
+                                            &stack_names_for_nonterm[nonterm_idx]
+                                        {
+                                            *stack_count_map.entry(stack_name).or_insert(0usize) +=
+                                                1;
+                                        }
+                                    }
+                                }
+                            }
+                        }
 
-                        let truncate_data_stack = if tokens_len > 1 {
-                            quote! { __data_stack.truncate(__data_stack.len() - #tokens_len + 1); }
+                        let len = rule.tokens.len();
+                        debug_assert!(len > 0);
+                        let (stack_pop_stream, stack_push_stream) = if let Some((
+                            pop_stack,
+                            pop_index_from_back,
+                        )) = pop_stack_idx_pair
+                        {
+                            if pop_index_from_back
+                                == stack_count_map.get(pop_stack).copied().unwrap_or(0)
+                            {
+                                (quote! {}, quote! {})
+                            } else {
+                                (
+                                    quote! { let __ret = __data_stack.#pop_stack.swap_remove( __data_stack.#pop_stack.len() - 1  - #pop_index_from_back ); },
+                                    quote! { __data_stack.#pop_stack.push(__ret); },
+                                )
+                            }
                         } else {
-                            quote! {}
+                            (quote! {}, quote! {})
                         };
 
+                        let (tags_truncate_stream, tag_push_stream) = if identity_token_idx == 0 {
+                            let truncate_len = len - 1;
+                            if truncate_len > 0 {
+                                (
+                                    quote! { __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #truncate_len); },
+                                    quote! {},
+                                )
+                            } else {
+                                (quote! {}, quote! {})
+                            }
+                        } else {
+                            let tag_push_stream = if let Some((pop_stack, _)) = pop_stack_idx_pair {
+                                quote! { __data_stack.#tag_stack_name.push(#tag_enum_name::#pop_stack); }
+                            } else {
+                                quote! {__data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name); }
+                            };
+
+                            let tags_truncate_stream = quote! { __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); };
+
+                            (tags_truncate_stream, tag_push_stream)
+                        };
+
+                        let mut stack_truncate_stream = TokenStream::new();
+                        for (stack_name, count) in stack_count_map {
+                            debug_assert!(count > 0);
+                            stack_truncate_stream.extend(quote! {
+                                __data_stack.#stack_name.truncate(__data_stack.#stack_name.len() - #count);
+                            });
+                        }
+                        let location_truncate_stream =
+                            quote! { __location_stack.truncate(__location_stack.len() - #len); };
+
                         fn_reduce_for_each_rule_stream.extend(quote! {
                             #[doc = #rule_debug_str]
                             #[inline]
                             fn #reduce_fn_ident(
-                                __data_stack: &mut Vec<Self>,
+                                __data_stack: &mut Self,
                                 __location_stack: &mut Vec<#location_typename>,
-                            ) -> #token_data_typename {
-                                let ret = __data_stack.swap_remove( __data_stack.len() - #tokens_len + #identity_token_idx );
-                                #truncate_data_stack
-                                __location_stack.truncate(__location_stack.len() - #tokens_len);
-                                ret
+                            ) {
+                                #stack_pop_stream // __ret = stack.swap_remove(i);
+                                #stack_truncate_stream // stack.truncate( ... );
+                                #stack_push_stream // stack.push( __ret );
+                                #location_truncate_stream // location.truncate( ... );
+                                #tags_truncate_stream // tags.truncate( ... );
+                                #tag_push_stream // tag.push( ... );
                             }
                         });
                     }
                     None => {
                         case_streams.extend(quote! {
-                            #rule_index => Ok(Self::#reduce_fn_ident( data_stack, location_stack )),
+                            #rule_index => { Self::#reduce_fn_ident( data_stack, location_stack ); Ok(()) }
                         });
 
-                        let tokens_len = rule.tokens.len();
-
-                        let (truncate_data_stack, truncate_location_stack) = if tokens_len > 0 {
-                            (
-                                quote! { __data_stack.truncate(__data_stack.len() - #tokens_len); },
-                                quote! { __location_stack.truncate(__location_stack.len() - #tokens_len); },
-                            )
+                        let mut stack_count_map = std::collections::BTreeMap::new();
+                        for token in rule.tokens.iter() {
+                            let token = token.token;
+                            match token {
+                                Token::Term(TerminalSymbol::Term(_)) => {
+                                    *stack_count_map
+                                        .entry(&terminal_stack_name)
+                                        .or_insert(0usize) += 1;
+                                }
+                                Token::Term(TerminalSymbol::Error) => {}
+                                Token::Term(TerminalSymbol::Eof) => {}
+                                Token::NonTerm(nonterm_idx) => {
+                                    if let Some(stack_name) = &stack_names_for_nonterm[nonterm_idx]
+                                    {
+                                        *stack_count_map.entry(stack_name).or_insert(0usize) += 1;
+                                    }
+                                }
+                            }
+                        }
+                        let mut stack_truncate_stream = TokenStream::new();
+                        for (stack_name, count) in stack_count_map {
+                            debug_assert!(count > 0);
+                            stack_truncate_stream.extend(quote! {
+                                __data_stack.#stack_name.truncate(__data_stack.#stack_name.len() - #count);
+                            });
+                        }
+                        let location_truncate_stream = if rule.tokens.len() > 0 {
+                            let len = rule.tokens.len();
+                            quote! { __location_stack.truncate(__location_stack.len() - #len); }
                         } else {
-                            (quote! {}, quote! {})
+                            quote! {}
+                        };
+                        let tags_truncate_stream = if rule.tokens.len() > 0 {
+                            let len = rule.tokens.len();
+                            quote! { __data_stack.#tag_stack_name.truncate(__data_stack.#tag_stack_name.len() - #len); }
+                        } else {
+                            quote! {}
                         };
-
                         fn_reduce_for_each_rule_stream.extend(quote! {
                             #[doc = #rule_debug_str]
                             #[inline]
                             fn #reduce_fn_ident(
-                                __data_stack: &mut Vec<Self>,
+                                __data_stack: &mut Self,
                                 __location_stack: &mut Vec<#location_typename>,
-                            ) -> #token_data_typename {
-                                #truncate_data_stack
-                                #truncate_location_stack
-
-                                #token_data_typename::#empty_ruletype_variant_name
+                            ) {
+                                #stack_truncate_stream
+                                #location_truncate_stream
+                                #tags_truncate_stream
+                                __data_stack.#tag_stack_name.push(#tag_enum_name::#empty_tag_name);
                             }
                         });
                     }
@@ -1426,30 +1649,81 @@ impl Grammar {
         }
 
         let start_idx = *self.nonterminals_index.get(&self.start_rule_name).unwrap();
-        let start_variant_name = &variant_names_for_nonterm[start_idx];
-        let (start_typename, extract_start) = match &self.nonterminals[start_idx].ruletype {
-            Some(typename) => (
-                typename.clone(),
-                quote! { #token_data_typename::#start_variant_name(data) => Ok(data) },
-            ),
+        let start_stack_name = &stack_names_for_nonterm[start_idx];
+        let (start_typename, pop_start) = match start_stack_name {
+            Some(stack_name) => {
+                let ruletype = self.nonterminals[start_idx]
+                    .ruletype
+                    .as_ref()
+                    .unwrap()
+                    .clone();
+                (
+                    ruletype,
+                    quote! {
+                        let tag = self.#tag_stack_name.pop();
+                        debug_assert!(tag == Some(#tag_enum_name::#stack_name));
+                        self.#stack_name.pop()
+                    },
+                )
+            }
             None => (
                 quote! {()},
-                quote! { #token_data_typename::#start_variant_name => Ok(())},
+                quote! {
+                    let tag = self.#tag_stack_name.pop();
+                    debug_assert!(tag == Some(#tag_enum_name::#empty_tag_name));
+                    Some(())
+                },
             ),
         };
 
-        // enum data type
-        let mut enum_variants_stream = TokenStream::new();
-        for (variant_name, typename) in variant_names_in_order.into_iter() {
-            if typename.is_empty() {
-                enum_variants_stream.extend(quote! {
-                    #variant_name,
-                });
-            } else {
-                enum_variants_stream.extend(quote! {
-                    #variant_name(#typename),
-                });
-            }
+        let mut tag_definition_stream = TokenStream::new();
+        for (stack_name, _) in &stack_names_in_order {
+            tag_definition_stream.extend(quote! {
+                #stack_name,
+            });
+        }
+
+        let mut stack_definition_stream = TokenStream::new();
+        let mut stack_default_stream = TokenStream::new();
+        let mut pop_match_stream = TokenStream::new();
+        let mut stack_clear_stream = TokenStream::new();
+        let mut stack_append_stream = TokenStream::new();
+        let mut split_off_count_init_stream = TokenStream::new();
+        let mut split_off_count_match_stream = TokenStream::new();
+        let mut split_off_split_stream = TokenStream::new();
+        let mut split_off_ctor_stream = TokenStream::new();
+        for (stack_name, typename) in &stack_names_in_order {
+            stack_definition_stream.extend(quote! {
+                #stack_name: Vec<#typename>,
+            });
+            stack_default_stream.extend(quote! {
+                #stack_name: Vec::new(),
+            });
+            pop_match_stream.extend(quote! {
+                #tag_enum_name::#stack_name => { self.#stack_name.pop(); }
+            });
+            stack_clear_stream.extend(quote! {
+                self.#stack_name.clear();
+            });
+            stack_append_stream.extend(quote! {
+                self.#stack_name.append(&mut other.#stack_name);
+            });
+
+            let count_var_name = format_ident!("__count_{stack_name}");
+            let other_stack_name = format_ident!("__other_{}", stack_name);
+
+            split_off_count_init_stream.extend(quote! {
+                let mut #count_var_name = 0;
+            });
+            split_off_count_match_stream.extend(quote! {
+                #tag_enum_name::#stack_name => { #count_var_name += 1; }
+            });
+            split_off_split_stream.extend(quote! {
+                let #other_stack_name = self.#stack_name.split_off( self.#stack_name.len() - #count_var_name );
+            });
+            split_off_ctor_stream.extend(quote! {
+                #stack_name: #other_stack_name,
+            });
         }
 
         let derive_clone_for_glr = if self.glr {
@@ -1459,21 +1733,39 @@ impl Grammar {
         };
 
         stream.extend(quote! {
+        /// tag for token that represents which stack a token is using
+        #[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
+        #[derive(Clone, Copy, PartialEq, Eq)]
+        pub enum #tag_enum_name {
+            #empty_tag_name,
+            #tag_definition_stream
+        }
+
         /// enum for each non-terminal and terminal symbol, that actually hold data
         #[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
         #derive_clone_for_glr
-        pub enum #token_data_typename {
-            #enum_variants_stream
+        pub struct #data_stack_typename {
+            pub #tag_stack_name: Vec<#tag_enum_name>,
+            #stack_definition_stream
+        }
+
+        impl Default for #data_stack_typename {
+            fn default() -> Self {
+                Self {
+                    #tag_stack_name: Vec::new(),
+                    #stack_default_stream
+                }
+            }
         }
 
         #[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut, dead_code)]
-        impl #token_data_typename {
+        impl #data_stack_typename {
             #fn_reduce_for_each_rule_stream
         }
 
 
         #[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types, unused_variables)]
-        impl #module_prefix::nonterminal::TokenData for #token_data_typename {
+        impl #module_prefix::parser::data_stack::DataStack for #data_stack_typename {
             type Term = #token_typename;
             type NonTerm = #nonterminals_enum_name;
             type ReduceActionError = #reduce_error_typename;
@@ -1481,15 +1773,61 @@ impl Grammar {
             type StartType = #start_typename;
             type Location = #location_typename;
 
+            fn pop_start(&mut self) -> Option<Self::StartType> {
+                #pop_start
+            }
+            fn pop(&mut self) {
+                match self.#tag_stack_name.pop().unwrap() {
+                    #pop_match_stream
+                    _ => {}
+                }
+            }
+            fn push_terminal(&mut self, term: Self::Term) {
+                self.#tag_stack_name.push(#tag_enum_name::#terminal_stack_name);
+                self.#terminal_stack_name.push( term );
+            }
+            fn push_empty(&mut self) {
+                self.#tag_stack_name.push(#tag_enum_name::#empty_tag_name);
+            }
+
+            fn clear(&mut self) {
+                self.#tag_stack_name.clear();
+                #stack_clear_stream
+            }
+            fn reserve(&mut self, additional: usize) {
+                self.#tag_stack_name.reserve(additional);
+            }
+
+            fn split_off(&mut self, at: usize) -> Self {
+                let other_tag_stack = self.#tag_stack_name.split_off(at);
+
+                #split_off_count_init_stream
+                for tag in &other_tag_stack {
+                    match tag {
+                        #split_off_count_match_stream
+                        _ => {}
+                    }
+                }
+                #split_off_split_stream
+                Self {
+                    #tag_stack_name: other_tag_stack,
+                    #split_off_ctor_stream
+                }
+            }
+            fn append(&mut self, other: &mut Self) {
+                self.#tag_stack_name.append(&mut other.#tag_stack_name);
+                #stack_append_stream
+            }
+
             fn reduce_action(
-                data_stack: &mut Vec<Self>,
+                data_stack: &mut Self,
                 location_stack: &mut Vec<#location_typename>,
                 rule_index: usize,
                 shift: &mut bool,
                 lookahead: &#module_prefix::TerminalSymbol<Self::Term>,
                 user_data: &mut Self::UserData,
                 location0: &mut Self::Location,
-            ) -> Result<Self, Self::ReduceActionError> {
+            ) -> Result<(), Self::ReduceActionError> {
                 match rule_index {
                     #case_streams
                     _ => {
@@ -1497,25 +1835,8 @@ impl Grammar {
                     }
                 }
             }
-            fn new_error() -> Self {
-                #token_data_typename::#empty_ruletype_variant_name
-            }
-            fn new_terminal(term: #token_typename) -> Self {
-                #token_data_typename::#terminal_variant_name(term)
-            }
         }
 
-        #[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types, unused_variables)]
-        impl TryFrom<#token_data_typename> for #start_typename {
-            type Error = ();
-
-            fn try_from(token: #token_data_typename) -> Result<Self, Self::Error> {
-                match token {
-                    #extract_start,
-                    _ => Err(()),
-                }
-            }
-        }
         });
     }
 
@@ -1523,7 +1844,7 @@ impl Grammar {
         let mut stream = TokenStream::new();
         self.emit_type_alises(&mut stream);
         self.emit_nonterm_enum(&mut stream);
-        self.emit_token_data(&mut stream);
+        self.emit_data_stack(&mut stream);
         self.emit_parser(&mut stream);
 
         stream
diff --git a/rusty_lr_parser/src/parser/parser_expanded.rs b/rusty_lr_parser/src/parser/parser_expanded.rs
index 081a5ef1..3c6763ff 100644
--- a/rusty_lr_parser/src/parser/parser_expanded.rs
+++ b/rusty_lr_parser/src/parser/parser_expanded.rs
@@ -195,7 +195,7 @@ Augmented -> Grammar eof
 /// type alias for `Context`
 #[allow(non_camel_case_types, dead_code)]
 pub type GrammarContext = ::rusty_lr_core::parser::deterministic::Context<
-    GrammarTokenData,
+    GrammarDataStack,
     u8,
 >;
 /// type alias for CFG production rule
@@ -215,7 +215,7 @@ pub type GrammarState = ::rusty_lr_core::parser::state::SparseState<
 /// type alias for `ParseError`
 #[allow(non_camel_case_types, dead_code)]
 pub type GrammarParseError = ::rusty_lr_core::parser::deterministic::ParseError<
-    GrammarTokenData,
+    GrammarDataStack,
 >;
 /// An enum that represents non-terminal symbols
 #[allow(non_camel_case_types, dead_code)]
@@ -427,30 +427,83 @@ impl ::rusty_lr_core::nonterminal::NonTerminal for GrammarNonTerminals {
         *self as usize
     }
 }
-/// enum for each non-terminal and terminal symbol, that actually hold data
+/// tag for token that represents which stack a token is using
 #[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
-pub enum GrammarTokenData {
-    Terminals(Lexed),
+#[derive(Clone, Copy, PartialEq, Eq)]
+pub enum GrammarTags {
     Empty,
-    Variant2(RuleDefArgs),
-    Variant3(Option<Group>),
-    Variant4(Vec<RuleLineArgs>),
-    Variant5(RuleLineArgs),
-    Variant6(PrecDPrecArgs),
-    Variant7((Option<Ident>, PatternArgs)),
-    Variant8(TerminalSetItem),
-    Variant9(TerminalSet),
-    Variant10(PatternArgs),
-    Variant11(IdentOrLiteral),
-    Variant12(TokenStream),
-    Variant13(Vec<(Option<Ident>, PatternArgs)>),
-    Variant14(Vec<PrecDPrecArgs>),
-    Variant15(Option<Lexed>),
-    Variant16(Vec<TerminalSetItem>),
-    Variant17(Vec<PatternArgs>),
-    Variant18(Vec<Vec<PatternArgs>>),
-    Variant19(Vec<Lexed>),
-    Variant20(Vec<IdentOrLiteral>),
+    __terminals,
+    __stack2,
+    __stack3,
+    __stack4,
+    __stack5,
+    __stack6,
+    __stack7,
+    __stack8,
+    __stack9,
+    __stack10,
+    __stack11,
+    __stack12,
+    __stack13,
+    __stack14,
+    __stack15,
+    __stack16,
+    __stack17,
+    __stack18,
+    __stack19,
+    __stack20,
+}
+/// enum for each non-terminal and terminal symbol, that actually hold data
+#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
+pub struct GrammarDataStack {
+    pub __tags: Vec<GrammarTags>,
+    __terminals: Vec<Lexed>,
+    __stack2: Vec<RuleDefArgs>,
+    __stack3: Vec<Option<Group>>,
+    __stack4: Vec<Vec<RuleLineArgs>>,
+    __stack5: Vec<RuleLineArgs>,
+    __stack6: Vec<PrecDPrecArgs>,
+    __stack7: Vec<(Option<Ident>, PatternArgs)>,
+    __stack8: Vec<TerminalSetItem>,
+    __stack9: Vec<TerminalSet>,
+    __stack10: Vec<PatternArgs>,
+    __stack11: Vec<IdentOrLiteral>,
+    __stack12: Vec<TokenStream>,
+    __stack13: Vec<Vec<(Option<Ident>, PatternArgs)>>,
+    __stack14: Vec<Vec<PrecDPrecArgs>>,
+    __stack15: Vec<Option<Lexed>>,
+    __stack16: Vec<Vec<TerminalSetItem>>,
+    __stack17: Vec<Vec<PatternArgs>>,
+    __stack18: Vec<Vec<Vec<PatternArgs>>>,
+    __stack19: Vec<Vec<Lexed>>,
+    __stack20: Vec<Vec<IdentOrLiteral>>,
+}
+impl Default for GrammarDataStack {
+    fn default() -> Self {
+        Self {
+            __tags: Vec::new(),
+            __terminals: Vec::new(),
+            __stack2: Vec::new(),
+            __stack3: Vec::new(),
+            __stack4: Vec::new(),
+            __stack5: Vec::new(),
+            __stack6: Vec::new(),
+            __stack7: Vec::new(),
+            __stack8: Vec::new(),
+            __stack9: Vec::new(),
+            __stack10: Vec::new(),
+            __stack11: Vec::new(),
+            __stack12: Vec::new(),
+            __stack13: Vec::new(),
+            __stack14: Vec::new(),
+            __stack15: Vec::new(),
+            __stack16: Vec::new(),
+            __stack17: Vec::new(),
+            __stack18: Vec::new(),
+            __stack19: Vec::new(),
+            __stack20: Vec::new(),
+        }
+    }
 }
 #[allow(
     unused_braces,
@@ -460,1371 +513,1825 @@ pub enum GrammarTokenData {
     unused_mut,
     dead_code
 )]
-impl GrammarTokenData {
+impl GrammarDataStack {
     ///Rule -> ident RuleType colon RuleLines semicolon
     #[inline]
     fn reduce_Rule_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack4)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__stack3)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 5usize);
+        let mut RuleType = __data_stack.__stack3.pop().unwrap();
+        let mut RuleLines = __data_stack.__stack4.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut colon = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant4(mut RuleLines) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RuleLines = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut colon) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_colon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant3(mut RuleType) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RuleType = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant2({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Rule-Ident");
-                };
-                let span = __rustylr_location_colon.span();
-                if let Some(fisrt) = RuleLines.first_mut() {
-                    fisrt.separator_span = span;
-                }
-                RuleDefArgs {
-                    name: ident,
-                    typename: RuleType.map(|t| t.stream()),
-                    rule_lines: RuleLines,
-                }
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Rule-Ident");
+            };
+            let span = __rustylr_location_colon.span();
+            if let Some(fisrt) = RuleLines.first_mut() {
+                fisrt.separator_span = span;
+            }
+            RuleDefArgs {
+                name: ident,
+                typename: RuleType.map(|t| t.stream()),
+                rule_lines: RuleLines,
+            }
+        };
+        __data_stack.__stack2.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack2);
+        Ok(())
     }
     ///RuleType -> parengroup
     #[inline]
     fn reduce_RuleType_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut parengroup) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut parengroup = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_parengroup = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant3({
-                let Lexed::ParenGroup(group) = parengroup else {
-                    unreachable!("RuleType - Group");
-                };
-                Some(group)
-            }),
-        )
+        let __res = {
+            let Lexed::ParenGroup(group) = parengroup else {
+                unreachable!("RuleType - Group");
+            };
+            Some(group)
+        };
+        __data_stack.__stack3.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack3);
+        Ok(())
     }
     ///RuleType ->
     #[inline]
     fn reduce_RuleType_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant3({ None }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { None };
+        __data_stack.__stack3.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack3);
+        Ok(())
     }
     ///RuleLines -> RuleLines pipe RuleLine
     #[inline]
     fn reduce_RuleLines_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant5(mut RuleLine) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack5)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack4)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut RuleLines = __data_stack.__stack4.pop().unwrap();
+        let mut RuleLine = __data_stack.__stack5.pop().unwrap();
+        let mut pipe = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_RuleLine = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut pipe) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_pipe = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant4(mut RuleLines) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RuleLines = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant4({
-                RuleLine.separator_span = __rustylr_location_pipe.span();
-                RuleLines.push(RuleLine);
-                RuleLines
-            }),
-        )
+        let __res = {
+            RuleLine.separator_span = __rustylr_location_pipe.span();
+            RuleLines.push(RuleLine);
+            RuleLines
+        };
+        __data_stack.__stack4.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack4);
+        Ok(())
     }
     ///RuleLines -> RuleLine
     #[inline]
     fn reduce_RuleLines_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant5(mut RuleLine) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack5)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut RuleLine = __data_stack.__stack5.pop().unwrap();
         let __rustylr_location_RuleLine = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant4({ vec![RuleLine] }))
+        let __res = { vec![RuleLine] };
+        __data_stack.__stack4.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack4);
+        Ok(())
     }
     ///RuleLine -> TokenMapped* PrecDef* Action
     #[inline]
     fn reduce_RuleLine_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant3(mut Action) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack3)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack14)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack13)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut TokenMapped = __data_stack.__stack13.pop().unwrap();
+        let mut PrecDef = __data_stack.__stack14.pop().unwrap();
+        let mut Action = __data_stack.__stack3.pop().unwrap();
         let __rustylr_location_Action = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant14(mut PrecDef) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_PrecDef = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant13(mut TokenMapped) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_TokenMapped = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant5({
-                RuleLineArgs {
-                    tokens: TokenMapped,
-                    reduce_action: Action.map(|action| action.to_token_stream()),
-                    separator_span: Span::call_site(),
-                    precs: PrecDef,
-                    prec: None,
-                    dprec: None,
-                }
-            }),
-        )
+        let __res = {
+            RuleLineArgs {
+                tokens: TokenMapped,
+                reduce_action: Action.map(|action| action.to_token_stream()),
+                separator_span: Span::call_site(),
+                precs: PrecDef,
+                prec: None,
+                dprec: None,
+            }
+        };
+        __data_stack.__stack5.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack5);
+        Ok(())
     }
     ///PrecDef -> percent prec IdentOrLiteral
     #[inline]
     fn reduce_PrecDef_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant11(mut IdentOrLiteral) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack11)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut IdentOrLiteral = __data_stack.__stack11.pop().unwrap();
+        let mut prec = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_IdentOrLiteral = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut prec) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_prec = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant6({ PrecDPrecArgs::Prec(IdentOrLiteral) }))
+        let __res = { PrecDPrecArgs::Prec(IdentOrLiteral) };
+        __data_stack.__stack6.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack6);
+        Ok(())
     }
     ///PrecDef -> percent prec error
     #[inline]
     fn reduce_PrecDef_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        __data_stack.pop();
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut prec = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut prec) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_prec = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant6({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "Expected <ident> to token or <literal>".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#operator-precedence"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                PrecDPrecArgs::None
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected <ident> to token or <literal>".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#operator-precedence"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PrecDPrecArgs::None
+        };
+        __data_stack.__stack6.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack6);
+        Ok(())
     }
     ///PrecDef -> percent dprec literal
     #[inline]
     fn reduce_PrecDef_2(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut literal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut literal = __data_stack.__terminals.pop().unwrap();
+        let mut dprec = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_literal = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dprec) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dprec = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant6({
-                let Lexed::Literal(literal) = literal else {
-                    unreachable!("PrecDPrecArgs-DPrec");
-                };
-                PrecDPrecArgs::DPrec(literal)
-            }),
-        )
+        let __res = {
+            let Lexed::Literal(literal) = literal else {
+                unreachable!("PrecDPrecArgs-DPrec");
+            };
+            PrecDPrecArgs::DPrec(literal)
+        };
+        __data_stack.__stack6.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack6);
+        Ok(())
     }
     ///PrecDef -> percent dprec error
     #[inline]
     fn reduce_PrecDef_3(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        __data_stack.pop();
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut dprec = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dprec) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dprec = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant6({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "Expected integer literal".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#rule-priority"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                PrecDPrecArgs::None
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected integer literal".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#rule-priority"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PrecDPrecArgs::None
+        };
+        __data_stack.__stack6.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack6);
+        Ok(())
     }
     ///PrecDef -> percent error
     #[inline]
     fn reduce_PrecDef_4(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        __data_stack.pop();
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant6({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "Expected %prec or %dprec".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#operator-precedence"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                PrecDPrecArgs::None
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected %prec or %dprec".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#operator-precedence"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PrecDPrecArgs::None
+        };
+        __data_stack.__stack6.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack6);
+        Ok(())
     }
     ///TokenMapped -> Pattern
     #[inline]
     fn reduce_TokenMapped_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant7({ (None, Pattern) }))
+        let __res = { (None, Pattern) };
+        __data_stack.__stack7.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack7);
+        Ok(())
     }
     ///TokenMapped -> ident equal Pattern
     #[inline]
     fn reduce_TokenMapped_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
+        let mut equal = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut equal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_equal = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant7({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Token-Ident");
-                };
-                (Some(ident), Pattern)
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Token-Ident");
+            };
+            (Some(ident), Pattern)
+        };
+        __data_stack.__stack7.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack7);
+        Ok(())
     }
     ///TerminalSetItem -> ident
     #[inline]
     fn reduce_TerminalSetItem_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("TerminalSetItem-Range1");
-                };
-                TerminalSetItem::Terminal(ident)
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("TerminalSetItem-Range1");
+            };
+            TerminalSetItem::Terminal(ident)
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSetItem -> ident minus ident
     #[inline]
     fn reduce_TerminalSetItem_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut last) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut last = __data_stack.__terminals.pop().unwrap();
+        let mut minus = __data_stack.__terminals.pop().unwrap();
+        let mut first = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_last = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut minus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_minus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut first) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_first = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                let Lexed::Ident(first) = first else {
-                    unreachable!("TerminalSetItem-Range1");
-                };
-                let Lexed::Ident(last) = last else {
-                    unreachable!("TerminalSetItem-Range3");
-                };
-                TerminalSetItem::Range(first, last)
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(first) = first else {
+                unreachable!("TerminalSetItem-Range1");
+            };
+            let Lexed::Ident(last) = last else {
+                unreachable!("TerminalSetItem-Range3");
+            };
+            TerminalSetItem::Range(first, last)
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSetItem -> ident minus error
     #[inline]
     fn reduce_TerminalSetItem_2(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        __data_stack.pop();
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut minus = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut minus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_minus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "Expected ident for terminal set".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                TerminalSetItem::Terminal(format_ident!("dummy"))
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected ident for terminal set".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            TerminalSetItem::Terminal(format_ident!("dummy"))
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSetItem -> literal
     #[inline]
     fn reduce_TerminalSetItem_3(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut literal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut literal = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_literal = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                let Lexed::Literal(literal) = literal else {
-                    unreachable!("TerminalSetItem-Literal");
-                };
-                TerminalSetItem::Literal(literal)
-            }),
-        )
+        let __res = {
+            let Lexed::Literal(literal) = literal else {
+                unreachable!("TerminalSetItem-Literal");
+            };
+            TerminalSetItem::Literal(literal)
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSetItem -> literal minus literal
     #[inline]
     fn reduce_TerminalSetItem_4(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut last) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut last = __data_stack.__terminals.pop().unwrap();
+        let mut minus = __data_stack.__terminals.pop().unwrap();
+        let mut first = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_last = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut minus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_minus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut first) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_first = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                let Lexed::Literal(first) = first else {
-                    unreachable!("TerminalSetItem-Range1");
-                };
-                let Lexed::Literal(last) = last else {
-                    unreachable!("TerminalSetItem-Range3");
-                };
-                TerminalSetItem::LiteralRange(first, last)
-            }),
-        )
+        let __res = {
+            let Lexed::Literal(first) = first else {
+                unreachable!("TerminalSetItem-Range1");
+            };
+            let Lexed::Literal(last) = last else {
+                unreachable!("TerminalSetItem-Range3");
+            };
+            TerminalSetItem::LiteralRange(first, last)
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSetItem -> literal minus error
     #[inline]
     fn reduce_TerminalSetItem_5(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        __data_stack.pop();
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut minus = __data_stack.__terminals.pop().unwrap();
+        let mut literal = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut minus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_minus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut literal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_literal = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant8({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "Expected literal for terminal set".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                TerminalSetItem::Terminal(format_ident!("dummy"))
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected literal for terminal set".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            TerminalSetItem::Terminal(format_ident!("dummy"))
+        };
+        __data_stack.__stack8.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack8);
+        Ok(())
     }
     ///TerminalSet -> lbracket caret? TerminalSetItem* rbracket
     #[inline]
     fn reduce_TerminalSet_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rbracket) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack16)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack15)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut caret = __data_stack.__stack15.pop().unwrap();
+        let mut TerminalSetItem = __data_stack.__stack16.pop().unwrap();
+        let mut rbracket = __data_stack.__terminals.pop().unwrap();
+        let mut lbracket = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rbracket = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant16(mut TerminalSetItem) = __data_stack
-            .pop()
-            .unwrap() else { unreachable!() };
         let __rustylr_location_TerminalSetItem = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant15(mut caret) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_caret = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lbracket) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lbracket = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant9({
-                TerminalSet {
-                    negate: caret.is_some(),
-                    items: TerminalSetItem,
-                    open_span: __rustylr_location_lbracket.span(),
-                    close_span: __rustylr_location_rbracket.span(),
-                }
-            }),
-        )
+        let __res = {
+            TerminalSet {
+                negate: caret.is_some(),
+                items: TerminalSetItem,
+                open_span: __rustylr_location_lbracket.span(),
+                close_span: __rustylr_location_rbracket.span(),
+            }
+        };
+        __data_stack.__stack9.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack9);
+        Ok(())
     }
     ///TerminalSet -> dot
     #[inline]
     fn reduce_TerminalSet_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut dot) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut dot = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_dot = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant9({
-                let span = __rustylr_location_dot.span();
-                TerminalSet {
-                    negate: true,
-                    items: vec![],
-                    open_span: span,
-                    close_span: span,
-                }
-            }),
-        )
+        let __res = {
+            let span = __rustylr_location_dot.span();
+            TerminalSet {
+                negate: true,
+                items: vec![],
+                open_span: span,
+                close_span: span,
+            }
+        };
+        __data_stack.__stack9.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack9);
+        Ok(())
     }
     ///Pattern -> ident
     #[inline]
     fn reduce_Pattern_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Ident");
-                };
-                PatternArgs::Ident(ident)
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Ident");
+            };
+            PatternArgs::Ident(ident)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern plus
     #[inline]
     fn reduce_Pattern_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut plus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
+        let mut plus = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_plus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Plus(plus) = plus else {
-                    unreachable!("Pattern-Plus");
-                };
-                PatternArgs::Plus(Box::new(Pattern), __rustylr_location_plus.span())
-            }),
-        )
+        let __res = {
+            let Lexed::Plus(plus) = plus else {
+                unreachable!("Pattern-Plus");
+            };
+            PatternArgs::Plus(Box::new(Pattern), __rustylr_location_plus.span())
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern star
     #[inline]
     fn reduce_Pattern_2(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut star) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
+        let mut star = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_star = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Star(Box::new(Pattern), __rustylr_location_star.span())
-            }),
-        )
+        let __res = {
+            PatternArgs::Star(Box::new(Pattern), __rustylr_location_star.span())
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern question
     #[inline]
     fn reduce_Pattern_3(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut question) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
+        let mut question = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_question = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Question(
-                    Box::new(Pattern),
-                    __rustylr_location_question.span(),
-                )
-            }),
-        )
+        let __res = {
+            PatternArgs::Question(Box::new(Pattern), __rustylr_location_question.span())
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern exclamation
     #[inline]
     fn reduce_Pattern_4(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut exclamation) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Pattern = __data_stack.__stack10.pop().unwrap();
+        let mut exclamation = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_exclamation = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Exclamation(
-                    Box::new(Pattern),
-                    __rustylr_location_exclamation.span(),
-                )
-            }),
-        )
+        let __res = {
+            PatternArgs::Exclamation(
+                Box::new(Pattern),
+                __rustylr_location_exclamation.span(),
+            )
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> TerminalSet
     #[inline]
     fn reduce_Pattern_5(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant9(mut TerminalSet) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack9)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut TerminalSet = __data_stack.__stack9.pop().unwrap();
         let __rustylr_location_TerminalSet = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant10({ PatternArgs::TerminalSet(TerminalSet) }))
+        let __res = { PatternArgs::TerminalSet(TerminalSet) };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern slash Pattern
     #[inline]
     fn reduce_Pattern_6(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut lh) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut lh = __data_stack.__stack10.pop().unwrap();
+        let mut p1 = __data_stack.__stack10.pop().unwrap();
+        let mut slash = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_lh = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut slash) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_slash = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut p1) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_p1 = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Lookaheads(Box::new(p1), Box::new(lh))
-            }),
-        )
+        let __res = { PatternArgs::Lookaheads(Box::new(p1), Box::new(lh)) };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> lparen $sep(Pattern*, pipe, +) rparen
     #[inline]
     fn reduce_Pattern_7(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack18)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut Pattern = __data_stack.__stack18.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant18(mut Pattern) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Pattern = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Group(
-                    Pattern,
-                    __rustylr_location_lparen.span(),
-                    __rustylr_location_rparen.span(),
-                )
-            }),
-        )
+        let __res = {
+            PatternArgs::Group(
+                Pattern,
+                __rustylr_location_lparen.span(),
+                __rustylr_location_rparen.span(),
+            )
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> lparen error rparen
     #[inline]
     fn reduce_Pattern_8(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                data.error_recovered
-                    .push(RecoveredError {
-                        message: "syntax error when parsing GROUP".to_string(),
-                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                            .to_string(),
-                        span: __rustylr_location_error,
-                    });
-                PatternArgs::Ident(format_ident!("dummy"))
-            }),
-        )
+        let __res = {
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "syntax error when parsing GROUP".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PatternArgs::Ident(format_ident!("dummy"))
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> literal
     #[inline]
     fn reduce_Pattern_9(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut literal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut literal = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_literal = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Literal(literal) = literal else {
-                    unreachable!("Pattern-Literal");
-                };
-                PatternArgs::Literal(literal)
-            }),
-        )
+        let __res = {
+            let Lexed::Literal(literal) = literal else {
+                unreachable!("Pattern-Literal");
+            };
+            PatternArgs::Literal(literal)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> Pattern minus Pattern
     #[inline]
     fn reduce_Pattern_10(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut p2) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut p2 = __data_stack.__stack10.pop().unwrap();
+        let mut p1 = __data_stack.__stack10.pop().unwrap();
+        let mut minus = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_p2 = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut minus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_minus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut p1) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_p1 = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                PatternArgs::Minus(Box::new(p1), Box::new(p2))
-            }),
-        )
+        let __res = { PatternArgs::Minus(Box::new(p1), Box::new(p2)) };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> dollar ident lparen Pattern comma Pattern comma? rparen
     #[inline]
     fn reduce_Pattern_11(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack15)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 5usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 6usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 7usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 8usize);
+        let mut del = __data_stack.__stack10.pop().unwrap();
+        let mut base = __data_stack.__stack10.pop().unwrap();
+        let mut comma = __data_stack.__stack15.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut dollar = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant15(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut del) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_del = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut base) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_base = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dollar) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dollar = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Sep-Ident");
-                };
-                if ident != "sep" {
-                    data.error_recovered
-                        .push(RecoveredError {
-                            message: "Expected $sep".to_string(),
-                            link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                                .to_string(),
-                            span: __rustylr_location_ident,
-                        });
-                }
-                PatternArgs::Sep(
-                    Box::new(base),
-                    Box::new(del),
-                    false,
-                    *__rustylr_location0,
-                )
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Sep-Ident");
+            };
+            if ident != "sep" {
+                data.error_recovered
+                    .push(RecoveredError {
+                        message: "Expected $sep".to_string(),
+                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                            .to_string(),
+                        span: __rustylr_location_ident,
+                    });
+            }
+            PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> dollar ident lparen Pattern comma Pattern comma plus rparen
     #[inline]
     fn reduce_Pattern_12(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 5usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 6usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 7usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 8usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize);
+        let mut del = __data_stack.__stack10.pop().unwrap();
+        let mut base = __data_stack.__stack10.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut plus = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut dollar = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut plus) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_plus = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut del) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_del = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut base) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_base = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dollar) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dollar = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Sep-Ident");
-                };
-                if ident != "sep" {
-                    data.error_recovered
-                        .push(RecoveredError {
-                            message: "Expected $sep".to_string(),
-                            link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                                .to_string(),
-                            span: __rustylr_location_ident,
-                        });
-                }
-                PatternArgs::Sep(
-                    Box::new(base),
-                    Box::new(del),
-                    true,
-                    *__rustylr_location0,
-                )
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Sep-Ident");
+            };
+            if ident != "sep" {
+                data.error_recovered
+                    .push(RecoveredError {
+                        message: "Expected $sep".to_string(),
+                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                            .to_string(),
+                        span: __rustylr_location_ident,
+                    });
+            }
+            PatternArgs::Sep(Box::new(base), Box::new(del), true, *__rustylr_location0)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> dollar ident lparen Pattern comma Pattern comma star rparen
     #[inline]
     fn reduce_Pattern_13(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 5usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 6usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 7usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 8usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize);
+        let mut del = __data_stack.__stack10.pop().unwrap();
+        let mut base = __data_stack.__stack10.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut star = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut dollar = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut star) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_star = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut del) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_del = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut base) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_base = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dollar) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dollar = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Sep-Ident");
-                };
-                if ident != "sep" {
-                    data.error_recovered
-                        .push(RecoveredError {
-                            message: "Expected $sep".to_string(),
-                            link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                                .to_string(),
-                            span: __rustylr_location_ident,
-                        });
-                }
-                PatternArgs::Sep(
-                    Box::new(base),
-                    Box::new(del),
-                    false,
-                    *__rustylr_location0,
-                )
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Sep-Ident");
+            };
+            if ident != "sep" {
+                data.error_recovered
+                    .push(RecoveredError {
+                        message: "Expected $sep".to_string(),
+                        link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                            .to_string(),
+                        span: __rustylr_location_ident,
+                    });
+            }
+            PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> dollar ident lparen Pattern comma Pattern error rparen
     #[inline]
     fn reduce_Pattern_14(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 5usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 6usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 7usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 8usize);
+        let mut del = __data_stack.__stack10.pop().unwrap();
+        let mut base = __data_stack.__stack10.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut dollar = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut del) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_del = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut base) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_base = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dollar) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dollar = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Sep-Ident");
-                };
-                if ident != "sep" {
-                    data.error_recovered
-                        .push(RecoveredError {
-                            message: "Expected $sep".to_string(),
-                            link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                                .to_string(),
-                            span: __rustylr_location_ident,
-                        });
-                }
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Sep-Ident");
+            };
+            if ident != "sep" {
                 data.error_recovered
                     .push(RecoveredError {
-                        message: "Unexpected $sep arguments".to_string(),
+                        message: "Expected $sep".to_string(),
                         link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
                             .to_string(),
-                        span: __rustylr_location_error,
+                        span: __rustylr_location_ident,
                     });
-                PatternArgs::Sep(
-                    Box::new(base),
-                    Box::new(del),
-                    false,
-                    *__rustylr_location0,
-                )
-            }),
-        )
+            }
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Unexpected $sep arguments".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Pattern -> dollar ident lparen Pattern comma Pattern comma error rparen
     #[inline]
     fn reduce_Pattern_15(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut rparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 5usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 6usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 7usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 8usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 9usize);
+        let mut del = __data_stack.__stack10.pop().unwrap();
+        let mut base = __data_stack.__stack10.pop().unwrap();
+        let mut rparen = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut comma = __data_stack.__terminals.pop().unwrap();
+        let mut lparen = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut dollar = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_rparen = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut del) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_del = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut comma) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_comma = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant10(mut base) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_base = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lparen) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lparen = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dollar) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dollar = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant10({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("Pattern-Sep-Ident");
-                };
-                if ident != "sep" {
-                    data.error_recovered
-                        .push(RecoveredError {
-                            message: "Expected $sep".to_string(),
-                            link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
-                                .to_string(),
-                            span: __rustylr_location_ident,
-                        });
-                }
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("Pattern-Sep-Ident");
+            };
+            if ident != "sep" {
                 data.error_recovered
                     .push(RecoveredError {
-                        message: "Expected '+' or '*' repetition".to_string(),
+                        message: "Expected $sep".to_string(),
                         link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
                             .to_string(),
-                        span: __rustylr_location_error,
+                        span: __rustylr_location_ident,
                     });
-                PatternArgs::Sep(
-                    Box::new(base),
-                    Box::new(del),
-                    false,
-                    *__rustylr_location0,
-                )
-            }),
-        )
+            }
+            data.error_recovered
+                .push(RecoveredError {
+                    message: "Expected '+' or '*' repetition".to_string(),
+                    link: "https://github.com/ehwan/RustyLR/blob/main/SYNTAX.md#patterns"
+                        .to_string(),
+                    span: __rustylr_location_error,
+                });
+            PatternArgs::Sep(Box::new(base), Box::new(del), false, *__rustylr_location0)
+        };
+        __data_stack.__stack10.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack10);
+        Ok(())
     }
     ///Action -> bracegroup
     #[inline]
     fn reduce_Action_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut bracegroup) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut bracegroup = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_bracegroup = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant3({
-                let Lexed::BraceGroup(group) = bracegroup else {
-                    unreachable!("Action0");
-                };
-                Some(group)
-            }),
-        )
+        let __res = {
+            let Lexed::BraceGroup(group) = bracegroup else {
+                unreachable!("Action0");
+            };
+            Some(group)
+        };
+        __data_stack.__stack3.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack3);
+        Ok(())
     }
     ///Action ->
     #[inline]
     fn reduce_Action_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant3({ None }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { None };
+        __data_stack.__stack3.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack3);
+        Ok(())
     }
     ///IdentOrLiteral -> ident
     #[inline]
     fn reduce_IdentOrLiteral_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut ident = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant11({
-                let Lexed::Ident(ident) = ident else {
-                    unreachable!("IdentOrLiteral-Ident");
-                };
-                IdentOrLiteral::Ident(ident)
-            }),
-        )
+        let __res = {
+            let Lexed::Ident(ident) = ident else {
+                unreachable!("IdentOrLiteral-Ident");
+            };
+            IdentOrLiteral::Ident(ident)
+        };
+        __data_stack.__stack11.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack11);
+        Ok(())
     }
     ///IdentOrLiteral -> literal
     #[inline]
     fn reduce_IdentOrLiteral_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut literal) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut literal = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_literal = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant11({
-                let Lexed::Literal(literal) = literal else {
-                    unreachable!("IdentOrLiteral-Literal");
-                };
-                IdentOrLiteral::Literal(literal)
-            }),
-        )
+        let __res = {
+            let Lexed::Literal(literal) = literal else {
+                unreachable!("IdentOrLiteral-Literal");
+            };
+            IdentOrLiteral::Literal(literal)
+        };
+        __data_stack.__stack11.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack11);
+        Ok(())
     }
     ///RustCode -> [^semicolon]+
     #[inline]
     fn reduce_RustCode_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant19(mut t) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack19)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut t = __data_stack.__stack19.pop().unwrap();
         let __rustylr_location_t = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant12({
-                let mut tokens = TokenStream::new();
-                for token in t.into_iter() {
-                    token.append_to_stream(&mut tokens);
-                }
-                tokens
-            }),
-        )
+        let __res = {
+            let mut tokens = TokenStream::new();
+            for token in t.into_iter() {
+                token.append_to_stream(&mut tokens);
+            }
+            tokens
+        };
+        __data_stack.__stack12.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack12);
+        Ok(())
     }
     ///Directive -> percent token ident RustCode semicolon
     #[inline]
     fn reduce_Directive_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 4usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 5usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut token = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut token) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_token = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             let Lexed::Ident(ident) = ident else {
@@ -1832,32 +2339,46 @@ impl GrammarTokenData {
             };
             data.terminals.push((ident, RustCode));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent token ident semicolon
     #[inline]
     fn reduce_Directive_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut token = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut token) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_token = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -1868,30 +2389,45 @@ impl GrammarTokenData {
                     span: __rustylr_location_ident,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent token error semicolon
     #[inline]
     fn reduce_Directive_2(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut token = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut token) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_token = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -1902,32 +2438,46 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent start ident semicolon
     #[inline]
     fn reduce_Directive_3(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut ident = __data_stack.__terminals.pop().unwrap();
+        let mut start = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut start) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_start = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             let Lexed::Ident(ident) = ident else {
@@ -1935,30 +2485,45 @@ impl GrammarTokenData {
             };
             data.start_rule_name.push(ident);
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent start error semicolon
     #[inline]
     fn reduce_Directive_4(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut start = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut start) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_start = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -1969,30 +2534,45 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent eofdef error semicolon
     #[inline]
     fn reduce_Directive_5(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut eofdef = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut eofdef) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_eofdef = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2004,56 +2584,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_eofdef,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent tokentype RustCode semicolon
     #[inline]
     fn reduce_Directive_6(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut tokentype = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut tokentype) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_tokentype = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.token_typename.push((__rustylr_location_tokentype.span(), RustCode));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent tokentype semicolon
     #[inline]
     fn reduce_Directive_7(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut tokentype = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut tokentype) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_tokentype = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2064,58 +2672,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_tokentype,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent userdata RustCode semicolon
     #[inline]
     fn reduce_Directive_8(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut userdata = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut userdata) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_userdata = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.userdata_typename.push((__rustylr_location_userdata.span(), RustCode));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent userdata semicolon
     #[inline]
     fn reduce_Directive_9(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut userdata = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut userdata) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_userdata = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2126,31 +2760,46 @@ impl GrammarTokenData {
                     span: __rustylr_location_userdata,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent left IdentOrLiteral+ semicolon
     #[inline]
     fn reduce_Directive_10(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack20)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut IdentOrLiteral = __data_stack.__stack20.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut left = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant20(mut IdentOrLiteral) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_IdentOrLiteral = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut left) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_left = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.precedences
@@ -2160,30 +2809,45 @@ impl GrammarTokenData {
                     IdentOrLiteral,
                 ));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent left error semicolon
     #[inline]
     fn reduce_Directive_11(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut left = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut left) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_left = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2194,31 +2858,46 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent right IdentOrLiteral+ semicolon
     #[inline]
     fn reduce_Directive_12(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack20)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut IdentOrLiteral = __data_stack.__stack20.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut right = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant20(mut IdentOrLiteral) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_IdentOrLiteral = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut right) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_right = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.precedences
@@ -2228,30 +2907,45 @@ impl GrammarTokenData {
                     IdentOrLiteral,
                 ));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent right error semicolon
     #[inline]
     fn reduce_Directive_13(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut right = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut right) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_right = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2262,58 +2956,90 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent precedence IdentOrLiteral+ semicolon
     #[inline]
     fn reduce_Directive_14(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack20)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut IdentOrLiteral = __data_stack.__stack20.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut precedence = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant20(mut IdentOrLiteral) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_IdentOrLiteral = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut precedence) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_precedence = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.precedences
                 .push((__rustylr_location_precedence.span(), None, IdentOrLiteral));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent precedence error semicolon
     #[inline]
     fn reduce_Directive_15(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut precedence = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut precedence) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_precedence = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2324,56 +3050,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent errortype RustCode semicolon
     #[inline]
     fn reduce_Directive_16(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut errortype = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut errortype) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_errortype = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_typename.push((__rustylr_location_errortype.span(), RustCode));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent errortype semicolon
     #[inline]
     fn reduce_Directive_17(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut errortype = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut errortype) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_errortype = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2384,56 +3138,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_errortype,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent moduleprefix RustCode semicolon
     #[inline]
     fn reduce_Directive_18(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut moduleprefix = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut moduleprefix) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_moduleprefix = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.module_prefix.push((__rustylr_location_moduleprefix.span(), RustCode));
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent moduleprefix semicolon
     #[inline]
     fn reduce_Directive_19(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut moduleprefix = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut moduleprefix) = __data_stack.pop().unwrap()
-        else { unreachable!() };
         let __rustylr_location_moduleprefix = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2444,56 +3226,83 @@ impl GrammarTokenData {
                     span: __rustylr_location_moduleprefix,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent glr semicolon
     #[inline]
     fn reduce_Directive_20(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut glr = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut glr) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_glr = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.glr = true;
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent glr error semicolon
     #[inline]
     fn reduce_Directive_21(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut glr = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut glr) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_glr = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2504,56 +3313,83 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent lalr semicolon
     #[inline]
     fn reduce_Directive_22(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut lalr = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lalr) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lalr = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.lalr = true;
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent lalr error semicolon
     #[inline]
     fn reduce_Directive_23(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut lalr = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut lalr) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_lalr = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2564,56 +3400,83 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent nooptim semicolon
     #[inline]
     fn reduce_Directive_24(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut nooptim = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut nooptim) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_nooptim = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.no_optim = true;
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent nooptim error semicolon
     #[inline]
     fn reduce_Directive_25(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut nooptim = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut nooptim) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_nooptim = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2624,56 +3487,83 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent dense semicolon
     #[inline]
     fn reduce_Directive_26(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut dense = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dense) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dense = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.dense = true;
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent dense error semicolon
     #[inline]
     fn reduce_Directive_27(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut dense = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut dense) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_dense = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2684,32 +3574,46 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent trace ident* semicolon
     #[inline]
     fn reduce_Directive_28(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack19)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut ident = __data_stack.__stack19.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut trace = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant19(mut ident) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_ident = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut trace) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_trace = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             let idents = ident
@@ -2722,30 +3626,45 @@ impl GrammarTokenData {
                 });
             data.traces.extend(idents);
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent trace error semicolon
     #[inline]
     fn reduce_Directive_29(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut trace = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut trace) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_trace = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2756,58 +3675,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent filter RustCode semicolon
     #[inline]
     fn reduce_Directive_30(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut filter = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut filter) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_filter = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.filter = Some(RustCode);
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent filter semicolon
     #[inline]
     fn reduce_Directive_31(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut filter = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut filter) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_filter = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2818,56 +3763,83 @@ impl GrammarTokenData {
                     span: __rustylr_location_filter,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent runtime semicolon
     #[inline]
     fn reduce_Directive_32(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut runtime = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut runtime) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_runtime = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.compiled = false;
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent runtime error semicolon
     #[inline]
     fn reduce_Directive_33(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut runtime = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut runtime) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_runtime = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2878,58 +3850,84 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent location RustCode semicolon
     #[inline]
     fn reduce_Directive_34(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack12)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 3usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 4usize);
+        let mut RustCode = __data_stack.__stack12.pop().unwrap();
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut location = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant12(mut RustCode) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_RustCode = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut location) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_location = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.location_typename = Some(RustCode);
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent location semicolon
     #[inline]
     fn reduce_Directive_35(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut location = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut location) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_location = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2940,26 +3938,39 @@ impl GrammarTokenData {
                     span: __rustylr_location_location,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///Directive -> percent error semicolon
     #[inline]
     fn reduce_Directive_36(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut semicolon) = __data_stack.pop().unwrap()
-        else { unreachable!() };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::Empty)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut semicolon = __data_stack.__terminals.pop().unwrap();
+        let mut percent = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_semicolon = __location_stack.pop().unwrap();
-        __data_stack.pop();
         let __rustylr_location_error = __location_stack.pop().unwrap();
-        let GrammarTokenData::Terminals(mut percent) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_percent = __location_stack.pop().unwrap();
         {
             data.error_recovered
@@ -2970,1002 +3981,1105 @@ impl GrammarTokenData {
                     span: __rustylr_location_error,
                 });
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///GrammarLine -> Rule
     #[inline]
     fn reduce_GrammarLine_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant2(mut Rule) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack2)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut Rule = __data_stack.__stack2.pop().unwrap();
         let __rustylr_location_Rule = __location_stack.pop().unwrap();
         {
             data.rules.push(Rule);
         }
-        Ok(GrammarTokenData::Empty)
+        __data_stack.__tags.push(GrammarTags::Empty);
+        Ok(())
     }
     ///GrammarLine -> Directive
     #[inline]
     fn reduce_GrammarLine_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        __data_stack.truncate(__data_stack.len() - 1usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        GrammarTokenData::Empty
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        __data_stack.__tags.push(GrammarTags::Empty);
     }
     ///Grammar -> GrammarLine+
     #[inline]
-    fn reduce_Grammar_0(
-        __data_stack: &mut Vec<Self>,
-        __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        __data_stack.truncate(__data_stack.len() - 1usize);
+    fn reduce_Grammar_0(__data_stack: &mut Self, __location_stack: &mut Vec<SpanPair>) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        GrammarTokenData::Empty
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        __data_stack.__tags.push(GrammarTags::Empty);
     }
     ///TokenMapped+ -> TokenMapped
     #[inline]
     fn reduce__TokenMappedPlus15_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant7(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack7)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__stack7.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant13({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack13.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack13);
+        Ok(())
     }
     ///TokenMapped+ -> TokenMapped+ TokenMapped
     #[inline]
     fn reduce__TokenMappedPlus15_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant7(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack7)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack13)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Ap = __data_stack.__stack13.pop().unwrap();
+        let mut A = __data_stack.__stack7.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant13(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant13({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack13.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack13);
+        Ok(())
     }
     ///TokenMapped* -> TokenMapped+
     #[inline]
     fn reduce__TokenMappedStar16_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///TokenMapped* ->
     #[inline]
     fn reduce__TokenMappedStar16_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant13({ vec![] }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { vec![] };
+        __data_stack.__stack13.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack13);
+        Ok(())
     }
     ///PrecDef+ -> PrecDef
     #[inline]
     fn reduce__PrecDefPlus17_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant6(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack6)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__stack6.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant14({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack14.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack14);
+        Ok(())
     }
     ///PrecDef+ -> PrecDef+ PrecDef
     #[inline]
     fn reduce__PrecDefPlus17_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant6(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack6)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack14)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Ap = __data_stack.__stack14.pop().unwrap();
+        let mut A = __data_stack.__stack6.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant14(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant14({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack14.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack14);
+        Ok(())
     }
     ///PrecDef* -> PrecDef+
     #[inline]
     fn reduce__PrecDefStar18_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///PrecDef* ->
     #[inline]
     fn reduce__PrecDefStar18_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant14({ vec![] }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { vec![] };
+        __data_stack.__stack14.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack14);
+        Ok(())
     }
     ///caret? -> caret
     #[inline]
     fn reduce__caretQuestion19_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant15(Some(A)))
+        let __res = Some(A);
+        __data_stack.__stack15.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack15);
+        Ok(())
     }
     ///caret? ->
     #[inline]
     fn reduce__caretQuestion19_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant15({ None }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { None };
+        __data_stack.__stack15.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack15);
+        Ok(())
     }
     ///TerminalSetItem+ -> TerminalSetItem
     #[inline]
     fn reduce__TerminalSetItemPlus20_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant8(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack8)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__stack8.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant16({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack16.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack16);
+        Ok(())
     }
     ///TerminalSetItem+ -> TerminalSetItem+ TerminalSetItem
     #[inline]
     fn reduce__TerminalSetItemPlus20_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant8(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack8)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack16)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Ap = __data_stack.__stack16.pop().unwrap();
+        let mut A = __data_stack.__stack8.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant16(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant16({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack16.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack16);
+        Ok(())
     }
     ///TerminalSetItem* -> TerminalSetItem+
     #[inline]
     fn reduce__TerminalSetItemStar21_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///TerminalSetItem* ->
     #[inline]
     fn reduce__TerminalSetItemStar21_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant16({ vec![] }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { vec![] };
+        __data_stack.__stack16.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack16);
+        Ok(())
     }
     ///Pattern+ -> Pattern
     #[inline]
     fn reduce__PatternPlus22_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__stack10.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant17({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack17.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack17);
+        Ok(())
     }
     ///Pattern+ -> Pattern+ Pattern
     #[inline]
     fn reduce__PatternPlus22_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant10(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack10)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack17)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut A = __data_stack.__stack10.pop().unwrap();
+        let mut Ap = __data_stack.__stack17.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant17(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant17({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack17.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack17);
+        Ok(())
     }
     ///Pattern* -> Pattern+
     #[inline]
     fn reduce__PatternStar23_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///Pattern* ->
     #[inline]
     fn reduce__PatternStar23_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant17({ vec![] }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { vec![] };
+        __data_stack.__stack17.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack17);
+        Ok(())
     }
     ///$sep(Pattern*, pipe, +) -> Pattern*
     #[inline]
     fn reduce___PatternStar23SepPlus24_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant17(mut __token0) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack17)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut __token0 = __data_stack.__stack17.pop().unwrap();
         let __rustylr_location___token0 = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant18({ vec![__token0] }))
+        let __res = { vec![__token0] };
+        __data_stack.__stack18.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack18);
+        Ok(())
     }
     ///$sep(Pattern*, pipe, +) -> $sep(Pattern*, pipe, +) pipe Pattern*
     #[inline]
     fn reduce___PatternStar23SepPlus24_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant17(mut __token1) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack17)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 2usize) == Some(&
+                GrammarTags::__stack18)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 3usize);
+        let mut __token1 = __data_stack.__stack17.pop().unwrap();
+        let mut __token0 = __data_stack.__stack18.pop().unwrap();
+        __data_stack.__terminals.pop();
         let __rustylr_location___token1 = __location_stack.pop().unwrap();
-        __data_stack.pop();
         __location_stack.pop();
-        let GrammarTokenData::Variant18(mut __token0) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location___token0 = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant18({
-                __token0.push(__token1);
-                __token0
-            }),
-        )
+        let __res = {
+            __token0.push(__token1);
+            __token0
+        };
+        __data_stack.__stack18.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack18);
+        Ok(())
     }
     ///comma? -> comma
     #[inline]
     fn reduce__commaQuestion25_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant15(Some(A)))
+        let __res = Some(A);
+        __data_stack.__stack15.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack15);
+        Ok(())
     }
     ///comma? ->
     #[inline]
     fn reduce__commaQuestion25_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant15({ None }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { None };
+        __data_stack.__stack15.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack15);
+        Ok(())
     }
     ///[^semicolon] -> ident
     #[inline]
     fn reduce__TermSet26_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> colon
     #[inline]
     fn reduce__TermSet26_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> pipe
     #[inline]
     fn reduce__TermSet26_2(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> percent
     #[inline]
     fn reduce__TermSet26_3(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> equal
     #[inline]
     fn reduce__TermSet26_4(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> plus
     #[inline]
     fn reduce__TermSet26_5(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> star
     #[inline]
     fn reduce__TermSet26_6(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> question
     #[inline]
     fn reduce__TermSet26_7(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> caret
     #[inline]
     fn reduce__TermSet26_8(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> minus
     #[inline]
     fn reduce__TermSet26_9(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> exclamation
     #[inline]
     fn reduce__TermSet26_10(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> slash
     #[inline]
     fn reduce__TermSet26_11(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> dot
     #[inline]
     fn reduce__TermSet26_12(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> dollar
     #[inline]
     fn reduce__TermSet26_13(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> comma
     #[inline]
     fn reduce__TermSet26_14(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> literal
     #[inline]
     fn reduce__TermSet26_15(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> parengroup
     #[inline]
     fn reduce__TermSet26_16(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> bracegroup
     #[inline]
     fn reduce__TermSet26_17(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> lparen
     #[inline]
     fn reduce__TermSet26_18(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> rparen
     #[inline]
     fn reduce__TermSet26_19(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> lbracket
     #[inline]
     fn reduce__TermSet26_20(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> rbracket
     #[inline]
     fn reduce__TermSet26_21(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> left
     #[inline]
     fn reduce__TermSet26_22(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> right
     #[inline]
     fn reduce__TermSet26_23(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> token
     #[inline]
     fn reduce__TermSet26_24(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> start
     #[inline]
     fn reduce__TermSet26_25(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> eofdef
     #[inline]
     fn reduce__TermSet26_26(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> tokentype
     #[inline]
     fn reduce__TermSet26_27(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> userdata
     #[inline]
     fn reduce__TermSet26_28(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> errortype
     #[inline]
     fn reduce__TermSet26_29(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> moduleprefix
     #[inline]
     fn reduce__TermSet26_30(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> lalr
     #[inline]
     fn reduce__TermSet26_31(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> glr
     #[inline]
     fn reduce__TermSet26_32(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> prec
     #[inline]
     fn reduce__TermSet26_33(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> precedence
     #[inline]
     fn reduce__TermSet26_34(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> nooptim
     #[inline]
     fn reduce__TermSet26_35(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> dense
     #[inline]
     fn reduce__TermSet26_36(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> trace
     #[inline]
     fn reduce__TermSet26_37(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> dprec
     #[inline]
     fn reduce__TermSet26_38(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> filter
     #[inline]
     fn reduce__TermSet26_39(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> runtime
     #[inline]
     fn reduce__TermSet26_40(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> location
     #[inline]
     fn reduce__TermSet26_41(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon] -> <Others>
     #[inline]
     fn reduce__TermSet26_42(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///[^semicolon]+ -> [^semicolon]
     #[inline]
     fn reduce___TermSet26Plus27_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant19({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack19.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack19);
+        Ok(())
     }
     ///[^semicolon]+ -> [^semicolon]+ [^semicolon]
     #[inline]
     fn reduce___TermSet26Plus27_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack19)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Ap = __data_stack.__stack19.pop().unwrap();
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant19(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant19({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack19.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack19);
+        Ok(())
     }
     ///IdentOrLiteral+ -> IdentOrLiteral
     #[inline]
     fn reduce__IdentOrLiteralPlus28_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant11(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack11)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__stack11.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant20({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack20.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack20);
+        Ok(())
     }
     ///IdentOrLiteral+ -> IdentOrLiteral+ IdentOrLiteral
     #[inline]
     fn reduce__IdentOrLiteralPlus28_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Variant11(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__stack11)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack20)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut A = __data_stack.__stack11.pop().unwrap();
+        let mut Ap = __data_stack.__stack20.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant20(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant20({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack20.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack20);
+        Ok(())
     }
     ///ident+ -> ident
     #[inline]
     fn reduce__identPlus29_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        Ok(GrammarTokenData::Variant19({ vec![A] }))
+        let __res = { vec![A] };
+        __data_stack.__stack19.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack19);
+        Ok(())
     }
     ///ident+ -> ident+ ident
     #[inline]
     fn reduce__identPlus29_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        let GrammarTokenData::Terminals(mut A) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)]
+        {
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 0usize) == Some(&
+                GrammarTags::__terminals)
+            );
+            debug_assert!(
+                __data_stack.__tags.get(__data_stack.__tags.len() - 1 - 1usize) == Some(&
+                GrammarTags::__stack19)
+            );
+        }
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        let mut Ap = __data_stack.__stack19.pop().unwrap();
+        let mut A = __data_stack.__terminals.pop().unwrap();
         let __rustylr_location_A = __location_stack.pop().unwrap();
-        let GrammarTokenData::Variant19(mut Ap) = __data_stack.pop().unwrap() else {
-            unreachable!()
-        };
         let __rustylr_location_Ap = __location_stack.pop().unwrap();
-        Ok(
-            GrammarTokenData::Variant19({
-                Ap.push(A);
-                Ap
-            }),
-        )
+        let __res = {
+            Ap.push(A);
+            Ap
+        };
+        __data_stack.__stack19.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack19);
+        Ok(())
     }
     ///ident* -> ident+
     #[inline]
     fn reduce__identStar30_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        let ret = __data_stack.swap_remove(__data_stack.len() - 1usize + 0usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        ret
     }
     ///ident* ->
     #[inline]
     fn reduce__identStar30_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Lexed>,
         data: &mut GrammarArgs,
         __rustylr_location0: &mut SpanPair,
-    ) -> Result<GrammarTokenData, ::rusty_lr_core::DefaultReduceActionError> {
-        Ok(GrammarTokenData::Variant19({ vec![] }))
+    ) -> Result<(), ::rusty_lr_core::DefaultReduceActionError> {
+        #[cfg(debug_assertions)] {}
+        let __res = { vec![] };
+        __data_stack.__stack19.push(__res);
+        __data_stack.__tags.push(GrammarTags::__stack19);
+        Ok(())
     }
     ///GrammarLine+ -> GrammarLine
     #[inline]
     fn reduce__GrammarLinePlus31_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        __data_stack.truncate(__data_stack.len() - 1usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 1usize);
-        GrammarTokenData::Empty
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 1usize);
+        __data_stack.__tags.push(GrammarTags::Empty);
     }
     ///GrammarLine+ -> GrammarLine GrammarLine+
     #[inline]
     fn reduce__GrammarLinePlus31_1(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        __data_stack.truncate(__data_stack.len() - 2usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 2usize);
-        GrammarTokenData::Empty
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        __data_stack.__tags.push(GrammarTags::Empty);
     }
     ///Augmented -> Grammar eof
     #[inline]
     fn reduce_Augmented_0(
-        __data_stack: &mut Vec<Self>,
+        __data_stack: &mut Self,
         __location_stack: &mut Vec<SpanPair>,
-    ) -> GrammarTokenData {
-        __data_stack.truncate(__data_stack.len() - 2usize);
+    ) {
         __location_stack.truncate(__location_stack.len() - 2usize);
-        GrammarTokenData::Empty
+        __data_stack.__tags.truncate(__data_stack.__tags.len() - 2usize);
+        __data_stack.__tags.push(GrammarTags::Empty);
     }
 }
 #[allow(
@@ -3975,22 +5089,319 @@ impl GrammarTokenData {
     non_camel_case_types,
     unused_variables
 )]
-impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
+impl ::rusty_lr_core::parser::data_stack::DataStack for GrammarDataStack {
     type Term = Lexed;
     type NonTerm = GrammarNonTerminals;
     type ReduceActionError = ::rusty_lr_core::DefaultReduceActionError;
     type UserData = GrammarArgs;
     type StartType = ();
     type Location = SpanPair;
+    fn pop_start(&mut self) -> Option<Self::StartType> {
+        let tag = self.__tags.pop();
+        debug_assert!(tag == Some(GrammarTags::Empty));
+        Some(())
+    }
+    fn pop(&mut self) {
+        match self.__tags.pop().unwrap() {
+            GrammarTags::__terminals => {
+                self.__terminals.pop();
+            }
+            GrammarTags::__stack2 => {
+                self.__stack2.pop();
+            }
+            GrammarTags::__stack3 => {
+                self.__stack3.pop();
+            }
+            GrammarTags::__stack4 => {
+                self.__stack4.pop();
+            }
+            GrammarTags::__stack5 => {
+                self.__stack5.pop();
+            }
+            GrammarTags::__stack6 => {
+                self.__stack6.pop();
+            }
+            GrammarTags::__stack7 => {
+                self.__stack7.pop();
+            }
+            GrammarTags::__stack8 => {
+                self.__stack8.pop();
+            }
+            GrammarTags::__stack9 => {
+                self.__stack9.pop();
+            }
+            GrammarTags::__stack10 => {
+                self.__stack10.pop();
+            }
+            GrammarTags::__stack11 => {
+                self.__stack11.pop();
+            }
+            GrammarTags::__stack12 => {
+                self.__stack12.pop();
+            }
+            GrammarTags::__stack13 => {
+                self.__stack13.pop();
+            }
+            GrammarTags::__stack14 => {
+                self.__stack14.pop();
+            }
+            GrammarTags::__stack15 => {
+                self.__stack15.pop();
+            }
+            GrammarTags::__stack16 => {
+                self.__stack16.pop();
+            }
+            GrammarTags::__stack17 => {
+                self.__stack17.pop();
+            }
+            GrammarTags::__stack18 => {
+                self.__stack18.pop();
+            }
+            GrammarTags::__stack19 => {
+                self.__stack19.pop();
+            }
+            GrammarTags::__stack20 => {
+                self.__stack20.pop();
+            }
+            _ => {}
+        }
+    }
+    fn push_terminal(&mut self, term: Self::Term) {
+        self.__tags.push(GrammarTags::__terminals);
+        self.__terminals.push(term);
+    }
+    fn push_empty(&mut self) {
+        self.__tags.push(GrammarTags::Empty);
+    }
+    fn clear(&mut self) {
+        self.__tags.clear();
+        self.__terminals.clear();
+        self.__stack2.clear();
+        self.__stack3.clear();
+        self.__stack4.clear();
+        self.__stack5.clear();
+        self.__stack6.clear();
+        self.__stack7.clear();
+        self.__stack8.clear();
+        self.__stack9.clear();
+        self.__stack10.clear();
+        self.__stack11.clear();
+        self.__stack12.clear();
+        self.__stack13.clear();
+        self.__stack14.clear();
+        self.__stack15.clear();
+        self.__stack16.clear();
+        self.__stack17.clear();
+        self.__stack18.clear();
+        self.__stack19.clear();
+        self.__stack20.clear();
+    }
+    fn reserve(&mut self, additional: usize) {
+        self.__tags.reserve(additional);
+    }
+    fn split_off(&mut self, at: usize) -> Self {
+        let other_tag_stack = self.__tags.split_off(at);
+        let mut __count___terminals = 0;
+        let mut __count___stack2 = 0;
+        let mut __count___stack3 = 0;
+        let mut __count___stack4 = 0;
+        let mut __count___stack5 = 0;
+        let mut __count___stack6 = 0;
+        let mut __count___stack7 = 0;
+        let mut __count___stack8 = 0;
+        let mut __count___stack9 = 0;
+        let mut __count___stack10 = 0;
+        let mut __count___stack11 = 0;
+        let mut __count___stack12 = 0;
+        let mut __count___stack13 = 0;
+        let mut __count___stack14 = 0;
+        let mut __count___stack15 = 0;
+        let mut __count___stack16 = 0;
+        let mut __count___stack17 = 0;
+        let mut __count___stack18 = 0;
+        let mut __count___stack19 = 0;
+        let mut __count___stack20 = 0;
+        for tag in &other_tag_stack {
+            match tag {
+                GrammarTags::__terminals => {
+                    __count___terminals += 1;
+                }
+                GrammarTags::__stack2 => {
+                    __count___stack2 += 1;
+                }
+                GrammarTags::__stack3 => {
+                    __count___stack3 += 1;
+                }
+                GrammarTags::__stack4 => {
+                    __count___stack4 += 1;
+                }
+                GrammarTags::__stack5 => {
+                    __count___stack5 += 1;
+                }
+                GrammarTags::__stack6 => {
+                    __count___stack6 += 1;
+                }
+                GrammarTags::__stack7 => {
+                    __count___stack7 += 1;
+                }
+                GrammarTags::__stack8 => {
+                    __count___stack8 += 1;
+                }
+                GrammarTags::__stack9 => {
+                    __count___stack9 += 1;
+                }
+                GrammarTags::__stack10 => {
+                    __count___stack10 += 1;
+                }
+                GrammarTags::__stack11 => {
+                    __count___stack11 += 1;
+                }
+                GrammarTags::__stack12 => {
+                    __count___stack12 += 1;
+                }
+                GrammarTags::__stack13 => {
+                    __count___stack13 += 1;
+                }
+                GrammarTags::__stack14 => {
+                    __count___stack14 += 1;
+                }
+                GrammarTags::__stack15 => {
+                    __count___stack15 += 1;
+                }
+                GrammarTags::__stack16 => {
+                    __count___stack16 += 1;
+                }
+                GrammarTags::__stack17 => {
+                    __count___stack17 += 1;
+                }
+                GrammarTags::__stack18 => {
+                    __count___stack18 += 1;
+                }
+                GrammarTags::__stack19 => {
+                    __count___stack19 += 1;
+                }
+                GrammarTags::__stack20 => {
+                    __count___stack20 += 1;
+                }
+                _ => {}
+            }
+        }
+        let __other___terminals = self
+            .__terminals
+            .split_off(self.__terminals.len() - __count___terminals);
+        let __other___stack2 = self
+            .__stack2
+            .split_off(self.__stack2.len() - __count___stack2);
+        let __other___stack3 = self
+            .__stack3
+            .split_off(self.__stack3.len() - __count___stack3);
+        let __other___stack4 = self
+            .__stack4
+            .split_off(self.__stack4.len() - __count___stack4);
+        let __other___stack5 = self
+            .__stack5
+            .split_off(self.__stack5.len() - __count___stack5);
+        let __other___stack6 = self
+            .__stack6
+            .split_off(self.__stack6.len() - __count___stack6);
+        let __other___stack7 = self
+            .__stack7
+            .split_off(self.__stack7.len() - __count___stack7);
+        let __other___stack8 = self
+            .__stack8
+            .split_off(self.__stack8.len() - __count___stack8);
+        let __other___stack9 = self
+            .__stack9
+            .split_off(self.__stack9.len() - __count___stack9);
+        let __other___stack10 = self
+            .__stack10
+            .split_off(self.__stack10.len() - __count___stack10);
+        let __other___stack11 = self
+            .__stack11
+            .split_off(self.__stack11.len() - __count___stack11);
+        let __other___stack12 = self
+            .__stack12
+            .split_off(self.__stack12.len() - __count___stack12);
+        let __other___stack13 = self
+            .__stack13
+            .split_off(self.__stack13.len() - __count___stack13);
+        let __other___stack14 = self
+            .__stack14
+            .split_off(self.__stack14.len() - __count___stack14);
+        let __other___stack15 = self
+            .__stack15
+            .split_off(self.__stack15.len() - __count___stack15);
+        let __other___stack16 = self
+            .__stack16
+            .split_off(self.__stack16.len() - __count___stack16);
+        let __other___stack17 = self
+            .__stack17
+            .split_off(self.__stack17.len() - __count___stack17);
+        let __other___stack18 = self
+            .__stack18
+            .split_off(self.__stack18.len() - __count___stack18);
+        let __other___stack19 = self
+            .__stack19
+            .split_off(self.__stack19.len() - __count___stack19);
+        let __other___stack20 = self
+            .__stack20
+            .split_off(self.__stack20.len() - __count___stack20);
+        Self {
+            __tags: other_tag_stack,
+            __terminals: __other___terminals,
+            __stack2: __other___stack2,
+            __stack3: __other___stack3,
+            __stack4: __other___stack4,
+            __stack5: __other___stack5,
+            __stack6: __other___stack6,
+            __stack7: __other___stack7,
+            __stack8: __other___stack8,
+            __stack9: __other___stack9,
+            __stack10: __other___stack10,
+            __stack11: __other___stack11,
+            __stack12: __other___stack12,
+            __stack13: __other___stack13,
+            __stack14: __other___stack14,
+            __stack15: __other___stack15,
+            __stack16: __other___stack16,
+            __stack17: __other___stack17,
+            __stack18: __other___stack18,
+            __stack19: __other___stack19,
+            __stack20: __other___stack20,
+        }
+    }
+    fn append(&mut self, other: &mut Self) {
+        self.__tags.append(&mut other.__tags);
+        self.__terminals.append(&mut other.__terminals);
+        self.__stack2.append(&mut other.__stack2);
+        self.__stack3.append(&mut other.__stack3);
+        self.__stack4.append(&mut other.__stack4);
+        self.__stack5.append(&mut other.__stack5);
+        self.__stack6.append(&mut other.__stack6);
+        self.__stack7.append(&mut other.__stack7);
+        self.__stack8.append(&mut other.__stack8);
+        self.__stack9.append(&mut other.__stack9);
+        self.__stack10.append(&mut other.__stack10);
+        self.__stack11.append(&mut other.__stack11);
+        self.__stack12.append(&mut other.__stack12);
+        self.__stack13.append(&mut other.__stack13);
+        self.__stack14.append(&mut other.__stack14);
+        self.__stack15.append(&mut other.__stack15);
+        self.__stack16.append(&mut other.__stack16);
+        self.__stack17.append(&mut other.__stack17);
+        self.__stack18.append(&mut other.__stack18);
+        self.__stack19.append(&mut other.__stack19);
+        self.__stack20.append(&mut other.__stack20);
+    }
     fn reduce_action(
-        data_stack: &mut Vec<Self>,
+        data_stack: &mut Self,
         location_stack: &mut Vec<SpanPair>,
         rule_index: usize,
         shift: &mut bool,
         lookahead: &::rusty_lr_core::TerminalSymbol<Self::Term>,
         user_data: &mut Self::UserData,
         location0: &mut Self::Location,
-    ) -> Result<Self, Self::ReduceActionError> {
+    ) -> Result<(), Self::ReduceActionError> {
         match rule_index {
             0usize => {
                 Self::reduce_Rule_0(
@@ -4792,8 +6203,14 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            80usize => Ok(Self::reduce_GrammarLine_1(data_stack, location_stack)),
-            81usize => Ok(Self::reduce_Grammar_0(data_stack, location_stack)),
+            80usize => {
+                Self::reduce_GrammarLine_1(data_stack, location_stack);
+                Ok(())
+            }
+            81usize => {
+                Self::reduce_Grammar_0(data_stack, location_stack);
+                Ok(())
+            }
             82usize => {
                 Self::reduce__TokenMappedPlus15_0(
                     data_stack,
@@ -4814,7 +6231,10 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            84usize => Ok(Self::reduce__TokenMappedStar16_0(data_stack, location_stack)),
+            84usize => {
+                Self::reduce__TokenMappedStar16_0(data_stack, location_stack);
+                Ok(())
+            }
             85usize => {
                 Self::reduce__TokenMappedStar16_1(
                     data_stack,
@@ -4845,7 +6265,10 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            88usize => Ok(Self::reduce__PrecDefStar18_0(data_stack, location_stack)),
+            88usize => {
+                Self::reduce__PrecDefStar18_0(data_stack, location_stack);
+                Ok(())
+            }
             89usize => {
                 Self::reduce__PrecDefStar18_1(
                     data_stack,
@@ -4897,7 +6320,8 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                 )
             }
             94usize => {
-                Ok(Self::reduce__TerminalSetItemStar21_0(data_stack, location_stack))
+                Self::reduce__TerminalSetItemStar21_0(data_stack, location_stack);
+                Ok(())
             }
             95usize => {
                 Self::reduce__TerminalSetItemStar21_1(
@@ -4929,7 +6353,10 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            98usize => Ok(Self::reduce__PatternStar23_0(data_stack, location_stack)),
+            98usize => {
+                Self::reduce__PatternStar23_0(data_stack, location_stack);
+                Ok(())
+            }
             99usize => {
                 Self::reduce__PatternStar23_1(
                     data_stack,
@@ -4980,49 +6407,178 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            104usize => Ok(Self::reduce__TermSet26_0(data_stack, location_stack)),
-            105usize => Ok(Self::reduce__TermSet26_1(data_stack, location_stack)),
-            106usize => Ok(Self::reduce__TermSet26_2(data_stack, location_stack)),
-            107usize => Ok(Self::reduce__TermSet26_3(data_stack, location_stack)),
-            108usize => Ok(Self::reduce__TermSet26_4(data_stack, location_stack)),
-            109usize => Ok(Self::reduce__TermSet26_5(data_stack, location_stack)),
-            110usize => Ok(Self::reduce__TermSet26_6(data_stack, location_stack)),
-            111usize => Ok(Self::reduce__TermSet26_7(data_stack, location_stack)),
-            112usize => Ok(Self::reduce__TermSet26_8(data_stack, location_stack)),
-            113usize => Ok(Self::reduce__TermSet26_9(data_stack, location_stack)),
-            114usize => Ok(Self::reduce__TermSet26_10(data_stack, location_stack)),
-            115usize => Ok(Self::reduce__TermSet26_11(data_stack, location_stack)),
-            116usize => Ok(Self::reduce__TermSet26_12(data_stack, location_stack)),
-            117usize => Ok(Self::reduce__TermSet26_13(data_stack, location_stack)),
-            118usize => Ok(Self::reduce__TermSet26_14(data_stack, location_stack)),
-            119usize => Ok(Self::reduce__TermSet26_15(data_stack, location_stack)),
-            120usize => Ok(Self::reduce__TermSet26_16(data_stack, location_stack)),
-            121usize => Ok(Self::reduce__TermSet26_17(data_stack, location_stack)),
-            122usize => Ok(Self::reduce__TermSet26_18(data_stack, location_stack)),
-            123usize => Ok(Self::reduce__TermSet26_19(data_stack, location_stack)),
-            124usize => Ok(Self::reduce__TermSet26_20(data_stack, location_stack)),
-            125usize => Ok(Self::reduce__TermSet26_21(data_stack, location_stack)),
-            126usize => Ok(Self::reduce__TermSet26_22(data_stack, location_stack)),
-            127usize => Ok(Self::reduce__TermSet26_23(data_stack, location_stack)),
-            128usize => Ok(Self::reduce__TermSet26_24(data_stack, location_stack)),
-            129usize => Ok(Self::reduce__TermSet26_25(data_stack, location_stack)),
-            130usize => Ok(Self::reduce__TermSet26_26(data_stack, location_stack)),
-            131usize => Ok(Self::reduce__TermSet26_27(data_stack, location_stack)),
-            132usize => Ok(Self::reduce__TermSet26_28(data_stack, location_stack)),
-            133usize => Ok(Self::reduce__TermSet26_29(data_stack, location_stack)),
-            134usize => Ok(Self::reduce__TermSet26_30(data_stack, location_stack)),
-            135usize => Ok(Self::reduce__TermSet26_31(data_stack, location_stack)),
-            136usize => Ok(Self::reduce__TermSet26_32(data_stack, location_stack)),
-            137usize => Ok(Self::reduce__TermSet26_33(data_stack, location_stack)),
-            138usize => Ok(Self::reduce__TermSet26_34(data_stack, location_stack)),
-            139usize => Ok(Self::reduce__TermSet26_35(data_stack, location_stack)),
-            140usize => Ok(Self::reduce__TermSet26_36(data_stack, location_stack)),
-            141usize => Ok(Self::reduce__TermSet26_37(data_stack, location_stack)),
-            142usize => Ok(Self::reduce__TermSet26_38(data_stack, location_stack)),
-            143usize => Ok(Self::reduce__TermSet26_39(data_stack, location_stack)),
-            144usize => Ok(Self::reduce__TermSet26_40(data_stack, location_stack)),
-            145usize => Ok(Self::reduce__TermSet26_41(data_stack, location_stack)),
-            146usize => Ok(Self::reduce__TermSet26_42(data_stack, location_stack)),
+            104usize => {
+                Self::reduce__TermSet26_0(data_stack, location_stack);
+                Ok(())
+            }
+            105usize => {
+                Self::reduce__TermSet26_1(data_stack, location_stack);
+                Ok(())
+            }
+            106usize => {
+                Self::reduce__TermSet26_2(data_stack, location_stack);
+                Ok(())
+            }
+            107usize => {
+                Self::reduce__TermSet26_3(data_stack, location_stack);
+                Ok(())
+            }
+            108usize => {
+                Self::reduce__TermSet26_4(data_stack, location_stack);
+                Ok(())
+            }
+            109usize => {
+                Self::reduce__TermSet26_5(data_stack, location_stack);
+                Ok(())
+            }
+            110usize => {
+                Self::reduce__TermSet26_6(data_stack, location_stack);
+                Ok(())
+            }
+            111usize => {
+                Self::reduce__TermSet26_7(data_stack, location_stack);
+                Ok(())
+            }
+            112usize => {
+                Self::reduce__TermSet26_8(data_stack, location_stack);
+                Ok(())
+            }
+            113usize => {
+                Self::reduce__TermSet26_9(data_stack, location_stack);
+                Ok(())
+            }
+            114usize => {
+                Self::reduce__TermSet26_10(data_stack, location_stack);
+                Ok(())
+            }
+            115usize => {
+                Self::reduce__TermSet26_11(data_stack, location_stack);
+                Ok(())
+            }
+            116usize => {
+                Self::reduce__TermSet26_12(data_stack, location_stack);
+                Ok(())
+            }
+            117usize => {
+                Self::reduce__TermSet26_13(data_stack, location_stack);
+                Ok(())
+            }
+            118usize => {
+                Self::reduce__TermSet26_14(data_stack, location_stack);
+                Ok(())
+            }
+            119usize => {
+                Self::reduce__TermSet26_15(data_stack, location_stack);
+                Ok(())
+            }
+            120usize => {
+                Self::reduce__TermSet26_16(data_stack, location_stack);
+                Ok(())
+            }
+            121usize => {
+                Self::reduce__TermSet26_17(data_stack, location_stack);
+                Ok(())
+            }
+            122usize => {
+                Self::reduce__TermSet26_18(data_stack, location_stack);
+                Ok(())
+            }
+            123usize => {
+                Self::reduce__TermSet26_19(data_stack, location_stack);
+                Ok(())
+            }
+            124usize => {
+                Self::reduce__TermSet26_20(data_stack, location_stack);
+                Ok(())
+            }
+            125usize => {
+                Self::reduce__TermSet26_21(data_stack, location_stack);
+                Ok(())
+            }
+            126usize => {
+                Self::reduce__TermSet26_22(data_stack, location_stack);
+                Ok(())
+            }
+            127usize => {
+                Self::reduce__TermSet26_23(data_stack, location_stack);
+                Ok(())
+            }
+            128usize => {
+                Self::reduce__TermSet26_24(data_stack, location_stack);
+                Ok(())
+            }
+            129usize => {
+                Self::reduce__TermSet26_25(data_stack, location_stack);
+                Ok(())
+            }
+            130usize => {
+                Self::reduce__TermSet26_26(data_stack, location_stack);
+                Ok(())
+            }
+            131usize => {
+                Self::reduce__TermSet26_27(data_stack, location_stack);
+                Ok(())
+            }
+            132usize => {
+                Self::reduce__TermSet26_28(data_stack, location_stack);
+                Ok(())
+            }
+            133usize => {
+                Self::reduce__TermSet26_29(data_stack, location_stack);
+                Ok(())
+            }
+            134usize => {
+                Self::reduce__TermSet26_30(data_stack, location_stack);
+                Ok(())
+            }
+            135usize => {
+                Self::reduce__TermSet26_31(data_stack, location_stack);
+                Ok(())
+            }
+            136usize => {
+                Self::reduce__TermSet26_32(data_stack, location_stack);
+                Ok(())
+            }
+            137usize => {
+                Self::reduce__TermSet26_33(data_stack, location_stack);
+                Ok(())
+            }
+            138usize => {
+                Self::reduce__TermSet26_34(data_stack, location_stack);
+                Ok(())
+            }
+            139usize => {
+                Self::reduce__TermSet26_35(data_stack, location_stack);
+                Ok(())
+            }
+            140usize => {
+                Self::reduce__TermSet26_36(data_stack, location_stack);
+                Ok(())
+            }
+            141usize => {
+                Self::reduce__TermSet26_37(data_stack, location_stack);
+                Ok(())
+            }
+            142usize => {
+                Self::reduce__TermSet26_38(data_stack, location_stack);
+                Ok(())
+            }
+            143usize => {
+                Self::reduce__TermSet26_39(data_stack, location_stack);
+                Ok(())
+            }
+            144usize => {
+                Self::reduce__TermSet26_40(data_stack, location_stack);
+                Ok(())
+            }
+            145usize => {
+                Self::reduce__TermSet26_41(data_stack, location_stack);
+                Ok(())
+            }
+            146usize => {
+                Self::reduce__TermSet26_42(data_stack, location_stack);
+                Ok(())
+            }
             147usize => {
                 Self::reduce___TermSet26Plus27_0(
                     data_stack,
@@ -5083,7 +6639,10 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            153usize => Ok(Self::reduce__identStar30_0(data_stack, location_stack)),
+            153usize => {
+                Self::reduce__identStar30_0(data_stack, location_stack);
+                Ok(())
+            }
             154usize => {
                 Self::reduce__identStar30_1(
                     data_stack,
@@ -5094,36 +6653,23 @@ impl ::rusty_lr_core::nonterminal::TokenData for GrammarTokenData {
                     location0,
                 )
             }
-            155usize => Ok(Self::reduce__GrammarLinePlus31_0(data_stack, location_stack)),
-            156usize => Ok(Self::reduce__GrammarLinePlus31_1(data_stack, location_stack)),
-            157usize => Ok(Self::reduce_Augmented_0(data_stack, location_stack)),
+            155usize => {
+                Self::reduce__GrammarLinePlus31_0(data_stack, location_stack);
+                Ok(())
+            }
+            156usize => {
+                Self::reduce__GrammarLinePlus31_1(data_stack, location_stack);
+                Ok(())
+            }
+            157usize => {
+                Self::reduce_Augmented_0(data_stack, location_stack);
+                Ok(())
+            }
             _ => {
                 unreachable!("Invalid Rule: {}", rule_index);
             }
         }
     }
-    fn new_error() -> Self {
-        GrammarTokenData::Empty
-    }
-    fn new_terminal(term: Lexed) -> Self {
-        GrammarTokenData::Terminals(term)
-    }
-}
-#[allow(
-    unused_braces,
-    unused_parens,
-    non_snake_case,
-    non_camel_case_types,
-    unused_variables
-)]
-impl TryFrom<GrammarTokenData> for () {
-    type Error = ();
-    fn try_from(token: GrammarTokenData) -> Result<Self, Self::Error> {
-        match token {
-            GrammarTokenData::Empty => Ok(()),
-            _ => Err(()),
-        }
-    }
 }
 /// A struct that holds the entire parser table and production rules.
 #[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
