Skip to content

Commit

Permalink
ensure reproducible elements order by sorting
Browse files Browse the repository at this point in the history
Signed-off-by: Hervé Boutemy <[email protected]>
  • Loading branch information
hboutemy committed Aug 9, 2022
1 parent a1fe929 commit 75e5e87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import org.antlr.codegen.*;
import java.util.HashSet;
import java.util.Set;
import java.util.Collection;
import java.util.Collections;
import org.antlr.runtime.BitSet;
import org.antlr.runtime.DFA;
import org.stringtemplate.v4.ST;
Expand Down Expand Up @@ -284,6 +285,7 @@ protected final List<String> getTokenTypesAsTargetLabels(Collection<GrammarAST>
}
labels.add( label );
}
Collections.sort(labels); // ensure reproducible order
return labels;
}

Expand Down

0 comments on commit 75e5e87

Please sign in to comment.