Skip to content
A statically-typed compiled language defined by a simple grammar
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
azure-pipelines.yaml Check for Valid Prequisites in Build Apr 20, 2019


Build Status

A statically-typed compiled language defined by a simple grammar.

Current Status

It is now possible to write simple programs. The following program computes 9 factorial:

fn fact(n: Number): Number
    var acc = 1
    var i = 1
    while i < n
        acc = acc * i
        i = i + 1

print fact(9) # => 362880

You can also mess around with constant strings:

# FizzBuzz
# Implementation of the legendary `FizzBuzz` algorithm.
fn fizzbuzz(n: Number): String
    (print 'fizzbuzz') if mod(n, 15) == 0 else
    (print 'fizz') if mod(n, 3) == 0 else
    (print 'buzz') if mod(n, 5) == 0 else

Building and Testing

The main build is performed by cargo. For running the functional tests and benchmarks you'll need Python. The suggested process is to use the script:

  • $ ./ will build the compiler target/release/ullage.
  • $ ./ test will build the compiler and run the test suite from specs/.
  • $ ./ bench will run the benchmarks from spec/bench/.


Ullage is open source, under the MIT License.

Features and Progress

  • Custom data structures
  • Pattern matching
  • First-class functions


  • Recognise words, numbers, comments, operators and white-space
  • Position information on each token
  • Interpolated strings
  • Expose whitespace to the parser


  • Parse base constructs
  • For loops and iterators
  • Traditional if blocks
  • Keep track of all underlying tokens
  • Expose position & span information on syntax nodes
  • Round-trippable/pretty-printable trees

Code Generation / Lowering

  • Create LLVM module and lower basic constructs
  • Array indexing
  • Arbitrary types for local variables
  • Heap allocated types
    • Lowering of String type
    • User-defined types
    • RC garbage collection (#26)
  • Library output types (LLVM ir, LLVM bc, object, staticlib, dylib, exe)
  • Control of target machine & features
  • Optimisation
  • Linker support:
    • clang - macOS linker default
    • gold - GNU ld
    • lld/llvm-link
    • Microsoft LINK
You can’t perform that action at this time.