sb.append("expecting "); appendCharName(sb, expecting); sb.append(", found "); appendCharName(sb, foundChar); break; case NOT_CHAR: sb.append("expecting anything but '"); appendCharName(sb, expecting); sb.append("'; got it anyway"); break; sb.append("NOT "); sb.append("in range: "); appendCharName(sb, expecting); sb.append(".."); appendCharName(sb, upper); sb.append(", found "); appendCharName(sb, foundChar); break; case SET: int[] elems = set.toArray(); for (int i = 0; i < elems.length; i++) { appendCharName(sb, elems[i]); appendCharName(sb, foundChar); break; default :