Tokens
Token is the smallest element of a mikroBasic PRO for ARM 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.
mikroBasic PRO for ARM 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 newline ' statement terminator
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!