Tokenize the input with flex

This commit is contained in:
2024-04-06 16:10:07 +02:00
parent 4251c361c7
commit aa3df7f4d3
11 changed files with 274 additions and 369 deletions

6
TODO
View File

@ -1,20 +1,14 @@
# Compiler
- Whitespaces are checked twice, in the source class and by lexing.
- Catch exceptions thrown by the argument parser and print them normally.
- Parser should be able to collect errors.
- Provide position information on parse tree nodes.
- Move constants to the symbol table, so we can check at parse time for duplicates.
- Don't pass raw pointers to the visitor methods.
- While loop.
- Type checking.
- Procedures.
- Calculate additional stack space needed for subexpressions in the allocator
visitor and not in the backend.
- Support immediates greater than 12 bits.
- It seems instructions are correctly encoded only if the compiler is running
on a little endian architecture.
- Merge declaration and definition nodes.
- Pointer.
- Static array.