20.01.2015 Views

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

etter achieved through two sets of syntax. <strong>The</strong> semantics of both sets of syntax are<br />

equivalent and are described in Section 4.<br />

<strong>The</strong> following section explains the formal grammar that is used to express the basic<br />

concepts from the previous section, such as types, constants, variables, expressions, etc.<br />

<strong>The</strong> formal grammar is used in both the XML and text syntaxes where applicable to<br />

define the format of strings. <strong>The</strong> formal grammar is given in Backus-Naur Form (BNF)<br />

where the syntactic symbol ’|’ means ”or”, ’[]’ means optional, and ’{}’ means 0 or<br />

more instances (Kleene closure). <strong>The</strong> special form of the closure operator, denoted<br />

’{} + ’ means 1 or more instances. Any constant is given inside of single quotation<br />

marks. For example, the keyword denoting the type integer is given as ’Integer’. It is<br />

important to distinguish between the syntactical ”optional symbol ’]’ and the constant<br />

denoting the right bracket ”]”.<br />

3.2.1 Basic Grammar<br />

Formally, the BNF grammars for the concepts described so far is given below. <strong>The</strong><br />

first part of the basic grammar explains the rules for constructing names, constants,<br />

and types. <strong>The</strong> second part of the grammar explains the rules for constructing expressions,<br />

variables, and formulas. <strong>The</strong> <strong>TASM</strong> language ignores whitespace unless<br />

whitespace is required. When whitespace is required, it is denoted by the token <<br />

T ASMW hitespace >. Tab characters, space characters, new line characters, carriage<br />

return characters, and form feed characters all represent whitespace.<br />

40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!