private String findAltLabelName(CommonTree label) {
		if (label == null) {
			return null;
		}
		else if (label instanceof AltAST) {
			AltAST altAST = (AltAST) label;
			if (altAST.altLabel != null) {
				return altAST.altLabel.toString();
			}
			else if (altAST.leftRecursiveAltInfo != null) {
				return altAST.leftRecursiveAltInfo.altLabel.toString();
			}
			else {
				return findAltLabelName(label.parent);
			}
		}
		else {
			return findAltLabelName(label.parent);
		}
	}
Make sure a label doesn't conflict with another symbol.
Labels must not conflict with: rules, tokens, scope names,
return values, parameters, and rule-scope dynamic attributes
defined in surrounding rule.  Also they must have same type
for repeated defs.
tool/src/org/antlr/v4/semantics/SymbolChecks.java