summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Parse standalone 0 as integerdibyendumajumdar2023-09-193-33/+30
|
* Merge branch 'main' of https://github.com/dibyendumajumdar/Simple into pr/2Cliff Click2023-09-191-0/+11
|\
| * Enable preview featuredibyendumajumdar2023-09-191-0/+3
| |
| * Enable preview featuredibyendumajumdar2023-09-191-0/+8
| |
* | Overhaul LexerCliff Click2023-09-193-278/+107
|/ | | | | | | | | | | | 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.
* | Make every effort to move the language level to 20 with previewCliff Click2023-09-183-6/+6
|/ | | | | For pattern-match switch statements. Much nicer looking code. Also IDEAJ gave me huge grief, so I might have hit this with a larger hammer than needed.
* 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-174-78/+56
| | | | 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 description of Chapter 1.dibyendumajumdar2023-09-171-1/+1
|
* 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-0725-9513/+335
| | | | | | 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-2614-347/+258
| | | | | | 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-253-1/+50
|
* Reorganized the project as multi-maven moduledibyendumajumdar2023-08-2538-402/+8892
| | | | | | | | 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.
* Implement parser for a simple language that roughly corresponds to appendix ↵dibyendumajumdar2023-08-216-6/+480
| | | | A in Aho's 2nd edition
* Added JCtools dependency and removed classes that were copied from theredibyendumajumdar2023-08-208-3162/+11
| | | | Removed the hash quality checks in Util as these access internals of maps in JCTools
* In this initial commit, following are included:dibyendumajumdar2023-08-2018-0/+4832
| | | | | | | util classes from AA Lexer code extracted from the Parse class. This is all draft as likely to change as we start creating the AST parser.
* Update README.mdCliff Click2023-08-191-0/+8
|
* Initial commitCliff Click2023-08-193-0/+227