File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
cli/src/generate/build_tables Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type SymbolSequence = Vec<Symbol>;
3232type AuxiliarySymbolSequence = Vec < AuxiliarySymbolInfo > ;
3333pub type ParseStateInfo < ' a > = ( SymbolSequence , ParseItemSet < ' a > ) ;
3434
35- #[ derive( Clone ) ]
35+ #[ derive( Clone , PartialEq ) ]
3636struct AuxiliarySymbolInfo {
3737 auxiliary_symbol : Symbol ,
3838 parent_symbols : Vec < Symbol > ,
@@ -193,7 +193,7 @@ impl<'a> ParseTableBuilder<'a> {
193193 fn add_actions (
194194 & mut self ,
195195 mut preceding_symbols : SymbolSequence ,
196- mut preceding_auxiliary_symbols : Vec < AuxiliarySymbolInfo > ,
196+ mut preceding_auxiliary_symbols : AuxiliarySymbolSequence ,
197197 state_id : ParseStateId ,
198198 item_set : & ParseItemSet < ' a > ,
199199 ) -> Result < ( ) > {
@@ -311,6 +311,8 @@ impl<'a> ParseTableBuilder<'a> {
311311 }
312312 }
313313
314+ preceding_auxiliary_symbols. dedup ( ) ;
315+
314316 // Having computed the successor item sets for each symbol, add a new
315317 // parse state for each of these item sets, and add a corresponding Shift
316318 // action to this state.
You can’t perform that action at this time.
0 commit comments