mikroC

mikroC - C Compiler for Microchip PIC microcontrollers

making it simple...

LEXICAL ELEMENTS

These topics provide a formal definition of the mikroC lexical elements. They describe the different categories of word-like units (tokens) recognized by a lan- guage.

In the tokenizing phase of compilation, the source code file is parsed (that is, broken down) into tokens and whitespace. The tokens in mikroC are derived from a series of operations performed on your programs by the compiler and its built-in preprocessor.

A mikroC program starts as a sequence of ASCII characters representing the source code, created by keystrokes using a suitable text editor (such as the mikroC editor). The basic program unit in mikroC is the file. This usually corresponds to a named file located in RAM or on disk and having the extension .c.

Whitespace

Whitespace is the 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 discard- ed. For example, the two sequences

int i; float f;

and

int i; float f;

are lexically equivalent and parse identically to give the six tokens.

The ASCII characters representing whitespace can occur within literal strings, in which case they are protected from the normal parsing process (they remain as part of the string).

page

 

36

MikroElektronika: Development tools - Books - Compilers