Skip to content

Commit

Permalink
Fix maximum calculation in GrammarSymbolSet::insert()
Browse files Browse the repository at this point in the history
Fixes #36 "Improve performance of GrammarSymbolSet".  Not reproduced
exactly because I didn't have the grammar to hand but it seems likely
this is the problem.
  • Loading branch information
Charles Baker committed Jun 7, 2023
1 parent b0a6fb6 commit aeacb29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lalr/GrammarSymbolSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ int GrammarSymbolSet::insert( const GrammarSymbolSet& set )
}
}
minimum_ = min( minimum_, set.minimum_ );
maximum_ = min( maximum_, set.maximum_ );
maximum_ = max( maximum_, set.maximum_ );
return added;
}

0 comments on commit aeacb29

Please sign in to comment.