alessiostalla / treep

Experiment in creating "language workbench" building blocks in Lisp, with no GUI, only API
GNU Affero General Public License v3.0
3 stars 0 forks source link

Treep

Treep is an (Abstract Syntax) Tree-Processing language. It aims to be the core of a "language workbench" type of application, to aid in the implementation of:

As such, Treep is a specialized language: you're not expected to write an entire application in it. Rather, it's a convienent toolbox for building other languages (interpreters, compilers, editors, ...).

In Treep, we start by defining the abstractions that make up our language (known as the concepts, metamodel, AST, etc. in other tools). Then, we can:

Treep is an Evolution of Lisp

At its core, McCarthy's LISP is the idea that we can represent all computation as lists of symbols. Therefore Lisp is a programming languages based on two fundamental data types and the functions to operate on them:

This design is marvelously simple yet powerful. Way simpler than how we are accustomed to think programming languages to be (parsers, compilers, etc.) yet surprisingly usable for writing large programs.

Treep takes the same concepts, but specializes them for high-level language design, sacrificing their simplicity:

Goals

Non-goals

Design Principles

Usage

At the present time, the language is not yet usable in practice, too many pieces are missing, in particular, a REPL. Stay tuned.

Implementation

Treep is implemented in Common Lisp and CLOS. While we believe this is an advantage, and Lisp enthusiasts will agree, the idea is that it won't be necessary to read or write any Lisp to use Treep.

We're not there yet, but that's a goal.

Installation

Treep is developed and tested on ABCL and SBCL.

Implementation and Building

Treep is structured as a tower of languages.

Each new level may require additional support from the levels below, so as the implementation progresses the above could change.

License

To the general public, Treep is distributed under the AGPL license, which is quite strict. However, individuals and corporations that want to use Treep for their purposes can obtain a friendlier license (either for free or for a fee, depending on the intended use). Please write to the author.