contrib: bring in the pep8 analysis framework
[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 var _location: nullable Location
10
11 # Location is set during AST building. Once built, location cannon be null
12 # However, manual instanciated nodes may need mode care
13 fun location: Location do return _location.as(not null)
14 end
15
16 # Ancestor of all tokens
17 abstract class Token
18 super ANode
19
20 fun text : String is abstract
21 end
22
23 # Ancestor of all productions
24 abstract class Prod
25 super ANode
26 fun location=(loc: Location) do _location = loc
27 end
28 class TEol
29 super Token
30 end
31 class TNumber
32 super Token
33 end
34 class TFloat
35 super Token
36 end
37 class TChar
38 super Token
39 end
40 class TString
41 super Token
42 end
43 class THex
44 super Token
45 end
46 class TColon
47 super Token
48 end
49 class TComma
50 super Token
51 end
52 class TComment
53 super Token
54 end
55 class TTkByte
56 super Token
57 end
58 class TTkWord
59 super Token
60 end
61 class TTkBlock
62 super Token
63 end
64 class TTkAscii
65 super Token
66 end
67 class TTkAddrss
68 super Token
69 end
70 class TTkEquate
71 super Token
72 end
73 class TTkBurn
74 super Token
75 end
76 class TEndBlock
77 super Token
78 end
79 class TId
80 super Token
81 end
82 class EOF
83 super Token
84 #private init noinit do end
85 end
86 class AError
87 super EOF
88 #private init noinit do end
89 end
90
91 class ALine
92 super Prod
93 readable var _n_label_decl: nullable ALabelDecl = null
94 readable var _n_comment: nullable TComment = null
95 end
96 class AInstruction
97 super Prod
98 readable writable var _n_id: TId
99 end
100 class AOperand
101 super Prod
102 readable var _n_value: AValue
103 end
104 class AValue super Prod end
105 class ADirective super Prod end
106
107 class AListing
108 super Prod
109 readable var _n_lines: List[ALine] = new List[ALine]
110 readable var _n_label_decl: nullable ALabelDecl = null
111 readable var _n_end_block: TEndBlock
112 end
113 class AEmptyLine
114 super ALine
115 readable var _n_eol: TEol
116 end
117 abstract class ANonEmptyLine
118 super ALine
119 end
120 class AInstructionLine
121 super ANonEmptyLine
122 readable var _n_instruction: AInstruction
123 readable var _n_eol: TEol
124 end
125 class ADirectiveLine
126 super ANonEmptyLine
127 readable var _n_directive: ADirective
128 readable var _n_eol: TEol
129 end
130 class ALabelDecl
131 super Prod
132 readable var _n_id: TId
133 readable var _n_colon: TColon
134 end
135 class AUnaryInstruction
136 super AInstruction
137 end
138 class ABinaryInstruction
139 super AInstruction
140 readable var _n_operand: AOperand
141 end
142 class AImmediateOperand
143 super AOperand
144 end
145 class AAnyOperand
146 super AOperand
147 readable var _n_comma: TComma
148 readable var _n_id: TId
149 end
150 class ALabelValue
151 super AValue
152 readable var _n_id: TId
153 end
154 class ANumberValue
155 super AValue
156 readable var _n_number: TNumber
157 end
158 class ACharValue
159 super AValue
160 readable var _n_char: TChar
161 end
162 class AStringValue
163 super AValue
164 readable var _n_string: TString
165 end
166 class AHexValue
167 super AValue
168 readable var _n_hex: THex
169 end
170 class AByteDirective
171 super ADirective
172 readable var _n_tk_byte: TTkByte
173 readable var _n_value: AValue
174 end
175 class AWordDirective
176 super ADirective
177 readable var _n_tk_word: TTkWord
178 readable var _n_value: AValue
179 end
180 class ABlockDirective
181 super ADirective
182 readable var _n_tk_block: TTkBlock
183 readable var _n_value: AValue
184 end
185 class AAsciiDirective
186 super ADirective
187 readable var _n_tk_ascii: TTkAscii
188 readable var _n_value: AValue
189 end
190 class AAddrssDirective
191 super ADirective
192 readable var _n_tk_addrss: TTkAddrss
193 readable var _n_value: AValue
194 end
195 class AEquateDirective
196 super ADirective
197 readable var _n_tk_equate: TTkEquate
198 readable var _n_value: AValue
199 end
200 class ABurnDirective
201 super ADirective
202 readable var _n_tk_burn: TTkBurn
203 readable var _n_value: AValue
204 end
205
206 class Start
207 super Prod
208 readable var _n_base: nullable AListing
209 readable var _n_eof: EOF
210 init(n_base: nullable AListing, n_eof: EOF)
211 do
212 super(null)
213 _n_base = n_base
214 _n_eof = n_eof
215 end
216 end