Skip to content

christianwimmer/simplelanguage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleLanguage

A simple demonstration language built using Truffle for the GraalVM.

SimpleLanguage is heavily documented to explain the how and why of writing a Truffle language. A good way to read this documentation is to generate HTML of the JavaDoc comments and read that, and then read the source alongside the comments.

This repository is licensed under the permissive UPL licence. Fork it to begin your own Truffle language.

Prerequisites

  • JDK 8
  • maven3

Installation

IDE Setup

Eclipse

  • Tested with Eclipse Mars SR2
  • Open Eclipse with a new workspace
  • Install m2e and m2e-apt plugins from the Eclipse marketplace (Help -> Eclipse Marketplace...)
  • File -> Import... -> Existing Maven Projects -> Select simplelanguage folder -> Finish

Netbeans

  • Tested with Netbeans 8.1
  • Open Netbeans
  • File -> Open Project -> Select simplelanguage folder -> Open Project

IntelliJ IDEA

  • Tested with IntelliJ 2016.1.3 Community Edition
  • Open IntelliJ IDEA
  • File -> New -> Project from existing Sources -> Select simplelanguage folder -> Click next and keep everything default on several screens -> Finish

Running

  • Execute ./sl tests/HelloWorld.sl to run a simple language source file.
  • Execute ./sl -disassemble tests/SumPrint.sl to see assembly code for Truffle compiled functions.

IGV

Debugging

  • Execute ./sl -debug tests/HelloWorld.sl.
  • Attach a Java remote debugger (like Eclipse) on port 8000.

Further information

License

The Truffle framework is licensed under the GPL 2 with Classpath exception. The SimpleLanguage is licensed under the Universal Permissive License (UPL).

About

A simple example language built using the Truffle API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.5%
  • Slash 3.3%
  • Shell 0.2%