summaryrefslogtreecommitdiff
path: root/chapter01/src/test/java
Commit message (Collapse)AuthorAgeFilesLines
* Parse standalone 0 as integerdibyendumajumdar2023-09-191-2/+17
|
* Overhaul LexerCliff Click2023-09-191-9/+36
| | | | | | | | | | | | 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.
* Fix a comp errorCliff Click2023-09-191-1/+1
| | | | missed one in the merge
* Merge branch 'main' of https://github.com/dibyendumajumdar/Simple into pr/2Cliff Click2023-09-181-1/+1
|\
| * Remove opcodesdibyendumajumdar2023-09-181-5/+2
| | | | | | | | Make the IdGenerator an input to the Parser
* | More edits to Chpt 1Cliff Click2023-09-181-20/+15
|/ | | | | | | | Add the Evil static global var, with appriopriate comments. Drop the singleton class, and every place it had to be passed. Much smaller code now, and will be a LOT smaller as the project grows. Drop the opcode; minor usages in prior implementations for performance, not needed here. Use the preview pattern match in test code to simplify.
* Chapter 01 implementationdibyendumajumdar2023-09-181-1/+23
|
* Start on parserdibyendumajumdar2023-09-171-0/+15
|
* Drop AST and parser and lexerdibyendumajumdar2023-09-071-62/+0
|
* Removed all external code.dibyendumajumdar2023-09-071-8/+4
| | | | | | Removed the common chapter. Reimplemented Lexer. Revised the list of chapters to something more accurate.
* Avoid using Node as a type as the IR will need thisdibyendumajumdar2023-08-261-6/+6
| | | | | So just extends the top level Ast class in all the subtypes. Also avoid holding reference to lexer in parser.
* Update the lexer, parser and AST to match the language definition.dibyendumajumdar2023-08-261-11/+9
| | | | | | Add toString() method on AST nodes so that we can easily check the results of parsing. Remove AA lexer Move the Ecstasy lexer classes to one package, except Handy
* Reorganized the project as multi-maven moduledibyendumajumdar2023-08-251-0/+68
Updated README Added language module with grammar Split the code into common and chapter01 modules. Removed a number of utility classes that were imported from AA. Added github workflow file.