Public Member Functions | |
FloatingPointParser () | |
synchronized final double | parseDouble (String s) throws RuntimeException |
Private Member Functions | |
final void | doAction (int state, int symbol, char ch) |
final int | getNextSymbol (char ch) |
final boolean | parse (String s) |
Private Attributes | |
String | a = "" |
String | b = "" |
String | c = "" |
Static Private Attributes | |
final int | ERROR_STATE = 99 |
final int[][] | transitions |
final java.text.DecimalFormatSymbols | symbols = new java.text.DecimalFormatSymbols() |
The parser is derived from the following regular expression:
[+-]?[0-9]*(\.[0-9]*)?((e[+-]?)[0-9]*)?
This expression allows maximum flexibility in description of floating point numbers, while still generating expected output. Every state of this parser is final and therefore suitable for parsing of sequential user input, where intermediate states are not valid values.
Creation date: (12/16/2001 16:46:23)
|
Creates new parser. |
|
Performs action associated with each state. Creation date: (12/16/2001 17:04:50)
|
|
Returns symbol based on character. Creation date: (12/16/2001 16:49:11)
|
|
Performs the actual parsing. Creation date: (12/16/2001 16:48:37)
|
|
Parses the supplied string and tries to convert it to double. Creation date: (12/16/2001 16:47:57)
|
|
|
|
|
|
|
|
|
|
|
|
Initial value:
|