(PushbackReader r, char initch)
| 334 | } |
| 335 | |
| 336 | static private Object readNumber(PushbackReader r, char initch) { |
| 337 | StringBuilder sb = new StringBuilder(); |
| 338 | sb.append(initch); |
| 339 | |
| 340 | for(; ;) |
| 341 | { |
| 342 | int ch = read1(r); |
| 343 | if(ch == -1 || isWhitespace(ch) || isMacro(ch)) |
| 344 | { |
| 345 | unread(r, ch); |
| 346 | break; |
| 347 | } |
| 348 | sb.append((char) ch); |
| 349 | } |
| 350 | |
| 351 | String s = sb.toString(); |
| 352 | Object n = matchNumber(s); |
| 353 | if(n == null) |
| 354 | throw new NumberFormatException("Invalid number: " + s); |
| 355 | return n; |
| 356 | } |
| 357 | |
| 358 | static private int readUnicodeChar(String token, int offset, int length, int base) { |
| 359 | if(token.length() != offset + length) |
no test coverage detected