private int appendSets(StringBuilder buf, int[] data, int p, int nsets) {
		for (int i=0; i<nsets; i++) {
			int nintervals = data[p++];
			buf.append(i).append(":");
			boolean containsEof = data[p++] != 0;
			if (containsEof) {
				buf.append(getTokenName(Token.EOF));
			}

			for (int j=0; j<nintervals; j++) {
				if ( containsEof || j>0 ) {
					buf.append(", ");
				}

				int a = data[p++];
				int b = data[p++];
				buf.append(getTokenName(a)).append("..").append(getTokenName(b));
			}
			buf.append("\n");
		}
		return p;
	}
For testing really; gives a human readable version of the ATN
tool-testsuite/test/org/antlr/v4/test/tool/ATNDescriber.java