public static IntervalSet toSet(BitSet bits) {
		IntervalSet s = new IntervalSet();
		int i = bits.nextSetBit(0);
		while ( i >= 0 ) {
			s.add(i);
			i = bits.nextSetBit(i+1);
		}
		return s;
	}
Convert array of strings to string&rarr;index map. Useful for
 converting rulenames to name&rarr;ruleindex map.
runtime/Java/src/org/antlr/v4/runtime/misc/Utils.java