Skip to content

goetz-markgraf/gamma-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamma CLI

A CLI (command line interface) for the gamma programming language. This project uses gamma-library.

This project is an example of how to integrate gamma-library in a project.

how to use gamma CLI

invoke with a gamma file

You can call the CLI with a location of a .gma-File as a parameter. The file is then parsed, executed and the result of the last expression printed out as the result of the script.

Use the CLI as a REPL

If you start the CLI without any parameter, you will be greeted with a REPL. You can then type gamma code and have it executed with the command . (a single dot on the input line).

Type .help to see all commands.

use the CLI as an interpreter for a script in another file

If you have a file with valid gamma-code you can use the CLI to execute that. Simply supply the name of the file as the first (and only) parameter.

The CLI will parse and execute the script. The result of the last expression together with the runtime in milliseconds will be printed out.

native compile the gamma interpreter

You can install GraalVM together with its module native-image to produce a machine native executable binary.

Once you have installed, just call build.sh and the current CLI – together with the latest build of gamma-library – will be natively compiled. This executable can be moved to any position on the classpath to run the REPL or the interpreter for gamma-script files natively.

About

A CLI for gamma-library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published