/[eiffelstudio]/vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/parser/et_ast_factory.e
ViewVC logotype

Contents of /vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/parser/et_ast_factory.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 98698 - (show annotations)
Mon May 9 13:53:54 2016 UTC (3 years, 5 months ago) by manus
File size: 123384 byte(s)
Update 4.0d version with changes in Gobo from 2016/05/09

1 note
2
3 description:
4
5 "Eiffel Abstract Syntax Tree factories"
6
7 library: "Gobo Eiffel Tools Library"
8 copyright: "Copyright (c) 2001-2016, Eric Bezault and others"
9 license: "MIT License"
10 date: "$Date$"
11 revision: "$Revision$"
12
13 class ET_AST_FACTORY
14
15 inherit
16
17 ET_SHARED_TOKEN_CONSTANTS
18
19 create
20
21 make
22
23 feature {NONE} -- Initialization
24
25 make
26 -- Create a new AST factory.
27 do
28 end
29
30 feature -- Eiffel keywords
31
32 new_across_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
33 -- New 'across' keyword
34 require
35 a_scanner_not_void: a_scanner /= Void
36 last_literal_not_empty: a_scanner.last_literal_count > 0
37 do
38 create Result.make_across
39 Result.set_position (a_scanner.line, a_scanner.column)
40 end
41
42 new_agent_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_AGENT_KEYWORD
43 -- New 'agent' keyword
44 require
45 a_scanner_not_void: a_scanner /= Void
46 last_literal_not_empty: a_scanner.last_literal_count > 0
47 do
48 create Result.make
49 Result.set_position (a_scanner.line, a_scanner.column)
50 end
51
52 new_alias_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
53 -- New 'alias' keyword
54 require
55 a_scanner_not_void: a_scanner /= Void
56 last_literal_not_empty: a_scanner.last_literal_count > 0
57 do
58 Result := tokens.alias_keyword
59 end
60
61 new_all_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
62 -- New 'all' keyword
63 require
64 a_scanner_not_void: a_scanner /= Void
65 last_literal_not_empty: a_scanner.last_literal_count > 0
66 do
67 create Result.make_all
68 Result.set_position (a_scanner.line, a_scanner.column)
69 end
70
71 new_and_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD_OPERATOR
72 -- New 'and' keyword
73 require
74 a_scanner_not_void: a_scanner /= Void
75 last_literal_not_empty: a_scanner.last_literal_count > 0
76 do
77 create Result.make_and
78 Result.set_position (a_scanner.line, a_scanner.column)
79 end
80
81 new_as_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
82 -- New 'as' keyword
83 require
84 a_scanner_not_void: a_scanner /= Void
85 last_literal_not_empty: a_scanner.last_literal_count > 0
86 do
87 Result := tokens.as_keyword
88 end
89
90 new_assign_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
91 -- New 'assign' keyword
92 require
93 a_scanner_not_void: a_scanner /= Void
94 last_literal_not_empty: a_scanner.last_literal_count > 0
95 do
96 Result := tokens.assign_keyword
97 end
98
99 new_attached_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
100 -- New 'attached' keyword
101 require
102 a_scanner_not_void: a_scanner /= Void
103 last_literal_not_empty: a_scanner.last_literal_count > 0
104 do
105 create Result.make_attached
106 Result.set_position (a_scanner.line, a_scanner.column)
107 end
108
109 new_attribute_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
110 -- New 'attribute' keyword
111 require
112 a_scanner_not_void: a_scanner /= Void
113 last_literal_not_empty: a_scanner.last_literal_count > 0
114 do
115 Result := tokens.attribute_keyword
116 end
117
118 new_check_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
119 -- New 'check' keyword
120 require
121 a_scanner_not_void: a_scanner /= Void
122 last_literal_not_empty: a_scanner.last_literal_count > 0
123 do
124 Result := tokens.check_keyword
125 end
126
127 new_class_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
128 -- New 'class' keyword
129 require
130 a_scanner_not_void: a_scanner /= Void
131 last_literal_not_empty: a_scanner.last_literal_count > 0
132 do
133 Result := tokens.class_keyword
134 end
135
136 new_convert_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
137 -- New 'convert' keyword
138 require
139 a_scanner_not_void: a_scanner /= Void
140 last_literal_not_empty: a_scanner.last_literal_count > 0
141 do
142 Result := tokens.convert_keyword
143 end
144
145 new_create_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
146 -- New 'create' keyword
147 require
148 a_scanner_not_void: a_scanner /= Void
149 last_literal_not_empty: a_scanner.last_literal_count > 0
150 do
151 Result := tokens.create_keyword
152 end
153
154 new_creation_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
155 -- New 'creation' keyword
156 require
157 a_scanner_not_void: a_scanner /= Void
158 last_literal_not_empty: a_scanner.last_literal_count > 0
159 do
160 Result := tokens.creation_keyword
161 end
162
163 new_current_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_CURRENT
164 -- New 'current' keyword
165 require
166 a_scanner_not_void: a_scanner /= Void
167 last_literal_not_empty: a_scanner.last_literal_count > 0
168 do
169 create Result.make
170 Result.set_position (a_scanner.line, a_scanner.column)
171 end
172
173 new_debug_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
174 -- New 'debug' keyword
175 require
176 a_scanner_not_void: a_scanner /= Void
177 last_literal_not_empty: a_scanner.last_literal_count > 0
178 do
179 Result := tokens.debug_keyword
180 end
181
182 new_deferred_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
183 -- New 'deferred' keyword
184 require
185 a_scanner_not_void: a_scanner /= Void
186 last_literal_not_empty: a_scanner.last_literal_count > 0
187 do
188 Result := tokens.deferred_keyword
189 end
190
191 new_detachable_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
192 -- New 'detachable' keyword
193 require
194 a_scanner_not_void: a_scanner /= Void
195 last_literal_not_empty: a_scanner.last_literal_count > 0
196 do
197 create Result.make_detachable
198 Result.set_position (a_scanner.line, a_scanner.column)
199 end
200
201 new_do_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
202 -- New 'do' keyword
203 require
204 a_scanner_not_void: a_scanner /= Void
205 last_literal_not_empty: a_scanner.last_literal_count > 0
206 do
207 Result := tokens.do_keyword
208 end
209
210 new_else_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
211 -- New 'else' keyword
212 require
213 a_scanner_not_void: a_scanner /= Void
214 last_literal_not_empty: a_scanner.last_literal_count > 0
215 do
216 Result := tokens.else_keyword
217 end
218
219 new_elseif_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
220 -- New 'elseif' keyword
221 require
222 a_scanner_not_void: a_scanner /= Void
223 last_literal_not_empty: a_scanner.last_literal_count > 0
224 do
225 Result := tokens.elseif_keyword
226 end
227
228 new_end_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
229 -- New 'end' keyword
230 require
231 a_scanner_not_void: a_scanner /= Void
232 last_literal_not_empty: a_scanner.last_literal_count > 0
233 do
234 Result := tokens.end_keyword
235 end
236
237 new_ensure_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
238 -- New 'ensure' keyword
239 require
240 a_scanner_not_void: a_scanner /= Void
241 last_literal_not_empty: a_scanner.last_literal_count > 0
242 do
243 create Result.make_ensure
244 Result.set_position (a_scanner.line, a_scanner.column)
245 end
246
247 new_expanded_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
248 -- New 'expanded' keyword
249 require
250 a_scanner_not_void: a_scanner /= Void
251 last_literal_not_empty: a_scanner.last_literal_count > 0
252 do
253 create Result.make_expanded
254 Result.set_position (a_scanner.line, a_scanner.column)
255 end
256
257 new_export_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
258 -- New 'export' keyword
259 require
260 a_scanner_not_void: a_scanner /= Void
261 last_literal_not_empty: a_scanner.last_literal_count > 0
262 do
263 Result := tokens.export_keyword
264 end
265
266 new_external_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
267 -- New 'external' keyword
268 require
269 a_scanner_not_void: a_scanner /= Void
270 last_literal_not_empty: a_scanner.last_literal_count > 0
271 do
272 Result := tokens.external_keyword
273 end
274
275 new_false_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_FALSE_CONSTANT
276 -- New 'false' keyword
277 require
278 a_scanner_not_void: a_scanner /= Void
279 last_literal_not_empty: a_scanner.last_literal_count > 0
280 do
281 create Result.make
282 Result.set_position (a_scanner.line, a_scanner.column)
283 end
284
285 new_feature_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
286 -- New 'feature' keyword
287 require
288 a_scanner_not_void: a_scanner /= Void
289 last_literal_not_empty: a_scanner.last_literal_count > 0
290 do
291 Result := tokens.feature_keyword
292 end
293
294 new_from_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
295 -- New 'from' keyword
296 require
297 a_scanner_not_void: a_scanner /= Void
298 last_literal_not_empty: a_scanner.last_literal_count > 0
299 do
300 Result := tokens.from_keyword
301 end
302
303 new_frozen_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
304 -- New 'frozen' keyword
305 require
306 a_scanner_not_void: a_scanner /= Void
307 last_literal_not_empty: a_scanner.last_literal_count > 0
308 do
309 create Result.make_frozen
310 Result.set_position (a_scanner.line, a_scanner.column)
311 end
312
313 new_if_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
314 -- New 'if' keyword
315 require
316 a_scanner_not_void: a_scanner /= Void
317 last_literal_not_empty: a_scanner.last_literal_count > 0
318 do
319 Result := tokens.if_keyword
320 end
321
322 new_implies_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD_OPERATOR
323 -- New 'implies' keyword
324 require
325 a_scanner_not_void: a_scanner /= Void
326 last_literal_not_empty: a_scanner.last_literal_count > 0
327 do
328 create Result.make_implies
329 Result.set_position (a_scanner.line, a_scanner.column)
330 end
331
332 new_indexing_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
333 -- New 'indexing' keyword
334 require
335 a_scanner_not_void: a_scanner /= Void
336 last_literal_not_empty: a_scanner.last_literal_count > 0
337 do
338 Result := tokens.indexing_keyword
339 end
340
341 new_infix_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
342 -- New 'infix' keyword
343 require
344 a_scanner_not_void: a_scanner /= Void
345 last_literal_not_empty: a_scanner.last_literal_count > 0
346 do
347 Result := tokens.infix_keyword
348 end
349
350 new_inherit_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
351 -- New 'inherit' keyword
352 require
353 a_scanner_not_void: a_scanner /= Void
354 last_literal_not_empty: a_scanner.last_literal_count > 0
355 do
356 Result := tokens.inherit_keyword
357 end
358
359 new_inspect_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
360 -- New 'inspect' keyword
361 require
362 a_scanner_not_void: a_scanner /= Void
363 last_literal_not_empty: a_scanner.last_literal_count > 0
364 do
365 Result := tokens.inspect_keyword
366 end
367
368 new_invariant_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
369 -- New 'invariant' keyword
370 require
371 a_scanner_not_void: a_scanner /= Void
372 last_literal_not_empty: a_scanner.last_literal_count > 0
373 do
374 Result := tokens.invariant_keyword
375 end
376
377 new_is_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
378 -- New 'is' keyword
379 require
380 a_scanner_not_void: a_scanner /= Void
381 last_literal_not_empty: a_scanner.last_literal_count > 0
382 do
383 Result := tokens.is_keyword
384 end
385
386 new_like_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
387 -- New 'like' keyword
388 require
389 a_scanner_not_void: a_scanner /= Void
390 last_literal_not_empty: a_scanner.last_literal_count > 0
391 do
392 create Result.make_like
393 Result.set_position (a_scanner.line, a_scanner.column)
394 end
395
396 new_local_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
397 -- New 'local' keyword
398 require
399 a_scanner_not_void: a_scanner /= Void
400 last_literal_not_empty: a_scanner.last_literal_count > 0
401 do
402 Result := tokens.local_keyword
403 end
404
405 new_loop_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
406 -- New 'loop' keyword
407 require
408 a_scanner_not_void: a_scanner /= Void
409 last_literal_not_empty: a_scanner.last_literal_count > 0
410 do
411 Result := tokens.loop_keyword
412 end
413
414 new_not_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD_OPERATOR
415 -- New 'not' keyword
416 require
417 a_scanner_not_void: a_scanner /= Void
418 last_literal_not_empty: a_scanner.last_literal_count > 0
419 do
420 create Result.make_not
421 Result.set_position (a_scanner.line, a_scanner.column)
422 end
423
424 new_note_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
425 -- New 'note' keyword
426 require
427 a_scanner_not_void: a_scanner /= Void
428 last_literal_not_empty: a_scanner.last_literal_count > 0
429 do
430 Result := tokens.note_keyword
431 end
432
433 new_obsolete_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
434 -- New 'obsolete' keyword
435 require
436 a_scanner_not_void: a_scanner /= Void
437 last_literal_not_empty: a_scanner.last_literal_count > 0
438 do
439 Result := tokens.obsolete_keyword
440 end
441
442 new_old_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
443 -- New 'old' keyword
444 require
445 a_scanner_not_void: a_scanner /= Void
446 last_literal_not_empty: a_scanner.last_literal_count > 0
447 do
448 create Result.make_old
449 Result.set_position (a_scanner.line, a_scanner.column)
450 end
451
452 new_once_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
453 -- New 'once' keyword
454 require
455 a_scanner_not_void: a_scanner /= Void
456 last_literal_not_empty: a_scanner.last_literal_count > 0
457 do
458 create Result.make_once
459 Result.set_position (a_scanner.line, a_scanner.column)
460 end
461
462 new_or_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD_OPERATOR
463 -- New 'or' keyword
464 require
465 a_scanner_not_void: a_scanner /= Void
466 last_literal_not_empty: a_scanner.last_literal_count > 0
467 do
468 create Result.make_or
469 Result.set_position (a_scanner.line, a_scanner.column)
470 end
471
472 new_precursor_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_PRECURSOR_KEYWORD
473 -- New 'precursor' keyword
474 require
475 a_scanner_not_void: a_scanner /= Void
476 last_literal_not_empty: a_scanner.last_literal_count > 0
477 do
478 create Result.make
479 Result.set_position (a_scanner.line, a_scanner.column)
480 end
481
482 new_prefix_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
483 -- New 'prefix' keyword
484 require
485 a_scanner_not_void: a_scanner /= Void
486 last_literal_not_empty: a_scanner.last_literal_count > 0
487 do
488 Result := tokens.prefix_keyword
489 end
490
491 new_redefine_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
492 -- New 'redefine' keyword
493 require
494 a_scanner_not_void: a_scanner /= Void
495 last_literal_not_empty: a_scanner.last_literal_count > 0
496 do
497 Result := tokens.redefine_keyword
498 end
499
500 new_reference_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
501 -- New 'reference' keyword
502 require
503 a_scanner_not_void: a_scanner /= Void
504 last_literal_not_empty: a_scanner.last_literal_count > 0
505 do
506 create Result.make_reference
507 Result.set_position (a_scanner.line, a_scanner.column)
508 end
509
510 new_rename_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
511 -- New 'rename' keyword
512 require
513 a_scanner_not_void: a_scanner /= Void
514 last_literal_not_empty: a_scanner.last_literal_count > 0
515 do
516 Result := tokens.rename_keyword
517 end
518
519 new_require_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
520 -- New 'require' keyword
521 require
522 a_scanner_not_void: a_scanner /= Void
523 last_literal_not_empty: a_scanner.last_literal_count > 0
524 do
525 create Result.make_require
526 Result.set_position (a_scanner.line, a_scanner.column)
527 end
528
529 new_rescue_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
530 -- New 'rescue' keyword
531 require
532 a_scanner_not_void: a_scanner /= Void
533 last_literal_not_empty: a_scanner.last_literal_count > 0
534 do
535 Result := tokens.rescue_keyword
536 end
537
538 new_result_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_RESULT
539 -- New 'result' keyword
540 require
541 a_scanner_not_void: a_scanner /= Void
542 last_literal_not_empty: a_scanner.last_literal_count > 0
543 do
544 create Result.make
545 Result.set_position (a_scanner.line, a_scanner.column)
546 end
547
548 new_retry_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_RETRY_INSTRUCTION
549 -- New 'retry' keyword
550 require
551 a_scanner_not_void: a_scanner /= Void
552 last_literal_not_empty: a_scanner.last_literal_count > 0
553 do
554 create Result.make
555 Result.set_position (a_scanner.line, a_scanner.column)
556 end
557
558 new_select_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
559 -- New 'select' keyword
560 require
561 a_scanner_not_void: a_scanner /= Void
562 last_literal_not_empty: a_scanner.last_literal_count > 0
563 do
564 Result := tokens.select_keyword
565 end
566
567 new_separate_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
568 -- New 'separate' keyword
569 require
570 a_scanner_not_void: a_scanner /= Void
571 last_literal_not_empty: a_scanner.last_literal_count > 0
572 do
573 create Result.make_separate
574 Result.set_position (a_scanner.line, a_scanner.column)
575 end
576
577 new_some_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
578 -- New 'some' keyword
579 require
580 a_scanner_not_void: a_scanner /= Void
581 last_literal_not_empty: a_scanner.last_literal_count > 0
582 do
583 create Result.make_some
584 Result.set_position (a_scanner.line, a_scanner.column)
585 end
586
587 new_strip_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
588 -- New 'strip' keyword
589 require
590 a_scanner_not_void: a_scanner /= Void
591 last_literal_not_empty: a_scanner.last_literal_count > 0
592 do
593 create Result.make_strip
594 Result.set_position (a_scanner.line, a_scanner.column)
595 end
596
597 new_then_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
598 -- New 'then' keyword
599 require
600 a_scanner_not_void: a_scanner /= Void
601 last_literal_not_empty: a_scanner.last_literal_count > 0
602 do
603 Result := tokens.then_keyword
604 end
605
606 new_true_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_TRUE_CONSTANT
607 -- New 'true' keyword
608 require
609 a_scanner_not_void: a_scanner /= Void
610 last_literal_not_empty: a_scanner.last_literal_count > 0
611 do
612 create Result.make
613 Result.set_position (a_scanner.line, a_scanner.column)
614 end
615
616 new_undefine_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
617 -- New 'undefine' keyword
618 require
619 a_scanner_not_void: a_scanner /= Void
620 last_literal_not_empty: a_scanner.last_literal_count > 0
621 do
622 Result := tokens.undefine_keyword
623 end
624
625 new_unique_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
626 -- New 'unique' keyword
627 require
628 a_scanner_not_void: a_scanner /= Void
629 last_literal_not_empty: a_scanner.last_literal_count > 0
630 do
631 create Result.make_unique
632 Result.set_position (a_scanner.line, a_scanner.column)
633 end
634
635 new_until_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
636 -- New 'until' keyword
637 require
638 a_scanner_not_void: a_scanner /= Void
639 last_literal_not_empty: a_scanner.last_literal_count > 0
640 do
641 Result := tokens.until_keyword
642 end
643
644 new_variant_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
645 -- New 'variant' keyword
646 require
647 a_scanner_not_void: a_scanner /= Void
648 last_literal_not_empty: a_scanner.last_literal_count > 0
649 do
650 Result := tokens.variant_keyword
651 end
652
653 new_void_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_VOID
654 -- New 'void' keyword
655 require
656 a_scanner_not_void: a_scanner /= Void
657 last_literal_not_empty: a_scanner.last_literal_count > 0
658 do
659 create Result.make
660 Result.set_position (a_scanner.line, a_scanner.column)
661 end
662
663 new_when_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD
664 -- New 'when' keyword
665 require
666 a_scanner_not_void: a_scanner /= Void
667 last_literal_not_empty: a_scanner.last_literal_count > 0
668 do
669 Result := tokens.when_keyword
670 end
671
672 new_xor_keyword (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_KEYWORD_OPERATOR
673 -- New 'xor' keyword
674 require
675 a_scanner_not_void: a_scanner /= Void
676 last_literal_not_empty: a_scanner.last_literal_count > 0
677 do
678 create Result.make_xor
679 Result.set_position (a_scanner.line, a_scanner.column)
680 end
681
682 feature -- Eiffel symbols
683
684 new_arrow_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
685 -- New '->' symbol
686 require
687 a_scanner_not_void: a_scanner /= Void
688 do
689 Result := tokens.arrow_symbol
690 end
691
692 new_assign_attempt_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
693 -- New '?=' symbol
694 require
695 a_scanner_not_void: a_scanner /= Void
696 do
697 Result := tokens.assign_attempt_symbol
698 end
699
700 new_assign_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
701 -- New ':=' symbol
702 require
703 a_scanner_not_void: a_scanner /= Void
704 do
705 Result := tokens.assign_symbol
706 end
707
708 new_bang_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
709 -- New '!' symbol
710 require
711 a_scanner_not_void: a_scanner /= Void
712 do
713 create Result.make_bang
714 Result.set_position (a_scanner.line, a_scanner.column)
715 end
716
717 new_colon_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
718 -- New ':' symbol
719 require
720 a_scanner_not_void: a_scanner /= Void
721 do
722 Result := tokens.colon_symbol
723 end
724
725 new_comma_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
726 -- New ',' symbol
727 require
728 a_scanner_not_void: a_scanner /= Void
729 do
730 Result := tokens.comma_symbol
731 end
732
733 new_div_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
734 -- New '//' symbol
735 require
736 a_scanner_not_void: a_scanner /= Void
737 do
738 create Result.make_div
739 Result.set_position (a_scanner.line, a_scanner.column)
740 end
741
742 new_divide_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
743 -- New '/' symbol
744 require
745 a_scanner_not_void: a_scanner /= Void
746 do
747 create Result.make_divide
748 Result.set_position (a_scanner.line, a_scanner.column)
749 end
750
751 new_dollar_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
752 -- New '$' symbol
753 require
754 a_scanner_not_void: a_scanner /= Void
755 do
756 create Result.make_dollar
757 Result.set_position (a_scanner.line, a_scanner.column)
758 end
759
760 new_dot_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
761 -- New '.' symbol
762 require
763 a_scanner_not_void: a_scanner /= Void
764 do
765 Result := tokens.dot_symbol
766 end
767
768 new_dotdot_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
769 -- New '..' symbol
770 require
771 a_scanner_not_void: a_scanner /= Void
772 do
773 Result := tokens.dotdot_symbol
774 end
775
776 new_equal_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
777 -- New '=' symbol
778 require
779 a_scanner_not_void: a_scanner /= Void
780 do
781 create Result.make_equal
782 Result.set_position (a_scanner.line, a_scanner.column)
783 end
784
785 new_ge_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
786 -- New '>=' symbol
787 require
788 a_scanner_not_void: a_scanner /= Void
789 do
790 create Result.make_ge
791 Result.set_position (a_scanner.line, a_scanner.column)
792 end
793
794 new_gt_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
795 -- New '>' symbol
796 require
797 a_scanner_not_void: a_scanner /= Void
798 do
799 create Result.make_gt
800 Result.set_position (a_scanner.line, a_scanner.column)
801 end
802
803 new_le_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
804 -- New '<=' symbol
805 require
806 a_scanner_not_void: a_scanner /= Void
807 do
808 create Result.make_le
809 Result.set_position (a_scanner.line, a_scanner.column)
810 end
811
812 new_left_array_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
813 -- New '<<' symbol
814 require
815 a_scanner_not_void: a_scanner /= Void
816 do
817 create Result.make_left_array
818 Result.set_position (a_scanner.line, a_scanner.column)
819 end
820
821 new_left_brace_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
822 -- New '{' symbol
823 require
824 a_scanner_not_void: a_scanner /= Void
825 do
826 Result := tokens.left_brace_symbol
827 end
828
829 new_left_bracket_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_BRACKET_SYMBOL
830 -- New '[' symbol
831 require
832 a_scanner_not_void: a_scanner /= Void
833 do
834 create Result.make
835 Result.set_position (a_scanner.line, a_scanner.column)
836 end
837
838 new_left_parenthesis_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
839 -- New '(' symbol
840 require
841 a_scanner_not_void: a_scanner /= Void
842 do
843 Result := tokens.left_parenthesis_symbol
844 end
845
846 new_lt_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
847 -- New '<' symbol
848 require
849 a_scanner_not_void: a_scanner /= Void
850 do
851 create Result.make_lt
852 Result.set_position (a_scanner.line, a_scanner.column)
853 end
854
855 new_minus_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
856 -- New '-' symbol
857 require
858 a_scanner_not_void: a_scanner /= Void
859 do
860 create Result.make_minus
861 Result.set_position (a_scanner.line, a_scanner.column)
862 end
863
864 new_mod_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
865 -- New '\\' symbol
866 require
867 a_scanner_not_void: a_scanner /= Void
868 do
869 create Result.make_mod
870 Result.set_position (a_scanner.line, a_scanner.column)
871 end
872
873 new_not_equal_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
874 -- New '/=' symbol
875 require
876 a_scanner_not_void: a_scanner /= Void
877 do
878 create Result.make_not_equal
879 Result.set_position (a_scanner.line, a_scanner.column)
880 end
881
882 new_not_tilde_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
883 -- New '/~' symbol
884 require
885 a_scanner_not_void: a_scanner /= Void
886 do
887 create Result.make_not_tilde
888 Result.set_position (a_scanner.line, a_scanner.column)
889 end
890
891 new_plus_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
892 -- New '+' symbol
893 require
894 a_scanner_not_void: a_scanner /= Void
895 do
896 create Result.make_plus
897 Result.set_position (a_scanner.line, a_scanner.column)
898 end
899
900 new_power_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
901 -- New '^' symbol
902 require
903 a_scanner_not_void: a_scanner /= Void
904 do
905 create Result.make_power
906 Result.set_position (a_scanner.line, a_scanner.column)
907 end
908
909 new_question_mark_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_QUESTION_MARK_SYMBOL
910 -- New '?' symbol
911 require
912 a_scanner_not_void: a_scanner /= Void
913 do
914 create Result.make
915 Result.set_position (a_scanner.line, a_scanner.column)
916 end
917
918 new_right_array_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
919 -- New '>>' symbol
920 require
921 a_scanner_not_void: a_scanner /= Void
922 do
923 Result := tokens.right_array_symbol
924 end
925
926 new_right_brace_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
927 -- New '}' symbol
928 require
929 a_scanner_not_void: a_scanner /= Void
930 do
931 Result := tokens.right_brace_symbol
932 end
933
934 new_right_bracket_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
935 -- New ']' symbol
936 require
937 a_scanner_not_void: a_scanner /= Void
938 do
939 Result := tokens.right_bracket_symbol
940 end
941
942 new_right_parenthesis_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
943 -- New ')' symbol
944 require
945 a_scanner_not_void: a_scanner /= Void
946 do
947 Result := tokens.right_parenthesis_symbol
948 end
949
950 new_semicolon_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SEMICOLON_SYMBOL
951 -- New ';' symbol
952 require
953 a_scanner_not_void: a_scanner /= Void
954 do
955 Result := tokens.semicolon_symbol
956 end
957
958 new_tilde_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL
959 -- New '~' symbol
960 require
961 a_scanner_not_void: a_scanner /= Void
962 do
963 create Result.make_tilde
964 Result.set_position (a_scanner.line, a_scanner.column)
965 end
966
967 new_times_symbol (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SYMBOL_OPERATOR
968 -- New '*' symbol
969 require
970 a_scanner_not_void: a_scanner /= Void
971 do
972 create Result.make_times
973 Result.set_position (a_scanner.line, a_scanner.column)
974 end
975
976 feature -- AST leaves
977
978 new_binary_integer_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_BINARY_INTEGER_CONSTANT
979 -- New integer constant in binary format
980 require
981 a_scanner_not_void: a_scanner /= Void
982 -- valid_literal: (0[bB](_*[0-1]+_*)+).recognizes (a_scanner.last_literal)
983 do
984 create Result.make (a_scanner.last_literal)
985 Result.set_position (a_scanner.line, a_scanner.column)
986 end
987
988 new_break (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_BREAK
989 -- New break
990 require
991 a_scanner_not_void: a_scanner /= Void
992 has_break: a_scanner.has_break
993 do
994 -- Result := Void
995 end
996
997 new_c1_character_constant (a_value: CHARACTER; a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_C1_CHARACTER_CONSTANT
998 -- New character constant of the form 'A'
999 require
1000 a_scanner_not_void: a_scanner /= Void
1001 do
1002 create Result.make (a_value)
1003 Result.set_position (a_scanner.line, a_scanner.column)
1004 end
1005
1006 new_c2_character_constant (a_value: CHARACTER; a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_C2_CHARACTER_CONSTANT
1007 -- New character constant of the form '%A'
1008 require
1009 a_scanner_not_void: a_scanner /= Void
1010 do
1011 create Result.make (a_value)
1012 Result.set_position (a_scanner.line, a_scanner.column)
1013 end
1014
1015 new_c3_character_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_C3_CHARACTER_CONSTANT
1016 -- New character constant of the form '%/code/'
1017 require
1018 a_scanner_not_void: a_scanner /= Void
1019 -- valid_literal: ((0*([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))|(0x[0-9a-fA-F]{1,4})).recognizes (a_scanner.last_literal)
1020 do
1021 Result := a_scanner.last_c3_character_constant
1022 Result.set_position (a_scanner.line, a_scanner.column)
1023 end
1024
1025 new_comment (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_COMMENT
1026 -- New comment
1027 require
1028 a_scanner_not_void: a_scanner /= Void
1029 has_comment: a_scanner.has_comment
1030 do
1031 -- Result := Void
1032 end
1033
1034 new_free_operator (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_FREE_OPERATOR
1035 -- New free operator
1036 require
1037 a_scanner_not_void: a_scanner /= Void
1038 last_literal_not_empty: a_scanner.last_literal_count > 0
1039 do
1040 create Result.make_prefix (a_scanner.last_literal)
1041 Result.set_position (a_scanner.line, a_scanner.column)
1042 end
1043
1044 new_hexadecimal_integer_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_HEXADECIMAL_INTEGER_CONSTANT
1045 -- New integer constant in hexadecimal format
1046 require
1047 a_scanner_not_void: a_scanner /= Void
1048 -- valid_literal: (0[xX](_*[0-9a-fA-F]+_*)+).recognizes (a_scanner.last_literal)
1049 do
1050 create Result.make (a_scanner.last_literal)
1051 Result.set_position (a_scanner.line, a_scanner.column)
1052 end
1053
1054 new_identifier (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_IDENTIFIER
1055 -- New identifier
1056 require
1057 a_scanner_not_void: a_scanner /= Void
1058 last_literal_not_empty: a_scanner.last_literal_count > 0
1059 do
1060 Result := a_scanner.last_identifier
1061 Result.set_position (a_scanner.line, a_scanner.column)
1062 end
1063
1064 new_octal_integer_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_OCTAL_INTEGER_CONSTANT
1065 -- New integer constant in octal format
1066 require
1067 a_scanner_not_void: a_scanner /= Void
1068 -- valid_literal: (0[cC](_*[0-7]+_*)+).recognizes (a_scanner.last_literal)
1069 do
1070 create Result.make (a_scanner.last_literal)
1071 Result.set_position (a_scanner.line, a_scanner.column)
1072 end
1073
1074 new_regular_integer_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_REGULAR_INTEGER_CONSTANT
1075 -- New integer constant with no underscore
1076 require
1077 a_scanner_not_void: a_scanner /= Void
1078 -- valid_literal: ([0-9]+).recognizes (a_scanner.last_literal)
1079 do
1080 create Result.make (a_scanner.last_literal)
1081 Result.set_position (a_scanner.line, a_scanner.column)
1082 end
1083
1084 new_regular_manifest_string (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_REGULAR_MANIFEST_STRING
1085 -- New manifest string with no special character
1086 require
1087 a_scanner_not_void: a_scanner /= Void
1088 -- valid_literal: ([^"%\n]*).recognizes (a_scanner.last_literal)
1089 do
1090 create Result.make (a_scanner.last_literal)
1091 Result.set_position (a_scanner.line, a_scanner.column)
1092 end
1093
1094 new_regular_real_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_REGULAR_REAL_CONSTANT
1095 -- New real constant with no underscore
1096 require
1097 a_scanner_not_void: a_scanner /= Void
1098 -- valid_literal: (([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([eE][+-]?[0-9]+)?).recognizes (a_scanner.last_literal)
1099 do
1100 create Result.make (a_scanner.last_literal)
1101 Result.set_position (a_scanner.line, a_scanner.column)
1102 end
1103
1104 new_special_manifest_string (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_SPECIAL_MANIFEST_STRING
1105 -- New manifest string with special characters
1106 require
1107 a_scanner_not_void: a_scanner /= Void
1108 -- valid_literal: (([^"%\n]|%([^\n]|\/([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\/|[ \t\r]*\n[ \t\r\n]*%))*).recognizes (a_scanner.last_literal)
1109 do
1110 Result := a_scanner.last_special_manifest_string
1111 Result.set_position (a_scanner.line, a_scanner.column)
1112 end
1113
1114 new_underscored_integer_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_UNDERSCORED_INTEGER_CONSTANT
1115 -- New integer constant with underscores
1116 require
1117 a_scanner_not_void: a_scanner /= Void
1118 -- valid_literal: ((_*[0-9]+_*)+).recognizes (a_scanner.last_literal)
1119 do
1120 create Result.make (a_scanner.last_literal)
1121 Result.set_position (a_scanner.line, a_scanner.column)
1122 end
1123
1124 new_underscored_real_constant (a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_UNDERSCORED_REAL_CONSTANT
1125 -- New real constant with underscores
1126 require
1127 a_scanner_not_void: a_scanner /= Void
1128 -- valid_literal: (((_*[0-9]+_*)+\.(_*[0-9]_*)*|(_*[0-9]_*)*\.(_*[0-9]_*)+)([eE][+-]?(_*[0-9]_*)+)?).recognizes (a_scanner.last_literal)
1129 do
1130 create Result.make (a_scanner.last_literal)
1131 Result.set_position (a_scanner.line, a_scanner.column)
1132 end
1133
1134 new_verbatim_string (a_marker, an_open, a_close: STRING; a_left_aligned: BOOLEAN; a_scanner: ET_EIFFEL_SCANNER_SKELETON): detachable ET_VERBATIM_STRING
1135 -- New verbatim string
1136 require
1137 a_marker_not_void: a_marker /= Void
1138 an_open_not_void: an_open /= Void
1139 a_close_not_void: a_close /= Void
1140 a_scanner_not_void: a_scanner /= Void
1141 do
1142 Result := a_scanner.last_verbatim_string (a_marker, an_open, a_close, a_left_aligned)
1143 Result.set_position (a_scanner.line, a_scanner.column)
1144 end
1145
1146 feature -- AST nodes
1147
1148 new_across_all_expression (a_across: detachable ET_KEYWORD; a_iterable_expression: detachable ET_EXPRESSION;
1149 a_as: detachable ET_KEYWORD; a_cursor_name: detachable ET_IDENTIFIER; an_invariant: detachable ET_LOOP_INVARIANTS;
1150 an_until_conditional: detachable ET_CONDITIONAL; a_all_conditional: detachable ET_CONDITIONAL;
1151 a_variant: detachable ET_VARIANT; an_end: detachable ET_KEYWORD): detachable ET_ACROSS_EXPRESSION
1152 -- New across all expression
1153 do
1154 if a_iterable_expression /= Void and a_cursor_name /= Void and a_all_conditional /= Void then
1155 create Result.make_all (a_iterable_expression, a_cursor_name, an_until_conditional, a_all_conditional)
1156 Result.set_invariant_part (an_invariant)
1157 Result.set_variant_part (a_variant)
1158 end
1159 end
1160
1161 new_across_instruction (a_across: detachable ET_KEYWORD; a_iterable_expression: detachable ET_EXPRESSION;
1162 a_as: detachable ET_KEYWORD; a_cursor_name: detachable ET_IDENTIFIER;
1163 a_from_compound: detachable ET_COMPOUND; an_invariant: detachable ET_LOOP_INVARIANTS;
1164 an_until_conditional: detachable ET_CONDITIONAL; a_loop_compound: detachable ET_COMPOUND;
1165 a_variant: detachable ET_VARIANT; an_end: detachable ET_KEYWORD): detachable ET_ACROSS_INSTRUCTION
1166 -- New across instruction
1167 do
1168 if a_iterable_expression /= Void and a_cursor_name /= Void then
1169 create Result.make (a_iterable_expression, a_cursor_name, a_from_compound, an_until_conditional, a_loop_compound)
1170 Result.set_invariant_part (an_invariant)
1171 Result.set_variant_part (a_variant)
1172 end
1173 end
1174
1175 new_across_some_expression (a_across: detachable ET_KEYWORD; a_iterable_expression: detachable ET_EXPRESSION;
1176 a_as: detachable ET_KEYWORD; a_cursor_name: detachable ET_IDENTIFIER; an_invariant: detachable ET_LOOP_INVARIANTS;
1177 an_until_conditional: detachable ET_CONDITIONAL; a_some_conditional: detachable ET_CONDITIONAL;
1178 a_variant: detachable ET_VARIANT; an_end: detachable ET_KEYWORD): detachable ET_ACROSS_EXPRESSION
1179 -- New across some expression
1180 do
1181 if a_iterable_expression /= Void and a_cursor_name /= Void and a_some_conditional /= Void then
1182 create Result.make_some (a_iterable_expression, a_cursor_name, an_until_conditional, a_some_conditional)
1183 Result.set_invariant_part (an_invariant)
1184 Result.set_variant_part (a_variant)
1185 end
1186 end
1187
1188 new_actual_arguments (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_ACTUAL_ARGUMENT_LIST
1189 -- New actual argument list with given capacity
1190 require
1191 nb_positive: nb >= 0
1192 do
1193 create Result.make_with_capacity (nb)
1194 end
1195
1196 new_actual_parameter_comma (a_parameter: detachable ET_ACTUAL_PARAMETER; a_comma: detachable ET_SYMBOL): detachable ET_ACTUAL_PARAMETER_ITEM
1197 -- New actual_parameter-comma
1198 do
1199 Result := a_parameter
1200 end
1201
1202 new_actual_parameters (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_ACTUAL_PARAMETER_LIST
1203 -- New actual generic parameter list with given capacity
1204 require
1205 nb_positive: nb >= 0
1206 do
1207 if nb > 0 then
1208 create Result.make_with_capacity (nb)
1209 if a_left /= Void and then not a_left.position.is_null then
1210 Result.set_left_bracket (a_left)
1211 end
1212 end
1213 end
1214
1215 new_agent_argument_operand_comma (an_argument: detachable ET_AGENT_ARGUMENT_OPERAND; a_comma: detachable ET_SYMBOL): detachable ET_AGENT_ARGUMENT_OPERAND_ITEM
1216 -- New agent_argument_operand-comma
1217 do
1218 Result := an_argument
1219 end
1220
1221 new_agent_argument_operands (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_AGENT_ARGUMENT_OPERAND_LIST
1222 -- New agent argument operand list with given capacity
1223 require
1224 nb_positive: nb >= 0
1225 do
1226 if nb > 0 then
1227 create Result.make_with_capacity (nb)
1228 end
1229 end
1230
1231 new_agent_typed_open_argument (l: detachable ET_SYMBOL; a_type: detachable ET_TYPE; r: detachable ET_SYMBOL;
1232 a_question_mark: detachable ET_QUESTION_MARK_SYMBOL): detachable ET_AGENT_TYPED_OPEN_ARGUMENT
1233 -- New agent open argument of the form '{TYPE} ?'
1234 do
1235 if a_type /= Void then
1236 create Result.make (a_type)
1237 end
1238 end
1239
1240 new_agent_open_target (l: detachable ET_SYMBOL; a_type: detachable ET_TYPE; r: detachable ET_SYMBOL): detachable ET_AGENT_OPEN_TARGET
1241 -- New agent open target of the form '{TYPE}'
1242 do
1243 if a_type /= Void then
1244 create Result.make (a_type)
1245 end
1246 end
1247
1248 new_alias_and_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1249 -- New alias "and" feature name
1250 do
1251 if a_string /= Void then
1252 create Result.make_and (a_string)
1253 if an_alias /= Void and then not an_alias.position.is_null then
1254 Result.set_alias_keyword (an_alias)
1255 end
1256 end
1257 end
1258
1259 new_alias_and_then_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1260 -- New alias "and then" feature name
1261 do
1262 if a_string /= Void then
1263 create Result.make_and_then (a_string)
1264 if an_alias /= Void and then not an_alias.position.is_null then
1265 Result.set_alias_keyword (an_alias)
1266 end
1267 end
1268 end
1269
1270 new_alias_bracket_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1271 -- New alias "[]" feature name
1272 do
1273 if a_string /= Void then
1274 create Result.make_bracket (a_string)
1275 if an_alias /= Void and then not an_alias.position.is_null then
1276 Result.set_alias_keyword (an_alias)
1277 end
1278 end
1279 end
1280
1281 new_alias_div_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1282 -- New alias "//" feature name
1283 do
1284 if a_string /= Void then
1285 create Result.make_div (a_string)
1286 if an_alias /= Void and then not an_alias.position.is_null then
1287 Result.set_alias_keyword (an_alias)
1288 end
1289 end
1290 end
1291
1292 new_alias_divide_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1293 -- New alias "//" feature name
1294 do
1295 if a_string /= Void then
1296 create Result.make_divide (a_string)
1297 if an_alias /= Void and then not an_alias.position.is_null then
1298 Result.set_alias_keyword (an_alias)
1299 end
1300 end
1301 end
1302
1303 new_alias_dotdot_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1304 -- New alias ".." feature name
1305 do
1306 if a_string /= Void then
1307 create Result.make_dotdot (a_string)
1308 if an_alias /= Void and then not an_alias.position.is_null then
1309 Result.set_alias_keyword (an_alias)
1310 end
1311 end
1312 end
1313
1314 new_alias_free_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_FREE_NAME
1315 -- New alias free feature name
1316 require
1317 a_string_computed: a_string /= Void implies a_string.value.count > 0
1318 do
1319 if a_string /= Void then
1320 create Result.make_infix (a_string)
1321 if an_alias /= Void and then not an_alias.position.is_null then
1322 Result.set_alias_keyword (an_alias)
1323 end
1324 end
1325 end
1326
1327 new_alias_ge_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1328 -- New alias ">=" feature name
1329 do
1330 if a_string /= Void then
1331 create Result.make_ge (a_string)
1332 if an_alias /= Void and then not an_alias.position.is_null then
1333 Result.set_alias_keyword (an_alias)
1334 end
1335 end
1336 end
1337
1338 new_alias_gt_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1339 -- New alias ">" feature name
1340 do
1341 if a_string /= Void then
1342 create Result.make_gt (a_string)
1343 if an_alias /= Void and then not an_alias.position.is_null then
1344 Result.set_alias_keyword (an_alias)
1345 end
1346 end
1347 end
1348
1349 new_alias_implies_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1350 -- New alias "implies" feature name
1351 do
1352 if a_string /= Void then
1353 create Result.make_implies (a_string)
1354 if an_alias /= Void and then not an_alias.position.is_null then
1355 Result.set_alias_keyword (an_alias)
1356 end
1357 end
1358 end
1359
1360 new_alias_le_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1361 -- New alias "<=" feature name
1362 do
1363 if a_string /= Void then
1364 create Result.make_le (a_string)
1365 if an_alias /= Void and then not an_alias.position.is_null then
1366 Result.set_alias_keyword (an_alias)
1367 end
1368 end
1369 end
1370
1371 new_alias_lt_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1372 -- New alias "<" feature name
1373 do
1374 if a_string /= Void then
1375 create Result.make_lt (a_string)
1376 if an_alias /= Void and then not an_alias.position.is_null then
1377 Result.set_alias_keyword (an_alias)
1378 end
1379 end
1380 end
1381
1382 new_alias_minus_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1383 -- New alias "-" feature name
1384 do
1385 if a_string /= Void then
1386 create Result.make_minus (a_string)
1387 if an_alias /= Void and then not an_alias.position.is_null then
1388 Result.set_alias_keyword (an_alias)
1389 end
1390 end
1391 end
1392
1393 new_alias_mod_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1394 -- New alias "\\" feature name
1395 do
1396 if a_string /= Void then
1397 create Result.make_mod (a_string)
1398 if an_alias /= Void and then not an_alias.position.is_null then
1399 Result.set_alias_keyword (an_alias)
1400 end
1401 end
1402 end
1403
1404 new_alias_not_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1405 -- New alias "not" feature name
1406 do
1407 if a_string /= Void then
1408 create Result.make_not (a_string)
1409 if an_alias /= Void and then not an_alias.position.is_null then
1410 Result.set_alias_keyword (an_alias)
1411 end
1412 end
1413 end
1414
1415 new_alias_or_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1416 -- New alias "or" feature name
1417 do
1418 if a_string /= Void then
1419 create Result.make_or (a_string)
1420 if an_alias /= Void and then not an_alias.position.is_null then
1421 Result.set_alias_keyword (an_alias)
1422 end
1423 end
1424 end
1425
1426 new_alias_or_else_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1427 -- New alias "or else" feature name
1428 do
1429 if a_string /= Void then
1430 create Result.make_or_else (a_string)
1431 if an_alias /= Void and then not an_alias.position.is_null then
1432 Result.set_alias_keyword (an_alias)
1433 end
1434 end
1435 end
1436
1437 new_alias_parenthesis_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1438 -- New alias "()" feature name
1439 do
1440 if a_string /= Void then
1441 create Result.make_parenthesis (a_string)
1442 if an_alias /= Void and then not an_alias.position.is_null then
1443 Result.set_alias_keyword (an_alias)
1444 end
1445 end
1446 end
1447
1448 new_alias_plus_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1449 -- New alias "+" feature name
1450 do
1451 if a_string /= Void then
1452 create Result.make_plus (a_string)
1453 if an_alias /= Void and then not an_alias.position.is_null then
1454 Result.set_alias_keyword (an_alias)
1455 end
1456 end
1457 end
1458
1459 new_alias_power_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1460 -- New alias "^" feature name
1461 do
1462 if a_string /= Void then
1463 create Result.make_power (a_string)
1464 if an_alias /= Void and then not an_alias.position.is_null then
1465 Result.set_alias_keyword (an_alias)
1466 end
1467 end
1468 end
1469
1470 new_alias_times_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1471 -- New alias "*" feature name
1472 do
1473 if a_string /= Void then
1474 create Result.make_times (a_string)
1475 if an_alias /= Void and then not an_alias.position.is_null then
1476 Result.set_alias_keyword (an_alias)
1477 end
1478 end
1479 end
1480
1481 new_alias_xor_name (an_alias: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ALIAS_NAME
1482 -- New alias "xor" feature name
1483 do
1484 if a_string /= Void then
1485 create Result.make_xor (a_string)
1486 if an_alias /= Void and then not an_alias.position.is_null then
1487 Result.set_alias_keyword (an_alias)
1488 end
1489 end
1490 end
1491
1492 new_aliased_feature_name (a_name: detachable ET_IDENTIFIER; an_alias: detachable ET_ALIAS_NAME): detachable ET_ALIASED_FEATURE_NAME
1493 -- New aliased feature name
1494 do
1495 if a_name /= Void and an_alias /= Void then
1496 create Result.make (a_name, an_alias)
1497 end
1498 end
1499
1500 new_all_export (a_clients: detachable ET_CLIENTS; an_all: detachable ET_KEYWORD): detachable ET_ALL_EXPORT
1501 -- New 'all' export clause
1502 do
1503 if a_clients /= Void then
1504 create Result.make (a_clients)
1505 end
1506 end
1507
1508 new_argument_name_comma (a_name: detachable ET_IDENTIFIER; a_comma: detachable ET_SYMBOL): detachable ET_ARGUMENT_NAME
1509 -- New argument_name-comma
1510 do
1511 Result := a_name
1512 end
1513
1514 new_assertion_semicolon (an_assertion: detachable ET_ASSERTION; a_semicolon: detachable ET_SYMBOL): detachable ET_ASSERTION_ITEM
1515 -- New assertion followed by a semicolon
1516 do
1517 Result := an_assertion
1518 end
1519
1520 new_assigner (an_assign: detachable ET_KEYWORD; a_feature_name: detachable ET_FEATURE_NAME): detachable ET_ASSIGNER
1521 -- New assigner
1522 do
1523 Result := a_feature_name
1524 end
1525
1526 new_assigner_instruction (a_target: detachable ET_QUALIFIED_FEATURE_CALL_EXPRESSION; an_assign: detachable ET_SYMBOL;
1527 a_source: detachable ET_EXPRESSION): detachable ET_ASSIGNER_INSTRUCTION
1528 -- New assigner instruction
1529 do
1530 if a_target /= Void and a_source /= Void then
1531 create Result.make (a_target, a_source)
1532 end
1533 end
1534
1535 new_assignment (a_target: detachable ET_WRITABLE; an_assign: detachable ET_SYMBOL; a_source: detachable ET_EXPRESSION): detachable ET_ASSIGNMENT
1536 -- New assignment instruction
1537 do
1538 if a_target /= Void and a_source /= Void then
1539 create Result.make (a_target, a_source)
1540 end
1541 end
1542
1543 new_assignment_attempt (a_target: detachable ET_WRITABLE; an_assign_attempt: detachable ET_SYMBOL;
1544 a_source: detachable ET_EXPRESSION): detachable ET_ASSIGNMENT_ATTEMPT
1545 -- New assignment-attempt instruction
1546 do
1547 if a_target /= Void and a_source /= Void then
1548 create Result.make (a_target, a_source)
1549 end
1550 end
1551
1552 new_attachment_separate_keywords (a_attachment_keyword: detachable ET_KEYWORD;
1553 a_separateness_keyword: detachable ET_KEYWORD): detachable ET_ATTACHMENT_SEPARATE_KEYWORDS
1554 -- New attachment keyword ('attached' or 'detachable') followed by the keyword 'separate'
1555 do
1556 if a_attachment_keyword /= Void and a_separateness_keyword /= Void then
1557 create Result.make (a_attachment_keyword, a_separateness_keyword)
1558 end
1559 end
1560
1561 new_attachment_symbol_separate_keyword (a_attachment_symbol: detachable ET_SYMBOL;
1562 a_separateness_keyword: detachable ET_KEYWORD): detachable ET_ATTACHMENT_SYMBOL_SEPARATE_KEYWORD
1563 -- New attachment symbol ('!' or '?') followed by the keyword 'separate'
1564 do
1565 if a_attachment_symbol /= Void and a_separateness_keyword /= Void then
1566 create Result.make (a_attachment_symbol, a_separateness_keyword)
1567 end
1568 end
1569
1570 new_attribute (a_name: detachable ET_EXTENDED_FEATURE_NAME; a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER;
1571 a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
1572 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_ATTRIBUTE
1573 -- New attribute declaration
1574 do
1575 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
1576 create Result.make (a_name, a_type, a_class)
1577 Result.set_assigner (an_assigner)
1578 Result.set_clients (a_clients)
1579 end
1580 end
1581
1582 new_attribute_compound (a_attribute: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
1583 -- New compound preceded by a 'attribute' keyword
1584 do
1585 if a_compound /= Void then
1586 Result := a_compound
1587 Result.set_keyword (tokens.attribute_keyword)
1588 end
1589 end
1590
1591 new_bang_instruction (l: detachable ET_SYMBOL; a_type: detachable ET_TYPE; r: detachable ET_SYMBOL;
1592 a_target: detachable ET_WRITABLE; a_call: detachable ET_QUALIFIED_CALL): detachable ET_BANG_INSTRUCTION
1593 -- New bang creation instruction
1594 do
1595 if a_target /= Void then
1596 create Result.make (a_type, a_target, a_call)
1597 if l /= Void and then not l.position.is_null then
1598 Result.set_left_bang (l)
1599 end
1600 end
1601 end
1602
1603 new_bracket_arguments (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_BRACKET_ARGUMENT_LIST
1604 -- New bracket argument list with given capacity
1605 require
1606 nb_positive: nb >= 0
1607 do
1608 if nb > 0 then
1609 create Result.make_with_capacity (nb)
1610 end
1611 end
1612
1613 new_bracket_expression (a_target: detachable ET_EXPRESSION; a_name: detachable ET_BRACKET_SYMBOL;
1614 args: detachable ET_BRACKET_ARGUMENT_LIST): detachable ET_BRACKET_EXPRESSION
1615 -- New bracket expression
1616 do
1617 if a_target /= Void and a_name /= Void then
1618 create Result.make (a_target, a_name, args)
1619 end
1620 end
1621
1622 new_call_agent (an_agent: detachable ET_AGENT_KEYWORD; a_target: detachable ET_AGENT_TARGET; a_name: detachable ET_QUALIFIED_FEATURE_NAME;
1623 args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_CALL_AGENT
1624 -- New call agent
1625 do
1626 if a_name /= Void then
1627 if a_target = Void then
1628 create Result.make_unqualified (a_name, args)
1629 else
1630 create Result.make (a_target, a_name, args)
1631 end
1632 if an_agent /= Void then
1633 Result.set_agent_keyword (an_agent)
1634 end
1635 end
1636 end
1637
1638 new_check_instruction (a_check: detachable ET_KEYWORD; a_then_compound: detachable ET_COMPOUND;
1639 an_end: detachable ET_KEYWORD; nb: INTEGER): detachable ET_CHECK_INSTRUCTION
1640 -- New check instruction with given capacity
1641 require
1642 nb_positive: nb >= 0
1643 do
1644 create Result.make_with_capacity (nb)
1645 Result.set_then_compound (a_then_compound)
1646 if a_check /= Void and then not a_check.position.is_null then
1647 Result.set_check_keyword (a_check)
1648 end
1649 end
1650
1651 new_choice_comma (a_choice: detachable ET_CHOICE; a_comma: detachable ET_SYMBOL): detachable ET_CHOICE_ITEM
1652 -- New choice-comma
1653 do
1654 Result := a_choice
1655 end
1656
1657 new_choice_list (a_when: detachable ET_KEYWORD; nb: INTEGER): detachable ET_CHOICE_LIST
1658 -- New choice list with capacity `nb'
1659 require
1660 nb_positive: nb >= 0
1661 do
1662 create Result.make_with_capacity (nb)
1663 if a_when /= Void and nb = 0 then
1664 Result.set_when_keyword (a_when)
1665 end
1666 end
1667
1668 new_choice_range (a_lower: detachable ET_CHOICE_CONSTANT; a_dotdot: detachable ET_SYMBOL;
1669 an_upper: detachable ET_CHOICE_CONSTANT): detachable ET_CHOICE_RANGE
1670 -- New choice range
1671 do
1672 if a_lower /= Void and an_upper /= Void then
1673 create Result.make (a_lower, an_upper)
1674 end
1675 end
1676
1677 new_class_type (a_type_mark: detachable ET_TYPE_MARK; a_name: detachable ET_CLASS_NAME;
1678 a_base_class: detachable ET_NAMED_CLASS): detachable ET_CLASS_TYPE
1679 -- New Eiffel class type
1680 do
1681 if a_name /= Void and a_base_class /= Void then
1682 create Result.make (a_type_mark, a_name, a_base_class)
1683 end
1684 end
1685
1686 new_client (a_name: detachable ET_CLASS_NAME; a_base_class: detachable ET_NAMED_CLASS): detachable ET_CLIENT
1687 -- New client
1688 do
1689 if a_name /= Void and a_base_class /= Void then
1690 create Result.make (a_name, a_base_class)
1691 end
1692 end
1693
1694 new_client_comma (a_name: detachable ET_CLASS_NAME; a_base_class: detachable ET_NAMED_CLASS;
1695 a_comma: detachable ET_SYMBOL): detachable ET_CLIENT_ITEM
1696 -- New client followed by a comma
1697 do
1698 if a_name /= Void and a_base_class /= Void then
1699 create {ET_CLIENT} Result.make (a_name, a_base_class)
1700 end
1701 end
1702
1703 new_clients (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_CLIENTS
1704 -- New client clause with given capacity
1705 require
1706 nb_positive: nb >= 0
1707 do
1708 create Result.make_with_capacity (nb)
1709 if a_left /= Void and then not a_left.position.is_null then
1710 Result.set_left_brace (a_left)
1711 end
1712 end
1713
1714 new_colon_type (a_colon: detachable ET_SYMBOL; a_type: detachable ET_TYPE): detachable ET_DECLARED_TYPE
1715 -- New colon-type
1716 do
1717 Result := a_type
1718 end
1719
1720 new_compound (nb: INTEGER): detachable ET_COMPOUND
1721 -- New instruction compound with capacity `nb'
1722 require
1723 nb_positive: nb >= 0
1724 do
1725 create Result.make_with_capacity (nb)
1726 end
1727
1728 new_empty_compound: detachable ET_COMPOUND
1729 -- New empty instruction compound
1730 do
1731 Result := Void
1732 end
1733
1734 new_conditional (a_keyword: detachable ET_KEYWORD; an_expression: detachable ET_EXPRESSION): detachable ET_CONDITIONAL
1735 -- New conditional
1736 do
1737 if an_expression /= Void then
1738 if a_keyword /= Void and then ((a_keyword.is_if or a_keyword.is_inspect) and not a_keyword.position.is_null) then
1739 create {ET_KEYWORD_EXPRESSION} Result.make (a_keyword, an_expression)
1740 else
1741 Result := an_expression
1742 end
1743 end
1744 end
1745
1746 new_constant_attribute (a_name: detachable ET_EXTENDED_FEATURE_NAME; a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER;
1747 an_is: detachable ET_AST_LEAF; a_constant: detachable ET_CONSTANT; a_semicolon: detachable ET_SEMICOLON_SYMBOL;
1748 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE;
1749 a_class: detachable ET_CLASS): detachable ET_CONSTANT_ATTRIBUTE
1750 -- New constant attribute declaration
1751 do
1752 if a_name /= Void and a_type /= Void and a_constant /= Void and a_clients /= Void and a_class /= Void then
1753 create Result.make (a_name, a_type, a_constant, a_class)
1754 Result.set_assigner (an_assigner)
1755 Result.set_clients (a_clients)
1756 end
1757 end
1758
1759 new_constrained_formal_parameter (a_type_mark: detachable ET_KEYWORD; a_name: detachable ET_IDENTIFIER;
1760 an_arrow: detachable ET_SYMBOL; a_constraint: detachable ET_TYPE;
1761 a_creation: detachable ET_CONSTRAINT_CREATOR; a_class: detachable ET_CLASS): detachable ET_CONSTRAINED_FORMAL_PARAMETER
1762 -- New constrained formal generic parameter
1763 do
1764 if a_name /= Void and a_constraint /= Void and a_class /= Void then
1765 create Result.make (a_name, a_constraint, a_creation, a_class)
1766 if a_type_mark /= Void then
1767 Result.set_type_mark (a_type_mark)
1768 end
1769 end
1770 end
1771
1772 new_constraint_actual_parameter_comma (a_parameter: detachable ET_CONSTRAINT_ACTUAL_PARAMETER;
1773 a_comma: detachable ET_SYMBOL): detachable ET_CONSTRAINT_ACTUAL_PARAMETER_ITEM
1774 -- New constraint_actual_parameter-comma
1775 do
1776 Result := a_parameter
1777 end
1778
1779 new_constraint_actual_parameters (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_CONSTRAINT_ACTUAL_PARAMETER_LIST
1780 -- New constraint actual generic parameter list with given capacity
1781 require
1782 nb_positive: nb >= 0
1783 do
1784 if nb > 0 then
1785 create Result.make_with_capacity (nb)
1786 if a_left /= Void and then not a_left.position.is_null then
1787 Result.set_left_bracket (a_left)
1788 end
1789 end
1790 end
1791
1792 new_constraint_creator (a_create: detachable ET_KEYWORD; an_end: detachable ET_KEYWORD; nb: INTEGER): detachable ET_CONSTRAINT_CREATOR
1793 -- New constraint creation clause with given capacity
1794 require
1795 nb_positive: nb >= 0
1796 do
1797 create Result.make_with_capacity (nb)
1798 end
1799
1800 new_constraint_generic_named_type (a_type_mark: detachable ET_TYPE_MARK; a_name: detachable ET_IDENTIFIER;
1801 a_generics: like new_constraint_actual_parameters): detachable ET_CONSTRAINT_GENERIC_NAMED_TYPE
1802 -- New Eiffel constraint generic named type
1803 do
1804 if a_name /= Void and a_generics /= Void then
1805 create Result.make (a_type_mark, a_name, a_generics)
1806 end
1807 end
1808
1809 new_constraint_labeled_actual_parameter (a_label: detachable ET_IDENTIFIER; a_colon: detachable ET_SYMBOL;
1810 a_type: detachable ET_CONSTRAINT_TYPE): detachable ET_CONSTRAINT_LABELED_ACTUAL_PARAMETER
1811 -- New constraint labeled actual parameter
1812 do
1813 if a_label /= Void and a_type /= Void then
1814 create Result.make (a_label, a_colon, a_type)
1815 end
1816 end
1817
1818 new_constraint_labeled_actual_parameter_semicolon (a_parameter: detachable ET_CONSTRAINT_LABELED_ACTUAL_PARAMETER;
1819 a_semicolon: detachable ET_SEMICOLON_SYMBOL): detachable ET_CONSTRAINT_ACTUAL_PARAMETER_ITEM
1820 -- New constraint_labeled_actual_parameter-semicolon
1821 do
1822 Result := a_parameter
1823 end
1824
1825 new_constraint_labeled_comma_actual_parameter (a_label: detachable ET_IDENTIFIER; a_comma: detachable ET_SYMBOL;
1826 a_type: detachable ET_CONSTRAINT_TYPE): detachable ET_CONSTRAINT_LABELED_COMMA_ACTUAL_PARAMETER
1827 -- New constraint labeled actual parameter followed by a comma
1828 do
1829 if a_label /= Void and a_type /= Void then
1830 create Result.make (a_label, a_comma, a_type)
1831 end
1832 end
1833
1834 new_constraint_named_type (a_type_mark: detachable ET_TYPE_MARK; a_name: detachable ET_IDENTIFIER): detachable ET_CONSTRAINT_NAMED_TYPE
1835 -- New Eiffel constraint named type
1836 do
1837 if a_name /= Void then
1838 create Result.make (a_type_mark, a_name)
1839 end
1840 end
1841
1842 new_convert_feature_comma (a_convert_feature: detachable ET_CONVERT_FEATURE; a_comma: detachable ET_SYMBOL): detachable ET_CONVERT_FEATURE_ITEM
1843 -- New convert_feature-comma
1844 do
1845 Result := a_convert_feature
1846 end
1847
1848 new_convert_features (a_convert: detachable ET_KEYWORD; nb: INTEGER): detachable ET_CONVERT_FEATURE_LIST
1849 -- New convert clause with given capacity
1850 require
1851 nb_positive: nb >= 0
1852 do
1853 create Result.make_with_capacity (nb)
1854 end
1855
1856 new_convert_function (a_name: detachable ET_FEATURE_NAME; a_colon: detachable ET_SYMBOL;
1857 a_types: detachable ET_TYPE_LIST): detachable ET_CONVERT_FUNCTION
1858 -- New convert function
1859 do
1860 if a_name /= Void and a_types /= Void then
1861 create Result.make (a_name, a_types)
1862 end
1863 end
1864
1865 new_convert_procedure (a_name: detachable ET_FEATURE_NAME; a_left_parenthesis: detachable ET_SYMBOL;
1866 a_types: detachable ET_TYPE_LIST; a_right_parenthesis: detachable ET_SYMBOL): detachable ET_CONVERT_PROCEDURE
1867 -- New convert procedure
1868 do
1869 if a_name /= Void and a_types /= Void then
1870 create Result.make (a_name, a_types)
1871 end
1872 end
1873
1874 new_convert_types (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_TYPE_LIST
1875 -- New convert type list with given capacity
1876 require
1877 nb_positive: nb >= 0
1878 local
1879 a_braced_types: ET_BRACED_TYPE_LIST
1880 do
1881 if nb > 0 then
1882 create a_braced_types.make_with_capacity (nb)
1883 Result := a_braced_types
1884 if a_left /= Void and then not a_left.position.is_null then
1885 a_braced_types.set_left_brace (a_left)
1886 end
1887 end
1888 end
1889
1890 new_create_expression (a_create: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
1891 a_call: detachable ET_QUALIFIED_CALL): detachable ET_CREATE_EXPRESSION
1892 -- New create expression
1893 do
1894 if a_type /= Void then
1895 create Result.make (a_type, a_call)
1896 if a_create /= Void and then not a_create.position.is_null then
1897 Result.set_create_keyword (a_create)
1898 end
1899 end
1900 end
1901
1902 new_create_instruction (a_create: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
1903 a_target: detachable ET_WRITABLE; a_call: detachable ET_QUALIFIED_CALL): detachable ET_CREATE_INSTRUCTION
1904 -- New create instruction
1905 do
1906 if a_target /= Void then
1907 create Result.make (a_type, a_target, a_call)
1908 if a_create /= Void and then not a_create.position.is_null then
1909 Result.set_create_keyword (a_create)
1910 end
1911 end
1912 end
1913
1914 new_creator (a_creation: detachable ET_KEYWORD; a_clients: detachable ET_CLIENT_LIST; nb: INTEGER): detachable ET_CREATOR
1915 -- New creation clause with given capacity
1916 require
1917 nb_positive: nb >= 0
1918 do
1919 if a_clients /= Void then
1920 create Result.make_with_capacity (a_clients, nb)
1921 end
1922 end
1923
1924 new_creators (nb: INTEGER): detachable ET_CREATOR_LIST
1925 -- New list of creation clauses with given capacity
1926 require
1927 nb_positive: nb >= 0
1928 do
1929 create Result.make_with_capacity (nb)
1930 end
1931
1932 new_current_address (d: detachable ET_SYMBOL; c: detachable ET_CURRENT): detachable ET_CURRENT_ADDRESS
1933 -- New address of Current
1934 do
1935 create Result.make
1936 if d /= Void and then not d.position.is_null then
1937 Result.set_dollar (d)
1938 end
1939 end
1940
1941 new_custom_attribute (a_creation: detachable ET_CREATE_EXPRESSION;
1942 a_settings: detachable ET_MANIFEST_TUPLE; an_end: detachable ET_KEYWORD): detachable ET_CUSTOM_ATTRIBUTE
1943 -- New if instruction
1944 do
1945 if a_creation /= Void then
1946 create Result.make (a_creation, a_settings)
1947 end
1948 end
1949
1950 new_debug_compound (a_debug: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
1951 -- New compound preceded by a 'debug' keyword
1952 do
1953 if a_debug /= Void and then not a_debug.position.is_null then
1954 if a_compound /= Void then
1955 Result := a_compound
1956 else
1957 create Result.make
1958 end
1959 Result.set_keyword (a_debug)
1960 elseif a_compound /= Void then
1961 Result := a_compound
1962 Result.set_keyword (tokens.debug_keyword)
1963 end
1964 end
1965
1966 new_debug_instruction (a_keys: detachable ET_MANIFEST_STRING_LIST; a_compound: detachable ET_COMPOUND;
1967 an_end: detachable ET_KEYWORD): detachable ET_DEBUG_INSTRUCTION
1968 -- New debug instruction
1969 do
1970 create Result.make (a_keys, a_compound)
1971 end
1972
1973 new_deferred_function (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
1974 a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER; an_is: detachable ET_KEYWORD;
1975 a_first_indexing: detachable ET_INDEXING_LIST; an_obsolete: detachable ET_OBSOLETE;
1976 a_preconditions: detachable ET_PRECONDITIONS; a_deferred: detachable ET_KEYWORD;
1977 a_postconditions: detachable ET_POSTCONDITIONS; an_end: detachable ET_KEYWORD;
1978 a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
1979 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_DEFERRED_FUNCTION
1980 -- New deferred function
1981 do
1982 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
1983 create Result.make (a_name, args, a_type, a_class)
1984 if an_is = tokens.is_keyword then
1985 Result.set_is_keyword (an_is)
1986 end
1987 Result.set_assigner (an_assigner)
1988 Result.set_obsolete_message (an_obsolete)
1989 Result.set_preconditions (a_preconditions)
1990 Result.set_postconditions (a_postconditions)
1991 Result.set_clients (a_clients)
1992 Result.set_first_indexing (a_first_indexing)
1993 end
1994 end
1995
1996 new_deferred_procedure (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
1997 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST; an_obsolete: detachable ET_OBSOLETE;
1998 a_preconditions: detachable ET_PRECONDITIONS; a_deferred: detachable ET_KEYWORD; a_postconditions: detachable ET_POSTCONDITIONS;
1999 an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
2000 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_DEFERRED_PROCEDURE
2001 -- New deferred procedure
2002 do
2003 if a_name /= Void and a_clients /= Void and a_class /= Void then
2004 create Result.make (a_name, args, a_class)
2005 if an_is = tokens.is_keyword then
2006 Result.set_is_keyword (an_is)
2007 end
2008 Result.set_obsolete_message (an_obsolete)
2009 Result.set_preconditions (a_preconditions)
2010 Result.set_postconditions (a_postconditions)
2011 Result.set_clients (a_clients)
2012 Result.set_first_indexing (a_first_indexing)
2013 end
2014 end
2015
2016 new_do_compound (a_do: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
2017 -- New compound preceded by a 'do' keyword
2018 do
2019 if a_compound /= Void then
2020 Result := a_compound
2021 Result.set_keyword (tokens.do_keyword)
2022 end
2023 end
2024
2025 new_do_function (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
2026 a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER;
2027 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST;
2028 an_obsolete: detachable ET_OBSOLETE; a_preconditions: detachable ET_PRECONDITIONS;
2029 a_locals: detachable ET_LOCAL_VARIABLE_LIST; a_compound: detachable ET_COMPOUND;
2030 a_postconditions: detachable ET_POSTCONDITIONS; a_rescue: detachable ET_COMPOUND;
2031 an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL;
2032 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE;
2033 a_class: detachable ET_CLASS): detachable ET_DO_FUNCTION
2034 -- New do function
2035 do
2036 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
2037 create Result.make (a_name, args, a_type, a_class)
2038 if an_is = tokens.is_keyword then
2039 Result.set_is_keyword (an_is)
2040 end
2041 Result.set_assigner (an_assigner)
2042 Result.set_obsolete_message (an_obsolete)
2043 Result.set_preconditions (a_preconditions)
2044 Result.set_locals (a_locals)
2045 Result.set_compound (a_compound)
2046 Result.set_postconditions (a_postconditions)
2047 Result.set_rescue_clause (a_rescue)
2048 Result.set_clients (a_clients)
2049 Result.set_first_indexing (a_first_indexing)
2050 end
2051 end
2052
2053 new_do_function_inline_agent (an_agent: detachable ET_AGENT_KEYWORD; a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST;
2054 a_type: detachable ET_DECLARED_TYPE; a_preconditions: detachable ET_PRECONDITIONS;
2055 a_locals: detachable ET_LOCAL_VARIABLE_LIST; a_compound: detachable ET_COMPOUND;
2056 a_postconditions: detachable ET_POSTCONDITIONS; a_rescue: detachable ET_COMPOUND;
2057 an_end: detachable ET_KEYWORD; an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_DO_FUNCTION_INLINE_AGENT
2058 -- New inline agent whose associated feature is a do function
2059 do
2060 if a_type /= Void then
2061 create Result.make (a_formal_args, a_type, an_actual_args)
2062 if an_agent /= Void then
2063 Result.set_agent_keyword (an_agent)
2064 end
2065 Result.set_preconditions (a_preconditions)
2066 Result.set_locals (a_locals)
2067 Result.set_compound (a_compound)
2068 Result.set_postconditions (a_postconditions)
2069 Result.set_rescue_clause (a_rescue)
2070 end
2071 end
2072
2073 new_do_procedure (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
2074 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST; an_obsolete: detachable ET_OBSOLETE;
2075 a_preconditions: detachable ET_PRECONDITIONS; a_locals: detachable ET_LOCAL_VARIABLE_LIST;
2076 a_compound: detachable ET_COMPOUND; a_postconditions: detachable ET_POSTCONDITIONS;
2077 a_rescue: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL;
2078 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE;
2079 a_class: detachable ET_CLASS): detachable ET_DO_PROCEDURE
2080 -- New do procedure
2081 do
2082 if a_name /= Void and a_clients /= Void and a_class /= Void then
2083 create Result.make (a_name, args, a_class)
2084 if an_is = tokens.is_keyword then
2085 Result.set_is_keyword (an_is)
2086 end
2087 Result.set_obsolete_message (an_obsolete)
2088 Result.set_preconditions (a_preconditions)
2089 Result.set_locals (a_locals)
2090 Result.set_compound (a_compound)
2091 Result.set_postconditions (a_postconditions)
2092 Result.set_rescue_clause (a_rescue)
2093 Result.set_clients (a_clients)
2094 Result.set_first_indexing (a_first_indexing)
2095 end
2096 end
2097
2098 new_do_procedure_inline_agent (an_agent: detachable ET_AGENT_KEYWORD; a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST;
2099 a_preconditions: detachable ET_PRECONDITIONS; a_locals: detachable ET_LOCAL_VARIABLE_LIST;
2100 a_compound: detachable ET_COMPOUND; a_postconditions: detachable ET_POSTCONDITIONS;
2101 a_rescue: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD;
2102 an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_DO_PROCEDURE_INLINE_AGENT
2103 -- New inline agent whose associated feature is a do procedure
2104 do
2105 create Result.make (a_formal_args, an_actual_args)
2106 if an_agent /= Void then
2107 Result.set_agent_keyword (an_agent)
2108 end
2109 Result.set_preconditions (a_preconditions)
2110 Result.set_locals (a_locals)
2111 Result.set_compound (a_compound)
2112 Result.set_postconditions (a_postconditions)
2113 Result.set_rescue_clause (a_rescue)
2114 end
2115
2116 new_dot_feature_name (a_dot: detachable ET_SYMBOL; a_name: detachable ET_FEATURE_NAME): detachable ET_QUALIFIED_FEATURE_NAME
2117 -- New dot-feature_name
2118 do
2119 Result := a_name
2120 end
2121
2122 new_else_compound (an_else: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
2123 -- New compound preceded by an 'else' keyword
2124 do
2125 if a_compound /= Void then
2126 Result := a_compound
2127 Result.set_keyword (tokens.else_keyword)
2128 end
2129 end
2130
2131 new_elseif_part (a_conditional: detachable ET_CONDITIONAL;
2132 a_then_compound: detachable ET_COMPOUND): detachable ET_ELSEIF_PART
2133 -- New elseif part
2134 do
2135 if a_conditional /= Void then
2136 create Result.make (a_conditional, a_then_compound)
2137 end
2138 end
2139
2140 new_elseif_part_list (nb: INTEGER): detachable ET_ELSEIF_PART_LIST
2141 -- New elseif part list with capacity `nb'
2142 require
2143 nb_positive: nb >= 0
2144 do
2145 if nb > 0 then
2146 create Result.make_with_capacity (nb)
2147 end
2148 end
2149
2150 new_equality_expression (l: detachable ET_EXPRESSION; an_op: detachable ET_SYMBOL;
2151 r: detachable ET_EXPRESSION): detachable ET_EQUALITY_EXPRESSION
2152 -- New equality expression
2153 do
2154 if l /= Void and an_op /= Void and r /= Void then
2155 create Result.make (l, an_op, r)
2156 end
2157 end
2158
2159 new_exports (an_export: detachable ET_KEYWORD; nb: INTEGER): detachable ET_EXPORT_LIST
2160 -- New export clause with given capacity
2161 require
2162 nb_positive: nb >= 0
2163 do
2164 create Result.make_with_capacity (nb)
2165 end
2166
2167 new_expression_address (d: detachable ET_SYMBOL; e: detachable ET_PARENTHESIZED_EXPRESSION): detachable ET_EXPRESSION_ADDRESS
2168 -- New expression address
2169 do
2170 if e /= Void then
2171 create Result.make (e)
2172 if d /= Void and then not d.position.is_null then
2173 Result.set_dollar (d)
2174 end
2175 end
2176 end
2177
2178 new_expression_comma (an_expression: detachable ET_EXPRESSION; a_comma: detachable ET_SYMBOL): detachable ET_EXPRESSION_ITEM
2179 -- New expression-comma
2180 do
2181 Result := an_expression
2182 end
2183
2184 new_extended_attribute (a_name: detachable ET_EXTENDED_FEATURE_NAME;
2185 a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER; a_first_indexing: detachable ET_INDEXING_LIST;
2186 an_obsolete: detachable ET_OBSOLETE; a_preconditions: detachable ET_PRECONDITIONS; a_locals: detachable ET_LOCAL_VARIABLE_LIST;
2187 a_compound: detachable ET_COMPOUND; a_postconditions: detachable ET_POSTCONDITIONS;
2188 a_rescue_clause: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL;
2189 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_EXTENDED_ATTRIBUTE
2190 -- New extended attribute declaration
2191 do
2192 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
2193 create Result.make (a_name, a_type, a_class)
2194 Result.set_assigner (an_assigner)
2195 Result.set_obsolete_message (an_obsolete)
2196 Result.set_preconditions (a_preconditions)
2197 Result.set_locals (a_locals)
2198 Result.set_compound (a_compound)
2199 Result.set_postconditions (a_postconditions)
2200 Result.set_rescue_clause (a_rescue_clause)
2201 Result.set_clients (a_clients)
2202 Result.set_first_indexing (a_first_indexing)
2203 end
2204 end
2205
2206 new_extended_feature_name_comma (a_name: detachable ET_EXTENDED_FEATURE_NAME; a_comma: detachable ET_SYMBOL): detachable ET_EXTENDED_FEATURE_NAME
2207 -- New extended_feature_name-comma
2208 do
2209 Result := a_name
2210 end
2211
2212 new_external_alias (a_keyword: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_EXTERNAL_ALIAS
2213 -- New external alias
2214 do
2215 Result := a_string
2216 end
2217
2218 new_external_function (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
2219 a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER;
2220 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST;
2221 an_obsolete: detachable ET_OBSOLETE; a_preconditions: detachable ET_PRECONDITIONS;
2222 a_language: detachable ET_EXTERNAL_LANGUAGE;
2223 an_alias: detachable ET_EXTERNAL_ALIAS; a_postconditions: detachable ET_POSTCONDITIONS;
2224 an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
2225 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_EXTERNAL_FUNCTION
2226 -- New external function
2227 do
2228 if a_name /= Void and a_type /= Void and a_language /= Void and a_clients /= Void and a_class /= Void then
2229 create Result.make (a_name, args, a_type, a_language, a_class)
2230 if an_is = tokens.is_keyword then
2231 Result.set_is_keyword (an_is)
2232 end
2233 Result.set_assigner (an_assigner)
2234 Result.set_obsolete_message (an_obsolete)
2235 Result.set_preconditions (a_preconditions)
2236 Result.set_postconditions (a_postconditions)
2237 Result.set_alias_clause (an_alias)
2238 Result.set_clients (a_clients)
2239 Result.set_first_indexing (a_first_indexing)
2240 end
2241 end
2242
2243 new_external_function_inline_agent (an_agent: detachable ET_AGENT_KEYWORD;
2244 a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST; a_type: detachable ET_DECLARED_TYPE;
2245 a_preconditions: detachable ET_PRECONDITIONS; a_language: detachable ET_EXTERNAL_LANGUAGE;
2246 an_alias: detachable ET_EXTERNAL_ALIAS; a_postconditions: detachable ET_POSTCONDITIONS;
2247 an_end: detachable ET_KEYWORD;
2248 an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_EXTERNAL_FUNCTION_INLINE_AGENT
2249 -- New inline agent whose associated feature is an external function
2250 do
2251 if a_type /= Void and a_language /= Void then
2252 create Result.make (a_formal_args, a_type, a_language, an_actual_args)
2253 if an_agent /= Void then
2254 Result.set_agent_keyword (an_agent)
2255 end
2256 Result.set_preconditions (a_preconditions)
2257 Result.set_alias_clause (an_alias)
2258 Result.set_postconditions (a_postconditions)
2259 end
2260 end
2261
2262 new_external_language (a_keyword: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_EXTERNAL_LANGUAGE
2263 -- New external language
2264 do
2265 Result := a_string
2266 end
2267
2268 new_external_procedure (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
2269 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST; an_obsolete: detachable ET_OBSOLETE;
2270 a_preconditions: detachable ET_PRECONDITIONS; a_language: detachable ET_EXTERNAL_LANGUAGE; an_alias: detachable ET_EXTERNAL_ALIAS;
2271 a_postconditions: detachable ET_POSTCONDITIONS; an_end: detachable ET_KEYWORD;
2272 a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
2273 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_EXTERNAL_PROCEDURE
2274 -- New external procedure
2275 do
2276 if a_name /= Void and a_language /= Void and a_clients /= Void and a_class /= Void then
2277 create Result.make (a_name, args, a_language, a_class)
2278 if an_is = tokens.is_keyword then
2279 Result.set_is_keyword (an_is)
2280 end
2281 Result.set_obsolete_message (an_obsolete)
2282 Result.set_preconditions (a_preconditions)
2283 Result.set_postconditions (a_postconditions)
2284 Result.set_alias_clause (an_alias)
2285 Result.set_clients (a_clients)
2286 Result.set_first_indexing (a_first_indexing)
2287 end
2288 end
2289
2290 new_external_procedure_inline_agent (an_agent: detachable ET_AGENT_KEYWORD; a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST;
2291 a_preconditions: detachable ET_PRECONDITIONS; a_language: detachable ET_EXTERNAL_LANGUAGE;
2292 an_alias: detachable ET_EXTERNAL_ALIAS; a_postconditions: detachable ET_POSTCONDITIONS;
2293 an_end: detachable ET_KEYWORD; an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_EXTERNAL_PROCEDURE_INLINE_AGENT
2294 -- New inline agent whose associated feature is an external procedure
2295 do
2296 if a_language /= Void then
2297 create Result.make (a_formal_args, a_language, an_actual_args)
2298 if an_agent /= Void then
2299 Result.set_agent_keyword (an_agent)
2300 end
2301 Result.set_preconditions (a_preconditions)
2302 Result.set_alias_clause (an_alias)
2303 Result.set_postconditions (a_postconditions)
2304 end
2305 end
2306
2307 new_feature_address (d: detachable ET_SYMBOL; a_name: detachable ET_FEATURE_NAME): detachable ET_FEATURE_ADDRESS
2308 -- New feature address
2309 do
2310 if a_name /= Void then
2311 create Result.make (a_name)
2312 if d /= Void and then not d.position.is_null then
2313 Result.set_dollar (d)
2314 end
2315 end
2316 end
2317
2318 new_feature_clause (a_feature: detachable ET_KEYWORD; a_clients: detachable ET_CLIENT_LIST): detachable ET_FEATURE_CLAUSE
2319 -- New fetaure clause
2320 do
2321 if a_clients /= Void then
2322 create Result.make (a_clients)
2323 end
2324 end
2325
2326 new_feature_clauses (nb: INTEGER): detachable ET_FEATURE_CLAUSE_LIST
2327 -- New feature clauses with given capacity
2328 require
2329 nb_positive: nb >= 0
2330 do
2331 create Result.make_with_capacity (nb)
2332 end
2333
2334 new_feature_export (a_clients: detachable ET_CLIENTS; nb: INTEGER): detachable ET_FEATURE_EXPORT
2335 -- New feature export clause with given capacity
2336 require
2337 nb_positive: nb >= 0
2338 do
2339 if a_clients /= Void then
2340 create Result.make_with_capacity (a_clients, nb)
2341 end
2342 end
2343
2344 new_feature_name_comma (a_name: detachable ET_FEATURE_NAME; a_comma: detachable ET_SYMBOL): detachable ET_FEATURE_NAME_ITEM
2345 -- New feature_name-comma
2346 do
2347 Result := a_name
2348 end
2349
2350 new_formal_argument (a_name: detachable ET_ARGUMENT_NAME; a_type: detachable ET_DECLARED_TYPE): detachable ET_FORMAL_ARGUMENT
2351 -- New formal argument
2352 do
2353 if a_name /= Void and a_type /= Void then
2354 create Result.make (a_name, a_type)
2355 end
2356 end
2357
2358 new_formal_argument_semicolon (an_argument: detachable ET_FORMAL_ARGUMENT; a_semicolon: detachable ET_SYMBOL): detachable ET_FORMAL_ARGUMENT_ITEM
2359 -- New formal_argument-semicolon
2360 do
2361 Result := an_argument
2362 end
2363
2364 new_formal_arguments (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_FORMAL_ARGUMENT_LIST
2365 -- New formal argument list with given capacity
2366 require
2367 nb_positive: nb >= 0
2368 do
2369 create Result.make_with_capacity (nb)
2370 end
2371
2372 new_formal_comma_argument (a_name: detachable ET_ARGUMENT_NAME; a_type: detachable ET_DECLARED_TYPE): detachable ET_FORMAL_ARGUMENT
2373 -- New formal agument whose name is followed by a comma
2374 do
2375 if a_name /= Void and a_type /= Void then
2376 create {ET_FORMAL_COMMA_ARGUMENT} Result.make (a_name, a_type)
2377 end
2378 end
2379
2380 new_formal_parameter (a_type_mark: detachable ET_KEYWORD; a_name: detachable ET_IDENTIFIER;
2381 a_class: detachable ET_CLASS): detachable ET_FORMAL_PARAMETER
2382 -- New formal generic parameter
2383 do
2384 if a_name /= Void and a_class /= Void then
2385 create Result.make (a_name, a_class)
2386 if a_type_mark /= Void then
2387 Result.set_type_mark (a_type_mark)
2388 end
2389 end
2390 end
2391
2392 new_formal_parameter_comma (a_formal: detachable ET_FORMAL_PARAMETER; a_comma: detachable ET_SYMBOL): detachable ET_FORMAL_PARAMETER_ITEM
2393 -- New formal_parameter-comma
2394 do
2395 Result := a_formal
2396 end
2397
2398 new_formal_parameter_type (a_type_mark: detachable ET_TYPE_MARK; a_name: detachable ET_IDENTIFIER;
2399 an_index: detachable INTEGER; a_class: detachable ET_CLASS): detachable ET_FORMAL_PARAMETER_TYPE
2400 -- New formal generic parameter type
2401 do
2402 if a_name /= Void and then an_index >= 1 and then a_class /= Void then
2403 create Result.make (a_type_mark, a_name, an_index, a_class)
2404 end
2405 end
2406
2407 new_formal_parameters (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_FORMAL_PARAMETER_LIST
2408 -- New formal generic parameter list with given capacity
2409 require
2410 nb_positive: nb >= 0
2411 do
2412 create Result.make_with_capacity (nb)
2413 if a_left /= Void and then not a_left.position.is_null then
2414 Result.set_left_bracket (a_left)
2415 end
2416 end
2417
2418 new_from_compound (a_from: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
2419 -- New compound preceded by a 'from' keyword
2420 do
2421 if a_from /= Void and then not a_from.position.is_null then
2422 if a_compound /= Void then
2423 Result := a_compound
2424 else
2425 create Result.make
2426 end
2427 Result.set_keyword (a_from)
2428 elseif a_compound /= Void then
2429 Result := a_compound
2430 Result.set_keyword (tokens.from_keyword)
2431 end
2432 end
2433
2434 new_generic_class_type (a_type_mark: detachable ET_TYPE_MARK; a_name: detachable ET_IDENTIFIER;
2435 a_generics: like new_actual_parameters; a_base_class: detachable ET_NAMED_CLASS): detachable ET_CLASS_TYPE
2436 -- New Eiffel generic class type
2437 do
2438 if a_name /= Void and a_generics /= Void and a_base_class /= Void then
2439 create Result.make_generic (a_type_mark, a_name, a_generics, a_base_class)
2440 end
2441 end
2442
2443 new_if_instruction (a_conditional: detachable ET_CONDITIONAL; a_then_compound: detachable ET_COMPOUND;
2444 an_elseif_parts: detachable ET_ELSEIF_PART_LIST; an_else_compound: detachable ET_COMPOUND;
2445 an_end: detachable ET_KEYWORD): detachable ET_IF_INSTRUCTION
2446 -- New if instruction
2447 do
2448 if a_conditional /= Void then
2449 create Result.make (a_conditional, a_then_compound)
2450 Result.set_elseif_parts (an_elseif_parts)
2451 Result.set_else_compound (an_else_compound)
2452 end
2453 end
2454
2455 new_indexing (a_terms: detachable ET_INDEXING_TERM_LIST): detachable ET_INDEXING
2456 -- New indexing clause
2457 do
2458 -- Do nothing.
2459 end
2460
2461 new_indexing_semicolon (an_indexing: detachable ET_INDEXING_ITEM; a_semicolon: detachable ET_SYMBOL): detachable ET_INDEXING_ITEM
2462 -- New indexing-semicolon
2463 do
2464 Result := an_indexing
2465 end
2466
2467 new_indexing_term_comma (a_term: detachable ET_INDEXING_TERM; a_comma: detachable ET_SYMBOL): detachable ET_INDEXING_TERM_ITEM
2468 -- New indexing_term-comma
2469 do
2470 Result := a_term
2471 end
2472
2473 new_indexing_terms (nb: INTEGER): detachable ET_INDEXING_TERM_LIST
2474 -- New indexing terms with given capacity
2475 require
2476 nb_positive: nb >= 0
2477 do
2478 -- Do nothing.
2479 end
2480
2481 new_indexings (an_indexing: detachable ET_KEYWORD; nb: INTEGER): detachable ET_INDEXING_LIST
2482 -- New indexing clause with given capacity
2483 require
2484 nb_positive: nb >= 0
2485 do
2486 -- Do nothing.
2487 end
2488
2489 new_infix_and_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2490 -- New infix "and" feature name
2491 do
2492 if an_operator /= Void then
2493 create Result.make_and (an_operator)
2494 if an_infix /= Void and then not an_infix.position.is_null then
2495 Result.set_infix_keyword (an_infix)
2496 end
2497 end
2498 end
2499
2500 new_infix_and_then_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2501 -- New infix "and then" feature name
2502 do
2503 if an_operator /= Void then
2504 create Result.make_and_then (an_operator)
2505 if an_infix /= Void and then not an_infix.position.is_null then
2506 Result.set_infix_keyword (an_infix)
2507 end
2508 end
2509 end
2510
2511 new_infix_and_then_operator (an_and: detachable ET_KEYWORD; a_then: detachable ET_KEYWORD): detachable ET_INFIX_AND_THEN_OPERATOR
2512 -- New binary "and then" operator
2513 do
2514 create Result.make
2515 if an_and /= Void and then not an_and.position.is_null then
2516 Result.set_and_keyword (an_and)
2517 end
2518 end
2519
2520 new_infix_div_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2521 -- New infix "//" feature name
2522 do
2523 if an_operator /= Void then
2524 create Result.make_div (an_operator)
2525 if an_infix /= Void and then not an_infix.position.is_null then
2526 Result.set_infix_keyword (an_infix)
2527 end
2528 end
2529 end
2530
2531 new_infix_divide_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2532 -- New infix "//" feature name
2533 do
2534 if an_operator /= Void then
2535 create Result.make_divide (an_operator)
2536 if an_infix /= Void and then not an_infix.position.is_null then
2537 Result.set_infix_keyword (an_infix)
2538 end
2539 end
2540 end
2541
2542 new_infix_expression (l: detachable ET_EXPRESSION; a_name: detachable ET_OPERATOR; r: detachable ET_EXPRESSION): detachable ET_INFIX_EXPRESSION
2543 -- New infix expression
2544 do
2545 if l /= Void and r /= Void and a_name /= Void then
2546 create Result.make (l, a_name, r)
2547 end
2548 end
2549
2550 new_infix_free_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_FREE_NAME
2551 -- New infix free feature name
2552 require
2553 an_operator_computed: an_operator /= Void implies an_operator.value.count > 0
2554 do
2555 if an_operator /= Void then
2556 create Result.make (an_operator)
2557 if an_infix /= Void and then not an_infix.position.is_null then
2558 Result.set_infix_keyword (an_infix)
2559 end
2560 end
2561 end
2562
2563 new_infix_free_operator (an_operator: detachable ET_FREE_OPERATOR): detachable ET_FREE_OPERATOR
2564 -- New infix "<free-operator>" operator
2565 do
2566 if an_operator /= Void then
2567 Result := an_operator
2568 Result.set_infix
2569 end
2570 end
2571
2572 new_infix_ge_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2573 -- New infix ">=" feature name
2574 do
2575 if an_operator /= Void then
2576 create Result.make_ge (an_operator)
2577 if an_infix /= Void and then not an_infix.position.is_null then
2578 Result.set_infix_keyword (an_infix)
2579 end
2580 end
2581 end
2582
2583 new_infix_gt_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2584 -- New infix ">" feature name
2585 do
2586 if an_operator /= Void then
2587 create Result.make_gt (an_operator)
2588 if an_infix /= Void and then not an_infix.position.is_null then
2589 Result.set_infix_keyword (an_infix)
2590 end
2591 end
2592 end
2593
2594 new_infix_implies_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2595 -- New infix "implies" feature name
2596 do
2597 if an_operator /= Void then
2598 create Result.make_implies (an_operator)
2599 if an_infix /= Void and then not an_infix.position.is_null then
2600 Result.set_infix_keyword (an_infix)
2601 end
2602 end
2603 end
2604
2605 new_infix_le_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2606 -- New infix "<=" feature name
2607 do
2608 if an_operator /= Void then
2609 create Result.make_le (an_operator)
2610 if an_infix /= Void and then not an_infix.position.is_null then
2611 Result.set_infix_keyword (an_infix)
2612 end
2613 end
2614 end
2615
2616 new_infix_lt_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2617 -- New infix "<" feature name
2618 do
2619 if an_operator /= Void then
2620 create Result.make_lt (an_operator)
2621 if an_infix /= Void and then not an_infix.position.is_null then
2622 Result.set_infix_keyword (an_infix)
2623 end
2624 end
2625 end
2626
2627 new_infix_minus_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2628 -- New infix "-" feature name
2629 do
2630 if an_operator /= Void then
2631 create Result.make_minus (an_operator)
2632 if an_infix /= Void and then not an_infix.position.is_null then
2633 Result.set_infix_keyword (an_infix)
2634 end
2635 end
2636 end
2637
2638 new_infix_minus_operator (an_operator: detachable ET_SYMBOL_OPERATOR): detachable ET_SYMBOL_OPERATOR
2639 -- New infix "-" operator
2640 do
2641 if an_operator /= Void then
2642 Result := an_operator
2643 Result.set_infix_minus
2644 end
2645 end
2646
2647 new_infix_mod_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2648 -- New infix "\\" feature name
2649 do
2650 if an_operator /= Void then
2651 create Result.make_mod (an_operator)
2652 if an_infix /= Void and then not an_infix.position.is_null then
2653 Result.set_infix_keyword (an_infix)
2654 end
2655 end
2656 end
2657
2658 new_infix_or_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2659 -- New infix "or" feature name
2660 do
2661 if an_operator /= Void then
2662 create Result.make_or (an_operator)
2663 if an_infix /= Void and then not an_infix.position.is_null then
2664 Result.set_infix_keyword (an_infix)
2665 end
2666 end
2667 end
2668
2669 new_infix_or_else_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2670 -- New infix "or else" feature name
2671 do
2672 if an_operator /= Void then
2673 create Result.make_or_else (an_operator)
2674 if an_infix /= Void and then not an_infix.position.is_null then
2675 Result.set_infix_keyword (an_infix)
2676 end
2677 end
2678 end
2679
2680 new_infix_or_else_operator (an_or: detachable ET_KEYWORD; an_else: detachable ET_KEYWORD): detachable ET_INFIX_OR_ELSE_OPERATOR
2681 -- New binary "or else" operator
2682 do
2683 create Result.make
2684 if an_or /= Void and then not an_or.position.is_null then
2685 Result.set_or_keyword (an_or)
2686 end
2687 end
2688
2689 new_infix_plus_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2690 -- New infix "+" feature name
2691 do
2692 if an_operator /= Void then
2693 create Result.make_plus (an_operator)
2694 if an_infix /= Void and then not an_infix.position.is_null then
2695 Result.set_infix_keyword (an_infix)
2696 end
2697 end
2698 end
2699
2700 new_infix_plus_operator (an_operator: detachable ET_SYMBOL_OPERATOR): detachable ET_SYMBOL_OPERATOR
2701 -- New infix "+" operator
2702 do
2703 if an_operator /= Void then
2704 Result := an_operator
2705 Result.set_infix_plus
2706 end
2707 end
2708
2709 new_infix_power_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2710 -- New infix "^" feature name
2711 do
2712 if an_operator /= Void then
2713 create Result.make_power (an_operator)
2714 if an_infix /= Void and then not an_infix.position.is_null then
2715 Result.set_infix_keyword (an_infix)
2716 end
2717 end
2718 end
2719
2720 new_infix_times_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2721 -- New infix "*" feature name
2722 do
2723 if an_operator /= Void then
2724 create Result.make_times (an_operator)
2725 if an_infix /= Void and then not an_infix.position.is_null then
2726 Result.set_infix_keyword (an_infix)
2727 end
2728 end
2729 end
2730
2731 new_infix_xor_name (an_infix: detachable ET_KEYWORD; an_operator: detachable ET_MANIFEST_STRING): detachable ET_INFIX_NAME
2732 -- New infix "xor" feature name
2733 do
2734 if an_operator /= Void then
2735 create Result.make_xor (an_operator)
2736 if an_infix /= Void and then not an_infix.position.is_null then
2737 Result.set_infix_keyword (an_infix)
2738 end
2739 end
2740 end
2741
2742 new_inspect_instruction (a_conditional: detachable ET_CONDITIONAL; a_when_parts: detachable ET_WHEN_PART_LIST;
2743 an_else_compound: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD): detachable ET_INSPECT_INSTRUCTION
2744 -- New inspect instruction
2745 do
2746 if a_conditional /= Void then
2747 create Result.make (a_conditional, a_when_parts)
2748 Result.set_else_compound (an_else_compound)
2749 end
2750 end
2751
2752 new_invariants (an_invariant: detachable ET_KEYWORD; a_class: detachable ET_CLASS; nb: INTEGER): detachable ET_INVARIANTS
2753 -- New class invariants with given capacity
2754 require
2755 nb_positive: nb >= 0
2756 do
2757 if a_class /= Void then
2758 create Result.make_with_capacity (a_class, nb)
2759 if an_invariant /= Void and then not an_invariant.position.is_null then
2760 Result.set_invariant_keyword (an_invariant)
2761 end
2762 end
2763 end
2764
2765 new_keyword_feature_name_list (a_keyword: detachable ET_KEYWORD; nb: INTEGER): detachable ET_KEYWORD_FEATURE_NAME_LIST
2766 -- New feature name list, with a given capacity, preceded by a keyword
2767 require
2768 nb_positive: nb >= 0
2769 do
2770 create Result.make_with_capacity (nb)
2771 end
2772
2773 new_label_comma (a_label: detachable ET_IDENTIFIER; a_comma: detachable ET_SYMBOL): detachable ET_LABEL
2774 -- New label-comma
2775 do
2776 Result := a_label
2777 end
2778
2779 new_labeled_actual_parameter (a_label: detachable ET_LABEL; a_type: detachable ET_DECLARED_TYPE): detachable ET_LABELED_ACTUAL_PARAMETER
2780 -- New labeled actual parameter
2781 do
2782 if a_label /= Void and a_type /= Void then
2783 create Result.make (a_label, a_type)
2784 end
2785 end
2786
2787 new_labeled_actual_parameter_semicolon (a_parameter: detachable ET_LABELED_ACTUAL_PARAMETER;
2788 a_semicolon: detachable ET_SYMBOL): detachable ET_ACTUAL_PARAMETER_ITEM
2789 -- New labeled_actual_parameter-semicolon
2790 do
2791 Result := a_parameter
2792 end
2793
2794 new_labeled_comma_actual_parameter (a_label: detachable ET_LABEL; a_type: detachable ET_DECLARED_TYPE): detachable ET_LABELED_ACTUAL_PARAMETER
2795 -- New labeled actual parameter whose label is followed by a comma
2796 do
2797 if a_label /= Void and a_type /= Void then
2798 create {ET_LABELED_COMMA_ACTUAL_PARAMETER} Result.make (a_label, a_type)
2799 end
2800 end
2801
2802 new_like_current (a_type_mark: detachable ET_TYPE_MARK; a_like: detachable ET_KEYWORD;
2803 a_current: detachable ET_CURRENT): detachable ET_LIKE_CURRENT
2804 -- New 'like Current' type
2805 do
2806 create Result.make (a_type_mark)
2807 if a_like /= Void and then not a_like.position.is_null then
2808 Result.set_like_keyword (a_like)
2809 end
2810 end
2811
2812 new_like_feature (a_type_mark: detachable ET_TYPE_MARK; a_like: detachable ET_KEYWORD;
2813 a_name: detachable ET_FEATURE_NAME): detachable ET_LIKE_FEATURE
2814 -- New 'like name' type
2815 do
2816 if a_name /= Void then
2817 create Result.make (a_type_mark, a_name)
2818 if a_like /= Void and then not a_like.position.is_null then
2819 Result.set_like_keyword (a_like)
2820 end
2821 end
2822 end
2823
2824 new_local_comma_variable (a_name: detachable ET_LOCAL_NAME; a_type: detachable ET_DECLARED_TYPE): detachable ET_LOCAL_VARIABLE
2825 -- New local variable whose name is followed by a comma
2826 do
2827 if a_name /= Void and a_type /= Void then
2828 create {ET_LOCAL_COMMA_VARIABLE} Result.make (a_name, a_type)
2829 end
2830 end
2831
2832 new_local_name_comma (a_name: detachable ET_IDENTIFIER; a_comma: detachable ET_SYMBOL): detachable ET_LOCAL_NAME
2833 -- New local_name-comma
2834 do
2835 Result := a_name
2836 end
2837
2838 new_local_variable (a_name: detachable ET_LOCAL_NAME; a_type: detachable ET_DECLARED_TYPE): detachable ET_LOCAL_VARIABLE
2839 -- New local variable
2840 do
2841 if a_name /= Void and a_type /= Void then
2842 create Result.make (a_name, a_type)
2843 end
2844 end
2845
2846 new_local_variable_semicolon (a_variable: detachable ET_LOCAL_VARIABLE; a_semicolon: detachable ET_SYMBOL): detachable ET_LOCAL_VARIABLE_ITEM
2847 -- New local_variable-semicolon
2848 do
2849 Result := a_variable
2850 end
2851
2852 new_local_variables (a_local: detachable ET_KEYWORD; nb: INTEGER): detachable ET_LOCAL_VARIABLE_LIST
2853 -- New local variable list with given capacity
2854 require
2855 nb_positive: nb >= 0
2856 do
2857 create Result.make_with_capacity (nb)
2858 if a_local /= Void and nb = 0 then
2859 Result.set_local_keyword (a_local)
2860 end
2861 end
2862
2863 new_loop_compound (a_loop: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
2864 -- New compound preceded by a 'loop' keyword
2865 do
2866 if a_compound /= Void then
2867 Result := a_compound
2868 Result.set_keyword (tokens.loop_keyword)
2869 end
2870 end
2871
2872 new_loop_instruction (a_from_compound: detachable ET_COMPOUND; an_invariant: detachable ET_LOOP_INVARIANTS;
2873 an_until_conditional: detachable ET_CONDITIONAL; a_loop_compound: detachable ET_COMPOUND;
2874 a_variant: detachable ET_VARIANT; an_end: detachable ET_KEYWORD): detachable ET_LOOP_INSTRUCTION
2875 -- New loop instruction
2876 do
2877 if an_until_conditional /= Void then
2878 create Result.make (a_from_compound, an_until_conditional, a_loop_compound)
2879 Result.set_invariant_part (an_invariant)
2880 Result.set_variant_part (a_variant)
2881 Result.set_has_old_variant_syntax (False)
2882 end
2883 end
2884
2885 new_loop_instruction_old_syntax (a_from_compound: detachable ET_COMPOUND; an_invariant: detachable ET_LOOP_INVARIANTS;
2886 a_variant: detachable ET_VARIANT; an_until_conditional: detachable ET_CONDITIONAL;
2887 a_loop_compound: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD): detachable ET_LOOP_INSTRUCTION
2888 -- New loop instruction with the old syntax where the variant
2889 -- clause appears after the invariant clause
2890 do
2891 if an_until_conditional /= Void then
2892 create Result.make (a_from_compound, an_until_conditional, a_loop_compound)
2893 Result.set_invariant_part (an_invariant)
2894 Result.set_variant_part (a_variant)
2895 Result.set_has_old_variant_syntax (True)
2896 end
2897 end
2898
2899 new_loop_invariants (an_invariant: detachable ET_KEYWORD; nb: INTEGER): detachable ET_LOOP_INVARIANTS
2900 -- New loop invariants with given capacity
2901 require
2902 nb_positive: nb >= 0
2903 do
2904 create Result.make_with_capacity (nb)
2905 if an_invariant /= Void and then not an_invariant.position.is_null then
2906 Result.set_invariant_keyword (an_invariant)
2907 end
2908 end
2909
2910 new_manifest_array (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_MANIFEST_ARRAY
2911 -- New manifest array with given capacity
2912 require
2913 nb_positive: nb >= 0
2914 do
2915 create Result.make_with_capacity (nb)
2916 if a_left /= Void and then not a_left.position.is_null then
2917 Result.set_left_symbol (a_left)
2918 end
2919 end
2920
2921 new_manifest_string_comma (a_string: detachable ET_MANIFEST_STRING; a_comma: detachable ET_SYMBOL): detachable ET_MANIFEST_STRING_ITEM
2922 -- New manifest_string-comma
2923 do
2924 Result := a_string
2925 end
2926
2927 new_manifest_string_list (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_MANIFEST_STRING_LIST
2928 -- New list of manifest strings with capacity `nb'.
2929 require
2930 nb_positive: nb >= 0
2931 do
2932 if nb > 0 then
2933 create Result.make_with_capacity (nb)
2934 end
2935 end
2936
2937 new_manifest_tuple (a_left, a_right: detachable ET_SYMBOL; nb: INTEGER): detachable ET_MANIFEST_TUPLE
2938 -- New manifest tuple with given capacity
2939 require
2940 nb_positive: nb >= 0
2941 do
2942 create Result.make_with_capacity (nb)
2943 if a_left /= Void and then not a_left.position.is_null then
2944 Result.set_left_symbol (a_left)
2945 end
2946 end
2947
2948 new_manifest_type (l: detachable ET_SYMBOL; a_type: detachable ET_TYPE; r: detachable ET_SYMBOL): detachable ET_MANIFEST_TYPE
2949 -- New manifest type
2950 do
2951 if a_type /= Void then
2952 create Result.make (a_type)
2953 end
2954 end
2955
2956 new_named_object_test (a_attached: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
2957 a_expression: detachable ET_EXPRESSION; a_as: detachable ET_KEYWORD;
2958 a_name: detachable ET_IDENTIFIER): detachable ET_NAMED_OBJECT_TEST
2959 -- New named object-test expression
2960 do
2961 if a_name /= Void and a_expression /= Void then
2962 create Result.make (a_type, a_expression, a_name)
2963 if a_attached /= Void and then not a_attached.position.is_null then
2964 Result.set_attached_keyword (a_attached)
2965 end
2966 end
2967 end
2968
2969 new_none_clients (a_left, a_right: detachable ET_SYMBOL): detachable ET_CLIENTS
2970 -- Client list of the form {}
2971 do
2972 create Result.make
2973 if a_left /= Void and then not a_left.position.is_null then
2974 Result.set_left_brace (a_left)
2975 end
2976 end
2977
2978 new_null_export (a_semicolon: detachable ET_SEMICOLON_SYMBOL): detachable ET_NULL_EXPORT
2979 -- New null export
2980 do
2981 -- Result := Void
2982 end
2983
2984 new_null_instruction (a_semicolon: detachable ET_SEMICOLON_SYMBOL): detachable ET_NULL_INSTRUCTION
2985 -- New null instruction
2986 do
2987 -- Result := Void
2988 end
2989
2990 new_object_equality_expression (l: detachable ET_EXPRESSION; an_op: detachable ET_SYMBOL;
2991 r: detachable ET_EXPRESSION): detachable ET_OBJECT_EQUALITY_EXPRESSION
2992 -- New object equality expression
2993 do
2994 if l /= Void and an_op /= Void and r /= Void then
2995 create Result.make (l, an_op, r)
2996 end
2997 end
2998
2999 new_object_test (a_attached: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
3000 a_expression: detachable ET_EXPRESSION): detachable ET_OBJECT_TEST
3001 -- New object-test expression
3002 do
3003 if a_expression /= Void then
3004 create Result.make (a_type, a_expression)
3005 if a_attached /= Void and then not a_attached.position.is_null then
3006 Result.set_attached_keyword (a_attached)
3007 end
3008 end
3009 end
3010
3011 new_obsolete_message (an_obsolete: detachable ET_KEYWORD;
3012 a_message: detachable ET_MANIFEST_STRING): detachable ET_OBSOLETE
3013 -- New obsolete clause
3014 do
3015 Result := a_message
3016 end
3017
3018 new_old_expression (an_old: detachable ET_KEYWORD; e: detachable ET_EXPRESSION): detachable ET_OLD_EXPRESSION
3019 -- New old expression
3020 do
3021 if e /= Void then
3022 create Result.make (e)
3023 if an_old /= Void and then not an_old.position.is_null then
3024 Result.set_old_keyword (an_old)
3025 end
3026 end
3027 end
3028
3029 new_old_object_test (a_left_brace: detachable ET_SYMBOL; a_name: detachable ET_IDENTIFIER;
3030 a_colon: detachable ET_SYMBOL; a_type: detachable ET_TYPE; a_right_brace: detachable ET_SYMBOL;
3031 a_expression: detachable ET_EXPRESSION): detachable ET_OLD_OBJECT_TEST
3032 -- New object-test expression
3033 do
3034 if a_name /= Void and a_type /= Void and a_expression /= Void then
3035 create Result.make (a_name, a_type, a_expression)
3036 if a_left_brace /= Void and then not a_left_brace.position.is_null then
3037 Result.set_left_brace (a_left_brace)
3038 end
3039 end
3040 end
3041
3042 new_once_compound (a_once: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
3043 -- New compound preceded by a 'once' keyword
3044 do
3045 if a_compound /= Void then
3046 Result := a_compound
3047 Result.set_keyword (tokens.once_keyword)
3048 end
3049 end
3050
3051 new_once_function (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
3052 a_type: detachable ET_DECLARED_TYPE; an_assigner: detachable ET_ASSIGNER;
3053 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST;
3054 an_obsolete: detachable ET_OBSOLETE; a_preconditions: detachable ET_PRECONDITIONS;
3055 a_locals: detachable ET_LOCAL_VARIABLE_LIST; a_keys: detachable ET_MANIFEST_STRING_LIST;
3056 a_compound: detachable ET_COMPOUND; a_postconditions: detachable ET_POSTCONDITIONS;
3057 a_rescue: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD;
3058 a_semicolon: detachable ET_SEMICOLON_SYMBOL; a_clients: detachable ET_CLIENT_LIST;
3059 a_feature_clause: detachable ET_FEATURE_CLAUSE; a_class: detachable ET_CLASS): detachable ET_ONCE_FUNCTION
3060 -- New once function
3061 do
3062 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
3063 create Result.make (a_name, args, a_type, a_class)
3064 if an_is = tokens.is_keyword then
3065 Result.set_is_keyword (an_is)
3066 end
3067 Result.set_assigner (an_assigner)
3068 Result.set_obsolete_message (an_obsolete)
3069 Result.set_preconditions (a_preconditions)
3070 Result.set_locals (a_locals)
3071 Result.set_keys (a_keys)
3072 Result.set_compound (a_compound)
3073 Result.set_postconditions (a_postconditions)
3074 Result.set_rescue_clause (a_rescue)
3075 Result.set_clients (a_clients)
3076 Result.set_first_indexing (a_first_indexing)
3077 end
3078 end
3079
3080 new_once_function_inline_agent (an_agent: detachable ET_AGENT_KEYWORD;
3081 a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST; a_type: detachable ET_DECLARED_TYPE;
3082 a_preconditions: detachable ET_PRECONDITIONS; a_locals: detachable ET_LOCAL_VARIABLE_LIST;
3083 a_keys: detachable ET_MANIFEST_STRING_LIST; a_compound: detachable ET_COMPOUND;
3084 a_postconditions: detachable ET_POSTCONDITIONS; a_rescue: detachable ET_COMPOUND;
3085 an_end: detachable ET_KEYWORD;
3086 an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_ONCE_FUNCTION_INLINE_AGENT
3087 -- New inline agent whose associated feature is a once function
3088 do
3089 if a_type /= Void then
3090 create Result.make (a_formal_args, a_type, an_actual_args)
3091 if an_agent /= Void then
3092 Result.set_agent_keyword (an_agent)
3093 end
3094 Result.set_preconditions (a_preconditions)
3095 Result.set_locals (a_locals)
3096 Result.set_keys (a_keys)
3097 Result.set_compound (a_compound)
3098 Result.set_postconditions (a_postconditions)
3099 Result.set_rescue_clause (a_rescue)
3100 end
3101 end
3102
3103 new_once_manifest_string (a_once: detachable ET_KEYWORD; a_string: detachable ET_MANIFEST_STRING): detachable ET_ONCE_MANIFEST_STRING
3104 -- New once manifest string
3105 do
3106 if a_string /= Void then
3107 create Result.make (a_string)
3108 if a_once /= Void and then not a_once.position.is_null then
3109 Result.set_once_keyword (a_once)
3110 end
3111 end
3112 end
3113
3114 new_once_procedure (a_name: detachable ET_EXTENDED_FEATURE_NAME; args: detachable ET_FORMAL_ARGUMENT_LIST;
3115 an_is: detachable ET_KEYWORD; a_first_indexing: detachable ET_INDEXING_LIST;
3116 an_obsolete: detachable ET_OBSOLETE; a_preconditions: detachable ET_PRECONDITIONS;
3117 a_locals: detachable ET_LOCAL_VARIABLE_LIST; a_keys: detachable ET_MANIFEST_STRING_LIST;
3118 a_compound: detachable ET_COMPOUND;
3119 a_postconditions: detachable ET_POSTCONDITIONS; a_rescue: detachable ET_COMPOUND;
3120 an_end: detachable ET_KEYWORD; a_semicolon: detachable ET_SEMICOLON_SYMBOL;
3121 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE;
3122 a_class: detachable ET_CLASS): detachable ET_ONCE_PROCEDURE
3123 -- New once procedure
3124 do
3125 if a_name /= Void and a_clients /= Void and a_class /= Void then
3126 create Result.make (a_name, args, a_class)
3127 if an_is = tokens.is_keyword then
3128 Result.set_is_keyword (an_is)
3129 end
3130 Result.set_obsolete_message (an_obsolete)
3131 Result.set_preconditions (a_preconditions)
3132 Result.set_locals (a_locals)
3133 Result.set_keys (a_keys)
3134 Result.set_compound (a_compound)
3135 Result.set_postconditions (a_postconditions)
3136 Result.set_rescue_clause (a_rescue)
3137 Result.set_clients (a_clients)
3138 Result.set_first_indexing (a_first_indexing)
3139 end
3140 end
3141
3142 new_once_procedure_inline_agent (an_agent: detachable ET_AGENT_KEYWORD;
3143 a_formal_args: detachable ET_FORMAL_ARGUMENT_LIST; a_preconditions: detachable ET_PRECONDITIONS;
3144 a_locals: detachable ET_LOCAL_VARIABLE_LIST; a_keys: detachable ET_MANIFEST_STRING_LIST;
3145 a_compound: detachable ET_COMPOUND; a_postconditions: detachable ET_POSTCONDITIONS;
3146 a_rescue: detachable ET_COMPOUND; an_end: detachable ET_KEYWORD;
3147 an_actual_args: detachable ET_AGENT_ARGUMENT_OPERAND_LIST): detachable ET_ONCE_PROCEDURE_INLINE_AGENT
3148 -- New inline agent whose associated feature is a once procedure
3149 do
3150 create Result.make (a_formal_args, an_actual_args)
3151 if an_agent /= Void then
3152 Result.set_agent_keyword (an_agent)
3153 end
3154 Result.set_preconditions (a_preconditions)
3155 Result.set_locals (a_locals)
3156 Result.set_keys (a_keys)
3157 Result.set_compound (a_compound)
3158 Result.set_postconditions (a_postconditions)
3159 Result.set_rescue_clause (a_rescue)
3160 end
3161
3162 new_parent (a_type: detachable ET_CLASS_TYPE; a_renames: detachable ET_RENAME_LIST; an_exports: detachable ET_EXPORT_LIST;
3163 an_undefines, a_redefines, a_selects: detachable ET_KEYWORD_FEATURE_NAME_LIST; an_end: detachable ET_KEYWORD): detachable ET_PARENT
3164 -- New parent
3165 do
3166 if a_type /= Void then
3167 create Result.make (a_type, a_renames, an_exports, an_undefines, a_redefines, a_selects)
3168 end
3169 end
3170
3171 new_parent_semicolon (a_parent: detachable ET_PARENT; a_semicolon: detachable ET_SYMBOL): detachable ET_PARENT_ITEM
3172 -- New parent-semicolon
3173 do
3174 Result := a_parent
3175 end
3176
3177 new_parents (an_inherit: detachable ET_KEYWORD; nb: INTEGER): detachable ET_PARENT_LIST
3178 -- New class parent list with given capacity
3179 require
3180 nb_positive: nb >= 0
3181 do
3182 create Result.make_with_capacity (nb)
3183 ensure
3184 parents_not_void: nb > 0 implies Result /= Void
3185 end
3186
3187 new_parenthesized_expression (l: detachable ET_SYMBOL; e: detachable ET_EXPRESSION;
3188 r: detachable ET_SYMBOL): detachable ET_PARENTHESIZED_EXPRESSION
3189 -- New parenthesized expression
3190 do
3191 if e /= Void then
3192 create Result.make (e)
3193 if l /= Void and then not l.position.is_null then
3194 Result.set_left_parenthesis (l)
3195 end
3196 end
3197 end
3198
3199 new_postconditions (an_ensure: detachable ET_KEYWORD;
3200 a_then: detachable ET_KEYWORD; nb: INTEGER): detachable ET_POSTCONDITIONS
3201 -- New postconditions with given capacity
3202 require
3203 nb_positive: nb >= 0
3204 do
3205 create Result.make_with_capacity (nb)
3206 if an_ensure /= Void and then not an_ensure.position.is_null then
3207 Result.set_ensure_keyword (an_ensure)
3208 end
3209 if a_then /= Void then
3210 Result.set_then_keyword (a_then)
3211 end
3212 end
3213
3214 new_preconditions (a_require: detachable ET_KEYWORD;
3215 an_else: detachable ET_KEYWORD; nb: INTEGER): detachable ET_PRECONDITIONS
3216 -- New preconditions with given capacity
3217 require
3218 nb_positive: nb >= 0
3219 do
3220 create Result.make_with_capacity (nb)
3221 if a_require /= Void and then not a_require.position.is_null then
3222 Result.set_require_keyword (a_require)
3223 end
3224 if an_else /= Void then
3225 Result.set_else_keyword (an_else)
3226 end
3227 end
3228
3229 new_precursor_class_name (l: detachable ET_SYMBOL; a_name:
3230 detachable ET_CLASS_NAME; r: detachable ET_SYMBOL): detachable ET_PRECURSOR_CLASS_NAME
3231 -- New class name surrounded by braces
3232 do
3233 Result := a_name
3234 end
3235
3236 new_precursor_expression (is_parent_prefixed: BOOLEAN;
3237 a_precursor: detachable ET_PRECURSOR_KEYWORD; a_parent: detachable ET_PRECURSOR_CLASS_NAME;
3238 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_PRECURSOR_EXPRESSION
3239 -- New precursor expression
3240 do
3241 if a_precursor /= Void then
3242 create Result.make (a_parent, args)
3243 Result.set_parent_prefixed (is_parent_prefixed)
3244 Result.set_precursor_keyword (a_precursor)
3245 end
3246 end
3247
3248 new_precursor_instruction (is_parent_prefixed: BOOLEAN; a_precursor: detachable ET_PRECURSOR_KEYWORD;
3249 a_parent: detachable ET_PRECURSOR_CLASS_NAME; args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_PRECURSOR_INSTRUCTION
3250 -- New precursor instruction
3251 do
3252 if a_precursor /= Void then
3253 create Result.make (a_parent, args)
3254 Result.set_parent_prefixed (is_parent_prefixed)
3255 Result.set_precursor_keyword (a_precursor)
3256 end
3257 end
3258
3259 new_prefix_expression (a_name: detachable ET_OPERATOR; e: detachable ET_EXPRESSION): detachable ET_PREFIX_EXPRESSION
3260 -- New prefix expression
3261 do
3262 if a_name /= Void and e /= Void then
3263 create Result.make (a_name, e)
3264 end
3265 end
3266
3267 new_prefix_free_name (a_prefix: detachable ET_KEYWORD;
3268 an_operator: detachable ET_MANIFEST_STRING): detachable ET_PREFIX_FREE_NAME
3269 -- New prefix free feature name
3270 require
3271 an_operator_computed: an_operator /= Void implies an_operator.value.count > 0
3272 do
3273 if an_operator /= Void then
3274 create Result.make (an_operator)
3275 if a_prefix /= Void and then not a_prefix.position.is_null then
3276 Result.set_prefix_keyword (a_prefix)
3277 end
3278 end
3279 end
3280
3281 new_prefix_free_operator (an_operator: detachable ET_FREE_OPERATOR): detachable ET_FREE_OPERATOR
3282 -- New prefix "<free-operator>" operator
3283 do
3284 if an_operator /= Void then
3285 Result := an_operator
3286 Result.set_prefix
3287 end
3288 end
3289
3290 new_prefix_minus_name (a_prefix: detachable ET_KEYWORD;
3291 an_operator: detachable ET_MANIFEST_STRING): detachable ET_PREFIX_NAME
3292 -- New prefix "-" feature name
3293 do
3294 if an_operator /= Void then
3295 create Result.make_minus (an_operator)
3296 if a_prefix /= Void and then not a_prefix.position.is_null then
3297 Result.set_prefix_keyword (a_prefix)
3298 end
3299 end
3300 end
3301
3302 new_prefix_minus_operator (an_operator: detachable ET_SYMBOL_OPERATOR): detachable ET_SYMBOL_OPERATOR
3303 -- New prefix "-" operator
3304 do
3305 if an_operator /= Void then
3306 Result := an_operator
3307 Result.set_prefix_minus
3308 end
3309 end
3310
3311 new_prefix_not_name (a_prefix: detachable ET_KEYWORD;
3312 an_operator: detachable ET_MANIFEST_STRING): detachable ET_PREFIX_NAME
3313 -- New prefix "not" feature name
3314 do
3315 if an_operator /= Void then
3316 create Result.make_not (an_operator)
3317 if a_prefix /= Void and then not a_prefix.position.is_null then
3318 Result.set_prefix_keyword (a_prefix)
3319 end
3320 end
3321 end
3322
3323 new_prefix_plus_name (a_prefix: detachable ET_KEYWORD;
3324 an_operator: detachable ET_MANIFEST_STRING): detachable ET_PREFIX_NAME
3325 -- New prefix "+" feature name
3326 do
3327 if an_operator /= Void then
3328 create Result.make_plus (an_operator)
3329 if a_prefix /= Void and then not a_prefix.position.is_null then
3330 Result.set_prefix_keyword (a_prefix)
3331 end
3332 end
3333 end
3334
3335 new_prefix_plus_operator (an_operator: detachable ET_SYMBOL_OPERATOR): detachable ET_SYMBOL_OPERATOR
3336 -- New prefix "+" operator
3337 do
3338 if an_operator /= Void then
3339 Result := an_operator
3340 Result.set_prefix_plus
3341 end
3342 end
3343
3344 new_qualified_call (a_name: detachable ET_QUALIFIED_FEATURE_NAME;
3345 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_QUALIFIED_CALL
3346 -- New qualified call
3347 do
3348 if a_name /= Void then
3349 create Result.make (a_name, args)
3350 end
3351 end
3352
3353 new_qualified_call_expression (a_target: detachable ET_EXPRESSION; a_name: detachable ET_QUALIFIED_FEATURE_NAME;
3354 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_QUALIFIED_CALL_EXPRESSION
3355 -- New qualified call expression
3356 do
3357 if a_name /= Void and a_target /= Void then
3358 create Result.make (a_target, a_name, args)
3359 end
3360 end
3361
3362 new_qualified_call_instruction (a_target: detachable ET_EXPRESSION; a_name: detachable ET_QUALIFIED_FEATURE_NAME;
3363 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_QUALIFIED_CALL_INSTRUCTION
3364 -- New qualified call instruction
3365 do
3366 if a_name /= Void and a_target /= Void then
3367 create Result.make (a_target, a_name, args)
3368 end
3369 end
3370
3371 new_qualified_like_braced_type (a_type_mark: detachable ET_TYPE_MARK;
3372 a_like: detachable ET_KEYWORD; a_left_brace: detachable ET_SYMBOL;
3373 a_type: detachable ET_TYPE; a_right_brace: detachable ET_SYMBOL;
3374 a_name: detachable ET_QUALIFIED_FEATURE_NAME): detachable ET_QUALIFIED_LIKE_BRACED_TYPE
3375 -- New qualified anchored type of the form 'like {A}.b'
3376 do
3377 if a_type /= Void and a_name /= Void then
3378 create Result.make (a_type_mark, a_type, a_name)
3379 if a_like /= Void and then not a_like.position.is_null then
3380 Result.set_like_keyword (a_like)
3381 end
3382 end
3383 end
3384
3385 new_qualified_like_type (a_type_mark: detachable ET_TYPE_MARK; a_type: detachable ET_LIKE_TYPE;
3386 a_name: detachable ET_QUALIFIED_FEATURE_NAME): detachable ET_QUALIFIED_LIKE_TYPE
3387 -- New qualified anchored type of the form 'like a.b.c'
3388 do
3389 if a_type /= Void and a_name /= Void then
3390 create Result.make (a_type_mark, a_type, a_name)
3391 end
3392 end
3393
3394 new_rename (old_name: detachable ET_FEATURE_NAME; an_as: detachable ET_KEYWORD;
3395 new_name: detachable ET_EXTENDED_FEATURE_NAME): detachable ET_RENAME
3396 -- New rename pair
3397 do
3398 if old_name /= Void and new_name /= Void then
3399 create Result.make (old_name, new_name)
3400 end
3401 end
3402
3403 new_rename_comma (old_name: detachable ET_FEATURE_NAME; an_as: detachable ET_KEYWORD;
3404 new_name: detachable ET_EXTENDED_FEATURE_NAME; a_comma: detachable ET_SYMBOL): detachable ET_RENAME_ITEM
3405 -- New rename pair followed by a comma
3406 do
3407 if old_name /= Void and new_name /= Void then
3408 create {ET_RENAME} Result.make (old_name, new_name)
3409 end
3410 end
3411
3412 new_renames (a_rename: detachable ET_KEYWORD; nb: INTEGER): detachable ET_RENAME_LIST
3413 -- New rename clause with given capacity
3414 require
3415 nb_positive: nb >= 0
3416 do
3417 create Result.make_with_capacity (nb)
3418 end
3419
3420 new_rescue_compound (a_rescue: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
3421 -- New compound preceded by a 'rescue' keyword
3422 do
3423 if a_compound /= Void then
3424 Result := a_compound
3425 Result.set_keyword (tokens.rescue_keyword)
3426 end
3427 end
3428
3429 new_result_address (d: detachable ET_SYMBOL; r: detachable ET_RESULT): detachable ET_RESULT_ADDRESS
3430 -- New address of Result
3431 do
3432 create Result.make
3433 if d /= Void and then not d.position.is_null then
3434 Result.set_dollar (d)
3435 end
3436 end
3437
3438 new_static_call_expression (a_feature: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
3439 a_name: detachable ET_QUALIFIED_FEATURE_NAME; args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_STATIC_CALL_EXPRESSION
3440 -- New static call expression
3441 do
3442 if a_type /= Void and a_name /= Void then
3443 create Result.make (a_type, a_name, args)
3444 if a_feature /= Void and then not a_feature.position.is_null then
3445 Result.set_feature_keyword (a_feature)
3446 end
3447 end
3448 end
3449
3450 new_static_call_instruction (a_feature: detachable ET_KEYWORD; a_type: detachable ET_TARGET_TYPE;
3451 a_name: detachable ET_QUALIFIED_FEATURE_NAME; args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_STATIC_CALL_INSTRUCTION
3452 -- New static call instruction
3453 do
3454 if a_type /= Void and a_name /= Void then
3455 create Result.make (a_type, a_name, args)
3456 if a_feature /= Void and then not a_feature.position.is_null then
3457 Result.set_feature_keyword (a_feature)
3458 end
3459 end
3460 end
3461
3462 new_strip_expression (a_strip: detachable ET_KEYWORD; l, r: detachable ET_SYMBOL; nb: INTEGER): detachable ET_STRIP_EXPRESSION
3463 -- New strip expression with given capacity
3464 require
3465 nb_positive: nb >= 0
3466 do
3467 create Result.make_with_capacity (nb)
3468 if a_strip /= Void and then not a_strip.position.is_null then
3469 Result.set_strip_keyword (a_strip)
3470 end
3471 end
3472
3473 new_tag (a_name: detachable ET_IDENTIFIER; a_colon: detachable ET_SYMBOL): detachable ET_TAG
3474 -- New tag
3475 do
3476 Result := a_name
3477 end
3478
3479 new_tagged_assertion (a_tag: detachable ET_TAG): detachable ET_TAGGED_ASSERTION
3480 -- New tagged assertion
3481 do
3482 if a_tag /= Void then
3483 create Result.make (a_tag)
3484 end
3485 end
3486
3487 new_tagged_indexing (a_tag: detachable ET_TAG; a_terms: detachable ET_INDEXING_TERM_LIST): detachable ET_TAGGED_INDEXING
3488 -- New tagged indexing clause
3489 do
3490 -- Do nothing.
3491 end
3492
3493 new_target_type (l: detachable ET_SYMBOL; a_type: detachable ET_TYPE; r: detachable ET_SYMBOL): detachable ET_TARGET_TYPE
3494 -- New type surrounded by braces
3495 do
3496 Result := a_type
3497 end
3498
3499 new_then_compound (a_then: detachable ET_KEYWORD; a_compound: detachable ET_COMPOUND): detachable ET_COMPOUND
3500 -- New compound preceded by a 'then' keyword
3501 do
3502 if a_compound /= Void then
3503 Result := a_compound
3504 Result.set_keyword (tokens.then_keyword)
3505 end
3506 end
3507
3508 new_tuple_type (a_type_mark: detachable ET_TYPE_MARK; a_tuple: detachable ET_IDENTIFIER;
3509 a_generics: like new_actual_parameters; a_base_class: detachable ET_NAMED_CLASS): detachable ET_TUPLE_TYPE
3510 -- New 'TUPLE' type
3511 do
3512 if a_base_class /= Void then
3513 create Result.make (a_type_mark, a_generics, a_base_class)
3514 if a_tuple /= Void and then not a_tuple.position.is_null then
3515 Result.set_tuple_keyword (a_tuple)
3516 end
3517 end
3518 end
3519
3520 new_type_comma (a_type: detachable ET_TYPE; a_comma: detachable ET_SYMBOL): detachable ET_TYPE_ITEM
3521 -- New type-comma
3522 do
3523 Result := a_type
3524 end
3525
3526 new_unique_attribute (a_name: detachable ET_EXTENDED_FEATURE_NAME; a_type: detachable ET_DECLARED_TYPE;
3527 an_assigner: detachable ET_ASSIGNER; an_is: detachable ET_AST_LEAF; a_unique: detachable ET_KEYWORD;
3528 a_semicolon: detachable ET_SEMICOLON_SYMBOL;
3529 a_clients: detachable ET_CLIENT_LIST; a_feature_clause: detachable ET_FEATURE_CLAUSE;
3530 a_class: detachable ET_CLASS): detachable ET_UNIQUE_ATTRIBUTE
3531 -- New unique attribute declaration
3532 do
3533 if a_name /= Void and a_type /= Void and a_clients /= Void and a_class /= Void then
3534 create Result.make (a_name, a_type, a_class)
3535 Result.set_assigner (an_assigner)
3536 Result.set_clients (a_clients)
3537 end
3538 end
3539
3540 new_unqualified_call_expression (a_name: detachable ET_FEATURE_NAME;
3541 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_UNQUALIFIED_CALL_EXPRESSION
3542 -- New unqualified call expression
3543 do
3544 if a_name /= Void then
3545 create Result.make (a_name, args)
3546 end
3547 end
3548
3549 new_unqualified_call_instruction (a_name: detachable ET_FEATURE_NAME;
3550 args: detachable ET_ACTUAL_ARGUMENT_LIST): detachable ET_UNQUALIFIED_CALL_INSTRUCTION
3551 -- New unqualified call instruction
3552 do
3553 if a_name /= Void then
3554 create Result.make (a_name, args)
3555 end
3556 end
3557
3558 new_variant (a_variant: detachable ET_KEYWORD; a_tag: detachable ET_TAG;
3559 an_expression: detachable ET_EXPRESSION): detachable ET_VARIANT
3560 -- New loop variant
3561 do
3562 if an_expression /= Void then
3563 create Result.make (a_tag, an_expression)
3564 if a_variant /= Void and then not a_variant.position.is_null then
3565 Result.set_variant_keyword (a_variant)
3566 end
3567 end
3568 end
3569
3570 new_when_part (a_choices: detachable ET_CHOICE_LIST;
3571 a_then_compound: detachable ET_COMPOUND): detachable ET_WHEN_PART
3572 -- New when part
3573 do
3574 if a_choices /= Void then
3575 create Result.make (a_choices, a_then_compound)
3576 end
3577 end
3578
3579 new_when_part_list (nb: INTEGER): detachable ET_WHEN_PART_LIST
3580 -- New when part list with capacity `nb'
3581 require
3582 nb_positive: nb >= 0
3583 do
3584 if nb > 0 then
3585 create Result.make_with_capacity (nb)
3586 end
3587 end
3588
3589 feature -- AST factory
3590
3591 new_class (a_name: ET_CLASS_NAME): ET_CLASS
3592 -- New Eiffel class
3593 require
3594 a_name_not_void: a_name /= Void
3595 do
3596 create Result.make (a_name)
3597 ensure
3598 class_not_void: Result /= Void
3599 end
3600
3601 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23