private static String filterToken(String s, int start, int end) {
  	StringBuffer sb = new StringBuffer();
  	char c;
  	boolean gotEscape = false;
  	boolean gotCR = false;
  
  	for (int i = start; i < end; i++) {
  	    c = s.charAt(i);
  	    if (c == '\n' && gotCR) {
  		// This LF is part of an unescaped 
  		// CRLF sequence (i.e, LWSP). Skip it.
  		gotCR = false;
  		continue;
  	    }
  
  	    gotCR = false;
  	    if (!gotEscape) {
  		// Previous character was NOT '\'
  		if (c == '\\') // skip this character
  		    gotEscape = true;
  		else if (c == '\r') // skip this character
  		    gotCR = true;
  		else // append this character
  		    sb.append(c);
  	    } else {
  		// Previous character was '\'. So no need to 
  		// bother with any special processing, just 
  		// append this character
  		sb.append(c);
  		gotEscape = false;
  	    }
  	}
  	return sb.toString();
      }