===
Jacket, implementation of Lisp on the JVM.
With this project I mean to:
- Employ JVM runtime system
- Practice theory of compilation
- Build yet another LISP implementation
- Implement partial application with s-expressions
- Have fun
Progress:
-
Lexer with regular grammar recognized by a finite state machine. Batteries included (FSM)
-
Parser
-
Semantic analysis
-
Language basics, n-arity polymorphic functions
- readln, println, print
- arithmetics (sum +, substraction -, multiplication *, division /)
- logical operations (and, or, xor, not)
- comparison operations (less <, less or equal <=, greater >, greater or equal >=, equal =, not equal !=)
-
Conditionals
-
Lists and list operations
-
Variables
-
Functions
-
Java interop
- Objects intantiation (class. args)
- Static fields access: (println java.lang.Short/MAX_VALUE)
- Static methods invokation: (java.lang.Double/valueOf "42E1")
- Instance fields access: (.FALSE #t)
- Instance methods invokation: (.after (java.util.Date. 1) (java.util.Date. 0))
- Shortcut syntax for all above: (. x method args), (. x field)
-
Macros
-
In future (may be) - web ui with ClojureScript. Send code, receive output and asm code. Deploying webapp. Github errors reporting, syntax hightlight, syntax hints.
-
Refactoring. Small bugfixes, using more protocols between modules.
- limiting stack
- optimal closures (only scope variables than are needed)
- check-dynamic-list, with arity and operation, must return sexprs inside
- unique labels problem (actual?)
- circular dependencies in macro (actual?)
- globals - check in list before generating else generate a error
- arguments/closed/locals - Token. or just symbol, storing in context?
- expressions returning something always (just check, make sure)
- if embedded let then inner variables redefine outside variables (just check)
- cond: check odd amount of arguments
- semantic analysis of some expressions does not return s-expressions (actual?)
- nil for printlns (leave on stack)
- error in lexer - "-" symbol, test it
- other characters inside strings