Zakaz – declarative language

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

  • Each command starts with a new line.
  • Each command must be in a human readable formal language

Hello World.tez example:

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

Example that prints description and open http://demensdeum.com in Firefox browser

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

The above example must be run along with the FirefoxPerformer, which is able to handle the last command for displaying the site via Firefox

./ZakazRuntime openDemensdeumSite.tez FirefoxPerformer

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

Source Code

https://gitlab.com/demensdeum/zakaz