(CharArr arr, int lim)
| 571 | |
| 572 | // read digits right of decimal point |
| 573 | private int readFrac(CharArr arr, int lim) throws IOException { |
| 574 | nstate = HAS_FRACTION; // deliberate set instead of '|' |
| 575 | while (--lim >= 0) { |
| 576 | int ch = getChar(); |
| 577 | if (ch >= '0' && ch <= '9') { |
| 578 | arr.write(ch); |
| 579 | } else if (ch == 'e' || ch == 'E') { |
| 580 | arr.write(ch); |
| 581 | return readExp(arr, lim); |
| 582 | } else { |
| 583 | if (ch != -1) start--; // back up |
| 584 | return NUMBER; |
| 585 | } |
| 586 | } |
| 587 | return BIGNUMBER; |
| 588 | } |
| 589 | |
| 590 | // call after 'e' or 'E' has been seen to read the rest of the exponent |
| 591 | private int readExp(CharArr arr, int lim) throws IOException { |
no test coverage detected