Tokens
Token is the smallest element of a mikroPascal PRO for PIC32 program, meaningful to the compiler. The parser separates tokens from the input stream by creating the longest token possible using the input characters in a left–to–right scan.
mikroPascal PRO for PIC32 recognizes the following kinds of tokens:
Token Extraction Example
Here is an example of token extraction. Take a look at the following example code sequence:
end_flag := 0;
First, note that end_flag
would be parsed as a single identifier, rather than as the keyword end
followed by the identifier _flag
.
The compiler would parse it as the following four tokens:
end_flag // variable identifier := // assignment operator 0 // literal ; // statement terminator
Note that :=
parses as one token (the longest token possible), not as token :
followed by token =
.
Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!