summaryrefslogtreecommitdiff
path: root/chapter01
Commit message (Collapse)AuthorAgeFilesLines
* Parse standalone 0 as integerdibyendumajumdar2023-09-193-33/+30
|
* Overhaul LexerCliff Click2023-09-192-87/+103
| | | | | | | | | | | | 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-183-3/+7
|\
| * Update based on feedbackdibyendumajumdar2023-09-181-11/+11
| |
| * Remove opcodesdibyendumajumdar2023-09-187-39/+20
| | | | | | | | Make the IdGenerator an input to the Parser
* | More edits to Chpt 1Cliff Click2023-09-188-125/+82
|/ | | | | | | | 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-186-105/+206
|
* Start on parserdibyendumajumdar2023-09-177-30/+278
|
* Revise description of Return node.dibyendumajumdar2023-09-171-0/+3
|
* Revise text and update diagram.dibyendumajumdar2023-09-173-77/+55
| | | | Remove the detail re inputs to a node from the diagram.
* Add diagramdibyendumajumdar2023-09-171-0/+10
|
* Add diagramdibyendumajumdar2023-09-172-0/+80
|
* Revised textdibyendumajumdar2023-09-171-6/+5
|
* Fix typosdibyendumajumdar2023-09-172-2/+2
|
* Revised based on feedbackdibyendumajumdar2023-09-172-15/+18
| | | | Added descriptions of the nodes.
* Initial definition of nodes that will be relevant for chapter 1.dibyendumajumdar2023-09-171-6/+29
|
* Initial definition of nodes that will be relevant for chapter 1.dibyendumajumdar2023-09-178-0/+196
|
* Revise grammar for chapter 1.dibyendumajumdar2023-09-172-24/+50
| | | | Start writing up Chapter 1.
* Drop AST and parser and lexerdibyendumajumdar2023-09-076-776/+0
|
* Corrected READMEdibyendumajumdar2023-09-071-6/+1
|
* Renamed Ast to AST.dibyendumajumdar2023-09-072-42/+42
|
* Removed all external code.dibyendumajumdar2023-09-077-98/+334
| | | | | | 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-263-131/+130
| | | | | 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-263-74/+148
| | | | | | 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
* Added a grammar definition for chapter 01.dibyendumajumdar2023-08-252-0/+49
|
* Reorganized the project as multi-maven moduledibyendumajumdar2023-08-256-0/+481
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.