diff options
| author | Cliff Click <cliffc@acm.org> | 2023-09-19 09:19:37 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2023-09-19 09:19:37 -0700 |
| commit | 02f839e3eaab921aecd9c13b59047dd0551e132a (patch) | |
| tree | bff164e39dfa9a9d42c89b041e5117b1d5c60fed /chapter02/src | |
| parent | cd4ac0ecebec7ac6eda30bdf1989318c14c64806 (diff) | |
| download | Simple-02f839e3eaab921aecd9c13b59047dd0551e132a.tar.gz Simple-02f839e3eaab921aecd9c13b59047dd0551e132a.zip | |
Overhaul Lexer
Switched to bytes from chars, since we'll be parsing files eventually and typically compilers parse bytes from files (and not Java chars).
Added a 'peek' to handle bad leading `--123` numbers.
Used simpler number parsing; doesn't do doubles (yet).
Added a filter for punctuation. Prior setup didn't handle multi-char punctuation like relation tests "<=".
Switched the "EOF" marker char from 0 to Char.MAX_VALUE; harder to make mistakes, and simplifies the WS test.
Switch javadoc comments to plain comments on private functions.
Added tests for broken keyword, broken numbers, negative numbers.
Diffstat (limited to 'chapter02/src')
0 files changed, 0 insertions, 0 deletions
