@@ -16,10 +16,15 @@ def initialize(commandAST,token)
16
16
end
17
17
end
18
18
19
- class IdentifierAST < AST
19
+ class TerminalAST < AST
20
+ end
21
+
22
+ class IdentifierAST < TerminalAST
23
+ attr_accessor ( :typeDenoter , :decl )
20
24
def initialize ( token )
21
25
super ( token )
22
- #@astName = "identifierAST"
26
+ @typeDenoter = nil
27
+ @decl = nil
23
28
end
24
29
end
25
30
@@ -32,10 +37,13 @@ def initialize(identifierAST,expressionAST,token)
32
37
end
33
38
end
34
39
35
- class AnyTypeDenoter < TypedenoterAST
36
-
40
+ class TypeDenoterAST < AST
37
41
end
38
42
43
+ #class AnyTypeDenoter < TypedenoterAST
44
+
45
+ #end
46
+
39
47
class ExpressionAST < AST
40
48
41
49
end
@@ -46,8 +54,7 @@ class CommandAST < AST
46
54
end
47
55
class DeclarationAST < AST
48
56
end
49
- class TypedenoterAST < AST
50
- end
57
+
51
58
class ActualParameterAST < AST
52
59
end
53
60
class ActualParameterSequenceAST < AST
@@ -67,7 +74,7 @@ def initialize(arrayAggregateAST ,token)
67
74
end
68
75
end
69
76
70
- class ArrayTypeDenoter < TypedenoterAST
77
+ class ArrayTypeDenoter < TypeDenoterAST
71
78
attr_accessor ( :IL , :T )
72
79
def initialize ( integerLiteralAST , typeDenoterAST , token )
73
80
super ( token )
@@ -144,17 +151,17 @@ def CharacterExpression (characterLiteralAST,token)
144
151
end
145
152
end
146
153
147
- class TerminalAST < AST
148
- attr_accessor ( :spelling )
149
- def initialize ( spelling , token )
150
- super ( token )
151
- @spelling = spelling
152
- end
153
- end
154
+ # class TerminalAST < AST
155
+ # attr_accessor(:spelling)
156
+ # def initialize(spelling,token)
157
+ # super(token)
158
+ # @spelling = spelling
159
+ # end
160
+ # end
154
161
class CharacterLiteralAST < TerminalAST
155
- def initialize ( spelling , token )
156
- super ( spelling , token )
157
- end
162
+ # def initialize(spelling,token)
163
+ # super(spelling,token)
164
+ # end
158
165
end
159
166
class CharTypeDenoterAST < TypeDenoterAST
160
167
@@ -349,6 +356,10 @@ def initialize(formalParameterAST, formalParameterSequenceAST,token)
349
356
end
350
357
end
351
358
359
+ class RecordAggregateAST < AST
360
+ attr_accessor ( :type )
361
+ end
362
+
352
363
class MultipleRecordAggregateAST < RecordAggregateAST
353
364
attr_accessor ( :I , :E , :RA )
354
365
def initialize ( identifierAST , expressionAST , recordAggregateAST , token )
@@ -359,9 +370,7 @@ def initialize(identifierAST, expressionAST, recordAggregateAST,token)
359
370
end
360
371
end
361
372
362
- class RecordAggregateAST < AST
363
- attr_accessor ( :type )
364
- end
373
+
365
374
366
375
class RecordExpressionAST < ExpressionAST
367
376
attr_accessor ( :RA )
0 commit comments