1. Juha Komulainen
  2. blunt

Source

blunt /

Filename Size Date modified Message
.idea
annotations/org/hamcrest
gradle/wrapper
src
54 B
895 B
472 B
5.0 KB
2.3 KB
27 B

A simple compiler/interpreter.

The main flow:

       String
         |
         |  parser.Lexer
         |
         v
 parser.Token sequence
         |
         |  parser.Parser
         |
         v
  ast.ASTExpression
         |
         |  types.checker.TypeChecker
         |
         v
  ast.ASTExpression
         |
         |  analyzer.Analyzer
         |
         v
  core.CoreExpression
         |
         |  CoreExpression.assemble
         |
         v
   asm.Instructions
         |
         |  asm.VM.run
         o

Things to do:

  • non-generic type parameters for constructors
  • pattern matching against data types
    • rewrite if to pattern match
  • explicit type definitions
  • type aliases
  • type classes
  • newtype declarations
  • type declarations for stdlib