2.2 Lexical Elements, Separators, and Delimiters
Static Semantics
{text of a program}
The text of a program consists of the texts of one
or more
compilations.
{lexical element} {token:
See lexical element} The text of each
compilation
is a sequence of separate
lexical elements. Each lexical element
is formed from a sequence of characters, and is either a delimiter, an
identifier,
a reserved word, a
numeric_literal,
a
character_literal,
a
string_literal,
or a comment. The meaning of a program depends only on the particular
sequences of lexical elements that form its
compilations,
excluding
comments.
{
AI95-00285-01}
The text of a
compilation
is divided into
{line} lines.
{end of a line} In
general, the representation for an end of line is implementation defined.
However, a sequence of one or more
format_effectors
other than the character whose code position is 16#09# (CHARACTER TABULATION)
signifies at least one end of line.
Implementation defined: The representation
for an end of line.
{
AI95-00285-01}
{separator} [In
some cases an explicit
separator is required to separate adjacent
lexical elements.] A separator is any of a
separator_space,
a
format_effector, or the end of a line, as
follows:
{
AI95-00285-01}
The character whose code position is 16#09# (CHARACTER TABULATION) is
a separator except within a
comment.
The end of a line is always a separator.
{
AI95-00285-01}
{delimiter} A
delimiter is either one of the following characters:
& ' ( ) * + , – . / : ; < = > |
{compound delimiter}
or one of the following
compound delimiters
each composed of two adjacent special characters
=> .. ** := /= >= <= << >> <>
The following names
are used when referring to compound delimiters:
delimiter | name
|
---|
=> | arrow
|
.. | double dot
|
** | double star, exponentiate
|
:= | assignment (pronounced: “becomes”)
|
/= | inequality (pronounced: “not
equal”)
|
>= | greater than or equal
|
<= | less than or equal
|
<< | left label bracket
|
>> | right label bracket
|
<> | box
|
Implementation Requirements
An implementation shall support lines of at least
200 characters in length, not counting any characters used to signify
the end of a line. An implementation shall support lexical elements of
at least 200 characters in length. The maximum supported line length
and lexical element length are implementation defined.
Implementation defined: Maximum supported
line length and lexical element length.
Discussion: From URG recommendation.
Wording Changes from Ada 95
{
AI95-00285-01}
The wording was updated to use the new character categories defined in
the preceding clause.