spy16 / parens

Parens is a highly flexible and embeddable LISP toolkit. :computer:
33 stars 3 forks source link
embeddable-language golang lisp lisp-interpreter parens scripting-engine

Parens

GoDoc Go Report Card Go

DEPRECATED: This repository is deprecated in favour much better slurp project and will be archived/removed soon.

Parens is a highly customisable, embeddable LISP toolkit.

Features

Please note that Parens is NOT an implementation of a particular LISP dialect. It provides pieces that can be used to build a LISP dialect or can be used as a scripting layer.

Usage

What can you use it for?

  1. Embedded script engine to provide dynamic behavior without requiring re-compilation of your application.
  2. Business rule engine by exposing very specific & composable rule functions.
  3. To build your own LISP dialect.

Parens requires Go 1.14 or higher.

Extending

Reader

Parens reader is inspired by Clojure reader and uses a read table. Reader can be extended to add new syntactical features by adding reader macros to the read table. Reader Macros are implementations of reader.Macro function type. All syntax that reader can read are implemented using Reader Macros. Use SetMacro() method of reader.Reader to override or add a custom reader or dispatch macro.

Reader returned by reader.New(...), is configured to support following forms:

Evaluation

Parens uses an Env for evaluating forms. A form is first macro-expanded and then analysed to produce an Expr that can be evaluated.

I've just received word that the Emperor has dissolved the MIT computer science program permanently.