Skip to content

Commit e8866a1

Browse files
committed
ensure reproducible elements order by sorting
1 parent e8a8271 commit e8866a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tool/src/main/antlr3/org/antlr/grammar/v3/CodeGenTreeWalker.g

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import org.antlr.codegen.*;
5656
import java.util.HashSet;
5757
import java.util.Set;
5858
import java.util.Collection;
59+
import java.util.Collections;
5960
import org.antlr.runtime.BitSet;
6061
import org.antlr.runtime.DFA;
6162
import org.stringtemplate.v4.ST;
@@ -284,6 +285,7 @@ protected final List<String> getTokenTypesAsTargetLabels(Collection<GrammarAST>
284285
}
285286
labels.add( label );
286287
}
288+
Collections.sort(labels); // ensure reproducible order
287289
return labels;
288290
}
289291

0 commit comments

Comments
 (0)