This folder contains the implementation and language examples for UPL.
UPL is written in Scala. src contains the sources of the UPL tool, in particular:
- Syntax: the grammar/AST
- Parser, Checker, Interpreter: the parser, checker, interpreter
- Main, WebMain, IDE: entry points for command line, browser, VSCode extension
'test' contains UPL examples for the UPL language. Start with 'basics.p', which explains a lot of the basic syntax. 'all.pp' is an example of a UPL project file.
To build, you can use the scripts in
- 'jarfile' to build a self-contained upl.jar file
- 'vscode-extension' to build a upl.vsix file that can be installed as a VSCode extension.
Install the vsix as a VSCode extension. Then use the 'test' folder as a workspace for testing and playing with UPL content.
It is easiest to open the UPL tool as an IntelliJ project via the scala.sbt file. The sbt file uses Scala.js to compile to Javascript. In sbt, use 'compile' to compile (generating *.class file) or 'fastLinkJS' (additinally generating a main.js file).
If you develop UPL, it is easier to skip installing the vsix file (but still generate it) and instead use 'Debug' in VSCode on the vscode-extension/extension folder, which will spawn a second VSCode window with the extension loaded.