Declarative language Zakaz

I present to your attention a pure declarative programming language – Zakaz. The main idea of ​​the new language is that an application contains commands for execution, written in any form, which must be executed by “executors”. If no “executor” can execute a command, then the program execution stops. Applications are called technical tasks (tez) and must have the extension .tez. The syntax of Zakaz requires two rules to be followed:

  • Each command starts on a new line
  • Each command must be written in formal language that is understandable to humans

Example Hello World.tez:

Show "Hello World" text on screenShow "Zakaz 'tez' example" text on screen

An example of a technical specification that displays a description of the operating principle and opens the site http://demensdeum.com in the Firefox browser

Show "Show website demo" text on screenShow "You need Firefox installed on your system to run this 'tez', and it should be callable through \"system\" C function" text on screenShow "Also there should be \"FirefoxPerformer\" assigned to Zakaz Runtime, please check manual for more information" text on screenShow website with address "http://demensdeum.com" in Firefox

The example above must be run together with the FirefoxPerformer executor, which is capable of handling the last command to output the site via Firefox

./ZakazRuntime openDemensdeumSite.tez FirefoxPerformer

To implement your own performer, you need to implement it as a dynamic library using the abstract class ZakazRuntime::Performer, and return it together with a smart pointer from the global function method createPerformer(). As an example, you can use the implementation of FirefoxPerformer.

Source code

https://gitlab.com/demensdeum/zakaz