All Projects → spy16 → parens

spy16 / parens

Licence: other
Parens is a highly flexible and embeddable LISP toolkit. 💻

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to parens

Yoctolisp
Tiny Scheme-like Lisp interpreter written in a weekend
Stars: ✭ 117 (+265.63%)
Mutual labels:  lisp-interpreter
CopperLang
The Copper interpreted programming language / embeddable interpreter / virtual machine
Stars: ✭ 27 (-15.62%)
Mutual labels:  scripting-engine
genyris
Genyris presents a new programming paradigm. Objects can belong to multiple classes independent from construction allowing data to be classified into types after creation.
Stars: ✭ 14 (-56.25%)
Mutual labels:  lisp-interpreter
Lice
A multi-paradigm programming language running on JVM
Stars: ✭ 120 (+275%)
Mutual labels:  lisp-interpreter
G Fu
Lisp 2 Go
Stars: ✭ 243 (+659.38%)
Mutual labels:  lisp-interpreter
venusscript
A dynamic, interpreted, scripting language written in Java.
Stars: ✭ 17 (-46.87%)
Mutual labels:  scripting-engine
Mumbler
My experimental programming language using Truffle
Stars: ✭ 100 (+212.5%)
Mutual labels:  lisp-interpreter
jisp
Small Lisp expression interpreter made in Java
Stars: ✭ 19 (-40.62%)
Mutual labels:  lisp-interpreter
WPF-Blockly
A WPF based visual programming editor and execution engine, which support all the code syntax (including module and object oriented programming), and even you can define your own syntax.
Stars: ✭ 236 (+637.5%)
Mutual labels:  scripting-engine
abap scheme
ABAP Scheme
Stars: ✭ 13 (-59.37%)
Mutual labels:  lisp-interpreter
Lips
Scheme based powerful lisp interpreter written in JavaScript
Stars: ✭ 120 (+275%)
Mutual labels:  lisp-interpreter
Esp Lisp
Beta: A small fast lisp interpeter for a ESP8266 as alternative to lua on the nodemcu.
Stars: ✭ 236 (+637.5%)
Mutual labels:  lisp-interpreter
lispkit
FUNCTIONAL PROGRAMMING: Application and Implementation, Peter Henderson, ISBN 0-13-331579-7
Stars: ✭ 33 (+3.13%)
Mutual labels:  lisp-interpreter
Cisp
A Common Lisp Interpreter Built in COBOL
Stars: ✭ 120 (+275%)
Mutual labels:  lisp-interpreter
sgscript
SGScript Scripting Engine
Stars: ✭ 60 (+87.5%)
Mutual labels:  scripting-engine
Golisp
Lisp Interpreter
Stars: ✭ 107 (+234.38%)
Mutual labels:  lisp-interpreter
BowlerStudio
A Full-Stack Robotics Development Environment
Stars: ✭ 95 (+196.88%)
Mutual labels:  scripting-engine
surgescript
SurgeScript: a scripting language for games.
Stars: ✭ 41 (+28.13%)
Mutual labels:  scripting-engine
PureLISP.sh
A Pure LISP interpreter written in shell script conformed to POSIX shell
Stars: ✭ 30 (-6.25%)
Mutual labels:  lisp-interpreter
CoCoC
C development system for (Nitr)OS9/6x09, with source
Stars: ✭ 22 (-31.25%)
Mutual labels:  lisp-interpreter

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

  • Highly customizable and powerful reader/parser through a read table (Inspired by Clojure) (See Reader)
  • Built-in data types: nil, bool, string, number, character, keyword, symbol, list.
  • Multiple number formats supported: decimal, octal, hexadecimal, radix and scientific notations.
  • Full unicode support. Symbols can include unicode characters (Example: find-δ, π etc.) and 🧠, 🏃 etc. (yes, smileys too).
  • Character Literals with support for:
    1. simple literals (e.g., \a for a)
    2. special literals (e.g., \newline, \tab etc.)
    3. unicode literals (e.g., \u00A5 for ¥ etc.)
  • Easy to extend. See Extending.
  • A macro system.

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:

  • Numbers:
    • Integers use int64 Go representation and can be specified using decimal, binary hexadecimal or radix notations. (e.g., 123, -123, 0b101011, 0xAF, 2r10100, 8r126 etc.)
    • Floating point numbers use float64 Go representation and can be specified using decimal notation or scientific notation. (e.g.: 3.1412, -1.234, 1e-5, 2e3, 1.5e3 etc.)
    • You can override number reader using WithNumReader().
  • Characters: Characters use rune or uint8 Go representation and can be written in 3 ways:
    • Simple: \a, , etc.
    • Special: \newline, \tab etc.
    • Unicode: \u1267
  • Boolean: true or false are converted to Bool type.
  • Nil: nil is represented as a zero-allocation empty struct in Go.
  • Keywords: Keywords represent symbolic data and start with :. (e.g., :foo)
  • Symbols: Symbols can be used to name a value and can contain any Unicode symbol.
  • Lists: Lists are zero or more forms contained within parenthesis. (e.g., (1 2 3), (1 [])).

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.

  • Macro-expansion can be customised by setting a custom Expander implementation. See parens.WithExpander().
  • Syntax analysis can be customised (For example, to add special forms), by setting a custom Analyzer implementation. See parens.WithAnalyzer().

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].