Chapter 2, Jaz scripting engine, Architecture – Ocean Optics Jaz Scripting Language and Scripting Engine User Manual
Page 11: Jaz scripting engine architecture, Overview, Jaz scripts, Script general layout
013-RD000-000-12- 201010
3
Chapter 2
Jaz Scripting Engine
Architecture
Overview
The Jaz Scripting engine comprises the linguistic analyzer for the language as well as the runtime driver
for script execution. The engine is invoked in the standard UNIX command line format with command
flags and arguments which determine modes of actions and the source of input.
Jaz Scripts
A script is an ASCII text file which can be composed by whatever means a user wishes to employ. Care
has been taken to filter out extraneous characters used as formatting by some editors. Plain 7-bit ASCII
text is the expected input.
Script General Layout
A script has the following sections:
Constants (optional)
Variable Declaration
Main Program
(optional)
Constants (optional)
Constants are values the script writer wishes to reference as if they were built-in elements. A Constants
section is not mandatory. If defined, the script engine defines the constant’s type via a strict parse of the
value. Constants may not be changed once defined. The script engine will flag all attempts to redefine a
constant at compilation time.
Variable Declaration
Variables must be declared before use in the program or in user-defined procedures. A variable has a
name, a type, and possibly a modifier (depending on the type). The script engine checks the type of each
variable for the appropriateness of its type in an expression. Type mismatches are flagged by the parser at
compile time as errors. There must be a Variable Declaration section as the script would be useless
without variables to operate on.