public Set<String> getElementLabelNames() {
        Set<String> refs = new HashSet<String>();
        for (int i=1; i<=numberOfAlts; i++) {
            refs.addAll(alt[i].labelDefs.keySet());
        }
		if ( refs.isEmpty() ) return null;
        return refs;
    }
Lexer actions are numbered across rules 0..n-1
tool/src/org/antlr/v4/tool/Rule.java