Official Language Specification — Version 1.0
Imvoke(:"system/64/user…")
World-type(:Azra , [ip = 1234])
name int, float
-- } space for main code
Extract : 123456
int, float
Extract(:Hello World)
*for more than 50 character use "str"
str
Delog{int, float, str…}
This is used to import the variables we need into the code;
otherwise, we can remove this line.
Submit(:1.azr)
Version 1.0
Document Type: Official Language Specification
In AZRA, every variable must follow a strict and recognizable pattern. This structure allows the system to correctly detect and interpret variable definitions.
-<VariableNumber><VariableName> = <Value>-
The leading and trailing dash characters (-) act as structural boundaries. If either dash is missing, the system cannot detect the definition and a Syntax Error will occur.
Every variable definition must begin with a dash (-).
Correct: -0x = 2-
Incorrect: 0x = 2
Each variable must have a numerical index placed directly before the variable name.
0.Example (third variable): -2msg = Hello-
Note: Floating-point values do not affect numbering rules.
The only number allowed before the variable name is the variable index.
Incorrect: -42A = Hello-
Numbers may appear inside the variable name only if they come after a letter.
Correct: -1Am1r = 10- -2x2 = 5-
Every variable definition must end with a dash (-).
Correct: -3b = Hello World3-
Incorrect: -3b = Hello World3
Missing the closing dash results in an Open Variable Syntax Error.
Strings with fewer than 50 characters may be written without quotation marks.
Examples: -1y = Hello World- -2z = Hi-
Strings with 50 or more characters must be enclosed in double quotation marks (").
Example: -3longMsg = "This is a long text containing more than fifty characters…"-
Single quotes (' ') are not recognized by AZRA and will cause a Syntax Error.
Incorrect: -1x = 'Hello'-
If a string begins or ends with a number-letter combination, it is still treated as a string.
Valid Examples:
-1y = 1Hello World-
-2z = Hello 1 World-
-3b = Hello World3-
The system determines value types using the following logic:
@ or ref: → Symbol / ReferenceReferences such as @2 are not standalone values. They must be wrapped inside parentheses when used in supported commands (e.g., Extract).
Correct: Extract(:@2)
Incorrect: Extract : @2
If a string contains multiple words, it is recommended to use double quotes for clarity, even if under 50 characters.
Recommended: -0name = "Amir Hosseini"-
= is flexible and stylistic. All are valid: -0x = 2- , -0x = 2 - , -0x=2--0x = 5- then -2y = 10- (Index 1 is missing).-1x = 5--0 1name = 2- , -3 12x = ok-_. No other characters are permitted.-0a = "1Hello"- , -1code = 1xTest-. Incorrect: -0a = 1-@2 cannot be directly assigned to a variable. Incorrect: -0ref = @2-. Symbols must be accessed through supported structures: Extract(:@n)The Target System refers to the system on which the code will be executed. This system has two possible forms:
The file containing the code must be named using numbers only. Examples: 1.azr , 561.azr. No alphabetic characters are allowed in the filename.
An AZRA file can only connect to other files written in the same language (AZR). If the file needs to connect to external code or a non-AZR file, that file must first be converted (compiled) into AZR format before use. Therefore, AZRA files only communicate with files of the same type.
Before the main body of code begins, certain metadata must be defined. This includes: the invoked system, file type (default: azr), system ID for execution authorization, and the symbol -- to mark the beginning of the main code section.
At the beginning of every file, the Imvoke instruction must appear. This command is responsible for calling the execution system, defining the system version, defining access level, and determining which environment is authorized to execute the file.
Example: Imvoke(:"system/64/user.001.alpha")
This line informs the system which environment should execute the file, which version is required, and what access level is permitted. If a system other than the specified one attempts to execute the file, execution will be denied. Without the Imvoke instruction, the file is not authorized to run and will be rejected.
The World-type instruction defines the execution environment and world configuration.
Example: World-type(:Azra | [ip = 1234])
This line specifies that the code runs in the Azra world with defined environmental parameters (for example, IP address or network identifier).
In AZRA, variable names must never contain spaces. Incorrect example: -0amir reza = 2- — This produces a Syntax Error because there is a space between amir and reza.
To separate words inside a variable name, the following character must be used: underscore _. Correct version: -0amir_reza = 2-. This version is also valid: -0amir-reza = 2-.
Note: In World-type, the underscore rule does not apply because World-type is a core system instruction and is not governed by the standard AZRA variable grammar.
At the end of the file, specific instructions must be added to inform the execution system what data should be processed and what data should be ignored. This section usually consists of two final commands: Delog{ … } and Submit.
General Format: Delog{int, str, …}
This instruction specifies which data types from the file's variables must be recognized during compilation. It defines which variable types (int, str, bool, ref, etc.) the program should process, instructs the compiler to ignore variables of other types, and ensures that only the types listed inside {} are included in final processing.
If Delog{...} is not present, all variables in the file are considered valid and required. The compiler must process every variable.
Example: Delog{int, str} — This means only numeric and string variables are relevant. Other types (e.g., bool or ref) will be ignored.
General Format: Submit(:<filename>)
Example: Submit(:1.azr)
This instruction must appear at the end of the file. It officially marks the end of the code, confirms successful execution, registers the file name for reporting and dependency tracking. No executable instructions may appear after Submit.
In a standard AZRA file, the ending typically appears as:
Delog{int, str, ref}
Submit(:123.azr)
Execution flow: 1. Delog determines which data types are processed and which are ignored. 2. Submit finalizes and officially closes the file execution.
Delog and Submit are complementary and form the official termination block of an AZR file. If either of them is missing, the system will consider the file incomplete or invalid.
Official Language Rule Document
The DBS (Dash Block Separator) rule is one of the core structural principles of the AZRA programming language. Its main purpose is to enforce organization, enhance readability, and allow structural verification of code blocks during compilation. Proper use of DBS enables the compiler to precisely identify where each code block starts and ends.
After every multi-line block, there must be a separator line consisting only of dash (-) characters. The number of dashes in that line must be exactly equal to the number of lines contained in the preceding block. This line acts as a "block signature", confirming the structural integrity and completeness of that code section.
A block is defined as a sequence of consecutive lines that together form a single logical unit within the program. Common examples of blocks in AZRA include: multiple variable definitions written consecutively, several Extract instructions grouped together, a series of related operations, or any segment of code perceived by the programmer as one cohesive unit. After every block, inserting a DBS line is mandatory. Omission of the DBS line will result in a compilation error.
Example 1: Two Line Block
-0x = Hello World-
Extract(:Hello World)
--
Because the block contains 2 lines, the separator line contains 2 dashes (--).
Example 2: Three Line Block
-1y = 1Hello World-
-2z = Hello 1 World-
-3b = Hello World3-
---
The block contains 3 lines, thus the separator consists of 3 dashes (---).
The DBS is not a mere visual separator—it plays several critical structural roles within the AZRA language:
The compiler is required to detect and report the following DBS-related errors:
-).The Dash Block Separator (DBS) rule ensures: structural stability of AZRA code, automatic detection of editing or copying errors, and verification of block completeness during compilation. By enforcing DBS at the end of every multi-line block, AZRA maintains deterministic structure validation and precise compilation integrity.
Official Structural & Behavioral Definition
A Class in AZRA is used to define a custom data type. A class contains: the class name, a list of properties, and optional method bodies.
General Structure:
Class(:ClassName | [prop1:type , prop2:type , …])
The first parenthesis holds the class name. The bracket block contains the property list. After defining a class, a DBS line must be placed, containing exactly 1 dash, because the class definition is considered a single structural line.
Example:
Class(:Person | [name:str , age:int])
-
This structure creates a Person class with two properties: name and age.
A Method is a function associated with a class and describes the behavior of an object.
General Structure:
Method(:methodName) ->returnType
-[variable definitions and operations]-
turn(:value)
Rules: A method must always begin with the keyword Method. returnType defines the method's output type. Internal variables must follow AZRA Variable Definition rules. Output must be produced using turn. The method must end with a DBS line, where the number of dashes equals the number of internal lines.
Example:
Method(:greet) ->str
-0msg = "Hello" + name-
turn(:msg)
--
(2 internal lines → --)
A Function (Func) is an independent piece of code located outside of classes, often used for higher-level logic or main program flow.
General Structure:
Func(:functionName)
-[variable definitions and operations]-
turn(optional)
Rules: A function begins with Func. It may contain variables, operations, method calls, and Extract. Output is defined using turn; it may be empty. Ending DBS must contain a number of dashes equal to the number of internal lines.
Example:
Func(:main)
-0p = Person("Amir" , 20)-
-1result = p:greet()-
Extract(:@1)
turn()
----
(4 internal lines → ----)
Methods are invoked using the : operator. General Form: object:method(). Example: p:greet() — This executes the greet method on object p.
Objects are created using the class name followed by arguments. General Structure: variable = ClassName(arg1 , arg2 , …). Example: -0p = Person("Amir" , 20)-
The turn instruction defines the output of a method or function. Forms: turn(:value) or turn() (no output).
All Class, Method, and Function definitions must end with a DBS line. The count of dashes must exactly match the number of internal logical lines of the block. This ensures structural validation, detection of missing, extra, or reordered lines, and block integrity at compile time.
In AZRA, logical decision-making is done through a four-part conditional chain consisting of the following reserved keywords: is, reply, shoot, wall(). This order must never change. Any modification in ordering results in a syntax error.
The conditional structure always begins with is. It defines the main logical condition. If the condition evaluates to true, its block executes. After execution, the entire chain terminates. If false, execution moves to the next stage (reply).
Zero or more reply sections may follow is. Each reply has its own independent condition. A reply is evaluated only if all prior conditions failed. If true, its block executes and the chain ends. If false, the next reply is tested.
If none of the previous conditions (is or any reply) evaluate to true, execution enters the shoot block. shoot acts as the final fallback path. It always appears after all replies.
The conditional chain must end with wall(). This instruction marks the official end of the conditional block and allows the compiler to close the structure correctly. If wall() is missing, a syntax error occurs because the compiler cannot determine where the decision structure ends.
is → If true → execute → endreply in order → First true reply → execute → endshootwall() to officially close the structureAfter the conditional chain ends (right after wall()), a DBS line must appear. The number of dashes must match the total logical lines inside the conditional block. A mismatch results in a DBS error.
Conditional Structure Specification — AZRA Language
The conditional structure in AZRA consists of four components: is, reply, shoot, wall(). These four elements together form the complete logical decision chain.
The keyword is is the first element of the conditional chain. The primary condition of the structure is defined within this section. If the condition inside is evaluates to true, its corresponding block is executed. After execution of the is block, the conditional chain terminates immediately.
The keyword reply is used to define additional conditions following is. Each reply is evaluated only if all preceding conditions have evaluated to false. Multiple reply sections are allowed within a single conditional chain. reply sections are evaluated strictly in the order they are written. The first reply whose condition evaluates to true will execute its block, and the chain terminates at that point.
The keyword shoot defines the fallback (default) path of the conditional chain. shoot executes only if none of the conditions in is or any reply evaluate to true. The definition of shoot is optional. If shoot is not defined and no condition evaluates to true, the chain terminates without executing any block. shoot has two syntactical forms: full form shoot() -> and short form shoot ->.
The keyword wall() marks the official termination of the conditional chain. The presence of wall() at the end of the conditional structure is mandatory. Omission of wall() results in a syntax error.
is → reply (zero or more times) → shoot (optional) → wall()
The defined order must be strictly followed. Any reordering, invalid repetition, or incorrect placement of elements results in a syntax error. Only the first branch whose condition evaluates to true is executed. All subsequent branches are ignored.
— End of AZRA Cipher Syntax Specification —
Click here to download the PDF file