| 603 | static final Pattern FLOATING_POINT_PATTERN = fpPattern(); |
| 604 | |
| 605 | @GwtIncompatible // regular expressions |
| 606 | private static Pattern fpPattern() { |
| 607 | String decimal = "(?:\\d++(?:\\.\\d*+)?|\\.\\d++)"; |
| 608 | String completeDec = decimal + "(?:[eE][+-]?\\d++)?[fFdD]?"; |
| 609 | String hex = "(?:\\p{XDigit}++(?:\\.\\p{XDigit}*+)?|\\.\\p{XDigit}++)"; |
| 610 | String completeHex = "0[xX]" + hex + "[pP][+-]?\\d++[fFdD]?"; |
| 611 | String fpPattern = "[+-]?(?:NaN|Infinity|" + completeDec + "|" + completeHex + ")"; |
| 612 | return Pattern.compile(fpPattern); |
| 613 | } |
| 614 | |
| 615 | /** |
| 616 | * Parses the specified string as a double-precision floating point value. The ASCII character |