97530a448dcb0be94b6d0f8f9ecd0ac468c03289
[nit.git] / contrib / pep8analysis / src / parser / parser_nodes.nit
1 # Raw AST node hierarchy.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_nodes
4
5 import location
6
7 # Root of the AST hierarchy
8 abstract class ANode
9 # Location is set during AST building. Once built, location cannon be null
10 # However, manual instanciated nodes may need mode care
11 var location: Location is writable, noinit
12 end
13
14 # Ancestor of all tokens
15 abstract class Token
16 super ANode
17
18 fun text : String is abstract
19 end
20
21 # Ancestor of all productions
22 abstract class Prod
23 super ANode
24 end
25 class TEol
26 super Token
27 end
28 class TNumber
29 super Token
30 end
31 class TFloat
32 super Token
33 end
34 class TChar
35 super Token
36 end
37 class TString
38 super Token
39 end
40 class THex
41 super Token
42 end
43 class TColon
44 super Token
45 end
46 class TComma
47 super Token
48 end
49 class TComment
50 super Token
51 end
52 class TTkByte
53 super Token
54 end
55 class TTkWord
56 super Token
57 end
58 class TTkBlock
59 super Token
60 end
61 class TTkAscii
62 super Token
63 end
64 class TTkAddrss
65 super Token
66 end
67 class TTkEquate
68 super Token
69 end
70 class TTkBurn
71 super Token
72 end
73 class TEndBlock
74 super Token
75 end
76 class TId
77 super Token
78 end
79 class EOF
80 super Token
81 end
82 class AError
83 super EOF
84 end
85
86 class ALine
87 super Prod
88 var n_label_decl: nullable ALabelDecl = null
89 var n_comment: nullable TComment = null
90 end
91 class AInstruction
92 super Prod
93 var n_id: TId is noinit
94 end
95 class AOperand
96 super Prod
97 var n_value: AValue is noinit
98 end
99 class AValue super Prod end
100 class ADirective super Prod end
101
102 class AListing
103 super Prod
104 var n_lines: List[ALine] = new List[ALine]
105 var n_label_decl: nullable ALabelDecl = null
106 var n_end_block: TEndBlock is noinit
107 end
108 class AEmptyLine
109 super ALine
110 var n_eol: TEol is noinit
111 end
112 abstract class ANonEmptyLine
113 super ALine
114 end
115 class AInstructionLine
116 super ANonEmptyLine
117 var n_instruction: AInstruction is noinit
118 var n_eol: TEol is noinit
119 end
120 class ADirectiveLine
121 super ANonEmptyLine
122 var n_directive: ADirective is noinit
123 var n_eol: TEol is noinit
124 end
125 class ALabelDecl
126 super Prod
127 var n_id: TId is noinit
128 var n_colon: TColon is noinit
129 end
130 class AUnaryInstruction
131 super AInstruction
132 end
133 class ABinaryInstruction
134 super AInstruction
135 var n_operand: AOperand is noinit
136 end
137 class AImmediateOperand
138 super AOperand
139 end
140 class AAnyOperand
141 super AOperand
142 var n_comma: TComma is noinit
143 var n_id: TId is noinit
144 end
145 class ALabelValue
146 super AValue
147 var n_id: TId is noinit
148 end
149 class ANumberValue
150 super AValue
151 var n_number: TNumber is noinit
152 end
153 class ACharValue
154 super AValue
155 var n_char: TChar is noinit
156 end
157 class AStringValue
158 super AValue
159 var n_string: TString is noinit
160 end
161 class AHexValue
162 super AValue
163 var n_hex: THex is noinit
164 end
165 class AByteDirective
166 super ADirective
167 var n_tk_byte: TTkByte is noinit
168 var n_value: AValue is noinit
169 end
170 class AWordDirective
171 super ADirective
172 var n_tk_word: TTkWord is noinit
173 var n_value: AValue is noinit
174 end
175 class ABlockDirective
176 super ADirective
177 var n_tk_block: TTkBlock is noinit
178 var n_value: AValue is noinit
179 end
180 class AAsciiDirective
181 super ADirective
182 var n_tk_ascii: TTkAscii is noinit
183 var n_value: AValue is noinit
184 end
185 class AAddrssDirective
186 super ADirective
187 var n_tk_addrss: TTkAddrss is noinit
188 var n_value: AValue is noinit
189 end
190 class AEquateDirective
191 super ADirective
192 var n_tk_equate: TTkEquate is noinit
193 var n_value: AValue is noinit
194 end
195 class ABurnDirective
196 super ADirective
197 var n_tk_burn: TTkBurn is noinit
198 var n_value: AValue is noinit
199 end
200
201 class Start
202 super Prod
203 var n_base: nullable AListing
204 var n_eof: EOF is noinit
205 init(n_base: nullable AListing, n_eof: EOF)
206 do
207 super
208 _n_base = n_base
209 _n_eof = n_eof
210 end
211 end