Open
Description
Currently cfront is using scanless parser with IR emitter binds into it, and it contains ~3000 LOC. But based on my contributions experience to industrial grade programming languages (V Lang in this case), shecc's frontend parser is lack of ease to either debug or for others to contribute (Even though shecc is meant to be educational).
Here's a list of my thoughts on improving the frontend of shecc:
- Discard scanerless parser, rewrite it into both lexer and parser.
- Introducing Abstract Syntax Tree for better IR emission and backend generation.
- Separation on the compilation phases into multiple files would be a better idea for potential contributors to learn shecc's architecture.
And by accepting the suggestion described above, the possible major changes would be:
- Having more than 3 phases compilation in shecc.
- The code generation logic must rewrite based on the introduced AST.
Metadata
Metadata
Assignees
Labels
No labels