Skip to content

Latest commit

 

History

History
100 lines (98 loc) · 4.29 KB

TODO.md

File metadata and controls

100 lines (98 loc) · 4.29 KB

TODO

The goal is to implement a working Oberon compiler. The checklist below will grow as I go along.

  • (temporary) built-in print.
  • support simple integers.
  • print tokens, AST and IR.
  • "golden tests" runner.
  • support binary + / -.
  • support unary + / -.
  • support binary * / /.
  • support grouping (...).
  • wrap statements in dummy module.
  • separate statements and expressions.
  • basic type checking.
  • support REAL outcome of divisions.
  • replace print statement with call expression (still built-in).
  • run "golden tests" as unit tests.
  • support integer DIV / MOD.
  • skip comments in lexer.
  • support string literals.
  • support boolean literals TRUE / FALSE.
  • support logical "not" ~.
  • support relational operators = / # / < / <= / >= / >.
  • support REAL literals.
  • support hex integer literals.
  • support hex string literals.
  • support scale factor in REAL literals.
  • better printing of boolean values.
  • support statement sequences (separated by ;).
  • get "golden tests" input from the code block in the markdown file.
  • remove dedicated "golden test" runner and rely on unit-tests.
  • reorganize "golden tests" to combine multiple tiny tests.
  • make statement sequence a separate node.
  • support basic MODULE structure (excluding imports and declarations) .
  • don't panic on compilation errors.
  • support IF / THEN / ELSIF / ELSE with constant expressions.
  • basic global variable and assignment support.
  • support global constant literals.
  • support global constant expressions.
  • require a MODULE instead of allowing naked statements.
  • support built-in INC and DEC procedures.
  • support built-in FLT and FLOOR procedures.
  • add designator to CallExpr.
  • no automatic type conversion.
  • support REPEAT / UNTIL statement.
  • support WHILE / DO / ELSIF statement.
  • support FOR / BY / DO statement.
  • support built-in ORD procedure for booleans.
  • support CHAR types.
  • support built-in ORD and CHR procedures.
  • support relational operators for CHAR types.
  • support SET types.
  • support built-in INCL and EXCL procedures.
  • verify SET operations + / - / * / /.
  • improve test coverage.
  • factor out builtin functions.
  • use visitor pattern for builtin functions.
  • split code into packages.
  • better error reporting.
  • continue parsing if errors are found.
  • combine constants and vars into symbol-table.
  • add types to symbol-table.
  • use a type node instead of a token.
  • solidify types during type checking.
  • support POINTER types.
  • support built-in NEW procedure.
  • do we need to distinguish lhs / rhs designators?
  • support pointer dereferences.
  • support temporary built-in DELETE procedure.
  • support qualified-identifiers.
  • replace print with builtin Texts procedures.
  • move generated code to oberonMain to allow for preamble.
  • capture command line arguments.
  • capture environment variables.
  • basic local variable and assignment support.
  • generate call-graph in markdown.
  • support multiple modules in checker (and generator?).
  • better sync points during parser error recovery.
  • add "golden tests" for error conditions (e.g. invalid code).
  • improve AST and type information for variables.
  • support procedure definitions.
  • add paramDecl to support by-value vs by-reference parameters.
  • add frames in checker (and generator?).
  • do we need a new AST for checked nodes?
  • support local procedure calls (i.e. in the same module).
  • support ARRAY types.
  • support built-in LEN procedure.
  • support RECORD types.
  • support PROCEDURE types.
  • support CASE / OF statement.
  • make builtin Texts procedures real procedures.
  • better command line arguments.
  • update "golden test" files in-place, so any additional content doesn't get overwritten.
  • support reference counting or garbage collection.
  • a magic "C" call built-in module?
  • remove builtin print procedure.
  • remove builtin DELETE procedure.
  • a standard library.
  • ...