A functional scripting language implemented in Java, inspired by Haskell, JavaScript, and Python.
Java XSLT Groovy
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle
sterling-lang
sterling-web
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradle.properties
settings.gradle

README.md

Sterling Code Build Status

Sterling is a functional scripting language implemented in Java, inspired by Haskell, JavaScript, and Python.

Read the Quickstart

Design Goals

  • Everything is an expression. Expressions can be constants, lambdas, curried functions, or objects.
  • Language is blend of object-oriented and functional programming.
  • Everything is immutable. State is emulated through heavy use of prototyping.
  • No type system: duck typing only.

Building and Running

Requirements

  • Gradle 1.5
  • Java 7 Update 21+

Build and Runtime Commands

Task Command Notes
Build $ gradle clean build Performs clean, compilation, and test
Executable $ gradle installApp Creates executable in build/install/sterling/bin
View Commands $ sterling Runs executable and displays available commands
Run Program $ sterling run sterling.example.program Runs Sterling main function in module
Translate $ sterling translate sterling.example.program Translates Sterling program in source file to AST
Parse $ sterling parse Parses input from command line to concrete tree

Example Program

This will create the executable and run the main function defined in src/main/resources/org/sterling/example/program.ag:

$ gradle installApp
$ ./build/install/sterling/bin/sterling run sterling.example.program

@TODO

  • Document modification of grammar and lexical specifications