JBFavicon
Zenith Parsing Engine
Monday, 26th June 2017

Zenith Parsing Engine

A scripting language that makes it easier to program

Zenith

Section I

What is the Zenith Engine?

The Zenith Parsing Engine (ZPE), often just known as the Zenith Engine, is a fully fledged language parser that features a concise programming syntax that produces powerful programs.

ZPE is designed with three core goals:

  • Easy to learn with easy to read syntax
  • Small, light and efficient
  • Quick to write

ZPE also aims to be clean, concise and well documented.

To date, all of these aims have been achieved.

Section II

Syntax

As of June 2015 there are 89 built in functions, each of which makes up the basis of the Zenith Parsing Engine.

Example syntaxes

The following samples show some syntax of the language.

Example #1: Incrementing

ZenLang
function main()
	$i = 10
	//Should print 11 due to pre-increment
	print($++i)
end function
			

Example #2: For loop

ZenLang
for($i = 0, $i < 1000, 1)
	print(floor($++i + 3.3))
end for
			

ZenLang
for($i = 0, $i < 1000, $i++)
	print(floor($++i + 3.3))
end for
			

Example #3: When is statement

ZenLang
when($i)
	is 1 do
		print("It is one.")
	is 2 do
		print("It is two.")
	otherwise do
		print("It is none of them.")
end when
			

Clean and concise.

The ZenLang (ZL) syntax has been designed to be similar to that of existing programming languages such as Java, PHP, C, VB.NET, C# and SML.

The syntax has taken the best of all languages.

Types.

ZPE does not have types. Every variable is stored without types so that variables can be changed to contain other values of different types.

Future versions of ZPE will allow you to force types on variables using the Typo typing system.

Section III

Speed and efficiency

Fast to run.

Fast to write.

Just as with BRS for .NET, the ZenLang syntax has been designed to be quick to write.

Things also read much easier as most of the syntax is designed to read like sentences.

Fifth gear.

Shorthands and shortcuts help write the code quickly.

Several alternative function names exist, for instance, string_replace can be substituted by str_replace .

Section IV

Features

Functional.

Designed for more than simplicity.

Learn.

Like BRS, ZPE was designed to be an educational language. ZPE is also built well-enough to make it incredibly useful as a programming language for performing other tasks such as system tasks and the like.

Example #1: Images for the web

ZenLang
$files = directory_list_files("/folder/")
for each($files as $file)
	$img = file_open_image($file)
	$img = image_transform_resize($img, 600, 400)
	file_save_image($img, $file)
end for
			

A clean focus and direction.

The future of ZPE focuses on efficient designs - reusing what exists already to develop and expand the potential of ZPE.

The ZPE standard library utilises the code from the language itself to develop a library of very powerful functionalities.

Content © J Balfour | Powered by reveal.js (Go full screen)