2.2 Lexical Elements, Separators, and Delimiters
Static Semantics
1
2/2
{
AI95-00285-01}
The text of a
compilation
is divided into
lines.
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) character
tabulation (HT) signifies at least one end of line.
2.a
Implementation defined: The representation
for an end of line.
3/2
{
AI95-00285-01}
[In some cases an explicit
separator is required
to separate adjacent lexical elements.] A separator is any of a
separator_space space
character, a
format_effector format
effector, or the end of a line, as follows:
3.a/2
Discussion: It
might be useful to define “white space” and use it here.
4/2
5/2
{
AI95-00285-01}
The character whose code position is 16#09# (CHARACTER
TABULATION) Character tabulation (HT)
is a separator except within a
comment.
6
The end of a line is always a separator.
7
7.1/3
{
AI05-0079-1}
One or more other_format
characters are allowed anywhere that a separator is[; any such characters
have no effect on the meaning of an Ada program].
8/2
{
AI95-00285-01}
A
delimiter is either one of the following
special characters
:
9
& ' ( ) * + , – . / : ; < = > |
10
or one of the following
compound
delimiters each composed of two adjacent special characters
11
=> .. ** := /= >= <= << >> <>
12
13
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
14
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.
14.a
Implementation defined: Maximum supported
line length and lexical element length.
14.b
Discussion: From URG recommendation.
Wording Changes from Ada 95
14.c/2
{
AI95-00285-01}
The wording was updated to use the new character
categories defined in the preceding clause.
Extensions to Ada 2005
14.d/3
{
AI05-0079-1}
Correction: Clarified
that other_format characters are allowed anywhere
that separators are allowed. This was intended in Ada 2005, but didn't
actually make it into the wording.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe