https://github.com/federicobond/primer
A simple imperative language for the JVM
https://github.com/federicobond/primer
compiler course-project jvm language
Last synced: 3 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T13:09:11.000Z (over 6 years ago)
- Last Synced: 2025-02-08T07:44:15.566Z (5 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 [](https://travis-ci.org/federicobond/primer)
======
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)