Debian Codegraph @

source_2020/02.mss

raw
1 @Part(02, Root="ada.mss")
2
3 @Comment{$Date: 2019/04/09 04:56:50 $}
4 @LabeledSection{Lexical Elements}
5
6 @Comment{$Source: e:\\cvsroot/ARM/Source/02.mss,v $}
7 @Comment{$Revision: 1.94 $}
8
9 @begin{Intro}
10 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
11 @redundant[The text of a program consists of the texts of one or more
12 @nt<compilation>s. The text of a @nt<compilation> is a sequence of
13 lexical elements, each composed of characters; the rules of
14 composition are given in this @Chg{Version=[3],New=[clause],Old=[section]}.
15 @nt{Pragma}s, which provide certain information for the compiler, are also
16 described in this @Chg{Version=[3],New=[clause],Old=[section]}.]
17 @end{Intro}
18
19 @LabeledClause{Character Set}
20
21 @begin{Intro}
22 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
23 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1]}
24 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
25 @Defn{character set}
26 The @Chg{Version=[2],New=[character repertoire for the text of an Ada
27 program consists of the
28 entire coding space described by the ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}
29 Universal @Chg{Version=[5],New=[],Old=[Multiple-Octet ]}Coded
30 Character Set. This coding space is organized in
31 @i<planes>, each plane comprising 65536 characters.@Defn2{Term=[plane],Sec=[character]}
32 @Defn{character plane}],Old=[only characters
33 allowed outside of @nt{comment}s are the @nt{graphic_character}s and
34 @ntf{format_effector}s.]}
35
36 @begin{Ramification}
37 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00285-01]}
38 @ChgDeleted{Version=[2],Text=[Any character, including an
39 @ntf<other_control_function>, is allowed in a comment.]}
40
41 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00285-01]}@ChgNote{Moved below}
42 @ChgDeleted{Version=[2],Text=[Note that this rule doesn't really have much
43 force, since the implementation can represent characters in the source in any
44 way it sees fit.
45 For example, an implementation could simply define that what seems to be
46 a nongraphic, non-format-effector character is actually a
47 representation of the space character.]}
48 @end{Ramification}
49 @begin(Discussion)
50 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
51 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1]}
52 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
53 It is our intent to follow the terminology of
54 @Chg{Version=[2],New=[ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}],Old=[ISO 10646 BMP]} where
55 appropriate, and to remain compatible with the character
56 classifications defined in @RefSec{Character Handling}.@Chg{Version=[2],
57 New=[],Old=[Note that our definition for
58 @nt<graphic_character> is more inclusive than that of ISO 10646-1.]}
59 @end(Discussion)
60 @end{Intro}
61
62 @begin{Syntax}
63 @begin{NotIso}
64 @ChgAdded{Version=[2],Noparanum=[T],Text=[@Shrink{@i<Paragraphs 2 and 3
65 were deleted.>}]}@Comment{This message should be
66 deleted if the paragraphs are ever renumbered.}
67 @end{NotIso}
68 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg],ARef=[AI95-00285-01]}
69 @DeletedSyn{Version=[2],lhs=<@Chg{Version=[2],New=<>,Old=<character>}>,
70 rhs="@Chg{Version=[2],New=<>,Old=<@Syn2{graphic_character} | @Synf{format_effector} | @Synf{other_control_function}>}"}
71
72 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg],ARef=[AI95-00285-01]}
73 @DeletedSyn{Version=[2],lhs=<@Chg{Version=[2],New=<>,Old=<graphic_character>}>,
74 rhs="@Chg{Version=[2],New=<>,Old=<@Synf{identifier_letter} | @Synf{digit} | @Synf{space_character} | @Synf{special_character}>}"}
75
76 @begin{SyntaxText}
77 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
78 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0266-1]}
79 @ChgRef{Version=[5],Kind=[RevisedAdded],ARef=[AI12-0263-1]}
80 @ChgAdded{Version=[2],Text=[A @ntf{character} is defined by this International
81 Standard for each cell in the coding space described by ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]},
82 regardless of whether or not ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]} allocates a character to that
83 cell.]}
84 @end{SyntaxText}
85 @end{Syntax}
86
87 @begin{StaticSem}
88 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
89 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0079-1],ARef=[AI05-0262-1],ARef=[AI05-0266-1]}
90 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
91 The@Chg{Version=[2],New=[],Old=[ character repertoire for the text of
92 an Ada program consists of the
93 collection of characters
94 @Chg{Version=[2],New=[described by the ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}],
95 Old=[called the Basic Multilingual Plane (BMP) of the
96 ISO 10646]} Universal Multiple-Octet Coded Character Set, plus a set
97 of @ntf<format_effector>s and, in comments only,
98 a set of @ntf<other_control_function>s; the]} coded representation for
99 @Chg{Version=[2],New=[],Old=[these ]}characters is implementation defined
100 @Redundant[(it need not be a
101 representation defined within @Chg{Version=[2],New=[ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}],
102 Old=[ISO-10646-1]})].@Chg{Version=[2],New=[ A character whose relative
103 code @Chg{Version=[3],New=[point],Old=[position]} in its plane
104 is 16#FFFE# or 16#FFFF# is not allowed anywhere
105 in the text of a program.],Old=[]}@Chg{Version=[3],New=[ The only
106 characters allowed outside of comments are those in categories
107 @ntf{other_format}, @ntf{format_effector}, and @ntf{graphic_character}.],Old=[]}
108 @ImplDef{The coded representation for the text of an Ada program.}
109
110 @begin{Ramification}@ChgNote{Moved from above}
111 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
112 @ChgAdded{Version=[2],Text=[Note that this rule doesn't really have
113 much force, since the implementation can represent characters in the
114 source in any way it sees fit.
115 For example, an implementation could simply define that what seems to be
116 an @ntf{other_private_use} character is actually a
117 representation of the space character.]}
118 @end{Ramification}
119
120 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
121 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0266-1],ARef=[AI05-0299-1]}
122 @ChgRef{Version=[5],Kind=[RevisedAdded],ARef=[AI12-0004-1],ARef=[AI12-0263-1]}
123 @ChgAdded{Version=[2],Text=[The semantics of an Ada program whose text is not
124 in Normalization Form @Chg{Version=[5],New=[C],Old=[KC]} (as
125 defined by @Chg{Version=[3],New=[Clause 21],Old=[section 24]}
126 of ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]})
127 is implementation defined.]}
128 @ChgImplDef{Version=[5],Kind=[AddedNormal],InitialVersion=[2],
129 Text=[@ChgAdded{Version=[2],Text=[The
130 semantics of an Ada program whose text is not in Normalization Form
131 @Chg{Version=[5],New=[C],Old=[KC]}.]}]}
132
133 @begin{Ramification}
134 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0004-1]}
135 @ChgAdded{Version=[5],Text=[In particular, an implementation can reject such
136 program source. It is easy during lexical analysis to reject source that
137 contains any code point not present in Normalization Form C. Portable
138 programs should always be encoded in Normalization Form C.]}
139 @end{Ramification}
140
141 @begin{Reason}
142 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0004-1]}
143 @ChgAdded{Version=[5],Text=[Normalization Form C ensures that all source is in
144 a unique format; it eliminates ambiguities and security issues potentially
145 caused by source using unusual sequences of characters. Note that WC3
146 (the Internet standards group) recommends that all Internet content be
147 in Normalization Form C. We don't require this as there is a potentially
148 significant cost to checking this (just rejecting unallowed code points
149 is not enough), and some implementations may need to be interoperable
150 with tools that produce unnormalized text.]}
151 @end{Reason}
152
153 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
154 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1],ARef=[AI05-0299-1]}
155 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
156 The description of the
157 language definition in this International Standard uses the @Chg{Version=[2],
158 New=[character properties General Category, Simple Uppercase Mapping,
159 Uppercase Mapping, and Special Case Condition of the documents referenced by
160 @Chg{Version=[5],New=[],Old=[the note in ]}@Chg{Version=[3],New=[Clause],Old=[section]} @Chg{Version=[5],New=[2],Old=[1]}
161 of ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}],Old=[graphic symbols
162 defined for Row 00: Basic Latin and Row 00: Latin-1 Supplement
163 of the ISO 10646 BMP; these correspond to the graphic symbols of
164 ISO 8859-1 (Latin-1); no graphic symbols are used in this International Standard for
165 characters outside of Row 00 of the BMP]}.
166 The actual set of graphic symbols used by an implementation
167 for the visual representation of
168 the text of an Ada program is not specified.
169 @PDefn{unspecified}
170
171 @begin{Discussion}
172 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0263-1]}
173 @ChgAdded{Version=[5],Text=[The @ldquote@;documents
174 referenced@rdquote means Unicode, Chapter 4. See the Discussion after the
175 the character categorization definition for a source for machine-readable
176 definitions of these properties.]}
177 @end{Discussion}
178
179 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
180 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1]}
181 @Leading@keepnext@;@Chg{Version=[2],New=[Characters],Old=[The categories of
182 characters]} are @Chg{Version=[2],New=[categorized],Old=[defined]} as follows:
183 @begin{Discussion}
184 @ChgRef{Version=[2],Kind=[AddedNormal]}
185 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0005-1],ARef=[AI05-0262-1],ARef=[AI05-0266-1]}
186 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
187 @ChgAdded{Version=[2],Text=[Our character classification considers that the
188 cells not allocated in ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]} are graphic characters, except for
189 those whose relative code @Chg{Version=[3],New=[point],Old=[position]}
190 in their plane is 16#FFFE# or 16#FFFF#. This
191 seems to provide the best compatibility with future versions of ISO/IEC 10646,
192 as future characters can @Chg{Version=[3],New=[],Old=[be ]}already be
193 used in Ada character and string literals.]}
194 @end{Discussion}
195 @begin{Description}
196 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00285-01]}
197 @ChgDeleted{Version=[2],Text=[@Defn{identifier_letter}@ntf<identifier_letter>@\@ntf{upper_case_identifier_letter} | @ntf{lower_case_identifier_letter}]}
198 @begin{Discussion}
199 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg]}
200 @ChgDeleted{Version=[2],Text=[We use @ntf<identifier_letter>
201 instead of simply @ntf<letter> because
202 ISO 10646 BMP includes many other characters that would generally
203 be considered "letters."]}
204 @end{Discussion}
205
206 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
207 @Chg{Version=[2],New=[@Defn{letter_uppercase}@ntf{letter_uppercase}],
208 Old=[@Defn{upper_case_identifier_letter}@ntf<upper_case_identifier_letter>]}@\Any
209 character @Chg{Version=[2],New=[whose General Category is defined
210 to be @lquotes@;Letter, Uppercase@rquotes@;],
211 Old=[of Row 00 of ISO 10646 BMP whose name begins
212 @lquotes@;Latin Capital Letter@rquotes@;]}.
213
214 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
215 @Chg{Version=[2],New=[@Defn{letter_lowercase}@ntf{letter_lowercase}],
216 Old=[@Defn{lower_case_identifier_letter}@ntf<lower_case_identifier_letter>]}@\Any
217 character @Chg{Version=[2],New=[whose General Category is defined
218 to be @lquotes@;Letter, Lowercase@rquotes@;],
219 Old=[of Row 00 of ISO 10646 BMP whose name begins
220 @lquotes@;Latin Small Letter@rquotes@;]}.
221 @begin{Honest}
222 @ChgRef{Version=[1],Kind=[Deleted],Ref=[8652/0001],ARef=[AI95-00124-01]}
223 @Comment{The change in subclause 1.3 for 8652/0001 handles this problem.}
224 @ChgDeleted{Version=[1],Text=[The above rules do not include the ligatures
225 @latin1(198) and @latin1(230).
226 However, the intent is to include these characters as identifier letters.
227 This problem was pointed out by a comment from the Netherlands.]}
228 @end{Honest}
229
230 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
231 @ChgAdded{Version=[2],Text=[@Defn{letter_titlecase}@ntf{letter_titlecase}@\Any
232 character whose General Category is defined to be @lquotes@;Letter, Titlecase@rquotes@;.]}
233
234 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
235 @ChgAdded{Version=[2],Text=[@Defn{letter_modifier}@ntf{letter_modifier}@\Any
236 character whose General Category is defined to be @lquotes@;Letter, Modifier@rquotes@;.]}
237
238 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
239 @ChgAdded{Version=[2],Text=[@Defn{letter_other}@ntf{letter_other}@\Any
240 character whose General Category is defined to be @lquotes@;Letter, Other@rquotes@;.]}
241
242 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
243 @ChgAdded{Version=[2],Text=[@Defn{mark_non_spacing}@ntf{mark_non_spacing}@\Any
244 character whose General Category is defined to be @lquotes@;Mark, Non-Spacing@rquotes@;.]}
245
246 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
247 @ChgAdded{Version=[2],Text=[@Defn{mark_non_spacing}@ntf{mark_spacing_combining}@\Any
248 character whose General Category is defined to be @lquotes@;Mark, Spacing Combining@rquotes@;.]}
249
250 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
251 @Chg{Version=[2],New=[@Defn{number_decimal}@ntf{number_decimal}],
252 Old=[@Defn{digit}@nt{digit}]}@\@Chg{Version=[2],New=[Any
253 character whose General Category is defined
254 to be @lquotes@;Number, Decimal@rquotes@;],
255 Old=[One of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9]}.
256
257 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
258 @ChgAdded{Version=[2],Text=[@Defn{number_letter}@ntf{number_letter}@\Any
259 character whose General Category is defined to be @lquotes@;Number, Letter@rquotes@;.]}
260
261 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
262 @ChgAdded{Version=[2],Text=[@Defn{punctuation_connector}@ntf{punctuation_connector}@\Any
263 character whose General Category is defined to be @lquotes@;Punctuation, Connector@rquotes@;.]}
264
265 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
266 @ChgAdded{Version=[2],Text=[@Defn{other_format}@ntf{other_format}@\Any
267 character whose General Category is defined to be @lquotes@;Other, Format@rquotes@;.]}
268
269 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
270 @Chg{Version=[2],New=[@Defn{separator_space}@ntf<separator_space>],
271 Old=[@Defn{space_character}@ntf{space_character}]}@\@Chg{Version=[2],New=[Any
272 character whose General Category is defined to be @lquotes@;Separator,
273 Space@rquotes@;.],Old=[The character of ISO 10646 BMP named
274 @lquotes@;Space@rquotes@;.]}
275
276 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
277 @Chg{Version=[2],New=[@Defn{separator_line}@ntf{separator_line}],
278 Old=[@Defn{special_character}@ntf{special_character}]}@\Any character
279 @Chg{Version=[2],New=[whose General Category is defined to be
280 @lquotes@;Separator, Line@rquotes@;.],
281 Old=[of the ISO 10646 BMP that is not reserved for a control function, and
282 is not the @ntf<space_character>, an @ntf<identifier_letter>, or a @ntf<digit>.]}
283 @begin{Ramification}
284 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg]}
285 @ChgDeleted{Version=[2],Text=[Note that the no break space and soft hyphen
286 are @ntf<special_character>s,
287 and therefore @nt<graphic_character>s.
288 They are not the same characters as space and hyphen-minus.]}
289 @end{Ramification}
290
291 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
292 @ChgAdded{Version=[2],Text=[@Defn{separator_paragraph}@ntf{separator_paragraph}@\Any
293 character whose General Category is defined to be @lquotes@;Separator, Paragraph@rquotes@;.]}
294
295 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
296 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0262-1]}
297 @Defn{format_effector}@ntf<format_effector>@\The
298 @Chg{Version=[2],New=[characters whose code @Chg{Version=[3],New=[points],Old=[positions]} are
299 16#09# (CHARACTER TABULATION), 16#0A# (LINE FEED), 16#0B# (LINE TABULATION),
300 16#0C# (FORM FEED), 16#0D# (CARRIAGE RETURN), 16#85# (NEXT LINE),
301 and the characters in categories @ntf{separator_line} and
302 @ntf{separator_paragraph}],
303 Old=[control functions of ISO 6429 called
304 character tabulation (HT), line tabulation (VT), carriage return (CR),
305 line feed (LF), and form feed (FF)]}.
306 @IndexSeeAlso{Term=[control character],See=(format_effector)}
307
308 @begin{Discussion}
309 @ChgRef{Version=[2],Kind=[AddedNormal]}
310 @ChgAdded{Version=[2],Text=[ISO/IEC 10646:2003 does not define the names
311 of control characters, but rather refers to the names defined by
312 ISO/IEC 6429:1992. These are the names that we use
313 here.@Comment{10646:2011 gives a list of the long names from 6429:1992,
314 so I'm not sure the above is true anymore. Best leave the old reference.}]}
315 @end{Discussion}
316
317 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
318 @ChgAdded{Version=[2],Text=[@Defn{other_control}@ntf{other_control}@\Any
319 character whose General Category is defined
320 to be @lquotes@;Other, Control@rquotes@;, and which is not defined to be a
321 @ntf<format_effector>.]}
322
323 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
324 @ChgAdded{Version=[2],Text=[@Defn{other_private_use}@ntf{other_private_use}@\Any
325 character whose General Category is defined to be @lquotes@;Other, Private Use@rquotes@;.]}
326
327 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
328 @ChgAdded{Version=[2],Text=[@Defn{other_surrogate}@ntf{other_surrogate}@\Any
329 character whose General Category is defined to be @lquotes@;Other, Surrogate@rquotes@;.]}
330
331 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
332 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0262-1]}
333 @Chg{Version=[2],New=[@Defn{graphic_character}@ntf{graphic_character}],
334 Old=[@Defn{other_control_function}@ntf<other_control_function>]}@\@Chg{Version=[2],
335 New=[Any character that is not in the categories @ntf{other_control},
336 @ntf{other_private_use}, @ntf{other_surrogate},
337 @ntf{format_effector}, and whose relative code
338 @Chg{Version=[3],New=[point],Old=[position]} in its plane is neither
339 16#FFFE# nor 16#FFFF#.],
340 Old=[Any control function,
341 other than a @ntf<format_effector>, that is allowed in a comment; the set of
342 @ntf<other_control_function>s allowed in comments is implementation defined.
343 @IndexSeeAlso{Term=[control character],See=(other_control_function)}]}
344 @ChgImplDef{Version=[2],Kind=[Deleted],InitialVersion=[0],
345 Text=[@ChgDeleted{Version=[2],Text=[The control functions allowed in comments.]}]}
346
347 @begin{Discussion}
348 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
349 @ChgAdded{Version=[2],Text=`We considered basing the definition of
350 lexical elements on Annex A of ISO/IEC
351 TR 10176 (4th edition), which lists the characters which should be supported in
352 identifiers for all programming languages, but we finally decided against this
353 option. Note that it is not our intent to diverge from ISO/IEC TR 10176,
354 except to the extent that ISO/IEC TR 10176 itself diverges from ISO/IEC
355 10646:2003 (which is the case at the time of this writing [January 2005]).'}
356
357 @ChgRef{Version=[2],Kind=[AddedNormal]}
358 @ChgAdded{Version=[2],Type=[Leading],Text=[More precisely, we intend to align
359 strictly with ISO/IEC 10646:2003. It must be
360 noted that ISO/IEC TR 10176 is a Technical Report while ISO/IEC 10646:2003 is a
361 Standard. If one has to make a choice, one should conform with the Standard
362 rather than with the Technical Report. And, it turns out that one @i<must>
363 make a choice because there are important differences between the two:]}
364
365 @begin{Itemize}
366 @ChgRef{Version=[2],Kind=[AddedNormal]}
367 @ChgAdded{Version=[2],Text=[ISO/IEC TR 10176 is still based on
368 ISO/IEC 10646:2000 while ISO/IEC 10646:2003 has already been published
369 for a year. We cannot afford to delay
370 the adoption of our amendment until ISO/IEC TR 10176 has been revised.]}
371
372 @ChgRef{Version=[2],Kind=[AddedNormal]}
373 @ChgAdded{Version=[2],Text=[There are considerable differences between the
374 two editions of ISO/IEC 10646,
375 notably in supporting characters beyond the BMP (this might be significant for
376 some languages, e.g. Korean).]}
377
378 @ChgRef{Version=[2],Kind=[AddedNormal]}
379 @ChgAdded{Version=[2],Text=[ISO/IEC TR 10176 does not define case conversion
380 tables, which are essential
381 for a case-insensitive language like Ada. To get case conversion tables, we
382 would have to reference either ISO/IEC 10646:2003 or Unicode, or we would have
383 to invent our own.]}
384 @end{Itemize}
385
386 @ChgRef{Version=[2],Kind=[AddedNormal]}
387 @ChgAdded{Version=[2],Type=[Leading],Text=[For the purpose of defining the
388 lexical elements of the language, we need
389 character properties like categorization, as well as case conversion tables.
390 These are mentioned in ISO/IEC 10646:2003 as useful for implementations, with a
391 reference to Unicode. Machine-readable tables are available on the web at URLs:]}
392 @begin{Example}
393 @ChgRef{Version=[2],Kind=[AddedNormal]}
394 @ChgAdded{Version=[2],Text=[@Chg{Version=[5],New=[@URLLink{URL=[http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt],
395 Text=[http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt]}
396 @URLLink{URL=[http://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt],
397 Text=[http://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt]}],
398 Old=[@URLLink{URL=[http://www.unicode.org/Public/4.0-Update/UnicodeData-4.0.0.txt],
399 Text=[http://www.unicode.org/Public/4.0-Update/UnicodeData-4.0.0.txt]}
400 @URLLink{URL=[http://www.unicode.org/Public/4.0-Update/CaseFolding-4.0.0.txt],
401 Text=[http://www.unicode.org/Public/4.0-Update/CaseFolding-4.0.0.txt]}]}]}
402 @end{Example}
403
404 @ChgRef{Version=[2],Kind=[AddedNormal]}
405 @ChgAdded{Version=[2],Type=[Leading],Text=[with an explanatory document found at URL:]}
406 @begin{Example}
407 @ChgRef{Version=[2],Kind=[AddedNormal]}
408 @ChgAdded{Version=[2],Text=[@Chg{Version=[5],New=[@URLLink{URL=[http://www.unicode.org/reports/tr44/tr44-20.html],
409 Text=[http://www.unicode.org/reports/tr44/tr44-20.html]}],
410 Old=[@URLLink{URL=[http://www.unicode.org/Public/4.0-Update/UCD-4.0.0.html],
411 Text=[http://www.unicode.org/Public/4.0-Update/UCD-4.0.0.html]}]}]}
412 @end{Example}
413
414 @ChgRef{Version=[2],Kind=[AddedNormal]}
415 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
416 @ChgAdded{Version=[2],Text=[The actual text of the standard only makes
417 specific references to the
418 corresponding clauses of ISO/IEC 10646@Chg{Version=[5],New=[],Old=[:2003]},
419 not to Unicode.]}
420
421 @end{Discussion}
422 @end{Description}
423
424 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
425 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1]}
426 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
427 @Leading@Chg{Version=[2],New=[],Old=[@Defn{names of @ntf{special_character}s}
428 @Defn2{Term=[special_character],Sec=(names)}]}The
429 following names are used when referring to certain
430 @Chg{Version=[2],New=[characters (the first name is that given in
431 ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]})],Old=[@ntf{special_character}s]}:
432 @Defn{quotation mark}
433 @Defn{number sign}
434 @Defn{ampersand}
435 @Defn{apostrophe}
436 @Defn{tick}
437 @Defn{left parenthesis}
438 @Defn{right parenthesis}
439 @Defn{asterisk}
440 @Defn{multiply}
441 @Defn{plus sign}
442 @Defn{comma}
443 @Defn{hyphen-minus}
444 @Defn{minus}
445 @Defn{full stop}
446 @Defn{dot}
447 @Defn{point}
448 @Defn{solidus}
449 @Defn{divide}
450 @Defn{colon}
451 @Defn{semicolon}
452 @Defn{less-than sign}
453 @Defn{equals sign}
454 @Defn{greater-than sign}
455 @Defn{low line}
456 @Defn{underline}
457 @Defn{vertical line}
458 @Chg{Version=[2],New=[@Defn{exclamation point}
459 @Defn{percent sign}],
460 Old=[@Defn{left square bracket}
461 @Defn{right square bracket}
462 @Defn{left curly bracket}
463 @Defn{right curly bracket}]}@Chg{Version=[5],New=[@Defn{at sign}
464 @Defn{left square bracket}
465 @Defn{right square bracket}],Old=[]}
466 @begin{Discussion}
467 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
468 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0266-1]}
469 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0125-3],ARef=[AI12-0212-1],ARef=[AI12-0263-1]}
470 @Chg{Version=[2],New=[@Defn{graphic symbols}@Defn{glyphs}This table
471 serves to show the correspondence between
472 ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]} names and the graphic symbols (glyphs) used in this
473 International Standard. These are the characters],
474 Old=[These are the ones]}
475 that play a special role in the syntax of Ada@Chg{Version=[2],New=[],
476 Old=[ 95, or in the syntax rules;
477 we don't bother to define names for all characters.
478 The first name given is the name from ISO 10646-1; the subsequent
479 names, if any, are those used within the
480 standard, depending on context]}.
481 @end{Discussion}
482
483 @Comment{The original version follows here (commented out)
484 @begin{Display}
485 @TabClear()@TabSet(P9)
486 @begin(TwoCol)
487 @NoParanum@;symbol @\name
488
489 @NoParanum@; " @\quotation mark
490 # @\number sign
491 & @\ampersand
492 ' @\apostrophe, tick
493 ( @\left parenthesis
494 ) @\right parenthesis
495 * @\asterisk, multiply
496 + @\plus sign
497 , @\comma
498 @en@; @\hyphen-minus, minus
499 . @\full stop, dot, point
500 / @\solidus, divide
501 @NewColumn
502 @NoParanum@;symbol @\name
503
504 @NoParanum@; : @\colon
505 ; @\semicolon
506 < @\less-than sign
507 = @\equals sign
508 > @\greater-than sign
509 _ @\low line, underline
510 | @\vertical line
511 [ @\left square bracket
512 ] @\right square bracket
513 { @\left curly bracket
514 } @\right curly bracket
515 @end(TwoCol)
516 @end{Display}}
517 @Comment{We use this (weird) four column version to make the HTML look much better.
518 WARNING: The items that go together are in separate columns!!}
519 @begin(FourCol)
520 @NoParanum@;@ @ @Chg{Version=[2],New=[graphic ],Old=[@ @ @ @ ]}symbol
521
522 @NoParanum@;@ @ @ @ @ @ @ @ @ "@*
523 @ @ @ @ @ @ @ @ @ #@*
524 @ @ @ @ @ @ @ @ @ &@*
525 @ @ @ @ @ @ @ @ @ '@*
526 @ @ @ @ @ @ @ @ @ (@*
527 @ @ @ @ @ @ @ @ @ )@*
528 @ @ @ @ @ @ @ @ @ *@*
529 @ @ @ @ @ @ @ @ @ +@*
530 @ @ @ @ @ @ @ @ @ ,@*
531 @ @ @ @ @ @ @ @ @ @en@;@*
532 @ @ @ @ @ @ @ @ @ .@*
533 @Chg{Version=[2],New=[@Chg<Version=[5],New=[@ @ @ @ @ @ @ @ @ @@],Old=<>>],Old=[@*]}@Chg{Version=[2],New=[],Old=[@ @ @ @ @ @ @ @ @ /]}@ChgNote{Funny layout so HTML and RTF look right}
534 @NewColumn
535 @NoParanum@;name
536
537 @NoParanum@;quotation mark@*
538 number sign@*
539 ampersand@*
540 apostrophe, tick@*
541 left parenthesis@*
542 right parenthesis@*
543 asterisk, multiply@*
544 plus sign@*
545 comma@*
546 hyphen-minus, minus@*
547 full stop, dot, point@*
548 @Chg{Version=[2],New=[@Chg<Version=[5],New=[commercial at, at sign],Old=<>>],Old=[@*]}@Chg{Version=[2],New=[],Old=[solidus, divide]}@ChgNote{Funny layout so HTML and RTF look right}
549
550 @NewColumn
551 @NoParanum@;@ @ @Chg{Version=[2],New=[graphic ],Old=[@ @ @ @ ]}symbol
552
553 @NoParanum@;@ @ @ @ @ @ @ @ @ :@*
554 @ @ @ @ @ @ @ @ @ ;@*
555 @ @ @ @ @ @ @ @ @ <@*
556 @ @ @ @ @ @ @ @ @ =@*
557 @ @ @ @ @ @ @ @ @ >@*
558 @ @ @ @ @ @ @ @ @ _@*
559 @ @ @ @ @ @ @ @ @ |@*
560 @ @ @ @ @ @ @ @ @ @Chg{Version=[2],New=[/],Old=<[>}@*
561 @ @ @ @ @ @ @ @ @ @Chg{Version=[2],New=[!],Old=<]>}@*
562 @ @ @ @ @ @ @ @ @ @Chg<Version=[2],New=[%],Old=<{>>@*
563 @Chg<Version=[5],New=<@ @ @ @ @ @ @ @ @ [>,Old=<>>@*
564 @Chg<Version=[2],New=[@Chg<Version=[5],New=<@ @ @ @ @ @ @ @ @ ]>,Old=<>>],Old=<@ @ @ @ @ @ @ @ @ }>>
565 @NewColumn
566 @NoParanum@;name
567
568 @NoParanum@;colon@*
569 semicolon@*
570 less-than sign@*
571 equals sign@*
572 greater-than sign@*
573 low line, underline@*
574 vertical line@*
575 @Chg{Version=[2],New=[solidus, divide],Old=[left square bracket]}@*
576 @Chg{Version=[2],New=[exclamation point],Old=[right square bracket]}@*
577 @Chg{Version=[2],New=[percent sign],Old=[left curly bracket]}@*
578 @Chg<Version=[5],New=[left square bracket],Old=[]>@*
579 @Chg{Version=[2],New=[@Chg<Version=[5],New=[right square bracket],Old=<>>],Old=[right curly bracket]}
580 @end(FourCol)
581 @end{StaticSem}
582
583 @begin{ImplReq}
584 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0286-1]}
585 @ChgAdded{Version=[3],Text=[An Ada implementation shall accept Ada source code
586 in UTF-8 encoding, with or without a BOM (see @RefSecNum{String Encoding}),
587 where every character is represented by its code point. The character pair
588 CARRIAGE RETURN/LINE FEED (code points 16#0D# 16#0A#) signifies a single end of
589 line (see @RefSecNum{Lexical Elements, Separators, and Delimiters}); every other
590 occurrence of a @ntf{format_effector} other than the character whose code point
591 position is 16#09# (CHARACTER TABULATION) also signifies a single end of line.]}
592
593 @begin{Reason}
594 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0079-1],ARef=[AI05-0286-1]}
595 @ChgAdded{Version=[3],Text=[This is simply requiring that an Ada implementation
596 be able to directly process the ACATS, which is provided in the described
597 format. Note that files that only contain characters with code points in the
598 first 128 (which is the majority of the ACATS) are represented in the same way
599 in both UTF-8 and in "plain" string format. The ACATS includes a BOM in files
600 that have any characters with code points greater than 127. Note that the BOM
601 contains characters not legal in Ada source code, so an implementation can use
602 that to automatically distinguish between files formatted as plain Latin-1
603 strings and UTF-8 with BOM.]}
604
605 @ChgRef{Version=[3],Kind=[AddedNormal]}
606 @ChgAdded{Version=[3],Text=[We allow line endings to be both represented as the
607 pair CR LF (as in Windows and the ACATS), and as single @ntf{format_effector}
608 characters (usually LF, as in Linux), in order that files created by standard
609 tools on most operating systems will meet the standard format. We specify how
610 many line endings each represent so that compilers use the same line numbering
611 for standard source files.]}
612
613 @ChgRef{Version=[3],Kind=[AddedNormal]}
614 @ChgAdded{Version=[3],Text=[This requirement increases portability by having a
615 format that is accepted by all Ada compilers. Note that implementations can
616 support other source representations, including structured representations like
617 a parse tree.]}
618
619 @end{Reason}
620 @end{ImplReq}
621
622 @begin{ImplPerm}
623 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00285-01]}
624 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0266-1]}
625 @Chg{Version=[3],New=[The categories defined above, as well as case mapping and
626 folding, may be based on an implementation-defined version of ISO/IEC 10646
627 (2003 edition or later).],Old=[@Chg{Version=[2],New=[],Old=[In a nonstandard
628 mode, the implementation may support a different character
629 repertoire@Redundant[; in particular,
630 the set of characters that are considered @ntf<identifier_letter>s
631 can be extended
632 or changed to conform to local conventions].]}]}
633 @begin{Ramification}
634 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg]}
635 @ChgDeleted{Version=[2],Text=[If an implementation supports
636 other character sets,
637 it defines which characters fall into each category,
638 such as @lquotes@;@ntf{identifier_letter},@rquotes@;
639 and what the corresponding rules of this section are,
640 such as which characters are allowed in the text of a program.]}
641
642 @ChgRef{Version=[3],Kind=[AddedNormal]}
643 @ChgAdded{Version=[3],Text=<The exact categories, case mapping, and case folding chosen
644 affects identifiers, the result of '[[Wide_]Wide_]Image, and packages
645 Wide_Characters.Handling and Wide_Wide_Characters.Handling.>}
646 @end{Ramification}
647 @begin{Discussion}
648 @ChgRef{Version=[3],Kind=[AddedNormal]}
649 @ChgAdded{Version=[3],Text=[This permission allows implementations to upgrade
650 to using a newer character set standard whenever that makes sense, rather
651 than having to wait for the next Ada Standard.
652 But the character set standard used cannot be older than ISO/IEC 10646:2003
653 (which is essentially similar to Unicode 4.0).]}
654 @end{Discussion}
655 @end{ImplPerm}
656
657 @begin{Notes}
658 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
659 @Chg{Version=[2],New=[The characters in categories @ntf{other_control},
660 @ntf{other_private_use}, and @ntf{other_surrogate} are only allowed in comments],
661 Old=[Every code position of ISO 10646 BMP that is not reserved for a control
662 function is defined to be a @nt<graphic_character> by this International Standard.
663 This includes all code positions other than 0000 - 001F, 007F - 009F,
664 and FFFE - FFFF]}.
665
666 @ChgRef{Version=[3],Kind=[DeletedNoDelMsg],ARef=[AI05-0286-1]}
667 @ChgDeleted{Version=[3],Text=[The language does not specify the source
668 representation of programs.]}
669 @begin(Discussion)
670 @ChgRef{Version=[2],Kind=[Revised]}
671 @ChgRef{Version=[3],Kind=[Deleted],ARef=[AI05-0286-1]}
672 @ChgDeleted{Version=[3],Text=[Any source representation is valid so long
673 as the implementer can produce an (information-preserving)
674 algorithm for translating both directions
675 between the representation and the standard character set.
676 (For example, every character in the standard character set has to be
677 representable, even if the output devices attached to a given computer
678 cannot print all of those characters properly.)
679 From a practical point of view, every implementer will have to provide
680 some way to process the @Chg{Version=[2],New=[ACATS],Old=[ACVC]}.
681 It is the intent to allow source representations, such as parse trees,
682 that are not even linear sequences of characters.
683 It is also the intent to allow different fonts:
684 reserved words might be in bold face,
685 and that should be irrelevant to the semantics.]}
686 @end(Discussion)
687 @end{Notes}
688
689 @begin{Extend83}
690 @Defn{extensions to Ada 83}
691 Ada 95 allows 8-bit and 16-bit characters,
692 as well as implementation-specified character sets.
693 @end{Extend83}
694
695 @begin{DiffWord83}
696 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
697 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
698 The syntax rules in this @Chg{Version=[3],New=[subclause],Old=[clause]} are
699 modified to remove the emphasis on basic characters vs. others.
700 (In this day and age, there is no need to point out that you can write
701 programs without using (for example) lower case letters.)
702 In particular, @ntf{character} (representing all characters usable outside
703 comments) is added, and @ntf{basic_graphic_character},
704 @ntf{other_special_character},
705 and @ntf{basic_character} are removed.
706 @ntf{Special_character} is expanded to include Ada 83's
707 @ntf{other_special_character}, as well as new 8-bit characters not
708 present in Ada 83.@Chg{Version=[2],New=[ Ada 2005 removes
709 @ntf{special_character} altogether; we want to stick to ISO/IEC 10646:2003
710 character classifications.],Old=[]}
711 Note that the term @lquotes@;basic letter@rquotes@; is used
712 in @RefSec{Character Handling}
713 to refer to letters without diacritical marks.
714
715 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
716 Character names now come from
717 @Chg{Version=[2],New=[ISO/IEC 10646:2003],Old=[ISO 10646]}.
718
719 @ChgRef{Version=[2],Kind=[Deleted],ARef=[AI95-00285-01]}
720 @ChgDeleted{Version=[2],Text=[We use @ntf<identifier_letter> rather than
721 @ntf<letter> since ISO 10646 BMP includes many "letters' that are not
722 permitted in identifiers (in the standard mode).]}
723 @end{DiffWord83}
724
725 @begin{Extend95}
726 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
727 @ChgAdded{Version=[2],Text=[@Defn{extensions to Ada 95}
728 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
729 Program text can use most characters defined by ISO-10646:2003. This
730 @Chg{Version=[3],New=[subclause],Old=[clause]} has been rewritten to use the categories defined in that Standard.
731 This should ease programming in languages other than English.]}
732 @end{Extend95}
733
734 @begin{Inconsistent2005}
735 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0266-1]}
736 @ChgAdded{Version=[3],Text=<@Defn{inconsistencies with Ada 2005}An
737 implementation is allowed (but not required) to use a newer character
738 set standard to determine the categories, case mapping, and case folding.
739 Doing so will change the results of attributes '[[Wide_]Wide_]Image and the
740 packages [Wide_]Wide_Characters.Handling in the case of a few rarely used
741 characters. (This also could make some identifiers illegal, for characters
742 that are no longer classified as letters.) This is unlikely to be a problem
743 in practice. Moreover, truly portable Ada 2012 programs should avoid using
744 in these contexts any characters that would have different classifications in
745 any character set standards issued since 10646:2003 (since the compiler can
746 use any such standard as the basis for its classifications).>}
747 @end{Inconsistent2005}
748
749 @begin{Diffword2005}
750 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0079-1]}
751 @ChgAdded{Version=[3],Text=[@b<Correction:> Clarified that only
752 characters in the categories defined here are allowed in the source
753 of an Ada program. This was clear in Ada 95, but Amendment 1 dropped
754 the wording instead of correcting it.]}
755
756 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0286-1]}
757 @ChgAdded{Version=[3],Text=[A standard source representation is defined
758 that all compilers are expected to process. Since this is the same format
759 as the ACATS, it seems unlikely that there are any implementations that
760 don't meet this requirement. Moreover, other representations are still
761 permitted, and the "impossible or impractical" loophole (see
762 @RefSecnum{Conformity of an Implementation with the Standard}) can be
763 invoked for any implementations that cannot directly process the ACATS.]}
764 @end{Diffword2005}
765
766 @begin{Diffword2012}
767 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0004-1]}
768 @ChgAdded{Version=[5],Text=[@b<Correction:> The interpretation of Ada source
769 that is in Normalization Form C but not in Normalization Form KC is no
770 longer implementation-defined. This change could potentially change the
771 meaning of a program for a compiler that normalized all program source
772 to Normalization Form KC before processing it. We don't document this as
773 an inconsistency as such handling was previously implementation defined
774 (so any such code was already defined to be not portable),
775 and we're not aware of any compiler that normalized source code (so we
776 don't expect to see this problem in the real world).]}
777 @end{Diffword2012}
778
779
780 @LabeledClause{Lexical Elements, Separators, and Delimiters}
781
782 @begin{StaticSem}
783 @Defn{text of a program}
784 The text of a program consists of the texts of one or more
785 @nt<compilation>s.
786 @Defn{lexical element}
787 @IndexSee{Term=[token],See=(lexical element)}
788 The text of each @nt<compilation> is a sequence
789 of separate @i(lexical elements).
790 Each lexical element is formed from a
791 sequence of characters, and is
792 either a delimiter, an @nt<identifier>, a reserved word,
793 a @nt<numeric_literal>, a @nt<character_literal>, a @nt<string_literal>,
794 or a comment.
795 The meaning of a program depends only on the particular sequences of
796 lexical elements that form its @nt{compilation}s, excluding
797 @nt{comment}s.
798
799 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
800 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0262-1]}
801 The text of a @nt<compilation> is divided into @Defn{line}@i{lines}.
802 @Defn{end of a line}
803 In general, the representation for an end of line is implementation defined.
804 However, a sequence of one or more @ntf<format_effector>s other
805 than @Chg{Version=[2],New=[the character whose code
806 @Chg{Version=[3],New=[point],Old=[position]}
807 is 16#09# (CHARACTER TABULATION)],Old=[character tabulation (HT)]}
808 signifies at least one end of line.
809 @ImplDef{The representation for an end of line.}
810
811 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
812 @Leading@Defn{separator}
813 @Redundant[In some cases an explicit @i(separator) is required
814 to separate adjacent lexical elements.]
815 A separator is
816 any of a @Chg{Version=[2],New=[@ntf{separator_space}],Old=[space character]},
817 a @Chg{Version=[2],New=[@ntf{format_effector}],Old=[format effector]},
818 or the end of a line, as follows:
819 @begin(Discussion)
820 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg]}
821 @ChgDeleted{Version=[2],Text=[It might be useful to define @lquotes@;white space@rquotes@;
822 and use it here.]}@ChgNote{No one can figure out why, and it wouldn't match the
823 Unicode def of whitespace.}
824 @end(Discussion)
825 @begin{Itemize}
826 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
827 A @Chg{Version=[2],New=[@ntf{separator_space}],Old=[space character]} is
828 a separator except within a @nt{comment}, a @nt{string_literal},
829 or a @nt{character_literal}.
830
831 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
832 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0262-1]}
833 @Chg{Version=[2],New=[The character whose code @Chg{Version=[3],New=[point],Old=[position]}
834 is 16#09# (CHARACTER TABULATION)],Old=[Character tabulation (HT)]} is a
835 separator except within a @nt{comment}.
836
837 The end of a line is always a separator.
838 @end{Itemize}
839
840 One or more separators are allowed between any two adjacent lexical
841 elements, before the first of each @nt{compilation}, or after the
842 last.
843 At least one separator is required between an @nt{identifier},
844 a reserved word, or a @nt{numeric_literal} and an adjacent
845 @nt{identifier}, reserved word, or @nt{numeric_literal}.
846
847 @ChgRef{Version=[3],Kind=[Added],ARef=[AI05-0079-1]}
848 @ChgAdded{Version=[3],Text=[One or more @ntf{other_format} characters
849 are allowed anywhere that a separator is@Redundant[; any such characters
850 have no effect on the meaning of an Ada program].]}
851
852 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
853 @Defn{delimiter}
854 A @i{delimiter} is either one of the following@Chg{Version=[2],New=[],Old=[ special]}
855 characters@Chg{Version=[2],New=[:],Old=[]}
856 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0125-3],ARef=[AI12-0212-1]}
857 @begin{Display}
858 &@ @ @ @ '@ @ @ @ (@ @ @ @ )@ @ @ @ *@ @ @ @ +@ @ @ @ ,@ @ @ @ @en@ @ @ @ .@ @ @ @ /@ @ @ @ :@ @ @ @ ;@ @ @ @ <@ @ @ @ =@ @ @ @ >@Chg{Version=[5],New=<@ @ @ @ @@@ @ @ @ [@ @ @ @ ]>,Old=[]}@ @ @ @ |
859 @end{Display}
860
861 @Defn{compound delimiter}
862 or one of the following @i{compound delimiters} each composed of two
863 adjacent special characters
864 @begin{Display}
865 =>@ @ @ @ ..@ @ @ @ **@ @ @ @ :=@ @ @ @ /=@ @ @ @ >=@ @ @ @ <=@ @ @ @ <<@ @ @ @ >>@ @ @ @ <>
866 @end{Display}
867
868 Each of the special characters listed for single character delimiters
869 is a single delimiter except if this character is used as a character
870 of a compound delimiter, or as a character of a @nt{comment},
871 @nt{string_literal}, @nt{character_literal}, or
872 @nt{numeric_literal}.
873
874 @RMNewPageVer{Version=[2]}@Comment{For printed version of Ada 2005 RM}
875
876 @Leading@keepnext@;The following names are used when referring to compound
877 delimiters:@table{Columns=[2],
878 Alignment=[Allleft],FirstColWidth=[1],LastColWidth=[4],
879 NoBreak=[F],Border=[F],SmallSize=[F],Caption=[],
880 Headers=[delimiter@ @\name],
881 Body=[=>@\arrow
882 ..@\double dot
883 **@\double star, exponentiate
884 :=@\assignment (pronounced: @lquotes@;becomes@rquotes@;)
885 /=@\inequality (pronounced: @lquotes@;not equal@rquotes@;)
886 >=@\greater than or equal
887 <=@\less than or equal
888 <<@\left label bracket
889 >>@\right label bracket
890 <>@\box]}
891 @end{StaticSem}
892
893 @begin{ImplReq}
894 An implementation shall support lines of
895 at least 200 characters in length, not counting any characters used to signify
896 the end of a line.
897 An implementation shall support lexical elements of at least
898 200 characters in length.
899 The maximum supported line length and lexical element length are
900 implementation defined.
901 @ImplDef{Maximum supported line length and lexical element length.}
902 @begin{Discussion}
903 From URG recommendation.
904 @end{Discussion}
905 @end{ImplReq}
906
907 @begin{Diffword95}
908 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
909 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
910 @ChgAdded{Version=[2],Text=[The wording was updated to use the new character
911 categories defined in the preceding @Chg{Version=[3],New=[subclause],Old=[clause]}.]}
912 @end{Diffword95}
913
914 @begin{Extend2005}
915 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0079-1]}
916 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 2005}@b<Correction:>
917 Clarified that
918 @ntf{other_format} characters are allowed anywhere that separators
919 are allowed. This was intended in Ada 2005, but didn't actually
920 make it into the wording.]}
921 @end{Extend2005}
922
923 @begin{DiffWord2012}
924 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0125-3],ARef=[AI12-0212-1]}
925 @ChgAdded{Version=[5],Text=[Added square brackets and the
926 @nt{target_name} symbol to the list
927 of delimiters (see @RefSecNum{Target Name Symbols}).]}
928 @end{DiffWord2012}
929
930
931 @LabeledClause{Identifiers}
932
933 @begin{Intro}
934 @nt<Identifier>s are used as names.
935 @end{Intro}
936
937 @begin{Syntax}
938 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
939 @Syn{lhs=<identifier>,rhs="
940 @Chg{Version=[2],New=<@Syn2{identifier_start} {@Syn2{identifier_start} | @Syn2{identifier_extend}}>,
941 Old=<@Synf{identifier_letter} {[@Synf{underline}] @Syn2{letter_or_digit}}>}"}
942
943 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
944 @Syn{lhs=<@Chg{Version=[2],New=<identifier_start>,Old=<letter_or_digit>}>,
945 rhs="@Chg{Version=[2],New=<
946 @Synf{letter_uppercase}
947 | @Synf{letter_lowercase}
948 | @Synf{letter_titlecase}
949 | @Synf{letter_modifier}
950 | @Synf{letter_other}
951 | @Synf{number_letter}>,Old=<@Synf{identifier_letter} | @Synf{digit}>}"}
952
953 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
954 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0091-1]}
955 @AddedSyn{Version=[2],lhs=<@Chg{Version=[2],New=<identifier_extend>,Old=<>}>,
956 rhs="@Chg{Version=[2],New=<
957 @Synf{mark_non_spacing}
958 | @Synf{mark_spacing_combining}
959 | @Synf{number_decimal}
960 | @Synf{punctuation_connector}@Chg{Version=[3],New=<>,Old=<
961 | @Synf{other_format}>}>,Old=<>}"}
962
963 @begin{SyntaxText}
964 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00395-01]}
965 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0091-1]}
966 @Chg{Version=[2],New=[@Chg{Version=[3],New=[An],Old=[After eliminating the
967 characters in category @ntf{other_format}, an]} @nt{identifier} shall not
968 contain two consecutive characters in category
969 @Chg{Version=[3],New=[@ntf{punctuation_connector}],Old=[punctuation_connector]},
970 or end with a character in that category.],Old=[An @nt{identifier} shall not be
971 a reserved word.]}
972 @begin{Reason}
973 @ChgRef{Version=[2],Kind=[AddedNormal]}
974 @ChgRef{Version=[3],Kind=[Revised]}
975 @ChgAdded{Version=[2],Text=[This rule was stated in the syntax in Ada 95,
976 but that has gotten too complex in Ada 2005.@Chg{Version=[3],New=[],
977 Old=[ Since @ntf{other_format}
978 characters usually do not display, we do not want to count them as separating
979 two underscores.]}]}
980 @end{Reason}
981 @end{SyntaxText}
982 @end{Syntax}
983
984 @begin{Legality}
985 @ChgRef{Version=[5],Kind=[Added],ARef=[AI12-0004-1],ARef=[AI12-0263-1]}
986 @ChgAdded{Version=[5],Text=[An identifier shall only contain characters that may
987 be present in Normalization Form KC (as defined by Clause 21 of ISO/IEC
988 10646:2017).]}
989
990 @begin{ImplNote}
991 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0004-1],ARef=[AI12-0005-1]}
992 @ChgAdded{Version=[5],Text=[An implementation can usually detect this during
993 lexical processing. The code points not allowed are those for which Unicode
994 property NFKC_QC (Normalization Form KC Quick_Check) has the value No. We
995 say "may be present" so that characters for which the value is Maybe
996 (really, one of the possible values is Maybe) are allowed (these are mainly
997 combining marks). The necessary tables can be found in
998 @URLLink{URL=[http://www.unicode.org/Public/UCD/latest/ucd/DerivedNormalizationProps.txt],
999 Text=[http://www.unicode.org/Public/UCD/latest/ucd/DerivedNormalizationProps.txt]}. Versions for older Unicode versions can be found on this site as
1000 well; start at @URLLink{URL=[http://www.unicode.org/Public/],
1001 Text=[http://www.unicode.org/Public/]} and find the appropriate version
1002 number.]}
1003 @end{ImplNote}
1004 @end{Legality}
1005
1006 @begin{StaticSem}
1007 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00285-01]}
1008 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0091-1],ARef=[AI05-0227-1],ARef=[AI05-0266-1],ARef=[AI05-0299-1]}
1009 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0263-1]}
1010 @Comment{Removed the "Type=[Leading]" along with the bullets. Don't have
1011 a way to make it doubly conditional (only in Version=[2]), and since it is
1012 mainly for spacing, we just forget it.}
1013 @ChgAdded{Version=[2],Text=[Two @nt{identifier}s are ]}@Chg{Version=[2],
1014 New=[considered the same if they consist of the same sequence of characters
1015 after applying @Chg{Version=[3],New=[locale-independent simple case folding,
1016 as defined by documents referenced @Chg{Version=[5],New=[],Old=[in the note ]}in
1017 Clause @Chg{Version=[5],New=[2],Old=[1]} of
1018 ISO/IEC 10646:@Chg{Version=[5],New=[2017],Old=[2011]}.@Defn{case insensitive}],Old=[the following transformations
1019 (in this order):]}],Old=[All characters of an @nt{identifier} are significant,
1020 including any underline character.
1021 @Defn{case insensitive}
1022 @nt{Identifier}s differing only in the use of
1023 corresponding upper and lower case letters are considered the same.]}
1024 @begin{Itemize}
1025 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
1026 @ChgRef{Version=[3],Kind=[DeletedAddedNoDelMsg],ARef=[AI05-0091-1]}
1027 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[],Old=[The characters
1028 in category @ntf{other_format} are eliminated.]}]}
1029
1030 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
1031 @ChgRef{Version=[3],Kind=[DeletedAddedNoDelMsg],ARef=[AI05-0091-1]}
1032 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[],Old=[The remaining sequence of
1033 characters is converted to upper case.
1034 @Defn{case insensitive}]}]}
1035 @end{Itemize}
1036 @begin(Discussion)
1037 @ChgRef{Version=[2],Kind=[DeletedNoDelMsg]}
1038 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0227-1]}
1039 @Chg{Version=[3],New=[Simple case folding is a mapping to lower case, so this
1040 is matching the defining (lower case) version of a reserved word. We could
1041 have mentioned case folding of the reserved words, but as that is an identity
1042 function, it would have no effect.],Old=[@Chg{Version=[2],New=[],Old=[Two of
1043 the letters of ISO 8859-1 appear only as lower case,
1044 "sharp s" and "y with diaeresis." These two letters have
1045 no corresponding upper case letter (in particular, they
1046 are not considered equivalent to one another).]}]}
1047
1048 @ChgRef{Version=[3],Kind=[Added],ARef=[AI05-0227-1]}
1049 @ChgRef{Version=[5],Kind=[RevisedAdded],ARef=[AI12-0263-1]}
1050 @ChgAdded{Version=[3],Text=[The @ldquote@;documents referenced@rdquote means
1051 Unicode@Chg{Version=[5],New=[, Chapter 4 (specifically, section 4.2
1052 @em Case)],Old=[]}. Note that simple case folding is supposed to be
1053 compatible between Unicode versions, so the Unicode version used doesn't
1054 matter.@Chg{Version=[5],New=[ A machine-readable version of the needed
1055 mapping can be found at:
1056 @URLLink{URL=[http://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt],
1057 Text=[http://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt]}.],Old=[]}]}
1058 @end(Discussion)
1059 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00395-01]}
1060 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0091-1],ARef=[AI05-0227-1]}
1061 @ChgAdded{Version=[2],Text=[After applying @Chg{Version=[3],New=[simple
1062 case folding],Old=[these transformations]}, an
1063 @nt{identifier} shall not be identical to a reserved
1064 word@Chg{Version=[3],New=[],Old=[ (in upper case)]}.]}
1065 @begin(ImplNote)
1066 @ChgRef{Version=[2],Kind=[AddedNormal]}
1067 @ChgRef{Version=[3],Kind=[Revised]}
1068 @ChgAdded{Version=[2],Text=[We match the reserved words after
1069 @Chg{Version=[3],New=[applying case folding],Old=[doing these
1070 transformations]} so that the rules for @nt{identifier}s and reserved words are
1071 the same. @Chg{Version=[3],New=[],Old=[(This allows @ntf{other_format}
1072 characters, which usually don't display, in a reserved word
1073 without changing it to an @nt{identifier}.) ]}Since
1074 a compiler usually will lexically process @nt{identifier}s and reserved words the
1075 same way (often with the same code), this will prevent a lot of headaches.]}
1076 @end(ImplNote)
1077 @begin(Ramification)
1078 @ChgRef{Version=[2],Kind=[AddedNormal]}
1079 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0227-1]}
1080 @ChgAdded{Version=[2],Text=[The rules for reserved words differ in one way:
1081 they define case conversion on letters rather than sequences. This means that
1082 @Chg{Version=[3],New=[it is possible that there exist ],Old=[]}some
1083 unusual sequences @Chg{Version=[3],New=[that ],Old=[]}are neither
1084 @nt{identifier}s nor reserved words.
1085 @Chg{Version=[3],New=[We are not aware of any such sequences so long as we use
1086 simple case folding (as opposed to full case folding), but we have defined the
1087 rules in case any are introduced in future character set standards. This
1088 originally was a problem when converting to upper case:],Old=[For instance,]}
1089 @lquotes@;@smldotlessi@;f@rquotes@; and
1090 @lquotes@;acce@latin1(223)@rquotes@; have upper case conversions of
1091 @lquotes@;IF@rquotes@; and @lquotes@;ACCESS@rquotes@; respectively.
1092 @Chg{Version=[3],New=[We would not want these to be treated as reserved words.
1093 But neither of these cases exist when using simple case folding.], Old=[These
1094 are not @nt{identifier}s, because the transformed values are
1095 identical to a reserved word. But they are not reserved words, either, because
1096 the original values do not match any reserved word as defined or with any number
1097 of characters of the reserved word in upper case. Thus, these odd
1098 constructions are just illegal, and should not appear in the source of
1099 a program.]}]}
1100 @end(Ramification)
1101 @end{StaticSem}
1102
1103 @begin{ImplPerm}
1104 In a nonstandard mode,
1105 an implementation may support other upper/lower case equivalence
1106 rules for @nt<identifier>s@Redundant[,
1107 to accommodate local conventions].
1108 @end{ImplPerm}
1109
1110 @begin(Discussion)
1111 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
1112 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0227-1]}
1113 @ChgAdded{Version=[2],Type=[Leading],Text=[For instance, in most languages,
1114 the @Chg{Version=[3],New=[simple case folded],Old=[uppercase]}
1115 equivalent of LATIN @Chg{Version=[3],New=[CAPITAL],Old=[SMALL]} LETTER I
1116 (@Chg{Version=[3],New=[an upper],Old=[a lower]} case letter
1117 @Chg{Version=[3],New=[without],Old=[with]} a dot above) is
1118 LATIN @Chg{Version=[3],New=[SMALL],Old=[CAPITAL]} LETTER I
1119 (@Chg{Version=[3],New=[a lower],Old=[an upper]} case letter
1120 @Chg{Version=[3],New=[with],Old=[without]} a dot above). In
1121 Turkish, though, LATIN @Chg{Version=[3],New=[CAPITAL],Old=[SMALL]} LETTER I
1122 and LATIN @Chg{Version=[3],New=[CAPITAL],Old=[SMALL]} LETTER
1123 @Chg{Version=[3],New=[],Old=[DOTLESS ]}I@Chg{Version=[3],New=[ WITH DOT
1124 ABOVE],Old=[]} are two distinct letters, so the @Chg{Version=[3],New=[case
1125 folded],Old=[upper case]} equivalent of LATIN
1126 @Chg{Version=[3],New=[CAPITAL],Old=[SMALL]} LETTER I is LATIN
1127 @Chg{Version=[3],New=[SMALL],Old=[CAPITAL]} LETTER
1128 @Chg{Version=[3],New=[DOTLESS ],Old=[]}I@Chg{Version=[3],New=[],Old=[ WITH DOT
1129 ABOVE]}, and the @Chg{Version=[3],New=[case folded],Old=[upper case]}
1130 equivalent of LATIN @Chg{Version=[3],New=[CAPITAL],Old=[SMALL]} LETTER
1131 @Chg{Version=[3],New=[],Old=[DOTLESS ]}I@Chg{Version=[3],New=[ WITH DOT
1132 ABOVE],Old=[]} is LATIN @Chg{Version=[3],New=[SMALL],Old=[CAPITAL]} LETTER I.
1133 Take for instance the following identifier (which is the name of a city on the
1134 Tigris river in Eastern Anatolia):]}
1135
1136 @begin{Example}
1137 @ChgRef{Version=[2],Kind=[AddedNormal]}
1138 @ChgRef{Version=[3],Kind=[Revised]}
1139 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[D@capdottedi@;YARBAKIR],Old=[diyarbak@smldotlessi@;r]} -- @RI[The first i is dotted, the second isn't.]]}
1140 @end{Example}
1141 @ChgRef{Version=[2],Kind=[AddedNormal]}
1142 @ChgRef{Version=[3],Kind=[Revised]}
1143 @ChgAdded{Version=[2],Type=[Leading],Text=[@Chg{Version=[3],New=[A Turkish
1144 reader would expect that the above identifier is equivalent to],Old=[Locale-independent conversion to
1145 upper case results in]}:]}
1146 @begin{Example}
1147 @ChgRef{Version=[2],Kind=[AddedNormal]}
1148 @ChgRef{Version=[3],Kind=[Revised]}
1149 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[diyarbak@smldotlessi@;r],Old=[DIYARBAKIR -- @RI[Both Is are dotless.]]}]}
1150 @end{Example}
1151 @ChgRef{Version=[3],Kind=[Added]}
1152 @ChgAdded{Version=[3],Type=[Leading],Text=[However, locale-independent simple case folding (and thus Ada)
1153 maps this to:]}
1154 @begin{Example}
1155 @ChgRef{Version=[3],Kind=[Added]}
1156 @ChgAdded{Version=[3],Text=[d@capdottedi@;yarbakir]}
1157 @end{Example}
1158 @ChgRef{Version=[2],Kind=[AddedNormal]}
1159 @ChgRef{Version=[3],Kind=[Revised]}
1160 @ChgAdded{Version=[2],Type=[Leading],Text=[@Chg{Version=[3],New=[which is
1161 different from any of the following identifiers],Old=[This means that the four
1162 following sequences of characters represent the same identifier, even though
1163 for a locutor of Turkish they would probably be considered distinct words]}:]}
1164 @begin{Example}
1165 @ChgRef{Version=[2],Kind=[AddedNormal]}
1166 @ChgAdded{Version=[2],Text=[diyarbakir
1167 diyarbak@smldotlessi@;r
1168 d@smldotlessi@;yarbakir
1169 d@smldotlessi@;yarbak@smldotlessi@;r]}
1170 @end{Example}
1171 @ChgRef{Version=[3],Kind=[Added]}
1172 @ChgAdded{Version=[3],Text=<including the @ldquote@;correct@rdquote matching
1173 identifier for Turkish. Upper case conversion (used in '[Wide_]Wide_Image)
1174 introduces additional problems.>}
1175
1176 @ChgRef{Version=[2],Kind=[AddedNormal]}
1177 @ChgRef{Version=[3],Kind=[Revised]}
1178 @Comment{Removed the "Type=[Leading]" along with the example. Don't have
1179 a way to make it doubly conditional (only in Version=[2]), and since it is
1180 mainly for spacing, we just forget it.}
1181 @ChgAdded{Version=[2],Text=[An implementation targeting the
1182 Turkish market is allowed (in fact, expected) to provide a nonstandard mode
1183 where case folding is appropriate for Turkish.@Chg{Version=[3],New=[],Old=[ This
1184 would cause the original identifier to be converted to:]}]}
1185 @begin{Example}
1186 @ChgRef{Version=[2],Kind=[AddedNormal]}
1187 @ChgRef{Version=[3],Kind=[DeletedNoDelMsg]}
1188 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[],Old=[D@capdottedi@;YARBAKIR -- @RI[The first I is dotted, the second isn't.]]}]}
1189 @end{Example}
1190 @ChgRef{Version=[2],Kind=[AddedNormal]}
1191 @ChgRef{Version=[3],Kind=[DeletedNoDelMsg]}
1192 @ChgAdded{Version=[2],Text=[@Chg{Version=[3],New=[],Old=[and the four
1193 sequences of characters shown above would represent four distinct
1194 identifiers.]}]}
1195
1196 @ChgRef{Version=[2],Kind=[AddedNormal]}
1197 @ChgAdded{Version=[2],Text=[Lithuanian and Azeri are two other languages that
1198 present similar idiosyncrasies.]}
1199 @end{Discussion}
1200
1201 @begin{Notes}
1202 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
1203 @ChgAdded{Version=[2],Text=[@nt{Identifier}s differing only in the use of
1204 corresponding upper and lower case letters are considered the same.]}
1205 @end{Notes}
1206
1207 @begin{Examples}
1208 @Leading@keepnext@i{Examples of identifiers:}
1209 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00433-01]}
1210 @ChgNote{Old version:@begin{Display}
1211 Count X Get_Symbol Ethelyn Marion
1212 @Comment{Blank line}
1213 Snobol_4 X1 Page_Count Store_Next_Item
1214 @end{Display}}
1215 @begin{Example}
1216 Count X Get_Symbol Ethelyn Marion
1217 Snobol_4 X1 Page_Count Store_Next_Item@Chg{Version=[2],New=[
1218 @unicode(928)@unicode(955)@unicode(940)@unicode(964)@unicode(969)@unicode(957) --@RI[ Plato]
1219 @unicode(1063)@unicode(1072)@unicode(1081)@unicode(1082)@unicode(1086)@unicode(1074)@unicode(1089)@unicode(1082)@unicode(1080)@unicode(1081) --@RI[ Tchaikovsky]
1220 @unicode(952) @unicode(966) --@RI[ Angles]],Old=[]}
1221 @end{Example}
1222 @end{Examples}
1223
1224 @begin{DiffWord83}
1225 We no longer include reserved words as @nt<identifier>s.
1226 This is not a language change.
1227 In Ada 83, @nt{identifier} included reserved words.
1228 However, this complicated several other
1229 rules (for example, regarding implementation-defined
1230 attributes and pragmas, etc.).
1231 We now explicitly allow certain reserved words for attribute designators,
1232 to make up for the loss.
1233 @begin{Ramification}
1234 Because syntax rules are relevant to overload resolution,
1235 it means that if it looks like a reserved word,
1236 it is not an @nt<identifier>.
1237 As a side effect, implementations cannot use reserved words as
1238 implementation-defined attributes or pragma names.
1239 @end{Ramification}
1240 @end{DiffWord83}
1241
1242 @begin{Extend95}
1243 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
1244 @ChgAdded{Version=[2],Text=[@Defn{extensions to Ada 95}
1245 An @nt{identifier} can use any letter defined by ISO-10646:2003, along
1246 with several other categories. This should ease programming in languages
1247 other than English.]}
1248 @end{Extend95}
1249
1250 @begin{Incompatible2005}
1251 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0091-1]}
1252 @ChgAdded{Version=[3],Text=[@Defn{incompatibilities with Ada 2005}@B<Correction:>
1253 @ntf{other_format} characters were removed from identifiers as the Unicode
1254 recommendations have changed. This change can only affect programs
1255 written for the original Ada 2005, so there should be few such programs.]}
1256
1257 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0227-1]}
1258 @ChgAdded{Version=[3],Text=[@B<Correction:> We now specify simple case
1259 folding rather than full case folding. That potentially could change
1260 identifier equivalence, although it is more likely that identifiers that
1261 are considered the same in original Ada 2005 will now be considered different.
1262 This change was made because the original Ada 2005 definition was incompatible
1263 (and even inconsistent in unusual cases) with the Ada 95 identifier
1264 equivalence rules. As such, the Ada 2005 rules were rarely fully implemented,
1265 and in any case, only Ada 2005 identifiers containing wide characters could
1266 be affected.]}
1267 @end{Incompatible2005}
1268
1269 @begin{Incompatible2012}
1270 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0004-1]}
1271 @ChgAdded{Version=[5],Text=[@Defn{incompatibilities with Ada 2012}@B<Correction:>
1272 An identifier that contains any characters not permitted in Normalization
1273 Form KC is now illegal. Ada 2012 allowed such identifiers, but their
1274 interpretation was implementation-defined (so the use of such
1275 identifiers was not portable). Identifiers that may be interpreted differently
1276 by different compilers is a safety and security hazard, so we no longer
1277 allow them.]}
1278 @end{Incompatible2012}
1279
1280
1281 @LabeledClause{Numeric Literals}
1282
1283 @begin{Intro}
1284 @Defn2{Term=[literal], Sec=(numeric)}
1285 There are two kinds of @nt<numeric_literal>s, @i(real literals) and @i(integer
1286 literals).
1287 @Defn{real literal}
1288 A real literal is a @nt{numeric_literal} that includes a point;
1289 @Defn{integer literal}
1290 an integer literal is a @nt{numeric_literal} without a point.
1291 @end{Intro}
1292
1293 @begin{Syntax}
1294 @Syn{lhs=<numeric_literal>,rhs="@Syn2{decimal_literal} | @Syn2{based_literal}"}
1295 @end{Syntax}
1296
1297 @begin{Notes}
1298 The type of an integer literal is @i{universal_integer}.
1299 The type of a real literal is @i{universal_real}.
1300 @end{Notes}
1301
1302 @LabeledSubClause{Decimal Literals}
1303
1304 @begin{Intro}
1305 @Defn2{Term=[literal], Sec=(decimal)}
1306 A @nt<decimal_literal> is a @nt<numeric_literal> in the conventional
1307 decimal notation (that is, the base is ten).
1308 @end{Intro}
1309
1310 @begin{Syntax}
1311 @Syn{lhs=<decimal_literal>,rhs="@Syn2{numeral} [.@Syn2{numeral}] [@Syn2{exponent}]"}
1312
1313
1314 @Syn{lhs=<numeral>,rhs="@Syn2{digit} {[@Synf{underline}] @Syn2{digit}}"}
1315
1316 @Syn{lhs=<exponent>,rhs="E [+] @Syn2{numeral} | E @en@; @Syn2{numeral}"}
1317
1318 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
1319 @AddedSyn{Version=[2],lhs=<@Chg{Version=[2],New=<digit>,Old=<>}>,
1320 rhs="@Chg{Version=[2],New=<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9>,Old=<>}"}
1321
1322 @begin{SyntaxText}
1323 An @nt{exponent} for an integer literal shall not have a minus sign.
1324 @begin{Ramification}
1325 Although
1326 this rule is in this subclause, it applies also to the next subclause.
1327 @end{Ramification}
1328 @end{SyntaxText}
1329 @end{Syntax}
1330
1331 @begin{StaticSem}
1332 An underline character in a
1333 @nt{numeric_literal} does not affect its meaning.
1334 The letter E of an @nt{exponent} can be written either in lower
1335 case or in upper case, with the same meaning.
1336 @begin{Ramification}
1337 Although these rules are in this subclause,
1338 they apply also to the next subclause.
1339 @end{Ramification}
1340
1341 An @nt{exponent} indicates the power of ten by which the value of the
1342 @nt{decimal_literal} without the @nt{exponent} is to be multiplied to
1343 obtain the value of the @nt{decimal_literal} with the @nt{exponent}.
1344 @end{StaticSem}
1345
1346 @begin{Examples}
1347 @Leading@keepnext@i{Examples of decimal literals:}
1348 @ChgNote{ Old version: @begin{Display}
1349 @tabclear()@tabset(P31)
1350 12 0 1E6 123_456 @\--@i{ integer literals}
1351 @Comment{Blank line}
1352 12.0 0.0 0.456 3.14159_26 @\--@i{ real literals}
1353 @end{Display}}
1354 @begin{Example}
1355 12 0 1E6 123_456 --@RI{ integer literals}
1356 @Comment{Blank line}
1357 12.0 0.0 0.456 3.14159_26 --@RI{ real literals}
1358 @end{Example}
1359 @end{Examples}
1360
1361 @begin{DiffWord83}
1362 We have changed the syntactic category name @ntf{integer} to be @nt{numeral}.
1363 We got this idea from ACID.
1364 It avoids the confusion between this and integers.
1365 (Other places don't offer similar confusions.
1366 For example, a @nt{string_literal} is different from a string.)
1367 @end{DiffWord83}
1368
1369 @LabeledSubClause{Based Literals}
1370
1371 @begin{Intro}
1372 @Redundant[
1373 @Defn2{Term=[literal], Sec=(based)}
1374 @Defn{binary literal}
1375 @Defn{base 2 literal}
1376 @Defn2{Term=[binary], Sec=(literal)}
1377 @Defn{octal literal}
1378 @Defn{base 8 literal}
1379 @Defn2{Term=[octal], Sec=(literal)}
1380 @Defn{hexadecimal literal}
1381 @Defn{base 16 literal}
1382 @Defn2{Term=[hexadecimal], Sec=(literal)}
1383 A @nt<based_literal> is a @nt<numeric_literal> expressed in a form
1384 that specifies the base explicitly.]
1385 @end{Intro}
1386
1387 @begin{Syntax}
1388 @Syn{lhs=<based_literal>,rhs="
1389 @Syn2{base} # @Syn2{based_numeral} [.@Syn2{based_numeral}] # [@Syn2{exponent}]"}
1390
1391
1392 @Syn{lhs=<base>,rhs="@Syn2{numeral}"}
1393
1394 @Syn{lhs=<based_numeral>,rhs="
1395 @Syn2{extended_digit} {[@Synf{underline}] @Syn2{extended_digit}}"}
1396
1397 @Syn{lhs=<extended_digit>,rhs="@Syn2{digit} | A | B | C | D | E | F"}
1398
1399 @end{Syntax}
1400
1401 @begin{Legality}
1402 @Defn{base}
1403 The @i(base) (the numeric value of the decimal @nt<numeral> preceding
1404 the first #) shall be at least two and at most sixteen.
1405 The @nt{extended_digit}s A through F represent the digits ten through
1406 fifteen, respectively.
1407 The value of each @nt{extended_digit} of a @nt{based_literal}
1408 shall be less than the base.
1409 @end{Legality}
1410
1411 @begin{StaticSem}
1412 The conventional meaning of based notation is assumed.
1413 An @nt{exponent} indicates the
1414 power of the base by which the value of the @nt{based_literal}
1415 without the @nt{exponent} is to be multiplied to obtain the value of
1416 the @nt{based_literal} with the @nt{exponent}.
1417 The @nt{base} and the @nt{exponent}, if any, are in decimal notation.
1418
1419 The @nt{extended_digit}s A through F can be written either in
1420 lower case or in upper case, with the same meaning.
1421 @end{StaticSem}
1422
1423 @begin{Examples}
1424 @Leading@keepnext@i{Examples of based literals:}
1425 @ChgNote{ Old version: @begin{Display}
1426 @tabclear()@tabset(P16, P45)
1427 2#1111_1111# @\16#FF# 016#0ff# @\--@i{ integer literals of value 255}
1428 16#E#E1 @\2#1110_0000# @\--@i{ integer literals of value 224}
1429 16#F.FF#E+2 @\2#1.1111_1111_1110#E11 @\--@i{ real literals of value 4095.0}
1430 @end{Display}}
1431 @begin{Example}
1432 2#1111_1111# 16#FF# 016#0ff# --@RI{ integer literals of value 255}
1433 16#E#E1 2#1110_0000# --@RI{ integer literals of value 224}
1434 16#F.FF#E+2 2#1.1111_1111_1110#E11 --@RI{ real literals of value 4095.0}
1435 @end{Example}
1436 @end{Examples}
1437
1438 @begin{DiffWord83}
1439 The rule about which letters are allowed is now encoded in BNF,
1440 as suggested by Mike Woodger.
1441 This is clearly more readable.
1442 @end{DiffWord83}
1443
1444 @LabeledClause{Character Literals}
1445
1446 @begin{Intro}
1447 @Redundant[A @nt<character_literal> is formed by enclosing a graphic
1448 character between two apostrophe characters.]
1449 @end{Intro}
1450
1451 @begin{Syntax}
1452 @Syn{lhs=<character_literal>,rhs="@SingleQuote@Synf{graphic_character}@SingleQuote"}
1453 @end{Syntax}@Comment{graphic_character is defined syntactically in Ada 95, but not in Ada 2007}
1454
1455 @begin{Notes}
1456 A @nt{character_literal} is an enumeration literal
1457 of a character type. See @RefSecNum(Character Types).
1458 @end{Notes}
1459
1460 @begin{Examples}
1461 @Leading@keepnext@i{Examples of character literals:}
1462 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00433-01]}
1463 @ChgNote{ Orginal version: @begin{Display}
1464 'A'@ @ @ @ @ '*'@ @ @ @ @ '''@ @ @ @ @ '@ '
1465 @end{Display}}
1466 @begin{Example}
1467 'A' '*' ''' ' '@Chg{Version=[2],New=[
1468 'L' '@Unicode(1051)' '@Unicode(923)' --@RI[ Various els.]
1469 '@Unicode(8734)' '@Unicode(1488)' --@RI[ Big numbers - infinity and aleph.]],Old=[]}
1470 @end{Example}
1471 @end{Examples}
1472
1473 @begin{DiffWord83}
1474 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
1475 The definitions of the values of literals are in
1476 @Chg{Version=[3],New=[Clauses],Old=[Sections]} 3 and 4, rather than here,
1477 since it requires knowledge of types.
1478 @end{DiffWord83}
1479
1480 @LabeledClause{String Literals}
1481
1482 @begin{Intro}
1483 @redundant[A @nt<string_literal> is formed by a sequence of graphic characters
1484 (possibly none) enclosed between two quotation marks used as
1485 string brackets. They are used to represent @nt<operator_symbol>s
1486 (see @RefSecNum(Subprogram Declarations)), values of a string type
1487 (see @RefSecNum(Literals)), and array subaggregates
1488 (see @RefSecNum(Array Aggregates)).
1489 @IndexSee{Term=[quoted string],See=(string_literal)}]
1490 @end{Intro}
1491
1492 @begin{Syntax}
1493 @Syn{lhs=<string_literal>,rhs=<"{@Syn2{string_element}}">}
1494
1495 @Syn{lhs=<string_element>,
1496 rhs=<"" | @SynI{non_quotation_mark_}@Synf{graphic_character}>}
1497
1498 @begin{SyntaxText}
1499 A @nt{string_element} is either a pair of quotation marks (""),
1500 or a single @ntf{graphic_character} other than a quotation mark.
1501 @end{SyntaxText}
1502 @end{Syntax}
1503
1504 @begin{StaticSem}
1505 @Defn2{Term=[sequence of characters], Sec=(of a @nt<string_literal>)}
1506 The @i(sequence of characters) of a @nt<string_literal> is formed
1507 from the sequence of @nt<string_element>s between the bracketing
1508 quotation marks, in the given order,
1509 with a @nt<string_element> that is "" becoming a single quotation
1510 mark in the sequence of characters,
1511 and any other @nt<string_element> being reproduced
1512 in the sequence.
1513
1514 @Defn{null string literal}
1515 A @i(null string literal) is a @nt<string_literal> with no
1516 @nt<string_element>s between the quotation marks.
1517
1518 @end{StaticSem}
1519
1520 @begin{Notes}
1521 An end of line cannot appear in a @nt{string_literal}.
1522
1523 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
1524 @ChgAdded{Version=[2],Text=[No transformation is performed on the
1525 sequence of characters of a @nt{string_literal}.]}
1526 @end{Notes}
1527
1528 @begin{Examples}
1529 @Leading@keepnext@i{Examples of string literals:}
1530 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00433-01]}
1531 @ChgNote< Original version: @begin{Display}
1532 @tabclear()@tabset(P16)
1533 "Message of the day:"
1534 @comment{Blank line}
1535 "" @\--@i{ a null string literal}
1536 "@ " "A" """" @\--@i{ three string literals of length 1}
1537 @comment{Blank line}
1538 "Characters such as $, %, and } are allowed in string literals"
1539 @end{Display}>
1540 @begin{Example}
1541 "Message of the day:"
1542 @comment{Blank line}
1543 "" --@RI{ a null string literal}
1544 " " "A" """" --@RI{ three string literals of length 1}
1545 @comment{Blank line}
1546 "Characters such as $, %, and } are allowed in string literals"
1547 @Chg{Version=[2],New=["Archimedes said ""@unicode(917)@unicode(973)@unicode(961)@unicode(951)@unicode(954)@unicode(945)"""
1548 "Volume of cylinder (@pi@;r@latin1(178)h) = "],Old=[]}
1549 @end{Example}
1550 @end{Examples}
1551
1552 @begin{DiffWord83}
1553 The wording has been changed to be strictly lexical.
1554 No mention is made of string or character values, since
1555 @nt<string_literal>s are also used to represent @nt<operator_symbol>s,
1556 which don't have a defined value.
1557
1558 The syntax is described differently.
1559 @end{DiffWord83}
1560
1561 @begin{DiffWord95}
1562 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
1563 @ChgAdded{Version=[2],Text=[We explicitly say that the characters of a
1564 @nt{string_literal} should be used as is. In particular, no normalization
1565 or folding should be performed on a @nt{string_literal}.]}
1566 @end{DiffWord95}
1567
1568
1569 @LabeledClause{Comments}
1570
1571 @begin{Intro}
1572 A @nt{comment} starts with two adjacent hyphens and extends up to the end
1573 of the line.
1574 @end{Intro}
1575
1576 @begin{Syntax}
1577 @Syn{lhs=<comment>,
1578 rhs=<--{@SynI{non_end_of_line_}@Synf{character}}>}@Comment{character is defined syntactically in Ada 95,
1579 but not in Ada 2007. We assume the worst here.}
1580
1581 @begin{SyntaxText}
1582 A @nt{comment} may appear on any line of a program.
1583 @end{SyntaxText}
1584 @end{Syntax}
1585
1586 @begin{StaticSem}
1587 The presence or absence of @nt{comment}s has no influence on whether a program
1588 is legal or illegal. Furthermore, @nt{comment}s do not influence the meaning
1589 of a program; their sole purpose is the enlightenment of the human reader.
1590 @end{StaticSem}
1591
1592 @begin{Examples}
1593 @Leading@keepnext@i{Examples of comments:}
1594 @ChgNote{Original version: @begin{Display}
1595 --@i{ the last sentence above echoes the Algol 68 report }
1596 @comment{Blank line}
1597 @key[end]; --@i{ processing of Line is complete }
1598 @comment{Blank line}
1599 --@i{ a long comment may be split onto}
1600 --@i{ two or more consecutive lines }
1601 @comment{Blank line}
1602 ----------------@i{ the first two hyphens start the comment }
1603 @end{Display}}
1604 @begin{Example}
1605 --@RI[ the last sentence above echoes the Algol 68 report ]
1606 @comment{Blank line}
1607 @key[end]; --@RI[ processing of Line is complete ]
1608 @comment{Blank line}
1609 --@RI[ a long comment may be split onto]
1610 --@RI[ two or more consecutive lines ]
1611 @comment{Blank line}
1612 ----------------@RI[ the first two hyphens start the comment ]
1613 @end{Example}
1614 @end{Examples}
1615
1616
1617 @LabeledClause{Pragmas}
1618
1619 @begin{Intro}
1620 @ToGlossaryAlso{Term=<Pragma>,
1621 Text=<A pragma is a compiler directive.
1622 There are language-defined pragmas that give instructions
1623 for optimization, listing control, etc.
1624 An implementation may support additional
1625 (implementation-defined) pragmas.>}
1626 @end{Intro}
1627
1628 @begin{MetaRules}
1629 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0100-1],ARef=[AI05-0163-1]}
1630 @ChgAdded{Version=[3],Text=[In general, if all @nt{pragma}s are treated as
1631 unrecognized @nt{pragma}s, the program should remain both syntactically and
1632 semantically legal. There are a few exceptions to this general principle (for
1633 example, @nt{pragma} Import can eliminate the need for a completion), but the
1634 principle remains, and is strictly true at the syntactic level. Certainly any
1635 implementation-defined @nt{pragma}s should obey this principle both
1636 syntactically and semantically, so that if the @nt{pragma}s are not recognized
1637 by some other implementation, the program will remain legal.]}
1638 @end{MetaRules}
1639
1640 @begin{Syntax}
1641 @Syn{lhs=<pragma>,rhs="
1642 @key{pragma} @Syn2{identifier} [(@Syn2{pragma_argument_association} {, @Syn2{pragma_argument_association}})];"}
1643
1644 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0290-1]}
1645 @Syn{lhs=<pragma_argument_association>,rhs="
1646 [@SynI{pragma_argument_}@Syn2{identifier} =>] @Syn2{name}
1647 | [@SynI{pragma_argument_}@Syn2{identifier} =>] @Syn2{expression}@Chg{Version=[3],New=[
1648 | @SynI{pragma_argument_}@Syn2{aspect_mark} => @Syn2{name}
1649 | @SynI{pragma_argument_}@Syn2{aspect_mark} => @Syn2{expression}],Old=[]}"}
1650
1651 @begin{SyntaxText}
1652 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0290-1]}
1653 In a @nt<pragma>, any @nt<pragma_argument_association>s without a
1654 @SynI{pragma_argument_}@nt<identifier> @Chg{Version=[3],New=[or
1655 @SynI{pragma_argument_}@nt<aspect_mark> ],Old=[]}shall
1656 precede any associations with a
1657 @i{pragma_argument_}@nt<identifier>@Chg{Version=[3],New=[ or
1658 @SynI{pragma_argument_}@nt<aspect_mark>],Old=[]}.
1659
1660 @Leading@keepnext@nt{Pragma}s are only allowed at the following places in a program:
1661 @begin{Itemize}
1662 @ChgRef{Version=[5],Kind=[Revised],ARef=[AI12-0236-1]}
1663 After a semicolon delimiter, but not within a
1664 @nt{formal_part}@Chg{Version=[5],New=[,],Old=[ or]}
1665 @nt{discriminant_part}@Chg{Version=[5],New=[, or
1666 @nt{declare_expression}],Old=[]}.
1667
1668 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0100-1],ARef=[AI05-0163-1]}
1669 At any place where the syntax rules allow a construct defined by a
1670 syntactic category whose name ends with @ldquote@ntf{declaration}@rdquote,
1671 @Chg{Version=[3],New=[@ldquote@ntf{item}@rdquote, ],Old=[]}@ldquote@ntf{statement}@rdquote,
1672 @ldquote@ntf{clause}@rdquote, or
1673 @ldquote@ntf{alternative}@rdquote, or one of the syntactic categories
1674 @nt{variant} or @nt{exception_handler};
1675 but not in place of such a construct@Chg{Version=[3],New=[ if the construct
1676 is required, or is part of a list that is required to have at least one such
1677 construct],Old=[. Also at any place where a @nt{compilation_unit} would be
1678 allowed]}.
1679
1680 @ChgRef{Version=[3],Kind=[Added],ARef=[AI05-0163-1]}
1681 @ChgAdded{Version=[3],Text=[In place of a @nt{statement} in a
1682 @nt{sequence_of_statements}.]}
1683
1684 @ChgRef{Version=[3],Kind=[Added],ARef=[AI05-0100-1]}
1685 @ChgAdded{Version=[3],Text=[At any place where a @nt{compilation_unit}
1686 is allowed.]}
1687 @end{Itemize}
1688
1689 Additional syntax rules and placement restrictions
1690 exist for specific pragmas.
1691 @end{SyntaxText}
1692 @begin{Discussion}
1693 The above rule is written in text,
1694 rather than in BNF;
1695 the syntactic category @nt{pragma} is not used in any BNF syntax rule.
1696 @end{Discussion}
1697 @begin{Ramification}
1698 A @nt{pragma} is allowed where a
1699 @nt<generic_formal_parameter_declaration> is allowed.
1700 @end{Ramification}
1701 @end{Syntax}
1702
1703 @begin{Intro}
1704 @Defn2{Term=[name], Sec=(of a @nt{pragma})}
1705 @Defn{pragma name}
1706 The @i{name} of a @nt{pragma} is
1707 the identifier following the reserved word @key{pragma}.
1708 @Defn{pragma argument}
1709 @Defn{argument of a pragma}
1710 The @nt{name} or @nt{expression} of a @nt{pragma_argument_association}
1711 is a @i{pragma argument}.
1712
1713 @begin{Honest}
1714 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00284-02]}
1715 @ChgAdded{Version=[2],Text=[For compatibility with Ada 83, the name of a
1716 @nt{pragma} may also be @lquotes@key{interface}@rquotes@;, which is not an
1717 identifier (because it is a reserved word).
1718 See @RefSecNum{Pragma Interface}.]}
1719 @end{Honest}
1720
1721 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0272-1]}
1722 @Defn{identifier specific to a pragma}
1723 @Defn{pragma, identifier specific to}
1724 An @i{identifier specific to a pragma} is
1725 an identifier @Chg{Version=[3],New=[or reserved word ],Old=[]}that is
1726 used in a pragma argument with special meaning
1727 for that pragma.
1728 @begin{Honest}
1729 Whenever the syntax rules for a given pragma allow
1730 "@nt{identifier}" as an argument of the @nt{pragma},
1731 that @nt{identifier} is an identifier specific to that
1732 pragma.
1733
1734 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0272-1]}
1735 @ChgAdded{Version=[3],Text=[In a few cases, a reserved word is
1736 allowed as "an identifier specific to a pragma". Even in these cases,
1737 the syntax still is written as @nt{identifier} (the reserved word(s)
1738 are not shown). For example, the restriction No_Use_Of_Attribute
1739 (see @RefSecNum{Language-Defined Restrictions and Profiles}) allows the
1740 reserved words which can be attribute designators, but the syntax for
1741 a restriction does not include these reserved words.]}
1742 @end{Honest}
1743 @end{Intro}
1744
1745 @begin{StaticSem}
1746 If an implementation does not recognize the name of a
1747 @nt{pragma}, then it has no effect on the semantics
1748 of the program.
1749 Inside such a @nt{pragma}, the only rules that apply are the
1750 @SyntaxName@;s.
1751 @begin{Honest}
1752 This rule takes precedence over any other rules that imply otherwise.
1753 @end{Honest}
1754 @begin{Ramification}
1755 Note well: this rule applies only to @nt{pragma}s whose name is not
1756 recognized.
1757 If anything else is wrong with a @nt{pragma} (at compile time),
1758 the @nt{pragma} is illegal.
1759 This is true whether the @nt{pragma} is
1760 language defined or implementation defined.
1761
1762 For example, an expression in an unrecognized @nt{pragma} does
1763 not cause freezing, even though the rules in
1764 @RefSec{Freezing Rules} say it does;
1765 the above rule overrules those other rules.
1766 On the other hand, an expression in a recognized @nt{pragma} causes
1767 freezing, even if this makes something illegal.
1768
1769 For another example, an expression that would be ambiguous is not
1770 illegal if it is inside an unrecognized @nt{pragma}.
1771
1772 Note, however, that implementations have to recognize @key[pragma]
1773 Inline(Foo) and freeze things accordingly, even if they choose to never
1774 do inlining.
1775
1776 Obviously, the contradiction needs to be resolved one way or the
1777 other. The reasons for resolving it this way are: The
1778 implementation is simple @em the compiler can just ignore the
1779 @nt{pragma} altogether.
1780 The interpretation of constructs appearing inside
1781 implementation-defined @nt{pragma}s is implementation defined. For
1782 example: @lquotes@;@key[pragma] Mumble(X);@rquotes@;. If the current implementation has
1783 never heard of Mumble, then it doesn't know whether X is a name,
1784 an expression, or an identifier specific to the pragma Mumble.
1785 @end{Ramification}
1786 @begin{Honest}
1787 The syntax of individual pragmas overrides the general
1788 syntax for @nt{pragma}.
1789 @end{Honest}
1790 @begin{Ramification}
1791 Thus, an identifier specific to a @nt{pragma} is not a @nt{name},
1792 syntactically; if it were, the visibility rules would be invoked,
1793 which is not what we want.
1794
1795 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
1796 This also implies that named associations do not allow one to give the
1797 arguments in an arbitrary order @em the order given in the syntax rule
1798 for each individual pragma must be obeyed.
1799 However, it is generally possible to leave out earlier arguments when
1800 later ones are given; for example, this is allowed by the syntax rule
1801 for pragma Import (see @Chg{Version=[3],New=[@RefSec{Interfacing Pragmas}],
1802 Old=[@RefSec{Interfacing Aspects}]}).
1803 As for subprogram calls, positional notation precedes named
1804 notation.
1805
1806 Note that Ada 83 had no pragmas for which the order of named
1807 associations mattered, since there was never more than one argument
1808 that allowed named associations.
1809 @end{Ramification}
1810 @begin{Honest}
1811 The interpretation of the arguments of implementation-defined pragmas
1812 is implementation defined.
1813 However, the syntax rules have to be obeyed.
1814 @end{Honest}
1815 @end{StaticSem}
1816
1817 @begin{RunTime}
1818 @PDefn2{Term=[execution], Sec=(pragma)}
1819 @PDefn2{Term=[elaboration], Sec=(pragma)}
1820 Any @nt{pragma} that appears at the place of an executable construct is
1821 executed.
1822 Unless otherwise specified for a particular pragma,
1823 this execution consists of the evaluation of each evaluable pragma
1824 argument in an arbitrary order.@PDefn2{Term=[arbitrary order],Sec=[allowed]}
1825 @begin{Ramification}
1826 For a @nt{pragma} that appears at the place of an elaborable
1827 construct, execution is elaboration.
1828
1829 An identifier specific to a pragma is neither a @nt{name} nor an
1830 @nt{expression} @em such identifiers are not evaluated (unless an
1831 implementation defines them to be evaluated in the case of an
1832 implementation-defined @nt{pragma}).
1833
1834 The @lquotes@;unless otherwise specified@rquotes@; part allows us (and
1835 implementations) to make exceptions, so a @nt{pragma} can contain an
1836 expression that is not evaluated.
1837 Note that @nt{pragma}s in @nt{type_definition}s may contain expressions
1838 that depend on discriminants.
1839
1840 When we wish to define a pragma with some run-time effect,
1841 we usually make sure that it appears in an executable context;
1842 otherwise, special rules are needed to define the run-time effect
1843 and when it happens.
1844 @end{Ramification}
1845 @end{RunTime}
1846
1847 @begin{ImplReq}
1848 The implementation shall give a warning message for
1849 an unrecognized pragma name.
1850 @begin{Ramification}
1851 An implementation is also allowed to have modes in which a warning
1852 message is suppressed, or in which the presence of an unrecognized
1853 @nt{pragma} is a compile-time error.
1854 @end{Ramification}
1855 @end{ImplReq}
1856
1857 @begin{ImplPerm}
1858 An implementation may provide implementation-defined pragmas;
1859 the name of an implementation-defined pragma shall differ
1860 from those of the language-defined pragmas.
1861 @ImplDef{Implementation-defined pragmas.}
1862 @begin{Ramification}
1863 The semantics of implementation-defined pragmas, and any associated
1864 rules (such as restrictions on their placement or arguments),
1865 are, of course, implementation defined.
1866 Implementation-defined pragmas may have run-time effects.
1867 @end{Ramification}
1868
1869 An implementation may ignore an unrecognized pragma even if
1870 it violates some of the @SyntaxName@;s, if detecting the
1871 syntax error is too complex.
1872 @begin{Reason}
1873 Many compilers use extra post-parsing checks to enforce the syntax
1874 rules, since the Ada syntax rules are not LR(k) (for any k).
1875 (The grammar is ambiguous, in fact.)
1876 This paragraph allows them to ignore an unrecognized pragma, without
1877 having to perform such post-parsing checks.
1878 @end{Reason}
1879 @end{ImplPerm}
1880
1881 @begin{ImplAdvice}
1882 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0163-1]}
1883 Normally,
1884 implementation-defined pragmas should have no semantic effect
1885 for error-free programs;
1886 that is, if the implementation-defined pragmas
1887 @Chg{Version=[3],New=[in a working program are replaced
1888 with unrecognized pragmas],Old=[are removed from a working program]},
1889 the program should still be legal, and should still have the same
1890 semantics.
1891 @ChgImplAdvice{Version=[2],Kind=[Added],Text=[@ChgAdded{Version=[2],
1892 Text=[Implementation-defined pragmas should have no semantic effect
1893 for error-free programs.]}]}
1894 @begin{Ramification}
1895 Note that @lquotes@;semantics@rquotes@; is not the same as @lquotes@;effect;@rquotes@;
1896 as explained in
1897 @RefSecNum{Conformity of an Implementation With the Standard},
1898 the semantics defines a set of possible effects.
1899
1900 Note that adding a @nt{pragma} to a program might cause an error
1901 (either at compile time or at run time).
1902 On the other hand, if the language-specified semantics for a
1903 feature are in part implementation defined,
1904 it makes sense to support pragmas that control the feature,
1905 and that have real semantics; thus,
1906 this paragraph is merely a recommendation.
1907 @end{Ramification}
1908
1909 @Leading@;Normally,
1910 an implementation should not define pragmas that can make an illegal
1911 program legal, except as follows:
1912 @begin(Itemize)
1913 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
1914 A @nt<pragma> used to complete a
1915 declaration@Chg{Version=[3],New=[],Old=[, such as a @nt{pragma} Import]};
1916
1917 @begin{Discussion}
1918 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
1919 @ChgAdded{Version=[3],Text=[There are no language-defined pragmas which
1920 can be completions; @nt{pragma} Import was defined this way in Ada 95
1921 and Ada 2005, but in Ada 2012 @nt{pragma} Import just sets aspect Import
1922 which disallows having any completion.]}
1923 @end{Discussion}
1924
1925 A @nt<pragma> used to configure the environment
1926 by adding, removing, or replacing @nt{library_item}s.
1927 @end(Itemize)
1928 @ChgImplAdvice{Version=[2],Kind=[Added],Text=[@ChgAdded{Version=[2],
1929 Text=[Implementation-defined pragmas should not make an illegal program
1930 legal, unless they complete a declaration or configure the @nt{library_item}s
1931 in an environment.]}]}
1932 @begin(Ramification)
1933 For example, it is OK to support Interface,
1934 System_Name, Storage_Unit, and Memory_Size @nt{pragma}s
1935 for upward compatibility reasons,
1936 even though all of these @nt{pragma}s can make an illegal program legal.
1937 (The latter three can affect legality in a rather subtle way:
1938 They affect the value of named numbers in System,
1939 and can therefore affect the legality in cases where
1940 static expressions are required.)
1941
1942 On the other hand,
1943 adding implementation-defined pragmas to a legal program can make it illegal.
1944 For example, a common kind of implementation-defined pragma is one that
1945 promises some property that allows more efficient code to be generated.
1946 If the promise is a lie,
1947 it is best if the user gets an error message.
1948 @end(Ramification)
1949 @end{ImplAdvice}
1950
1951 @begin{Incompatible83}
1952 @Defn{incompatibilities with Ada 83}
1953 In Ada 83, @lquotes@;bad@rquotes@; @nt{pragma}s are ignored.
1954 In Ada 95, they are illegal,
1955 except in the case where the name of the @nt{pragma} itself
1956 is not recognized by the implementation.
1957 @end{Incompatible83}
1958
1959 @begin{Extend83}
1960 @Defn{extensions to Ada 83}
1961 Implementation-defined @nt{pragma}s may affect the legality of a program.
1962 @end{Extend83}
1963
1964 @begin{DiffWord83}
1965 Implementation-defined @nt{pragma}s may affect the run-time semantics of
1966 the program.
1967 This was always true in Ada 83 (since it was not explicitly forbidden by
1968 RM83), but it was not clear, because there was no definition of
1969 @lquotes@;executing@rquotes@; or @lquotes@;elaborating@rquotes@; a @nt{pragma}.
1970 @end{DiffWord83}
1971
1972 @begin{Extend2005}
1973 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0163-1]}
1974 @ChgAdded{Version=[3],Text=[@Defn{extensions to Ada 2005}@b<Correction:>
1975 Allow @nt{pragma}s in place of a @nt{statement}, even if there are no
1976 other @nt{statement}s in a @nt{sequence_of_statements}.]}
1977
1978 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0272-1]}
1979 @ChgAdded{Version=[3],Text=[Identifiers specific to a pragma can be
1980 reserved words.]}
1981
1982 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0290-1]}
1983 @ChgAdded{Version=[3],Text=[Pragma arguments can be identified with
1984 @nt{aspect_mark}s; this allows @nt{identifier}'Class in this context.
1985 As usual, this is only allowed if specifically allowed by a particular
1986 pragma.]}
1987 @end{Extend2005}
1988
1989 @begin{DiffWord2005}
1990 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0100-1]}
1991 @ChgAdded{Version=[3],Text=[@b{Correction:} Clarified where @nt{pragma}s
1992 are (and are not) allowed.]}
1993 @end{DiffWord2005}
1994
1995 @begin{DiffWord2012}
1996 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0236-1]}
1997 @ChgAdded{Version=[5],Text=[Added wording to ensure that @nt{pragma}s are not
1998 allowed in @nt{declare_expression}s. We don't allow this as the definition
1999 of most pragmas assume that they're given between entities. We also don't
2000 want to answer questions about conformance of @nt{pragma}s, especially
2001 unrecognized @nt{pragma}s and @nt{pragma}s whose state can change between
2002 the specification and body.]}
2003 @end{DiffWord2012}
2004
2005
2006 @begin{Syntax}
2007 @Leading@keepnext@;The forms of List, Page, and Optimize @nt{pragma}s are as follows:
2008
2009 @PragmaSyn`@key{pragma} @prag(List)(@Syn2{identifier});'
2010
2011 @PragmaSyn`@key{pragma} @prag(Page);'
2012
2013 @PragmaSyn`@key{pragma} @prag(Optimize)(@Syn2{identifier});'
2014
2015 @begin{SyntaxText}
2016 @Redundant[Other pragmas are defined throughout this International Standard,
2017 and are summarized in
2018 @RefSecNum{Language-Defined Pragmas}.]
2019 @begin{Ramification}
2020 The language-defined pragmas
2021 are supported by every implementation,
2022 although @lquotes@;supporting@rquotes@; some of
2023 them (for example, Inline) requires nothing more than checking the
2024 arguments, since they act only as advice to the implementation.
2025 @end{Ramification}
2026
2027 @end{SyntaxText}
2028 @end{Syntax}
2029
2030 @begin{StaticSem}
2031 A @nt{pragma} List
2032 takes one of the @nt{identifier}s On or Off as the single
2033 argument. This pragma is allowed anywhere a
2034 @nt{pragma} is allowed. It specifies that listing of the
2035 compilation is to be continued or suspended until a List
2036 @nt{pragma} with the opposite argument is given within the
2037 same compilation. The @nt{pragma} itself is always listed if
2038 the compiler is producing a listing.
2039
2040 A @nt{pragma} Page
2041 is allowed anywhere a
2042 @nt{pragma} is allowed. It specifies that the program text
2043 which follows the @nt{pragma} should start on a new page (if
2044 the compiler is currently producing a listing).
2045
2046 A @nt{pragma} Optimize
2047 takes one of the @nt{identifier}s Time, Space, or Off as the
2048 single argument. This @nt{pragma} is allowed anywhere a @nt<pragma>
2049 is allowed, and it applies until the end of the immediately enclosing
2050 declarative region,
2051 or for a @nt{pragma} at the place of a @nt{compilation_unit},
2052 to the end of the @nt<compilation>.
2053 It gives advice to the implementation as to
2054 whether time or space is the primary optimization criterion, or
2055 that optional optimizations should be turned off.
2056 @Redundant[It is implementation defined how this advice is followed.]
2057 @ImplDef{Effect of pragma Optimize.}
2058 @begin{Discussion}
2059
2060 For example, a compiler might use Time vs. Space to control whether
2061 generic instantiations are implemented with a macro-expansion model,
2062 versus a shared-generic-body model.
2063
2064
2065 We don't define what constitutes an @lquotes@;optimization@rquotes@;
2066 @em in fact, it cannot be formally defined in the context of Ada.
2067 One compiler might call something an optional optimization,
2068 whereas another compiler might consider that same thing
2069 to be a normal part of code generation.
2070 Thus, the programmer cannot rely on this pragma having any
2071 particular portable effect on the generated code.
2072 Some compilers might even ignore the pragma altogether.
2073 @end{Discussion}
2074 @end{StaticSem}
2075
2076 @begin{Examples}
2077 @Leading@keepnext@i{Examples of pragmas:}
2078 @begin{Example}
2079 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00433-01]}
2080 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
2081 @key[pragma] List(Off); -- @Examcom{turn off listing generation}
2082 @key[pragma] Optimize(Off); -- @Examcom{turn off optional optimizations}
2083 @Chg{Version=[3],New=[@key[pragma] Pure(Rational_Numbers); -- @Examcom{set categorization for package}
2084 @key[pragma] Assert(Exists(File_Name),
2085 Message => "Nonexistent file"); -- @Examcom{assert file exists}],
2086 Old=[@key[pragma] Inline(Set_Mask); --@Examcom{ generate code for Set_Mask inline}
2087 @Chg{Version=[2],New=[@key[pragma] Import(C, Put_Char, External_Name => "putchar"); --@Examcom{ import C putchar function}],
2088 Old=[@key[pragma] Suppress(Range_Check, On => Index); -- @Examcom{turn off range checking on Index}]}]}
2089 @end{Example}
2090 @end{Examples}
2091
2092 @begin{Extend83}
2093 @Defn{extensions to Ada 83}
2094 The Optimize @nt<pragma> now allows the identifier Off
2095 to request that normal optimization be turned off.
2096
2097 An Optimize @nt<pragma> may appear anywhere pragmas are allowed.
2098 @end{Extend83}
2099
2100 @begin{DiffWord83}
2101 We now describe the pragmas Page, List, and Optimize here,
2102 to act as examples, and to remove the normative material from
2103 @RefSec{Language-Defined Pragmas}, so it can be entirely an
2104 informative annex.
2105 @end{DiffWord83}
2106
2107 @begin{DiffWord95}
2108 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00433-01]}
2109 @ChgAdded{Version=[2],Text=[Updated the example of named pragma parameters,
2110 because the second parameter of @nt{pragma} Suppress is obsolescent.]}
2111 @end{DiffWord95}
2112
2113 @begin{DiffWord2005}
2114 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0229-1]}
2115 @ChgAdded{Version=[3],Text=[Updated the example of pragmas, because both
2116 @nt{pragma}s Inline and Import are obsolescent.]}
2117 @end{DiffWord2005}
2118
2119
2120 @LabeledClause{Reserved Words}
2121
2122 @begin{Syntax}
2123 @begin{Bundle}
2124 @ChgRef{Version=[1], Kind=[Deleted]}
2125 @ChgDeleted[Version=[1],Type=[Leading],Text=<@ @;@comment{Empty paragraph to hang junk paragraph number from original RM}>]
2126
2127 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00284-02],ARef=[AI95-00395-01]}
2128 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0091-1]}
2129 @ChgNote{The table of words has no paragraph number, so we need to put the
2130 change here}
2131 @Leading
2132 @Defn{reserved word}
2133 The following are the @i{reserved words}@Chg{Version=[2],New=[. Within a program,
2134 some or all of the letters of a reserved word may be in
2135 upper case@Chg{Version=[3],New=[],Old=[, and one or
2136 more characters in category @ntf{other_format} may be inserted within or at the
2137 end of the reserved word]}.],Old=[ (ignoring upper/lower case distinctions):]}
2138 @begin{Discussion}
2139 Reserved words have special meaning in the syntax.
2140 In addition, certain reserved words are used as attribute names.
2141
2142 The syntactic category @nt{identifier}
2143 no longer allows reserved words. We have added the few reserved
2144 words that are legal explicitly to the syntax for @nt{attribute_reference}.
2145 Allowing identifier to include reserved words has been a source
2146 of confusion for some users, and differs from the way they
2147 are treated in the C and Pascal language definitions.
2148 @end{Discussion}
2149 @*
2150
2151 @begin{Display}
2152 @begin{FourCol}
2153 @noparanum@key{abort}
2154 @key{abs}
2155 @key{abstract}
2156 @key{accept}
2157 @key{access}
2158 @key{aliased}
2159 @key{all}
2160 @key{and}
2161 @key{array}
2162 @key{at}
2163
2164 @noparanum@key{begin}
2165 @key{body}
2166
2167 @noparanum@key{case}
2168 @key{constant}
2169
2170 @noparanum@key{declare}
2171 @key{delay}
2172 @key{delta}
2173 @key{digits}
2174 @key{do}
2175 @NewColumn
2176
2177 @noparanum@key{else}
2178 @key{elsif}
2179 @key{end}
2180 @key{entry}
2181 @key{exception}
2182 @key{exit}
2183
2184 @noparanum@key{for}
2185 @key{function}
2186
2187 @noparanum@key{generic}
2188 @key{goto}
2189
2190 @noparanum@key{if}
2191 @key{in}
2192 @Chg{Version=[2],New=[@key{interface}],Old=[]}
2193 @key{is}
2194
2195
2196 @noparanum@key{limited}
2197 @key{loop}
2198
2199 @noparanum@key{mod}
2200 @NewColumn
2201
2202 @noparanum@key{new}
2203 @key{not}
2204 @key{null}
2205
2206
2207 @noparanum@key{of}
2208 @key{or}
2209 @key{others}
2210 @key{out}
2211 @Chg{Version=[2],New=[@key{overriding}],Old=[]}
2212
2213 @noparanum@key{package}
2214 @Chg{Version=[5],New=[@key{parallel}],Old=[]}
2215 @key{pragma}
2216 @key{private}
2217 @key{procedure}
2218 @key{protected}
2219
2220 @noparanum@key{raise}
2221 @key{range}
2222 @key{record}
2223 @key{rem}
2224 @key{renames}
2225 @key{requeue}
2226 @NewColumn
2227
2228 @noparanum@key{return}
2229 @key{reverse}
2230
2231 @noparanum@key{select}
2232 @key{separate}
2233 @Chg{Version=[3],New=[@key{some}],Old=[]}
2234 @key{subtype}
2235 @Chg{Version=[2],New=[@key{synchronized}],Old=[]}
2236
2237 @noparanum@key{tagged}
2238 @key{task}
2239 @key{terminate}
2240 @key{then}
2241 @key{type}
2242
2243 @noparanum@key{until}
2244 @key{use}
2245
2246 @noparanum@key{when}
2247 @key{while}
2248 @key{with}
2249
2250 @noparanum@key{xor}
2251 @end{FourCol}
2252 @end{Display}
2253 @end{Bundle}
2254 @end{Syntax}
2255
2256 @begin{Notes}
2257 The reserved words appear in @key{lower case boldface}
2258 in this International Standard,
2259 except when used in the @nt{designator} of an attribute
2260 (see @RefSecNum(Attributes)).
2261 Lower case boldface is also used
2262 for a reserved word in a
2263 @nt{string_literal} used as an @nt{operator_symbol}.
2264 This is merely a convention @em programs may be written in whatever
2265 typeface is desired and available.
2266 @end{Notes}
2267
2268 @begin{Incompatible83}
2269 @Defn{incompatibilities with Ada 83}
2270 The following words are not reserved in Ada 83, but are reserved in Ada
2271 95: @key{abstract}, @key{aliased}, @key{protected}, @key{requeue},
2272 @key{tagged}, @key{until}.
2273 @end{Incompatible83}
2274
2275 @begin{DiffWord83}
2276 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
2277 The @Chg{Version=[3],New=[subclause],Old=[clause]} entitled @lquotes@;Allowed
2278 Replacements of Characters@rquotes@; has been moved to
2279 @RefSec(Obsolescent Features).
2280 @end{DiffWord83}
2281
2282 @begin{Incompatible95}
2283 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00284-02]}
2284 @ChgAdded{Version=[2],Text=[@Defn{incompatibilities with Ada 95}
2285 The following words are not reserved in Ada 95, but are reserved in Ada
2286 2005: @key{interface}, @key{overriding}, @key{synchronized}. A special
2287 allowance is made for @key{pragma} Interface (see @RefSecNum{Pragma Interface}).
2288 Uses of these words as identifiers will need to be changed, but we do not
2289 expect them to be common.]}
2290 @end{Incompatible95}
2291
2292 @begin{DiffWord95}
2293 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00395-01]}
2294 @ChgAdded{Version=[2],Text=[The definition of upper case equivalence has
2295 been modified to allow identifiers using all of the characters of ISO 10646.
2296 This change has no effect on the character sequences that are reserved
2297 words, but does make some unusual sequences of characters illegal.]}
2298 @end{DiffWord95}
2299
2300 @begin{Incompatible2005}
2301 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0091-1]}
2302 @ChgAdded{Version=[3],Text=[@Defn{incompatibilities with Ada 2005}@b<Correction:>
2303 Removed @ntf{other_format}
2304 characters from reserved words in order to be compatible with the latest
2305 Unicode recommendations. This change can only affect programs
2306 written for original Ada 2005, and there is little reason to put
2307 @ntf{other_format} characters into reserved words in the first place,
2308 so there should be very few such programs.]}
2309
2310 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0176-1]}
2311 @ChgAdded{Version=[3],Text=[The following word is not reserved in Ada 2005, but is
2312 reserved in Ada 2012: @key{some}. Uses of this word as an identifier will need
2313 to be changed, but we do not expect them to be common.]}
2314 @end{Incompatible2005}
2315
2316 @begin{Incompatible2012}
2317 @ChgRef{Version=[5],Kind=[AddedNormal],ARef=[AI12-0119-1]}
2318 @ChgAdded{Version=[5],Text=[@Defn{incompatibilities with Ada 2012}The
2319 following word is not reserved in Ada 2012, but is reserved in Ada 202x:
2320 @key{parallel}. Uses of this word as an identifier will need
2321 to be changed, but we do not expect them to be common.]}
2322 @end{Incompatible2012}
2323