Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
LEXICAL ELEMENTS OVERVIEW
The following topics provide a formal definition of the mikroPascal PRO for AVR lex-
ical elements. They describe different categories of word-like units (tokens) recog-
nized by mikroPascal PRO for AVR.
In the tokenizing phase of compilation, the source code file is parsed (i.e. broken
down) into tokens and whitespace. The tokens in mikroPascal PRO for AVR are
derived from a series of operations performed on your programs by the compiler.
Whitespace
Whitespace is a collective name given to spaces (blanks), horizontal and vertical
tabs, newline characters and comments. Whitespace can serve to indicate where
tokens start and end, but beyond this function, any surplus whitespace is discarded.
For example, two sequences
var i : char;
j : word;
and
var
i : char;
j : word;
are lexically equivalent and parse identically to give nine tokens:
var
i
:
char
;
j
:
word
;
Whitespace in Strings
The ASCII characters representing whitespace can occur within string literals, in
which case they are protected from the normal parsing process (they remain a part
of the string). For example,
Whitespace in Strings
some_string := 'mikro foo';
120
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroPASCAL PRO for AVR
CHAPTER 5