diff options
| author | Cliff Click <cliffc@acm.org> | 2024-12-30 22:29:17 -0800 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-01-15 15:07:30 -0800 |
| commit | 051cf6520f342003582185fceb4c474e1e7d20dc (patch) | |
| tree | 15f2783ded8a9dfba35674b36c4595affffd4f6c /chapter17/src | |
| parent | caa2b978e5a0a83b2615e1e703ce1ec07bf86f77 (diff) | |
| download | Simple-051cf6520f342003582185fceb4c474e1e7d20dc.tar.gz Simple-051cf6520f342003582185fceb4c474e1e7d20dc.zip | |
Getting error code to report same w/out peeps
Parse "arg--2" as "arg - -2" and not "arg-- 2".
Use ParserException instead of RuntimeException.
Add a Field w/out final test.
Allow Float NaN to hash/compare
Bug cast didn't check type when GVN
Better handling of dead return/exit paths
Diffstat (limited to 'chapter17/src')
| -rw-r--r-- | chapter17/src/main/java/com/seaofnodes/simple/Parser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java index 570ae67e..5a44b63e 100644 --- a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java +++ b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java @@ -1420,7 +1420,7 @@ public class Parser { if( "+-/*&|^".indexOf(ch0) == -1 ) return 0; char ch1 = (char)_input[_position+1]; if( ch1 == '=' ) { _position += 2; return ch0; } - if( Character.isDigit(_input[_position+2]) ) return 0; + if( isIdLetter((char)_input[_position+2]) ) return 0; if( ch0 == '+' && ch1 == '+' ) { _position += 2; return (char) 1; } if( ch0 == '-' && ch1 == '-' ) { _position += 2; return (char)-1; } return 0; |
