See the Language Report for a detailed description of the language and the compiler.
Make sure you have stack installed and run:
stack install alex
stack build
SPL-compiler
Usage: spl-compiler FILENAME [-o|--output FILENAME] [-l|--lexerDump]
[-p|--parserDump] [-t|--typeCheckerDump] [--noOptimization]
Compiler for the SPL Language
Available options:
FILENAME Input file for compiling
-o,--output FILENAME Output file for writing result
-l,--lexerDump Only lex file and print the result
-p,--parserDump Only parse file and pretty print the result
-t,--typeCheckerDump Parse and typecheck, then pretty print the result
--noOptimization Do not perform constant folding and dead code elimination
-h,--help Show this help text
stack run spl-compiler -- -o out.ssm helloWorld.spl
./ssm.sh --cli --file out.ssm
We have an extensive test suite which can be run using:
stack test --coverage