parser: get the state number only once per state
[nit.git] / src / parser / parser_nodes.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 2008-2009 Jean Privat <jean@pryen.org>
4 # Copyright 2009 Jean-Sebastien Gelinas <calestar@gmail.com>
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 # AST nodes of the Nit language
19 # Was previously based on parser_abs.nit.
20 package parser_nodes
21
22 import location
23
24 # Root of the AST hierarchy
25 abstract class ANode
26 var _location: nullable Location
27 # Location is set during AST building. Once built, location cannon be null
28 # However, manual instanciated nodes may need mode care
29 fun location: Location do return _location.as(not null)
30 # The location of the important part of the node (identifier or whatever)
31 fun hot_location: Location do return location
32 init do end
33
34 # Display a message for the colored location of the node
35 fun debug(message: String)
36 do
37 print "{hot_location} {self.class_name}: {message}\n{hot_location.colored_line("0;32")}"
38 end
39 end
40
41 # Ancestor of all tokens
42 abstract class Token
43 super ANode
44 fun text: String is abstract
45
46 redef fun to_s: String do
47 return "'{text}'"
48 end
49 end
50
51 # Ancestor of all productions
52 abstract class Prod
53 super ANode
54 fun location=(l: Location) do _location = l
55 end
56 class TEol
57 super Token
58 redef fun to_s
59 do
60 return "end of line"
61 end
62 end
63 class TComment
64 super Token
65 end
66 abstract class TokenKeyword
67 super Token
68 redef fun to_s
69 do
70 return "keyword '{text}'"
71 end
72 end
73 class TKwmodule
74 super TokenKeyword
75 end
76 class TKwimport
77 super TokenKeyword
78 end
79 class TKwclass
80 super TokenKeyword
81 end
82 class TKwabstract
83 super TokenKeyword
84 end
85 class TKwinterface
86 super TokenKeyword
87 end
88 class TKwenum
89 super TokenKeyword
90 end
91 class TKwspecial
92 super TokenKeyword
93 end
94 class TKwend
95 super TokenKeyword
96 end
97 class TKwmeth
98 super TokenKeyword
99 end
100 class TKwtype
101 super TokenKeyword
102 end
103 class TKwinit
104 super TokenKeyword
105 end
106 class TKwredef
107 super TokenKeyword
108 end
109 class TKwis
110 super TokenKeyword
111 end
112 class TKwdo
113 super TokenKeyword
114 end
115 class TKwreadable
116 super TokenKeyword
117 end
118 class TKwwritable
119 super TokenKeyword
120 end
121 class TKwvar
122 super TokenKeyword
123 end
124 class TKwintern
125 super TokenKeyword
126 end
127 class TKwextern
128 super TokenKeyword
129 end
130 class TKwprotected
131 super TokenKeyword
132 end
133 class TKwprivate
134 super TokenKeyword
135 end
136 class TKwintrude
137 super TokenKeyword
138 end
139 class TKwif
140 super TokenKeyword
141 end
142 class TKwthen
143 super TokenKeyword
144 end
145 class TKwelse
146 super TokenKeyword
147 end
148 class TKwwhile
149 super TokenKeyword
150 end
151 class TKwloop
152 super TokenKeyword
153 end
154 class TKwfor
155 super TokenKeyword
156 end
157 class TKwin
158 super TokenKeyword
159 end
160 class TKwand
161 super TokenKeyword
162 end
163 class TKwor
164 super TokenKeyword
165 end
166 class TKwnot
167 super TokenKeyword
168 end
169 class TKwreturn
170 super TokenKeyword
171 end
172 class TKwcontinue
173 super TokenKeyword
174 end
175 class TKwbreak
176 super TokenKeyword
177 end
178 class TKwabort
179 super TokenKeyword
180 end
181 class TKwassert
182 super TokenKeyword
183 end
184 class TKwnew
185 super TokenKeyword
186 end
187 class TKwisa
188 super TokenKeyword
189 end
190 class TKwonce
191 super TokenKeyword
192 end
193 class TKwsuper
194 super TokenKeyword
195 end
196 class TKwself
197 super TokenKeyword
198 end
199 class TKwtrue
200 super TokenKeyword
201 end
202 class TKwfalse
203 super TokenKeyword
204 end
205 class TKwnull
206 super TokenKeyword
207 end
208 class TKwas
209 super TokenKeyword
210 end
211 class TKwnullable
212 super TokenKeyword
213 end
214 class TKwisset
215 super TokenKeyword
216 end
217 class TKwlabel
218 super TokenKeyword
219 end
220 class TKwdebug
221 super Token
222 end
223 class TOpar
224 super Token
225 end
226 class TCpar
227 super Token
228 end
229 class TObra
230 super Token
231 end
232 class TCbra
233 super Token
234 end
235 class TComma
236 super Token
237 end
238 class TColumn
239 super Token
240 end
241 class TQuad
242 super Token
243 end
244 class TAssign
245 super Token
246 end
247 abstract class TokenOperator
248 super Token
249 redef fun to_s
250 do
251 return "operator '{text}'"
252 end
253 end
254 class TPluseq
255 super TokenOperator
256 end
257 class TMinuseq
258 super TokenOperator
259 end
260 class TDotdotdot
261 super TokenOperator
262 end
263 class TDotdot
264 super TokenOperator
265 end
266 class TDot
267 super TokenOperator
268 end
269 class TPlus
270 super TokenOperator
271 end
272 class TMinus
273 super TokenOperator
274 end
275 class TStar
276 super TokenOperator
277 end
278 class TSlash
279 super TokenOperator
280 end
281 class TPercent
282 super TokenOperator
283 end
284 class TEq
285 super TokenOperator
286 end
287 class TNe
288 super TokenOperator
289 end
290 class TLt
291 super TokenOperator
292 end
293 class TLe
294 super TokenOperator
295 end
296 class TLl
297 super TokenOperator
298 end
299 class TGt
300 super TokenOperator
301 end
302 class TGe
303 super TokenOperator
304 end
305 class TGg
306 super TokenOperator
307 end
308 class TStarship
309 super TokenOperator
310 end
311 class TBang
312 super TokenOperator
313 end
314 class TClassid
315 super Token
316 redef fun to_s
317 do
318 do return "type identifier '{text}'"
319 end
320 end
321 class TId
322 super Token
323 redef fun to_s
324 do
325 do return "identifier '{text}'"
326 end
327 end
328 class TAttrid
329 super Token
330 redef fun to_s
331 do
332 do return "attribute '{text}'"
333 end
334 end
335 abstract class TokenLiteral
336 super Token
337 redef fun to_s
338 do
339 do return "literal value '{text}'"
340 end
341 end
342 class TNumber
343 super TokenLiteral
344 end
345 class TFloat
346 super TokenLiteral
347 end
348 class TChar
349 super TokenLiteral
350 end
351 class TString
352 super TokenLiteral
353 end
354 class TStartString
355 super TokenLiteral
356 end
357 class TMidString
358 super TokenLiteral
359 end
360 class TEndString
361 super Token
362 end
363 class TBadString
364 super Token
365 redef fun to_s
366 do
367 do return "malformed string {text}"
368 end
369 end
370 class TBadChar
371 super Token
372 redef fun to_s
373 do
374 do return "malformed character {text}"
375 end
376 end
377 class EOF
378 super Token
379 private init noinit do end
380 redef fun to_s
381 do
382 return "end of file"
383 end
384 end
385 class AError
386 super EOF
387 private init noinit do end
388 end
389
390 class AModule
391 super Prod
392 readable var _n_moduledecl: nullable AModuledecl = null
393 readable var _n_imports: List[AImport] = new List[AImport]
394 readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
395 end
396 class AModuledecl
397 super Prod
398 readable var _n_doc: nullable ADoc = null
399 readable var _n_kwmodule: TKwmodule
400 readable var _n_name: AModuleName
401 end
402 abstract class AImport super Prod end
403 class AStdImport
404 super AImport
405 readable var _n_visibility: AVisibility
406 readable var _n_kwimport: TKwimport
407 readable var _n_name: AModuleName
408 end
409 class ANoImport
410 super AImport
411 readable var _n_visibility: AVisibility
412 readable var _n_kwimport: TKwimport
413 readable var _n_kwend: TKwend
414 end
415 abstract class AVisibility super Prod end
416 class APublicVisibility
417 super AVisibility
418 end
419 class APrivateVisibility
420 super AVisibility
421 readable var _n_kwprivate: TKwprivate
422 end
423 class AProtectedVisibility
424 super AVisibility
425 readable var _n_kwprotected: TKwprotected
426 end
427 class AIntrudeVisibility
428 super AVisibility
429 readable var _n_kwintrude: TKwintrude
430 end
431 abstract class AClassdef super Prod
432 readable var _n_propdefs: List[APropdef] = new List[APropdef]
433 end
434 class AStdClassdef
435 super AClassdef
436 readable var _n_doc: nullable ADoc = null
437 readable var _n_kwredef: nullable TKwredef = null
438 readable var _n_visibility: AVisibility
439 readable var _n_classkind: AClasskind
440 readable var _n_id: nullable TClassid = null
441 readable var _n_formaldefs: List[AFormaldef] = new List[AFormaldef]
442 readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass]
443 readable var _n_kwend: TKwend
444 redef fun hot_location do return n_id.location
445 end
446 class ATopClassdef
447 super AClassdef
448 end
449 class AMainClassdef
450 super AClassdef
451 end
452 abstract class AClasskind super Prod end
453 class AConcreteClasskind
454 super AClasskind
455 readable var _n_kwclass: TKwclass
456 end
457 class AAbstractClasskind
458 super AClasskind
459 readable var _n_kwabstract: TKwabstract
460 readable var _n_kwclass: TKwclass
461 end
462 class AInterfaceClasskind
463 super AClasskind
464 readable var _n_kwinterface: TKwinterface
465 end
466 class AEnumClasskind
467 super AClasskind
468 readable var _n_kwenum: TKwenum
469 end
470 class AExternClasskind
471 super AClasskind
472 readable var _n_kwextern: TKwextern
473 end
474 class AFormaldef
475 super Prod
476 readable var _n_id: TClassid
477 readable var _n_type: nullable AType = null
478 end
479 class ASuperclass
480 super Prod
481 readable var _n_kwspecial: nullable TKwspecial = null
482 readable var _n_kwsuper: nullable TKwsuper = null
483 readable var _n_type: AType
484 end
485 abstract class APropdef super Prod
486 readable var _n_doc: nullable ADoc = null
487 end
488 class AAttrPropdef
489 super APropdef
490 readable var _n_kwredef: nullable TKwredef = null
491 readable var _n_visibility: AVisibility
492 readable var _n_kwvar: TKwvar
493 readable var _n_id: nullable TAttrid
494 readable var _n_id2: nullable TId
495 readable var _n_type: nullable AType = null
496 readable var _n_readable: nullable AAble = null
497 readable var _n_writable: nullable AAble = null
498 readable var _n_expr: nullable AExpr = null
499 redef fun hot_location
500 do
501 if n_id != null then return n_id.location else return n_id2.location
502 end
503 end
504 abstract class AMethPropdef
505 super APropdef
506 readable var _n_kwredef: nullable TKwredef = null
507 readable var _n_visibility: nullable AVisibility
508 readable var _n_methid: nullable AMethid = null
509 readable var _n_signature: nullable ASignature
510 redef fun hot_location
511 do
512 if n_methid != null then
513 return n_methid.location
514 else
515 return location
516 end
517 end
518 end
519 class ADeferredMethPropdef
520 super AMethPropdef
521 readable var _n_kwmeth: TKwmeth
522 end
523 class AInternMethPropdef
524 super AMethPropdef
525 readable var _n_kwmeth: TKwmeth
526 end
527 abstract class AExternPropdef
528 super AMethPropdef
529 readable var _n_extern: nullable TString = null
530 readable var _n_extern_calls: nullable AExternCalls = null
531 end
532 class AExternMethPropdef
533 super AMethPropdef
534 super AExternPropdef
535 readable var _n_kwmeth: TKwmeth
536 end
537 class AConcreteMethPropdef
538 super AMethPropdef
539 readable var _n_kwmeth: nullable TKwmeth
540 readable var _n_block: nullable AExpr = null
541 end
542 abstract class AInitPropdef
543 super AMethPropdef
544 end
545 class AConcreteInitPropdef
546 super AConcreteMethPropdef
547 super AInitPropdef
548 readable var _n_kwinit: TKwinit
549 redef fun hot_location do return n_kwinit.location
550 end
551 class AExternInitPropdef
552 super AExternPropdef
553 super AInitPropdef
554 readable var _n_kwnew: TKwnew
555 end
556 class AMainMethPropdef
557 super AConcreteMethPropdef
558 end
559 class AExternCalls
560 super Prod
561 readable var _n_kwimport: TKwimport
562 readable var _n_extern_calls: List[AExternCall] = new List[AExternCall]
563 end
564 abstract class AExternCall
565 super Prod
566 end
567 abstract class APropExternCall
568 special AExternCall
569 end
570 class ALocalPropExternCall
571 special APropExternCall
572 readable var _n_methid: AMethid
573 end
574 class AFullPropExternCall
575 special APropExternCall
576 readable var _n_classid: TClassid
577 readable var _n_quad: nullable TQuad = null
578 readable var _n_methid: AMethid
579 end
580 class AInitPropExternCall
581 special APropExternCall
582 readable var _n_classid: TClassid
583 end
584 class ASuperExternCall
585 special AExternCall
586 readable var _n_kwsuper: TKwsuper
587 end
588 abstract class ACastExternCall
589 special AExternCall
590 end
591 class ACastAsExternCall
592 special ACastExternCall
593 readable var _n_from_type: AType
594 readable var _n_kwas: TKwas
595 readable var _n_to_type: AType
596 end
597 class AAsNullableExternCall
598 special ACastExternCall
599 readable var _n_type: AType
600 readable var _n_kwas: TKwas
601 readable var _n_kwnullable: TKwnullable
602 end
603 class AAsNotNullableExternCall
604 special ACastExternCall
605 readable var _n_type: AType
606 readable var _n_kwas: TKwas
607 readable var _n_kwnot: TKwnot
608 readable var _n_kwnullable: TKwnullable
609 end
610 class ATypePropdef
611 super APropdef
612 readable var _n_kwredef: nullable TKwredef = null
613 readable var _n_visibility: AVisibility
614 readable var _n_kwtype: TKwtype
615 readable var _n_id: TClassid
616 readable var _n_type: AType
617 end
618 abstract class AAble super Prod
619 readable var _n_visibility: nullable AVisibility = null
620 readable var _n_kwredef: nullable TKwredef = null
621 end
622 class AReadAble
623 super AAble
624 readable var _n_kwreadable: TKwreadable
625 end
626 class AWriteAble
627 super AAble
628 readable var _n_kwwritable: TKwwritable
629 end
630 abstract class AMethid super Prod end
631 class AIdMethid
632 super AMethid
633 readable var _n_id: TId
634 end
635 class APlusMethid
636 super AMethid
637 readable var _n_plus: TPlus
638 end
639 class AMinusMethid
640 super AMethid
641 readable var _n_minus: TMinus
642 end
643 class AStarMethid
644 super AMethid
645 readable var _n_star: TStar
646 end
647 class ASlashMethid
648 super AMethid
649 readable var _n_slash: TSlash
650 end
651 class APercentMethid
652 super AMethid
653 readable var _n_percent: TPercent
654 end
655 class AEqMethid
656 super AMethid
657 readable var _n_eq: TEq
658 end
659 class ANeMethid
660 super AMethid
661 readable var _n_ne: TNe
662 end
663 class ALeMethid
664 super AMethid
665 readable var _n_le: TLe
666 end
667 class AGeMethid
668 super AMethid
669 readable var _n_ge: TGe
670 end
671 class ALtMethid
672 super AMethid
673 readable var _n_lt: TLt
674 end
675 class AGtMethid
676 super AMethid
677 readable var _n_gt: TGt
678 end
679 class ALlMethid
680 super AMethid
681 readable writable var _n_ll: TLl
682 end
683 class AGgMethid
684 super AMethid
685 readable writable var _n_gg: TGg
686 end
687 class ABraMethid
688 super AMethid
689 readable var _n_obra: TObra
690 readable var _n_cbra: TCbra
691 end
692 class AStarshipMethid
693 super AMethid
694 readable var _n_starship: TStarship
695 end
696 class AAssignMethid
697 super AMethid
698 readable var _n_id: TId
699 readable var _n_assign: TAssign
700 end
701 class ABraassignMethid
702 super AMethid
703 readable var _n_obra: TObra
704 readable var _n_cbra: TCbra
705 readable var _n_assign: TAssign
706 end
707 class ASignature
708 super Prod
709 readable var _n_opar: nullable TOpar = null
710 readable var _n_params: List[AParam] = new List[AParam]
711 readable var _n_cpar: nullable TCpar = null
712 readable var _n_type: nullable AType = null
713 readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl]
714 end
715 class AParam
716 super Prod
717 readable var _n_id: TId
718 readable var _n_type: nullable AType = null
719 readable var _n_dotdotdot: nullable TDotdotdot = null
720 end
721 class AClosureDecl
722 super Prod
723 readable var _n_kwbreak: nullable TKwbreak = null
724 readable var _n_bang: TBang
725 readable var _n_id: TId
726 readable var _n_signature: ASignature
727 readable var _n_expr: nullable AExpr = null
728 end
729 class AType
730 super Prod
731 readable var _n_kwnullable: nullable TKwnullable = null
732 readable var _n_id: TClassid
733 readable var _n_types: List[AType] = new List[AType]
734 end
735 class ALabel
736 super Prod
737 readable var _n_kwlabel: TKwlabel
738 readable var _n_id: TId
739 end
740 abstract class AExpr super Prod end
741 class ABlockExpr
742 super AExpr
743 readable var _n_expr: List[AExpr] = new List[AExpr]
744 readable var _n_kwend: nullable TKwend = null
745 end
746 class AVardeclExpr
747 super AExpr
748 readable var _n_kwvar: TKwvar
749 readable var _n_id: TId
750 readable var _n_type: nullable AType = null
751 readable var _n_assign: nullable TAssign = null
752 readable var _n_expr: nullable AExpr = null
753 end
754 class AReturnExpr
755 super AExpr
756 readable var _n_kwreturn: nullable TKwreturn = null
757 readable var _n_expr: nullable AExpr = null
758 end
759 abstract class ALabelable
760 super Prod
761 readable var _n_label: nullable ALabel = null
762 end
763 class ABreakExpr
764 super AExpr
765 super ALabelable
766 readable var _n_kwbreak: TKwbreak
767 readable var _n_expr: nullable AExpr = null
768 end
769 class AAbortExpr
770 super AExpr
771 readable var _n_kwabort: TKwabort
772 end
773 class AContinueExpr
774 super AExpr
775 super ALabelable
776 readable var _n_kwcontinue: nullable TKwcontinue = null
777 readable var _n_expr: nullable AExpr = null
778 end
779 class ADoExpr
780 super AExpr
781 super ALabelable
782 readable var _n_kwdo: TKwdo
783 readable var _n_block: nullable AExpr = null
784 end
785 class AIfExpr
786 super AExpr
787 readable var _n_kwif: TKwif
788 readable var _n_expr: AExpr
789 readable var _n_then: nullable AExpr = null
790 readable var _n_else: nullable AExpr = null
791 end
792 class AIfexprExpr
793 super AExpr
794 readable var _n_kwif: TKwif
795 readable var _n_expr: AExpr
796 readable var _n_kwthen: TKwthen
797 readable var _n_then: AExpr
798 readable var _n_kwelse: TKwelse
799 readable var _n_else: AExpr
800 end
801 class AWhileExpr
802 super AExpr
803 super ALabelable
804 readable var _n_kwwhile: TKwwhile
805 readable var _n_expr: AExpr
806 readable var _n_kwdo: TKwdo
807 readable var _n_block: nullable AExpr = null
808 end
809 class ALoopExpr
810 super AExpr
811 super ALabelable
812 readable var _n_kwloop: TKwloop
813 readable var _n_block: nullable AExpr = null
814 end
815 class AForExpr
816 super AExpr
817 super ALabelable
818 readable var _n_kwfor: TKwfor
819 readable var _n_ids: List[TId] = new List[TId]
820 readable var _n_expr: AExpr
821 readable var _n_kwdo: TKwdo
822 readable var _n_block: nullable AExpr = null
823 end
824 class AAssertExpr
825 super AExpr
826 readable var _n_kwassert: TKwassert
827 readable var _n_id: nullable TId = null
828 readable var _n_expr: AExpr
829 readable var _n_else: nullable AExpr = null
830 end
831 abstract class AAssignFormExpr
832 super AExpr
833 readable var _n_assign: TAssign
834 readable var _n_value: AExpr
835 end
836 abstract class AReassignFormExpr
837 super AExpr
838 readable var _n_assign_op: AAssignOp
839 readable var _n_value: AExpr
840 end
841 class AOnceExpr
842 super AProxyExpr
843 readable var _n_kwonce: TKwonce
844 end
845 abstract class ASendExpr
846 super AExpr
847 readable var _n_expr: AExpr
848 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
849 end
850 abstract class ABinopExpr
851 super ASendExpr
852 readable var _n_expr2: AExpr
853 end
854 abstract class ABoolExpr
855 super AExpr
856 end
857 class AOrExpr
858 super ABoolExpr
859 readable var _n_expr: AExpr
860 readable var _n_expr2: AExpr
861 end
862 class AAndExpr
863 super ABoolExpr
864 readable var _n_expr: AExpr
865 readable var _n_expr2: AExpr
866 end
867 class AOrElseExpr
868 super ABoolExpr
869 readable var _n_expr: AExpr
870 readable var _n_expr2: AExpr
871 end
872 class ANotExpr
873 super ABoolExpr
874 readable var _n_kwnot: TKwnot
875 readable var _n_expr: AExpr
876 end
877 class AEqExpr
878 super ABinopExpr
879 end
880 class AEeExpr
881 super ABoolExpr
882 readable var _n_expr: AExpr
883 readable var _n_expr2: AExpr
884 end
885 class ANeExpr
886 super ABinopExpr
887 end
888 class ALtExpr
889 super ABinopExpr
890 end
891 class ALeExpr
892 super ABinopExpr
893 end
894 class ALlExpr
895 super ABinopExpr
896 end
897 class AGtExpr
898 super ABinopExpr
899 end
900 class AGeExpr
901 super ABinopExpr
902 end
903 class AGgExpr
904 super ABinopExpr
905 end
906 class AIsaExpr
907 super ABoolExpr
908 readable var _n_expr: AExpr
909 readable var _n_type: AType
910 end
911 class APlusExpr
912 super ABinopExpr
913 end
914 class AMinusExpr
915 super ABinopExpr
916 end
917 class AStarshipExpr
918 super ABinopExpr
919 end
920 class AStarExpr
921 super ABinopExpr
922 end
923 class ASlashExpr
924 super ABinopExpr
925 end
926 class APercentExpr
927 super ABinopExpr
928 end
929 class AUminusExpr
930 super ASendExpr
931 readable var _n_minus: TMinus
932 end
933 class ANewExpr
934 super AExpr
935 readable var _n_kwnew: TKwnew
936 readable var _n_type: AType
937 readable var _n_id: nullable TId = null
938 readable var _n_args: AExprs
939 end
940 abstract class AAttrFormExpr
941 super AExpr
942 readable var _n_expr: AExpr
943 readable var _n_id: TAttrid
944 end
945 class AAttrExpr
946 super AAttrFormExpr
947 end
948 class AAttrAssignExpr
949 super AAttrFormExpr
950 super AAssignFormExpr
951 end
952 abstract class ACallFormExpr
953 super ASendExpr
954 readable var _n_id: TId
955 readable var _n_args: AExprs
956 end
957 abstract class ASendReassignFormExpr
958 super ASendExpr
959 super AReassignFormExpr
960 end
961 class AAttrReassignExpr
962 super AExpr
963 super AAttrFormExpr
964 super AReassignFormExpr
965 end
966 class ACallExpr
967 super ACallFormExpr
968 end
969 class ACallAssignExpr
970 super ACallFormExpr
971 super AAssignFormExpr
972 end
973 class ACallReassignExpr
974 super AExpr
975 super ACallFormExpr
976 super ASendReassignFormExpr
977 end
978 class ASuperExpr
979 super AExpr
980 readable var _n_qualified: nullable AQualified = null
981 readable var _n_kwsuper: TKwsuper
982 readable var _n_args: AExprs
983 end
984 class AInitExpr
985 super ASendExpr
986 readable var _n_kwinit: TKwinit
987 readable var _n_args: AExprs
988 end
989 abstract class ABraFormExpr
990 super ASendExpr
991 readable var _n_args: AExprs
992 end
993 class ABraExpr
994 super ABraFormExpr
995 end
996 class ABraAssignExpr
997 super ABraFormExpr
998 super AAssignFormExpr
999 end
1000 abstract class AVarFormExpr
1001 super AExpr
1002 readable var _n_id: TId
1003 end
1004 class ABraReassignExpr
1005 super ABraFormExpr
1006 super ASendReassignFormExpr
1007 end
1008 class AClosureCallExpr
1009 super AExpr
1010 readable var _n_id: TId
1011 readable var _n_args: AExprs
1012 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
1013 end
1014 class AVarExpr
1015 super AVarFormExpr
1016 end
1017 class AVarAssignExpr
1018 super AVarFormExpr
1019 super AAssignFormExpr
1020 end
1021 class AVarReassignExpr
1022 super AVarFormExpr
1023 super AReassignFormExpr
1024 end
1025 abstract class ARangeExpr
1026 super AExpr
1027 readable var _n_expr: AExpr
1028 readable var _n_expr2: AExpr
1029 end
1030 class ACrangeExpr
1031 super ARangeExpr
1032 readable var _n_obra: TObra
1033 readable var _n_cbra: TCbra
1034 end
1035 class AOrangeExpr
1036 super ARangeExpr
1037 readable var _n_obra: TObra
1038 readable var _n_cbra: TObra
1039 end
1040 class AArrayExpr
1041 super AExpr
1042 readable var _n_exprs: AExprs
1043 end
1044 class ASelfExpr
1045 super AExpr
1046 readable var _n_kwself: nullable TKwself
1047 end
1048 class AImplicitSelfExpr
1049 super ASelfExpr
1050 end
1051 class ATrueExpr
1052 super ABoolExpr
1053 readable var _n_kwtrue: TKwtrue
1054 end
1055 class AFalseExpr
1056 super ABoolExpr
1057 readable var _n_kwfalse: TKwfalse
1058 end
1059 class ANullExpr
1060 super AExpr
1061 readable var _n_kwnull: TKwnull
1062 end
1063 class AIntExpr
1064 super AExpr
1065 readable var _n_number: TNumber
1066 end
1067 class AFloatExpr
1068 super AExpr
1069 readable var _n_float: TFloat
1070 end
1071 class ACharExpr
1072 super AExpr
1073 readable var _n_char: TChar
1074 end
1075 abstract class AStringFormExpr
1076 super AExpr
1077 end
1078 class AStringExpr
1079 super AStringFormExpr
1080 readable var _n_string: TString
1081 end
1082 class AStartStringExpr
1083 super AStringFormExpr
1084 readable var _n_string: TStartString
1085 end
1086 class AMidStringExpr
1087 super AStringFormExpr
1088 readable var _n_string: TMidString
1089 end
1090 class AEndStringExpr
1091 super AStringFormExpr
1092 readable var _n_string: TEndString
1093 end
1094 class ASuperstringExpr
1095 super AExpr
1096 readable var _n_exprs: List[AExpr] = new List[AExpr]
1097 end
1098 class AParExpr
1099 super AProxyExpr
1100 readable var _n_opar: TOpar
1101 readable var _n_cpar: TCpar
1102 end
1103 abstract class AProxyExpr
1104 super AExpr
1105 readable var _n_expr: AExpr
1106 end
1107 class AAsCastExpr
1108 super AExpr
1109 readable var _n_expr: AExpr
1110 readable var _n_kwas: TKwas
1111 readable var _n_opar: TOpar
1112 readable var _n_type: AType
1113 readable var _n_cpar: TCpar
1114 end
1115 class AAsNotnullExpr
1116 super AExpr
1117 readable var _n_expr: AExpr
1118 readable var _n_kwas: TKwas
1119 readable var _n_opar: TOpar
1120 readable var _n_kwnot: TKwnot
1121 readable var _n_kwnull: TKwnull
1122 readable var _n_cpar: TCpar
1123 end
1124 class AIssetAttrExpr
1125 super AAttrFormExpr
1126 readable var _n_kwisset: TKwisset
1127 end
1128 abstract class AExprs
1129 super Prod
1130 readable var _n_exprs: List[AExpr] = new List[AExpr]
1131 end
1132 class ADebugTypeExpr
1133 super AExpr
1134 readable var _n_kwdebug: TKwdebug
1135 readable var _n_kwtype: TKwtype
1136 readable var _n_expr: AExpr
1137 readable var _n_type: AType
1138 end
1139 class AListExprs
1140 super AExprs
1141 end
1142 class AParExprs
1143 super AExprs
1144 readable var _n_opar: TOpar
1145 readable var _n_cpar: TCpar
1146 end
1147 class ABraExprs
1148 super AExprs
1149 readable var _n_obra: TObra
1150 readable var _n_cbra: TCbra
1151 end
1152 abstract class AAssignOp super Prod end
1153 class APlusAssignOp
1154 super AAssignOp
1155 readable var _n_pluseq: TPluseq
1156 end
1157 class AMinusAssignOp
1158 super AAssignOp
1159 readable var _n_minuseq: TMinuseq
1160 end
1161 class AClosureDef
1162 super ALabelable
1163 readable var _n_bang: TBang
1164 readable var _n_id: AClosureId
1165 readable var _n_ids: List[TId] = new List[TId]
1166 readable var _n_kwdo: nullable TKwdo = null
1167 readable var _n_expr: nullable AExpr = null
1168 redef fun hot_location do return n_id.location
1169 end
1170 abstract class AClosureId
1171 super Prod
1172 end
1173 class ASimpleClosureId
1174 super AClosureId
1175 readable var _n_id: TId
1176 end
1177 class ABreakClosureId
1178 super AClosureId
1179 readable var _n_kwbreak: TKwbreak
1180 end
1181 class AModuleName
1182 special Prod
1183 readable var _n_quad: nullable TQuad = null
1184 readable var _n_path: List[TId] = new List[TId]
1185 readable var _n_id: TId
1186 end
1187 class AQualified
1188 super Prod
1189 readable var _n_quad: nullable TQuad = null
1190 readable var _n_id: List[TId] = new List[TId]
1191 readable var _n_classid: nullable TClassid = null
1192 end
1193 class ADoc
1194 super Prod
1195 readable var _n_comment: List[TComment] = new List[TComment]
1196 end
1197
1198 class Start
1199 super Prod
1200 readable var _n_base: nullable AModule
1201 readable var _n_eof: EOF
1202 init(n_base: nullable AModule, n_eof: EOF)
1203 do
1204 self._n_base = n_base
1205 self._n_eof = n_eof
1206 end
1207 end