Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/federicobond/primer

A simple imperative language for the JVM
https://github.com/federicobond/primer

compiler course-project jvm language

Last synced: about 2 months ago
JSON representation

A simple imperative language for the JVM

Awesome Lists containing this project

README

        

Primer [![Build Status](https://travis-ci.org/federicobond/primer.svg?branch=master)](https://travis-ci.org/federicobond/primer)
======

![primer](https://cloud.githubusercontent.com/assets/138426/4963448/6a7c1160-6714-11e4-96d9-dfc2773d2334.jpg)

A programming language.

To build the project, run:

mvn package

To execute a file, run:

bin/primer run script.primer

To compile a file to a Java class, run:

bin/primer compile script.primer

You can also add a shebang like this to make a file executable:

#!/path/to/bin/primer run

### Debugging commands

To visualize the AST of a file, run:

bin/primer ast script.primer

To visualize the list of tokens of a file, run:

bin/primer tokens script.primer

To see a human-readable version of the generated bytecode, run:

bin/primer bytecode script.primer

(remember that you will need to add the primer runtime to your classpath to
execute a compiled class)