Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/federicobond/primer
- Owner: federicobond
- Created: 2014-09-26T23:19:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T13:09:11.000Z (about 6 years ago)
- Last Synced: 2024-10-28T03:44:58.233Z (3 months ago)
- Topics: compiler, course-project, jvm, language
- Language: Java
- Homepage:
- Size: 2.81 MB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)