{ char c;
{ char c;  if (USE_CHEATS) { loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer[i]; switch (c) { case '%': if (expandPE) { break loop; }    case '<': case '>': case '&': case ',': case '|': case '*': case '+': case '?': case ')': case '=': case '\'': case '"': case '[': case ' ': case '\t': case '\r': case '\n': case ';': case '/': int start = readBufferPos; if (i == start) { error("name expected", readBuffer[i], null); } readBufferPos = i; return intern(readBuffer, start, i - start);  default:      if (isName && i == readBufferPos) { char c2 = (char) (c & 0x00f0); switch (c & 0xff00) {  case 0x0100: switch (c2) { case 0x0030: if (c == 0x0132 || c == 0x0133 || c == 0x013f) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x0040: if (c == 0x0140 || c == 0x0149) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x00c0: if (c == 0x01c4 || c == 0x01cc) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x00f0: if (c == 0x01f1 || c == 0x01f3) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x00b0: if (c == 0x01f1 || c == 0x01f3) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; default: if (c == 0x017f) { error("Not a name start character, U+" + Integer.toHexString(c)); } }  break;  case 0x1100: switch (c2) { case 0x0000: if (c == 0x1104 || c == 0x1108 || c == 0x110a || c == 0x110d) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x0030: if (c == 0x113b || c == 0x113f) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x0040: if (c == 0x1141 || c == 0x114d || c == 0x114f ) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x0050: if (c == 0x1151 || c == 0x1156) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x0060: if (c == 0x1162 || c == 0x1164 || c == 0x1166 || c == 0x116b || c == 0x116f) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; case 0x00b0: if (c == 0x11b6 || c == 0x11b9 || c == 0x11bb || c == 0x116f) { error("Not a name start character, U+" + Integer.toHexString(c)); } break; default: if (c == 0x1174 || c == 0x119f || c == 0x11ac || c == 0x11c3 || c == 0x11f1) { error("Not a name start character, U+" + Integer.toHexString(c)); } } break; default: if (c == 0x0e46 || c == 0x1011 || c == 0x212f || c == 0x0587 || c == 0x0230 ) { error("Not a name start character, U+" + Integer.toHexString(c)); } } }   if (i == readBufferPos && isName) { if (!Character.isUnicodeIdentifierStart(c) && c != ':' && c != '_') { error("Not a name start character, U+" + Integer.toHexString(c)); } } else if (!Character.isUnicodeIdentifierPart(c) && c != '-' && c != ':' && c != '_' && c != '.' && !isExtender(c)) { error("Not a name character, U+" + Integer.toHexString(c)); } } } }  nameBufferPos = 0;
    private String readNmtoken (boolean isName)    throws SAXException, IOException    {	char c;	if (USE_CHEATS) {loop:	    for (int i = readBufferPos; i < readBufferLength; i++) {		c = readBuffer [i];		switch (c) {		  case '%':		    if (expandPE)			break loop;		    // else fall through...		    // What may legitimately come AFTER a name/nmtoken?		  case '<': case '>': case '&':		  case ',': case '|': case '*': case '+': case '?':		  case ')':		  case '=':		  case '\'': case '"':		  case '[':		  case ' ': case '\t': case '\r': case '\n':		  case ';':		  case '/':		    int start = readBufferPos;		    if (i == start)			error ("name expected", readBuffer [i], null);		    readBufferPos = i;		    return intern (readBuffer, start, i - start);		  default:// FIXME ... per IBM's OASIS test submission, these://   ?		U+06dd //   Combining	U+309B		    //these switches are kind of ugly but at least we won't		    //have to go over the whole lits for each char		    if (isName && i == readBufferPos){			    char c2 = (char) (c & 0x00f0);	                    switch (c & 0xff00){	                    	//starting with 01	                    	case 0x0100:	                       	    switch (c2){	                    	        case 0x0030:	                    	            if (c == 0x0132 || c == 0x0133 || c == 0x013f)	                    	            	error ("Not a name start character, U+"	              				       + Integer.toHexString (c));	                    	        break;	                    	        case 0x0040:	                	            if (c == 0x0140 || c == 0x0149)	                	            	error ("Not a name start character, U+"	          				       + Integer.toHexString (c));	                	        break;	                    	        case 0x00c0:	            	                    if (c == 0x01c4 || c == 0x01cc)	            	            	        error ("Not a name start character, U+"	      				               + Integer.toHexString (c));	            	                break;	                    	        case 0x00f0:	        	                    if (c == 0x01f1 || c == 0x01f3)	        	            	        error ("Not a name start character, U+"	  				               + Integer.toHexString (c));	        	                break;	                    	        case 0x00b0:	    	                            if (c == 0x01f1 || c == 0x01f3)	    	            	                error ("Not a name start character, U+"					               + Integer.toHexString (c));	    	                        break;	        	                default:	        	                    if (c == 0x017f)	                	            	error ("Not a name start character, U+"	          				        + Integer.toHexString (c));		                    	    }				    	                    	break;	                    	//starting with 11	                    	case 0x1100:	                            switch (c2){	                                case 0x0000:	                                    if (c == 0x1104 || c == 0x1108 ||	                                    	c == 0x110a || c == 0x110d)	                                      	error ("Not a name start character, U+"	                      		             + Integer.toHexString (c));	                                break;	                                case 0x0030:	                                    if (c == 0x113b || c == 0x113f)	                                      	error ("Not a name start character, U+"	                          	               + Integer.toHexString (c));	                                break;	                                case 0x0040:	                                    if (c == 0x1141 || c == 0x114d	                                        || c == 0x114f )	                                      	error ("Not a name start character, U+"	                          	               + Integer.toHexString (c));	                                break;	                                case 0x0050:	                                     if (c == 0x1151 || c == 0x1156)	                                         error ("Not a name start character, U+"	                          		        + Integer.toHexString (c));	                                break;	                                case 0x0060:		                             if (c == 0x1162 || c == 0x1164		                             	 || c == 0x1166 || c == 0x116b						 || c == 0x116f)		                                 error ("Not a name start character, U+"		                          		 + Integer.toHexString (c));		                                break;	                                case 0x00b0:	                                     if (c == 0x11b6 || c == 0x11b9	                                         || c == 0x11bb || c == 0x116f)	                                         error ("Not a name start character, U+"	                          		        + Integer.toHexString (c));	                                break;	                                default:	                                    if (c == 0x1174 || c == 0x119f	                                    	|| c == 0x11ac || c == 0x11c3						|| c == 0x11f1)	                                        error ("Not a name start character, U+"	                                                + Integer.toHexString (c));	                            }	                        break;	                        default:	                           if (c == 0x0e46 || c == 0x1011 	                               || c == 0x212f || c == 0x0587				       || c == 0x0230 )	                	       error ("Not a name start character, U+"	          		              + Integer.toHexString (c));	                    }		    }		    // punt on exact tests from Appendix A; approximate		    // them using the Unicode ID start/part rules		    if (i == readBufferPos && isName) {			if (!Character.isUnicodeIdentifierStart (c)				&& c != ':' && c != '_')			    error ("Not a name start character, U+"				  + Integer.toHexString (c));		    } else if (!Character.isUnicodeIdentifierPart (c)			    && c != '-' && c != ':' && c != '_' && c != '.'			    && !isExtender (c))			error ("Not a name character, U+"				+ Integer.toHexString (c));		}	    }	}	nameBufferPos = 0;	// Read the first character.loop:	while (true) {	    c = readCh ();	    switch (c) {	    case '%':	    case '<': case '>': case '&':	    case ',': case '|': case '*': case '+': case '?':	    case ')':	    case '=':	    case '\'': case '"':	    case '[':	    case ' ': case '\t': case '\n': case '\r':	    case ';':	    case '/':		unread (c);		if (nameBufferPos == 0) {		    error ("name expected");		}		// punt on exact tests from Appendix A, but approximate them		if (isName			&& !Character.isUnicodeIdentifierStart (				nameBuffer [0])			&& ":_".indexOf (nameBuffer [0]) == -1)		    error ("Not a name start character, U+"			      + Integer.toHexString (nameBuffer [0]));		String s = intern (nameBuffer, 0, nameBufferPos);		nameBufferPos = 0;		return s;	    default:		// punt on exact tests from Appendix A, but approximate them		if ((nameBufferPos != 0 || !isName)			&& !Character.isUnicodeIdentifierPart (c)			&& ":-_.".indexOf (c) == -1			&& !isExtender (c))		    error ("Not a name character, U+"			    + Integer.toHexString (c));		if (nameBufferPos >= nameBuffer.length)		    nameBuffer =			(char[]) extendArray (nameBuffer,				    nameBuffer.length, nameBufferPos);		nameBuffer [nameBufferPos++] = c;	    }	}    }