public Map<String, List<Pair<Integer, AltAST>>> getAltLabels() {
		Map<String, List<Pair<Integer, AltAST>>> labels = new LinkedHashMap<String, List<Pair<Integer, AltAST>>>();
		for (int i=1; i<=numberOfAlts; i++) {
			GrammarAST altLabel = alt[i].ast.altLabel;
			if ( altLabel!=null ) {
				List<Pair<Integer, AltAST>> list = labels.get(altLabel.getText());
				if (list == null) {
					list = new ArrayList<Pair<Integer, AltAST>>();
					labels.put(altLabel.getText(), list);
				}

				list.add(new Pair<Integer, AltAST>(i, alt[i].ast));
			}
		}
		if ( labels.isEmpty() ) return null;
		return labels;
	}
Get {@code #} labels. The keys of the map are the labels applied to outer
alternatives of a lexer rule, and the values are collections of pairs
(alternative number and {@link AltAST}) identifying the alternatives with
this label. Unlabeled alternatives are not included in the result.
tool/src/org/antlr/v4/tool/Rule.java