| 563 | } |
| 564 | |
| 565 | template <typename Iter> std::string _parse_number(input<Iter> &in) |
| 566 | { |
| 567 | std::string num_str; |
| 568 | while (1) { |
| 569 | int ch = in.getc(); |
| 570 | if (('0' <= ch && ch <= '9') || ch == '+' || ch == '-' || ch == 'e' || ch == 'E') { |
| 571 | num_str.push_back(static_cast<char>(ch)); |
| 572 | } else if (ch == '.') { |
| 573 | num_str.push_back('.'); |
| 574 | } else { |
| 575 | in.ungetc(); |
| 576 | break; |
| 577 | } |
| 578 | } |
| 579 | return num_str; |
| 580 | } |
| 581 | |
| 582 | template <typename Context, typename Iter> bool _parse(Context &ctx, input<Iter> &in) |
| 583 | { |