From dc33d1842543ad22842a62bbd9bb300a79f1ff4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 8 Aug 2022 23:07:21 +0200 Subject: [PATCH] ensure reproducible elements order by sorting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Boutemy --- tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g b/tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g index 9c107b531..aa9aa835e 100644 --- a/tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g +++ b/tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g @@ -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; @@ -284,6 +285,7 @@ protected final List getTokenTypesAsTargetLabels(Collection } labels.add( label ); } + Collections.sort(labels); // ensure reproducible order return labels; }