General syntax
EGL
is a specification-level
language. Using EGL, you can perform the following
tasks:
- Define data.
- Generate the logic that operates on the data.
- Customize user interfaces to present the data.
The syntax for these definitions uses five different types
of tokens (the
smallest meaningful particles in a program). Consider the following
line of
EGL code:
while (customerNumber != 0)This
line contains the following tokens:
- "while"
- "("
- "customerNumber"
- "!"
- "="
- "0"
- ")"
The EGL
parser examines these tokens and classifies them. There are five
different types of tokens:
- Literals
- Literals
can be numeric (numbers) or strings (characters, in quotation
marks). For example,
0is a literal. - Identifiers
- Identifiers are names you assign
to functions, variables, libraries, and
other named entities in the program. For example,
customerNumberis an identifier. - Keywords
- Keywords are names EGL reserves for functions, properties, statements, constants, and other special purposes. For example, the keyword while signals the beginning of an EGL loop statement. For more on statements, see EGL statements.
- Operators
- Operators are symbols that define relationships between identifiers, or keywords, or both. For example, "not equal to" (!=) is an operator.
- Special characters
- Special characters provide the punctuation in EGL statements. For example, parentheses surround a logical expression like "customerNumber != 0".