====== The Arx Syntax and Semantics ======
===== General =====
The Arx language has a //mainstream// syntax comparable to the syntax
of languages as
[[wp>C_(programming_language)|C]],
[[wp>Pascal_(programming_language)|Pascal]],
[[wp>Matlab|Matlab]], or
[[wp>VHDL|VHDL]]. The most deviant syntax feature is maybe that //no
semicolons// are used at the end of statements.
===== Case Sensitivity =====
Arx is case sensitive. All keywords should be written in lower case.
Identifiers can have upper and lower case characters. It is, however,
not recommended to rely on case for distinguishing identifiers.
VHDL, for example, is not case sensitive which will cause identifiers
that only differ in case to become identical after code generation.
===== Notation =====
A simple notation is used to describe the Arx syntax. In principle,
the syntax elements (keywords, punctuation, etc.) themselves
are directly presented. Elements that do not belong to the language
are enclosed in angle brackets ''<'' and ''>''. So:
bitvector()
is used to indicate that the vector length is part of the
bitvector. For real Arx code should be replaced by an integer or
an expression that evaluates to an integer:
bitvector(32)
or:
bitvector(word_length-1)
An optional syntax element is indicated by enclosing it in the brace
pairs ''-{'' and ''}-''.
The repetition of some syntax element by one or more times is
indicated by putting that element between the special brace pairs
''+{'' and ''}+''. The brace pairs ''*{'' and ''}*'' are used for a
repetition of zero or more times.
So, the syntax description:
variable
+{ *{, }* : }+
indicates that the following fragment of code is valid:
variable
a, b: integer
c: real
===== Getting Started =====
Arx specifies [[component|components]], which are comparable to
//modules// in Verilog or //entity-architecture// combinations in
VHDL. Readers new to Arx are recommended to visit the
[[component|component]] page and follow from there the links
to the other language elements.
===== Main Topics =====
The list below gives direct access to important main topics relevant
for learning the Arx syntax and semantics:
* [[component|The component]]
* [[declarations|Declarations]]
* [[statements|Statements]]
* [[expressions|Expressions and operators]]
* [[datatypes|Data types]]
* [[instantiation|Instantiation and hierarchical descriptions]]
* [[function|Function definition and function call]]