Skip to content
Llispy is a restricted subset of Scheme that compiles to native code via LLVM IR
Scala C++ Scheme Python C Objective-C
Find file
Latest commit bb45257 @etaoins Use the correct type ID for indirects
This presumably makes our garbage collector follow indirects correctly

README.md

Overview

Llispy is a Scheme implementation that compiles to native code via LLVM IR. The compiler is written in Scala while the runtime and included standard library are written in C++ with Scheme glue.

Llispy's Scheme dialect targets the Scheme R7RS-Small draft with inspiration from MIT Scheme for determining behaviours left unspecified by R7RS. The compile and run phases are strictly separated; the R7RS read module supporting runtime parsing of S-expressions will not be implemented. This unforunately excludes the possibility of a stateful REPL.

Requirements

The compiler and generated executables target modern Unix-like systems. Mac OS X 10.7, Ubuntu 11.04 on x86-64 and x86 have been successfully tested along with x86-64 FreeBSD 8.2. The minimum requirements for Llispy are:

  1. LLVM and Clang++ 3.0svn for Mac OS X or 2.9+ for Linux
  2. simple-build-tool 0.10.0
  3. Python 2.6

Usage

The runtime must first be built by running make in the runtime/ directory. The compiler/ directory can then be built with simple-build-tool. The resulting JAR can be invoked as:

llispy infile.scm outfile

This will produce a standalone executable linked against the runtime. There is also a "REPL" available by running the compiler without arguments. This simply wraps the user's input in (display) and then compiles and executes it on the fly. There is no state kept between expressions entered in the REPL.

Something went wrong with that request. Please try again.