ZPE Programming Environment

ZPE Programming Environment (or simply ZPE), formerly the Zenith Parsing Engine is a general-purpose compiler, parser and runtime environment for the YASS language designed for educational use as well as for its general use. The language it interprets, YASS, is an interpreted, high-level, general-purpose programming language. YASS is largely built upon making the language easy to read and use, with optional support for syntaxes such as curly-bracket syntax. YASS supports dynamic typing or static typing, as well as strong typing and weak typing.

It was started in May 2015 as a planned university project but later was changed to be a replacement for another programming language developing at the time known as BlackRabbit Script, also built by Jamie Balfour. ZPE and YASS were designed to help with the automation of scripts by clearing up the inconsistent syntaxes of other scripting languages. The Zenith Parsing Engine (formerly ZenithParser) powers the underlying parsers, including the CSV, JSON and XML parsers.

The ZPE Programming Environment is written in Java, making it cross-platform. A side effect is that specific plugins and built-in objects are entirely written in Java.

Whilst ZPE is closed source, all plugins, transpilers and additional tools are open-source. The Standard Algorithms library is also open-source and available on Balfour's GitHub page.

YASS
The language interpreted by the ZPE runtime is known as YASS or Yet Another Simple Syntax. Several languages influenced the YASS syntax including C, PHP, Java, JavaScript, VB.NET, C#.NET, SML and Python which has remained largely the same since about version 1.5. ZPE/YASS can be used for general-purpose programming, support client and server communications, and server-side scripting. Some websites are already using ZPE alongside other languages such as PHP.

YASS can also be transpiled to other languages such as Python and PHP.

Features
ZPE features many built-in functions including functions that simplify mathematical problems such as the greater_than_all function, the to_binary, to_octal and to_hexadecimal functions as well as many functions to streamline processing of arrays such as,   and. ZPE also features a parser known as the Zenith Parser Engine, which forms the foundation of the whole language processor and performs both lexical analysis and compiler optimisation on textual input.

On the original subsite dedicated to ZPE, a documentation section documents all language constructs, internal functions and syntax.

ZPE was initially built as a planned university project that never came to fruition. In the end, it was eventually used as the replacement for the BlackRabbit Script language that Balfour was developing at the time. ZPE originally had no mathematical parser, meaning functions were used for addition, subtraction, division and multiplication. An example of this early syntax:

In late 2015, still in version 1.3.x of ZPE, the Real Math Mode (RMM) parser was added. Syntax changed so that it looked a lot more like other languages:

To improve performance, the Real Math Mode parser was replaced by the Logical And Mathematical Parser (LAMP) in 2016 and then the Logical And Mathematical Evaluator (LAME) in 2019.

ZPE and YASS also support a mix of strong typing and weak typing in the same script:

YASS Unfold
YASS Unfold is a syntax analyser that can transform syntax into descriptions. YASS Unfold works based on the AST generated from the code to generate code descriptions.

Transpilers
ZPE also added transpilers to convert YASS to other languages efficiently. These are distributed as plugins and are available on Balfour's GitHub and personal website.

The first transpiler built was the YASS to Python transpiler (known as ZenPy) due to similarities in how both languages work underneath.

Transpilers to convert YASS to PHP and Java also exist but are less mature than ZenPy.

Libraries
ZPE/YASS rely on libraries being developed to extend functionality. The main reason behind this is to reduce the size of the main runtime package. Specific libraries are written in the YASS language itself and then compiled. They are then distributed via the ZULE network, which was added in 2018.

Other libraries are written in native Java. For example, the zpe_mysql library adds MySQL functionalities to the language using a library around six times the size of the original runtime.

ZPE Native
In August 2022, an AArch64 build was compiled using the GraalVM compiler. This offered performance much better than the JRE version alone. ZPE Native can improve performance considerably but is not cross-platform and is only available on current platforms (this includes an EXE for Windows, a Linux-compatible binary, and the AArch build).