/DLISP

Lisp-like interpreted programming language implemented in Delphi

Primary LanguageDelphi

DLISP

Lisp-like interpreted programming language implemented in Delphi. Uses Automatic-Reference-Counting for Memory Management (no cyclic reference detection yet). The syntax and function names are inspired by Clojure and LISP. Expressions as function arguments are currently evaluated eagerly, not lazily. Macros and built-in functions however can control when exactly expressions are evaluated.

Built-in Functions (current state)

  • (def <symbol> <exp>) - define a new variable in the current scope
  • (type <exp>) - returns the internal data type of the expression result
  • (print <exp1> <exp2> ...) - prints each expression in a new line to stdout
  • (list <exp1> <exp2> ...) - creates a list of values
  • (quote <exp>) - returns the expression unevaluated
  • (fn (list <symbol> ... & <symbol>) <exp1> ... ) - creates a new function
  • (__cfg <symbol> <exp>) - function for reading and setting internal configuration