author | vranyj1 |
Wed, 24 Feb 2016 12:12:00 +0000 | |
changeset 25 | 5a6921729520 |
parent 1 | b8cca2663544 |
permissions | -rw-r--r-- |
1 | 1 |
"{ Package: 'stx:goodies/smaCC' }" |
2 |
||
3 |
"{ NameSpace: SmaCC }" |
|
4 |
||
5 |
SmaCCParser subclass:#StParser |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SmaCC-Example Parsers' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!StParser class methodsFor:'accessing'! |
|
14 |
||
15 |
parseExpression: aString |
|
16 |
^self simplifyExpression: (self parse: aString |
|
17 |
startingAt: self startingStateForSequenceNode) |
|
18 |
! |
|
19 |
||
20 |
parseExpression: aString onError: aBlock |
|
21 |
^self simplifyExpression: (self |
|
22 |
parse: aString |
|
23 |
startingAt: self startingStateForSequenceNode |
|
24 |
onError: aBlock) |
|
25 |
! |
|
26 |
||
27 |
parseMethod: aString |
|
28 |
^self parse: aString startingAt: self startingStateForMethod |
|
29 |
! |
|
30 |
||
31 |
parseMethod: aString onError: aBlock |
|
32 |
^self |
|
33 |
parse: aString |
|
34 |
startingAt: self startingStateForMethod |
|
35 |
onError: aBlock |
|
36 |
! ! |
|
37 |
||
38 |
!StParser class methodsFor:'generated-accessing'! |
|
39 |
||
40 |
scannerClass |
|
41 |
^StScanner |
|
42 |
! ! |
|
43 |
||
44 |
!StParser class methodsFor:'generated-comments'! |
|
45 |
||
46 |
parserDefinitionComment |
|
47 |
||
48 |
"%id <number> <negative_number> <name> <binary_symbol>; |
|
49 |
%start SequenceNode ; |
|
50 |
||
51 |
Method: |
|
52 |
<name> MethodSequenceNode {(RBMethodNode selector: '1' value asSymbol arguments: #() body: '2' last) ""tags: '2' first; yourself""} |
|
53 |
| BinaryMethodName MethodSequenceNode {(RBMethodNode selector: '1' first arguments: '1' last body: '2' last) ""tags: '2' first; yourself""} |
|
54 |
| KeywordMethodName MethodSequenceNode {(RBMethodNode selector: '1' first contents asSymbol arguments: '1' last body: '2' last) ""tags: '2' first; yourself""}; |
|
55 |
||
56 |
BinaryMethodName: |
|
57 |
<binary_symbol> Variable {Array with: '1' value asSymbol with: (Array with: '2')} ; |
|
58 |
||
59 |
KeywordMethodName: |
|
60 |
<keyword> Variable {| stream | stream := WriteStream on: (String new: 30). stream nextPutAll: '1' value. Array with: stream with: (OrderedCollection with: '2')} |
|
61 |
| KeywordMethodName <keyword> Variable {'1' first nextPutAll: '2' value. '1' last add: '3'. '1'}; |
|
62 |
||
63 |
Primitives: |
|
64 |
{OrderedCollection new} |
|
65 |
| Primitives ""<"" PrimitiveMessageSend "">"" {'1' add: ('2' startPosition to: '4' startPosition); yourself}; |
|
66 |
||
67 |
PrimitiveMessageSend: |
|
68 |
| PrimitiveMessageSend <keyword> {nil} |
|
69 |
| PrimitiveMessageSend Literal {nil} |
|
70 |
| PrimitiveMessageSend ""("" {nil} |
|
71 |
| PrimitiveMessageSend "")"" {nil} |
|
72 |
| PrimitiveMessageSend ""{"" {nil} |
|
73 |
| PrimitiveMessageSend ""}"" {nil} |
|
74 |
| PrimitiveMessageSend "";"" {nil} |
|
75 |
| PrimitiveMessageSend ""."" {nil} |
|
76 |
| PrimitiveMessageSend <name> {nil} |
|
77 |
| PrimitiveMessageSend <binary_symbol> {nil}; |
|
78 |
||
79 |
MethodSequenceNode: |
|
80 |
Primitives ""|"" TemporaryVariables ""|"" Primitives Statements {Array with: ('1' addAll: '5'; yourself) with: (RBSequenceNode temporaries: '3' statements: '6')} |
|
81 |
| Primitives ""||"" Primitives Statements {Array with: ('1' addAll: '3'; yourself) with: (RBSequenceNode temporaries: #() statements: '4')} |
|
82 |
| Primitives Statements {Array with: '1' with: (RBSequenceNode temporaries: #() statements: '2')}; |
|
83 |
||
84 |
SequenceNode: |
|
85 |
Temporaries Statements {RBSequenceNode temporaries: '1' statements: '2'}; |
|
86 |
||
87 |
Temporaries: |
|
88 |
{#()} |
|
89 |
| ""||"" {#()} |
|
90 |
| ""|"" TemporaryVariables ""|"" {'2'}; |
|
91 |
||
92 |
TemporaryVariables: |
|
93 |
{OrderedCollection new} |
|
94 |
| TemporaryVariables Variable {'1' add: '2'; yourself}; |
|
95 |
||
96 |
Statements: |
|
97 |
{OrderedCollection new} |
|
98 |
| StatementList "".""? {#liftFirstValue:} |
|
99 |
| StatementList ""."" ""^"" Expression "".""? {'1' add: (RBReturnNode value: '4'); yourself} |
|
100 |
| ""^"" Expression "".""? {OrderedCollection with: (RBReturnNode value: '2')}; |
|
101 |
||
102 |
StatementList: |
|
103 |
Expression |
|
104 |
| StatementList ""."" Expression {'1' add: '3'; yourself}; |
|
105 |
||
106 |
Block: |
|
107 |
""["" BlockArgs ""|"" SequenceNode ""]"" {RBBlockNode arguments: '2' body: '4'} |
|
108 |
| ""["" SequenceNode ""]"" {RBBlockNode body: '2'} |
|
109 |
| ""["" BlockArgs ""]"" {RBBlockNode arguments: '2' body: (RBSequenceNode statements: #())} |
|
110 |
| ""["" BlockArgs ""||"" TemporaryVariables ""|"" Statements ""]"" {RBBlockNode arguments: '2' body: (RBSequenceNode temporaries: '4' statements: '6')}; |
|
111 |
||
112 |
BlockArgs: |
|
113 |
"":"" Variable {OrderedCollection with: '2'} |
|
114 |
| BlockArgs "":"" Variable {'1' add: '3'; yourself}; |
|
115 |
||
116 |
||
117 |
Expression: |
|
118 |
Variable "":="" Expression {RBAssignmentNode variable: '1' value: '3'} |
|
119 |
| Cascade {#liftFirstValue:}; |
|
120 |
||
121 |
Cascade: |
|
122 |
MessageSend CascadeList |
|
123 |
{| messages | |
|
124 |
'2' isEmpty ifTrue: [^'1']. |
|
125 |
messages := OrderedCollection new: '2' size + 1. |
|
126 |
messages add: '1'. |
|
127 |
'2' do: [:each | messages add: (RBMessageNode receiver: '1' receiver selector: each first contents asSymbol arguments: each last)]. |
|
128 |
RBCascadeNode messages: messages} |
|
129 |
| Primary {#liftFirstValue:}; |
|
130 |
||
131 |
MessageSend: |
|
132 |
KeywordMessageSend {#liftFirstValue:} |
|
133 |
| BinaryMessageSend {#liftFirstValue:} |
|
134 |
| UnaryMessageSend {#liftFirstValue:}; |
|
135 |
||
136 |
CascadeList: |
|
137 |
{OrderedCollection new} |
|
138 |
| CascadeList "";"" SimpleMessage {'1' add: '3'; yourself}; |
|
139 |
||
140 |
SimpleMessage: |
|
141 |
UnaryMessage {#liftFirstValue:} |
|
142 |
| BinaryMessage {#liftFirstValue:} |
|
143 |
| KeywordMessage {#liftFirstValue:}; |
|
144 |
||
145 |
KeywordMessageSend: |
|
146 |
BinaryMessageSend KeywordMessage {#createMessageNodeFrom:} |
|
147 |
| UnaryMessageSend KeywordMessage {#createMessageNodeFrom:} |
|
148 |
| Primary KeywordMessage {#createMessageNodeFrom:}; |
|
149 |
||
150 |
KeywordMessage: |
|
151 |
<keyword> KeywordArgument {| stream | stream := WriteStream on: (String new: 30). stream nextPutAll: '1' value. Array with: stream with: (OrderedCollection with: '2')} |
|
152 |
| KeywordMessage <keyword> KeywordArgument {'1' first nextPutAll: '2' value. '1' last add: '3'. '1'}; |
|
153 |
||
154 |
KeywordArgument: |
|
155 |
BinaryMessageSend {#liftFirstValue:} |
|
156 |
| UnaryMessageSend {#liftFirstValue:} |
|
157 |
| Primary {#liftFirstValue:}; |
|
158 |
||
159 |
BinaryMessageSend: |
|
160 |
BinaryMessageSend BinaryMessage {#createMessageNodeFrom:} |
|
161 |
| UnaryMessageSend BinaryMessage {#createMessageNodeFrom:} |
|
162 |
| Primary BinaryMessage {#createMessageNodeFrom:} ; |
|
163 |
||
164 |
BinaryMessage : |
|
165 |
<binary_symbol> BinaryArgument {Array with: (ReadStream on: '1' value) with: (Array with: '2')}; |
|
166 |
||
167 |
BinaryArgument: |
|
168 |
UnaryMessageSend {#liftFirstValue:} |
|
169 |
| Primary {#liftFirstValue:}; |
|
170 |
||
171 |
UnaryMessageSend : |
|
172 |
UnaryMessageSend UnaryMessage {#createMessageNodeFrom:} |
|
173 |
| Primary UnaryMessage {#createMessageNodeFrom:}; |
|
174 |
||
175 |
UnaryMessage : |
|
176 |
<name> {Array with: (ReadStream on: '1' value) with: #()}; |
|
177 |
||
178 |
||
179 |
Primary: |
|
180 |
""("" Expression "")"" {#liftSecondValue:} |
|
181 |
| Literal {RBLiteralNode value: '1'} |
|
182 |
| Variable {#liftFirstValue:} |
|
183 |
| Block {#liftFirstValue:}; |
|
184 |
||
185 |
Variable: |
|
186 |
<name> {RBVariableNode named: '1' value} |
|
187 |
| <dotted_name> {RBVariableNode named: '1' value}; |
|
188 |
||
189 |
Literal: |
|
190 |
""true"" {true} |
|
191 |
| ""false"" {false} |
|
192 |
| ""nil"" {nil} |
|
193 |
| <number> {'1' value} |
|
194 |
| <negative_number> {'1' value} |
|
195 |
| <character> {'1' value at: 2} |
|
196 |
| <string> {('1' value copyFrom: 2 to: '1' value size - 1) copyReplaceAll: '''''' with: ''''} |
|
197 |
| ""#"" <string> {(('2' value copyFrom: 2 to: '2' value size - 1) copyReplaceAll: '''''' with: '''') asSymbol} |
|
198 |
| ""#"" <name> {'2' value asSymbol} |
|
199 |
| ""#"" <binary_symbol> {'2' value asSymbol} |
|
200 |
| ""#"" <keyword> {'2' value asSymbol} |
|
201 |
| ""#"" <multikeyword> {'2' value asSymbol} |
|
202 |
| ""#"" ""["" ByteArray ""]"" {'3' contents} |
|
203 |
| ""#"" ""("" Array "")"" {'3' contents} |
|
204 |
| ""#"" ""{"" <name> ""}"" {'3' value asQualifiedReference} |
|
205 |
| ""#"" ""{"" <dotted_name> ""}"" {'3' value asQualifiedReference}; |
|
206 |
||
207 |
ByteArray: |
|
208 |
{WriteStream on: ByteArray new} |
|
209 |
| ByteArray <number> {'1' nextPut: '2' value; yourself}; |
|
210 |
||
211 |
Array: |
|
212 |
{WriteStream on: Array new} |
|
213 |
| Array ArrayLiteral {'1' nextPut: '2'; yourself} |
|
214 |
| Array <name> "":="" {'2' stopPosition + 1 = '3' startPosition ifTrue: ['1' nextPut: ('2' value, ':') asSymbol] ifFalse: ['1' nextPut: '2' value asSymbol; nextPut: #':']. scanner position: '3' startPosition. currentToken := nil. '1'}; |
|
215 |
||
216 |
ArrayLiteral: |
|
217 |
Literal {#liftFirstValue:} |
|
218 |
| <name> {'1' value asSymbol} |
|
219 |
| <binary_symbol> {'1' value asSymbol} |
|
220 |
| <keyword> {'1' value asSymbol} |
|
221 |
| <multikeyword> {'1' value asSymbol} |
|
222 |
| ""{"" <name> ""}"" {'2' value asQualifiedReference} |
|
223 |
| ""{"" <dotted_name> ""}"" {'2' value asQualifiedReference} |
|
224 |
| ""("" Array "")"" {'2' contents} |
|
225 |
| ""["" ByteArray ""]"" {'2' contents} |
|
226 |
| <any_char> {'1' value asSymbol} |
|
227 |
| <dotted_name> {'1' value};" |
|
228 |
! ! |
|
229 |
||
230 |
!StParser class methodsFor:'generated-starting states'! |
|
231 |
||
232 |
startingStateForMethod |
|
233 |
^1 |
|
234 |
! |
|
235 |
||
236 |
startingStateForSequenceNode |
|
237 |
^2 |
|
238 |
! ! |
|
239 |
||
240 |
!StParser class methodsFor:'private'! |
|
241 |
||
242 |
simplifyExpression: aSequenceNode |
|
243 |
^(aSequenceNode statements size == 1 |
|
244 |
and: [aSequenceNode temporaries isEmpty]) |
|
245 |
ifTrue: [aSequenceNode statements first] |
|
246 |
ifFalse: [aSequenceNode] |
|
247 |
! ! |
|
248 |
||
249 |
!StParser methodsFor:'generated-reduction actions'! |
|
250 |
||
251 |
reduceActionForArray1: nodes |
|
252 |
^WriteStream on: Array new |
|
253 |
! |
|
254 |
||
255 |
reduceActionForArray2: nodes |
|
256 |
^(nodes at: 1) |
|
257 |
nextPut: (nodes at: 2); |
|
258 |
yourself |
|
259 |
! |
|
260 |
||
261 |
reduceActionForArray3: nodes |
|
262 |
(nodes at: 2) stopPosition + 1 = (nodes at: 3) startPosition |
|
263 |
ifTrue: [(nodes at: 1) nextPut: ((nodes at: 2) value , ':') asSymbol] |
|
264 |
ifFalse: |
|
265 |
[(nodes at: 1) |
|
266 |
nextPut: (nodes at: 2) value asSymbol; |
|
267 |
nextPut: #':']. |
|
268 |
scanner position: (nodes at: 3) startPosition. |
|
269 |
currentToken := nil. |
|
270 |
^nodes at: 1 |
|
271 |
! |
|
272 |
||
273 |
reduceActionForArrayLiteral10: nodes |
|
274 |
^(nodes at: 1) value asSymbol |
|
275 |
! |
|
276 |
||
277 |
reduceActionForArrayLiteral11: nodes |
|
278 |
^(nodes at: 1) value |
|
279 |
! |
|
280 |
||
281 |
reduceActionForArrayLiteral2: nodes |
|
282 |
^(nodes at: 1) value asSymbol |
|
283 |
! |
|
284 |
||
285 |
reduceActionForArrayLiteral3: nodes |
|
286 |
^(nodes at: 1) value asSymbol |
|
287 |
! |
|
288 |
||
289 |
reduceActionForArrayLiteral4: nodes |
|
290 |
^(nodes at: 1) value asSymbol |
|
291 |
! |
|
292 |
||
293 |
reduceActionForArrayLiteral5: nodes |
|
294 |
^(nodes at: 1) value asSymbol |
|
295 |
! |
|
296 |
||
297 |
reduceActionForArrayLiteral6: nodes |
|
298 |
^(nodes at: 2) value asQualifiedReference |
|
299 |
! |
|
300 |
||
301 |
reduceActionForArrayLiteral7: nodes |
|
302 |
^(nodes at: 2) value asQualifiedReference |
|
303 |
! |
|
304 |
||
305 |
reduceActionForArrayLiteral8: nodes |
|
306 |
^(nodes at: 2) contents |
|
307 |
! |
|
308 |
||
309 |
reduceActionForArrayLiteral9: nodes |
|
310 |
^(nodes at: 2) contents |
|
311 |
! |
|
312 |
||
313 |
reduceActionForBinaryMessage1: nodes |
|
314 |
^Array with: (ReadStream on: (nodes at: 1) value) with: (Array with: (nodes at: 2)) |
|
315 |
! |
|
316 |
||
317 |
reduceActionForBinaryMethodName1: nodes |
|
318 |
^Array with: (nodes at: 1) value asSymbol with: (Array with: (nodes at: 2)) |
|
319 |
! |
|
320 |
||
321 |
reduceActionForBlock1: nodes |
|
322 |
^RBBlockNode arguments: (nodes at: 2) body: (nodes at: 4) |
|
323 |
! |
|
324 |
||
325 |
reduceActionForBlock2: nodes |
|
326 |
^RBBlockNode body: (nodes at: 2) |
|
327 |
! |
|
328 |
||
329 |
reduceActionForBlock3: nodes |
|
330 |
^RBBlockNode arguments: (nodes at: 2) body: (RBSequenceNode statements: #()) |
|
331 |
! |
|
332 |
||
333 |
reduceActionForBlock4: nodes |
|
334 |
^RBBlockNode arguments: (nodes at: 2) |
|
335 |
body: (RBSequenceNode temporaries: (nodes at: 4) statements: (nodes at: 6)) |
|
336 |
! |
|
337 |
||
338 |
reduceActionForBlockArgs1: nodes |
|
339 |
^OrderedCollection with: (nodes at: 2) |
|
340 |
! |
|
341 |
||
342 |
reduceActionForBlockArgs2: nodes |
|
343 |
^(nodes at: 1) |
|
344 |
add: (nodes at: 3); |
|
345 |
yourself |
|
346 |
! |
|
347 |
||
348 |
reduceActionForByteArray1: nodes |
|
349 |
^WriteStream on: ByteArray new |
|
350 |
! |
|
351 |
||
352 |
reduceActionForByteArray2: nodes |
|
353 |
^(nodes at: 1) |
|
354 |
nextPut: (nodes at: 2) value; |
|
355 |
yourself |
|
356 |
! |
|
357 |
||
358 |
reduceActionForCascade1: nodes |
|
359 |
| messages | |
|
360 |
(nodes at: 2) isEmpty ifTrue: [^nodes at: 1]. |
|
361 |
messages := OrderedCollection new: (nodes at: 2) size + 1. |
|
362 |
messages add: (nodes at: 1). |
|
363 |
(nodes at: 2) do: |
|
364 |
[:each | |
|
365 |
messages add: (RBMessageNode |
|
366 |
receiver: (nodes at: 1) receiver |
|
367 |
selector: each first contents asSymbol |
|
368 |
arguments: each last)]. |
|
369 |
^RBCascadeNode messages: messages |
|
370 |
! |
|
371 |
||
372 |
reduceActionForCascadeList1: nodes |
|
373 |
^OrderedCollection new |
|
374 |
! |
|
375 |
||
376 |
reduceActionForCascadeList2: nodes |
|
377 |
^(nodes at: 1) |
|
378 |
add: (nodes at: 3); |
|
379 |
yourself |
|
380 |
! |
|
381 |
||
382 |
reduceActionForExpression1: nodes |
|
383 |
^RBAssignmentNode variable: (nodes at: 1) value: (nodes at: 3) |
|
384 |
! |
|
385 |
||
386 |
reduceActionForKeywordMessage1: nodes |
|
387 |
| stream | |
|
388 |
stream := WriteStream on: (String new: 30). |
|
389 |
stream nextPutAll: (nodes at: 1) value. |
|
390 |
^Array with: stream with: (OrderedCollection with: (nodes at: 2)) |
|
391 |
! |
|
392 |
||
393 |
reduceActionForKeywordMessage2: nodes |
|
394 |
(nodes at: 1) first nextPutAll: (nodes at: 2) value. |
|
395 |
(nodes at: 1) last add: (nodes at: 3). |
|
396 |
^nodes at: 1 |
|
397 |
! |
|
398 |
||
399 |
reduceActionForKeywordMethodName1: nodes |
|
400 |
| stream | |
|
401 |
stream := WriteStream on: (String new: 30). |
|
402 |
stream nextPutAll: (nodes at: 1) value. |
|
403 |
^Array with: stream with: (OrderedCollection with: (nodes at: 2)) |
|
404 |
! |
|
405 |
||
406 |
reduceActionForKeywordMethodName2: nodes |
|
407 |
(nodes at: 1) first nextPutAll: (nodes at: 2) value. |
|
408 |
(nodes at: 1) last add: (nodes at: 3). |
|
409 |
^nodes at: 1 |
|
410 |
! |
|
411 |
||
412 |
reduceActionForLiteral10: nodes |
|
413 |
^(nodes at: 2) value asSymbol |
|
414 |
! |
|
415 |
||
416 |
reduceActionForLiteral11: nodes |
|
417 |
^(nodes at: 2) value asSymbol |
|
418 |
! |
|
419 |
||
420 |
reduceActionForLiteral12: nodes |
|
421 |
^(nodes at: 2) value asSymbol |
|
422 |
! |
|
423 |
||
424 |
reduceActionForLiteral13: nodes |
|
425 |
^(nodes at: 3) contents |
|
426 |
! |
|
427 |
||
428 |
reduceActionForLiteral14: nodes |
|
429 |
^(nodes at: 3) contents |
|
430 |
! |
|
431 |
||
432 |
reduceActionForLiteral15: nodes |
|
433 |
^(nodes at: 3) value asQualifiedReference |
|
434 |
! |
|
435 |
||
436 |
reduceActionForLiteral16: nodes |
|
437 |
^(nodes at: 3) value asQualifiedReference |
|
438 |
! |
|
439 |
||
440 |
reduceActionForLiteral1: nodes |
|
441 |
^true |
|
442 |
! |
|
443 |
||
444 |
reduceActionForLiteral2: nodes |
|
445 |
^false |
|
446 |
! |
|
447 |
||
448 |
reduceActionForLiteral3: nodes |
|
449 |
^nil |
|
450 |
! |
|
451 |
||
452 |
reduceActionForLiteral4: nodes |
|
453 |
^(nodes at: 1) value |
|
454 |
! |
|
455 |
||
456 |
reduceActionForLiteral5: nodes |
|
457 |
^(nodes at: 1) value |
|
458 |
! |
|
459 |
||
460 |
reduceActionForLiteral6: nodes |
|
461 |
^(nodes at: 1) value at: 2 |
|
462 |
! |
|
463 |
||
464 |
reduceActionForLiteral7: nodes |
|
465 |
^((nodes at: 1) value copyFrom: 2 to: (nodes at: 1) value size - 1) |
|
466 |
copyReplaceAll: '''''' |
|
467 |
with: '''' |
|
468 |
! |
|
469 |
||
470 |
reduceActionForLiteral8: nodes |
|
471 |
^(((nodes at: 2) value copyFrom: 2 to: (nodes at: 2) value size - 1) |
|
472 |
copyReplaceAll: '''''' |
|
473 |
with: '''') asSymbol |
|
474 |
! |
|
475 |
||
476 |
reduceActionForLiteral9: nodes |
|
477 |
^(nodes at: 2) value asSymbol |
|
478 |
! |
|
479 |
||
480 |
reduceActionForMethod1: nodes |
|
481 |
^RBMethodNode |
|
482 |
selector: (nodes at: 1) value asSymbol |
|
483 |
arguments: #() |
|
484 |
body: (nodes at: 2) last |
|
485 |
! |
|
486 |
||
487 |
reduceActionForMethod2: nodes |
|
488 |
^RBMethodNode |
|
489 |
selector: (nodes at: 1) first |
|
490 |
arguments: (nodes at: 1) last |
|
491 |
body: (nodes at: 2) last |
|
492 |
! |
|
493 |
||
494 |
reduceActionForMethod3: nodes |
|
495 |
^RBMethodNode |
|
496 |
selector: (nodes at: 1) first contents asSymbol |
|
497 |
arguments: (nodes at: 1) last |
|
498 |
body: (nodes at: 2) last |
|
499 |
! |
|
500 |
||
501 |
reduceActionForMethodSequenceNode1: nodes |
|
502 |
^Array with: ((nodes at: 1) |
|
503 |
addAll: (nodes at: 5); |
|
504 |
yourself) |
|
505 |
with: (RBSequenceNode temporaries: (nodes at: 3) statements: (nodes at: 6)) |
|
506 |
! |
|
507 |
||
508 |
reduceActionForMethodSequenceNode2: nodes |
|
509 |
^Array with: ((nodes at: 1) |
|
510 |
addAll: (nodes at: 3); |
|
511 |
yourself) |
|
512 |
with: (RBSequenceNode temporaries: #() statements: (nodes at: 4)) |
|
513 |
! |
|
514 |
||
515 |
reduceActionForMethodSequenceNode3: nodes |
|
516 |
^Array with: (nodes at: 1) |
|
517 |
with: (RBSequenceNode temporaries: #() statements: (nodes at: 2)) |
|
518 |
! |
|
519 |
||
520 |
reduceActionForOptional_____1: nodes |
|
521 |
^nil |
|
522 |
! |
|
523 |
||
524 |
reduceActionForOptional_____2: nodes |
|
525 |
^nodes at: 1 |
|
526 |
! |
|
527 |
||
528 |
reduceActionForPrimary2: nodes |
|
529 |
^RBLiteralNode value: (nodes at: 1) |
|
530 |
! |
|
531 |
||
532 |
reduceActionForPrimitiveMessageSend10: nodes |
|
533 |
^nil |
|
534 |
! |
|
535 |
||
536 |
reduceActionForPrimitiveMessageSend11: nodes |
|
537 |
^nil |
|
538 |
! |
|
539 |
||
540 |
reduceActionForPrimitiveMessageSend2: nodes |
|
541 |
^nil |
|
542 |
! |
|
543 |
||
544 |
reduceActionForPrimitiveMessageSend3: nodes |
|
545 |
^nil |
|
546 |
! |
|
547 |
||
548 |
reduceActionForPrimitiveMessageSend4: nodes |
|
549 |
^nil |
|
550 |
! |
|
551 |
||
552 |
reduceActionForPrimitiveMessageSend5: nodes |
|
553 |
^nil |
|
554 |
! |
|
555 |
||
556 |
reduceActionForPrimitiveMessageSend6: nodes |
|
557 |
^nil |
|
558 |
! |
|
559 |
||
560 |
reduceActionForPrimitiveMessageSend7: nodes |
|
561 |
^nil |
|
562 |
! |
|
563 |
||
564 |
reduceActionForPrimitiveMessageSend8: nodes |
|
565 |
^nil |
|
566 |
! |
|
567 |
||
568 |
reduceActionForPrimitiveMessageSend9: nodes |
|
569 |
^nil |
|
570 |
! |
|
571 |
||
572 |
reduceActionForPrimitives1: nodes |
|
573 |
^OrderedCollection new |
|
574 |
! |
|
575 |
||
576 |
reduceActionForPrimitives2: nodes |
|
577 |
^(nodes at: 1) |
|
578 |
add: ((nodes at: 2) startPosition to: (nodes at: 4) startPosition); |
|
579 |
yourself |
|
580 |
! |
|
581 |
||
582 |
reduceActionForSequenceNode1: nodes |
|
583 |
^RBSequenceNode temporaries: (nodes at: 1) statements: (nodes at: 2) |
|
584 |
! |
|
585 |
||
586 |
reduceActionForStatementList2: nodes |
|
587 |
^(nodes at: 1) |
|
588 |
add: (nodes at: 3); |
|
589 |
yourself |
|
590 |
! |
|
591 |
||
592 |
reduceActionForStatements1: nodes |
|
593 |
^OrderedCollection new |
|
594 |
! |
|
595 |
||
596 |
reduceActionForStatements3: nodes |
|
597 |
^(nodes at: 1) |
|
598 |
add: (RBReturnNode value: (nodes at: 4)); |
|
599 |
yourself |
|
600 |
! |
|
601 |
||
602 |
reduceActionForStatements4: nodes |
|
603 |
^OrderedCollection with: (RBReturnNode value: (nodes at: 2)) |
|
604 |
! |
|
605 |
||
606 |
reduceActionForTemporaries1: nodes |
|
607 |
^#() |
|
608 |
! |
|
609 |
||
610 |
reduceActionForTemporaries2: nodes |
|
611 |
^#() |
|
612 |
! |
|
613 |
||
614 |
reduceActionForTemporaries3: nodes |
|
615 |
^nodes at: 2 |
|
616 |
! |
|
617 |
||
618 |
reduceActionForTemporaryVariables1: nodes |
|
619 |
^OrderedCollection new |
|
620 |
! |
|
621 |
||
622 |
reduceActionForTemporaryVariables2: nodes |
|
623 |
^(nodes at: 1) |
|
624 |
add: (nodes at: 2); |
|
625 |
yourself |
|
626 |
! |
|
627 |
||
628 |
reduceActionForUnaryMessage1: nodes |
|
629 |
^Array with: (ReadStream on: (nodes at: 1) value) with: #() |
|
630 |
! |
|
631 |
||
632 |
reduceActionForVariable1: nodes |
|
633 |
^RBVariableNode named: (nodes at: 1) value |
|
634 |
! |
|
635 |
||
636 |
reduceActionForVariable2: nodes |
|
637 |
^RBVariableNode named: (nodes at: 1) value |
|
638 |
! ! |
|
639 |
||
640 |
!StParser methodsFor:'generated-tables'! |
|
641 |
||
642 |
reduceTable |
|
643 |
^#( |
|
644 |
#(33 0 #reduceActionForTemporaries1:) |
|
645 |
#(33 1 #reduceActionForTemporaries2:) |
|
646 |
#(33 3 #reduceActionForTemporaries3:) |
|
647 |
#(34 0 #reduceActionForStatements1:) |
|
648 |
#(34 2 #liftFirstValue:) |
|
649 |
#(34 5 #reduceActionForStatements3:) |
|
650 |
#(34 3 #reduceActionForStatements4:) |
|
651 |
#(35 1 #reduceActionForVariable1:) |
|
652 |
#(35 1 #reduceActionForVariable2:) |
|
653 |
#(36 1 #reduceFor:) |
|
654 |
#(36 3 #reduceActionForStatementList2:) |
|
655 |
#(37 0 #reduceActionForTemporaryVariables1:) |
|
656 |
#(37 2 #reduceActionForTemporaryVariables2:) |
|
657 |
#(38 3 #reduceActionForExpression1:) |
|
658 |
#(38 1 #liftFirstValue:) |
|
659 |
#(39 2 #reduceActionForBlockArgs1:) |
|
660 |
#(39 3 #reduceActionForBlockArgs2:) |
|
661 |
#(40 5 #reduceActionForBlock1:) |
|
662 |
#(40 3 #reduceActionForBlock2:) |
|
663 |
#(40 3 #reduceActionForBlock3:) |
|
664 |
#(40 7 #reduceActionForBlock4:) |
|
665 |
#(41 2 #reduceActionForCascade1:) |
|
666 |
#(41 1 #liftFirstValue:) |
|
667 |
#(42 1 #liftFirstValue:) |
|
668 |
#(42 1 #liftFirstValue:) |
|
669 |
#(42 1 #liftFirstValue:) |
|
670 |
#(43 0 #reduceActionForCascadeList1:) |
|
671 |
#(43 3 #reduceActionForCascadeList2:) |
|
672 |
#(44 3 #liftSecondValue:) |
|
673 |
#(44 1 #reduceActionForPrimary2:) |
|
674 |
#(44 1 #liftFirstValue:) |
|
675 |
#(44 1 #liftFirstValue:) |
|
676 |
#(45 0 #reduceActionForOptional_____1:) |
|
677 |
#(45 1 #reduceActionForOptional_____2:) |
|
678 |
#(46 2 #createMessageNodeFrom:) |
|
679 |
#(46 2 #createMessageNodeFrom:) |
|
680 |
#(46 2 #createMessageNodeFrom:) |
|
681 |
#(47 2 #createMessageNodeFrom:) |
|
682 |
#(47 2 #createMessageNodeFrom:) |
|
683 |
#(48 1 #liftFirstValue:) |
|
684 |
#(48 1 #liftFirstValue:) |
|
685 |
#(48 1 #liftFirstValue:) |
|
686 |
#(49 0 #reduceFor:) |
|
687 |
#(49 2 #reduceActionForPrimitiveMessageSend2:) |
|
688 |
#(49 2 #reduceActionForPrimitiveMessageSend3:) |
|
689 |
#(49 2 #reduceActionForPrimitiveMessageSend4:) |
|
690 |
#(49 2 #reduceActionForPrimitiveMessageSend5:) |
|
691 |
#(49 2 #reduceActionForPrimitiveMessageSend6:) |
|
692 |
#(49 2 #reduceActionForPrimitiveMessageSend7:) |
|
693 |
#(49 2 #reduceActionForPrimitiveMessageSend8:) |
|
694 |
#(49 2 #reduceActionForPrimitiveMessageSend9:) |
|
695 |
#(49 2 #reduceActionForPrimitiveMessageSend10:) |
|
696 |
#(49 2 #reduceActionForPrimitiveMessageSend11:) |
|
697 |
#(50 1 #reduceActionForUnaryMessage1:) |
|
698 |
#(51 2 #reduceActionForBinaryMessage1:) |
|
699 |
#(52 2 #reduceActionForKeywordMessage1:) |
|
700 |
#(52 3 #reduceActionForKeywordMessage2:) |
|
701 |
#(53 1 #liftFirstValue:) |
|
702 |
#(53 1 #liftFirstValue:) |
|
703 |
#(53 1 #liftFirstValue:) |
|
704 |
#(54 1 #liftFirstValue:) |
|
705 |
#(54 1 #liftFirstValue:) |
|
706 |
#(55 1 #reduceFor:) |
|
707 |
#(56 2 #reduceActionForMethod1:) |
|
708 |
#(56 2 #reduceActionForMethod2:) |
|
709 |
#(56 2 #reduceActionForMethod3:) |
|
710 |
#(57 2 #reduceActionForKeywordMethodName1:) |
|
711 |
#(57 3 #reduceActionForKeywordMethodName2:) |
|
712 |
#(58 2 #reduceActionForBinaryMethodName1:) |
|
713 |
#(59 0 #reduceActionForByteArray1:) |
|
714 |
#(59 2 #reduceActionForByteArray2:) |
|
715 |
#(60 0 #reduceActionForArray1:) |
|
716 |
#(60 2 #reduceActionForArray2:) |
|
717 |
#(60 3 #reduceActionForArray3:) |
|
718 |
#(61 1 #liftFirstValue:) |
|
719 |
#(61 1 #reduceActionForArrayLiteral2:) |
|
720 |
#(61 1 #reduceActionForArrayLiteral3:) |
|
721 |
#(61 1 #reduceActionForArrayLiteral4:) |
|
722 |
#(61 1 #reduceActionForArrayLiteral5:) |
|
723 |
#(61 3 #reduceActionForArrayLiteral6:) |
|
724 |
#(61 3 #reduceActionForArrayLiteral7:) |
|
725 |
#(61 3 #reduceActionForArrayLiteral8:) |
|
726 |
#(61 3 #reduceActionForArrayLiteral9:) |
|
727 |
#(61 1 #reduceActionForArrayLiteral10:) |
|
728 |
#(61 1 #reduceActionForArrayLiteral11:) |
|
729 |
#(62 2 #createMessageNodeFrom:) |
|
730 |
#(62 2 #createMessageNodeFrom:) |
|
731 |
#(62 2 #createMessageNodeFrom:) |
|
732 |
#(65 6 #reduceActionForMethodSequenceNode1:) |
|
733 |
#(65 4 #reduceActionForMethodSequenceNode2:) |
|
734 |
#(65 2 #reduceActionForMethodSequenceNode3:) |
|
735 |
#(66 2 #reduceActionForSequenceNode1:) |
|
736 |
#(67 1 #reduceActionForLiteral1:) |
|
737 |
#(67 1 #reduceActionForLiteral2:) |
|
738 |
#(67 1 #reduceActionForLiteral3:) |
|
739 |
#(67 1 #reduceActionForLiteral4:) |
|
740 |
#(67 1 #reduceActionForLiteral5:) |
|
741 |
#(67 1 #reduceActionForLiteral6:) |
|
742 |
#(67 1 #reduceActionForLiteral7:) |
|
743 |
#(67 2 #reduceActionForLiteral8:) |
|
744 |
#(67 2 #reduceActionForLiteral9:) |
|
745 |
#(67 2 #reduceActionForLiteral10:) |
|
746 |
#(67 2 #reduceActionForLiteral11:) |
|
747 |
#(67 2 #reduceActionForLiteral12:) |
|
748 |
#(67 4 #reduceActionForLiteral13:) |
|
749 |
#(67 4 #reduceActionForLiteral14:) |
|
750 |
#(67 4 #reduceActionForLiteral15:) |
|
751 |
#(67 4 #reduceActionForLiteral16:) |
|
752 |
#(68 0 #reduceActionForPrimitives1:) |
|
753 |
#(68 4 #reduceActionForPrimitives2:) |
|
754 |
) |
|
755 |
! |
|
756 |
||
757 |
transitionTable |
|
758 |
^#( |
|
759 |
#[1 0 13 0 20 0 17 0 24 0 21 0 26 0 25 0 56 0 29 0 57 0 33 0 58] |
|
760 |
#[1 0 6 0 2 0 6 0 4 0 6 0 10 0 6 0 13 0 6 0 14 0 37 0 15 0 41 0 17 0 6 0 18 0 6 0 19 0 6 0 20 0 6 0 21 0 6 0 22 0 6 0 23 0 6 0 29 0 6 0 30 0 45 0 33 0 6 0 63 0 49 0 66] |
|
761 |
#[1 1 182 0 2 1 182 0 4 1 182 0 8 1 182 0 10 1 182 0 13 1 182 0 14 1 182 0 15 1 182 0 17 1 182 0 18 1 182 0 19 1 182 0 20 1 182 0 21 1 182 0 22 1 182 0 23 1 182 0 29 1 182 0 30 1 182 0 63 0 53 0 65 0 57 0 68] |
|
762 |
#[1 0 61 0 20 0 65 0 29 0 69 0 35] |
|
763 |
#[1 0 61 0 20 0 65 0 29 0 73 0 35] |
|
764 |
#[0 0 0 0 63] |
|
765 |
#[1 1 182 0 2 1 182 0 4 1 182 0 8 1 182 0 10 1 182 0 13 1 182 0 14 1 182 0 15 1 182 0 17 1 182 0 18 1 182 0 19 1 182 0 20 1 182 0 21 1 182 0 22 1 182 0 23 0 77 0 24 1 182 0 29 1 182 0 30 1 182 0 63 0 81 0 65 0 57 0 68] |
|
766 |
#[1 1 182 0 2 1 182 0 4 1 182 0 8 1 182 0 10 1 182 0 13 1 182 0 14 1 182 0 15 1 182 0 17 1 182 0 18 1 182 0 19 1 182 0 20 1 182 0 21 1 182 0 22 1 182 0 23 1 182 0 29 1 182 0 30 1 182 0 63 0 85 0 65 0 57 0 68] |
|
767 |
#[0 0 10 0 2 0 4 0 10 0 12 0 13 0 14 0 18 0 19 0 20 0 21 0 22 0 23 0 29 0 30 0 63] |
|
768 |
#[1 0 50 0 17 0 50 0 20 0 50 0 29 0 89 0 37] |
|
769 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 18 0 12 0 105 0 13 0 109 0 14 0 113 0 18 0 117 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 137 0 34 0 141 0 35 0 145 0 36 0 149 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 18 0 63 0 181 0 67] |
|
770 |
#[0 0 0 0 63] |
|
771 |
#[0 1 2 0 63] |
|
772 |
#[1 0 93 0 2 0 97 0 4 0 185 0 8 0 101 0 10 0 105 0 13 0 109 0 14 0 189 0 15 0 193 0 17 0 113 0 18 0 117 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 197 0 34 0 141 0 35 0 145 0 36 0 149 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 18 0 63 0 181 0 67] |
|
773 |
#[0 0 34 0 1 0 2 0 4 0 5 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 26 0 29 0 30 0 63] |
|
774 |
#[0 0 38 0 1 0 2 0 4 0 5 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 26 0 29 0 30 0 63] |
|
775 |
#[0 1 14 0 2 0 4 0 8 0 10 0 13 0 14 0 15 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 29 0 30 0 63] |
|
776 |
#[0 1 22 0 2 0 4 0 8 0 10 0 13 0 14 0 15 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 29 0 30 0 63] |
|
777 |
#[1 0 61 0 20 0 65 0 29 0 201 0 35] |
|
778 |
#[0 1 10 0 63] |
|
779 |
#[0 1 6 0 63] |
|
780 |
#[1 0 205 0 17 0 61 0 20 0 65 0 29 0 209 0 35] |
|
781 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 141 0 35 0 213 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 181 0 67] |
|
782 |
#[1 0 217 0 2 0 221 0 6 0 225 0 18 0 229 0 20 0 233 0 23 0 237 0 24 0 241 0 25 0 245 0 26] |
|
783 |
#[0 1 126 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
784 |
#[0 1 122 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
785 |
#[0 1 118 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
786 |
#[1 0 6 0 2 0 6 0 4 0 6 0 10 0 6 0 12 0 6 0 13 0 6 0 14 0 37 0 15 0 249 0 16 0 41 0 17 0 6 0 18 0 6 0 19 0 6 0 20 0 6 0 21 0 6 0 22 0 6 0 23 0 6 0 29 0 6 0 30 0 45 0 33 0 253 0 39 1 1 0 66] |
|
787 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 141 0 35 1 5 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 181 0 67] |
|
788 |
#[0 1 130 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
789 |
#[0 1 134 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
790 |
#[0 1 142 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
791 |
#[0 1 138 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
792 |
#[0 1 114 0 12 0 63] |
|
793 |
#[1 0 126 0 1 0 126 0 5 1 9 0 11 0 126 0 12 0 126 0 20 0 126 0 24 0 126 0 26 0 126 0 63] |
|
794 |
#[1 1 13 0 5 0 134 0 12 1 17 0 45 0 134 0 63] |
|
795 |
#[0 0 42 0 5 0 12 0 63] |
|
796 |
#[0 0 130 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
797 |
#[0 0 62 0 1 0 5 0 12 0 63] |
|
798 |
#[1 0 110 0 1 0 110 0 5 0 110 0 9 0 110 0 12 1 21 0 43 0 110 0 63] |
|
799 |
#[1 0 94 0 1 0 94 0 5 0 94 0 12 1 25 0 20 1 29 0 24 1 33 0 26 1 37 0 50 1 41 0 51 1 45 0 52 0 94 0 63] |
|
800 |
#[1 0 102 0 1 0 102 0 5 0 102 0 9 0 102 0 12 1 29 0 24 1 33 0 26 1 49 0 51 1 53 0 52 0 102 0 63] |
|
801 |
#[1 0 106 0 1 0 106 0 5 0 106 0 9 0 106 0 12 1 25 0 20 1 29 0 24 1 33 0 26 1 57 0 50 1 61 0 51 1 65 0 52 0 106 0 63] |
|
802 |
#[0 0 98 0 1 0 5 0 9 0 12 0 63] |
|
803 |
#[0 0 122 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
804 |
#[1 0 174 0 1 0 174 0 2 0 174 0 3 0 174 0 4 0 174 0 5 0 174 0 6 0 174 0 7 0 174 0 9 0 174 0 10 0 174 0 13 0 174 0 14 0 174 0 20 0 174 0 21 0 174 0 22 0 174 0 23 0 174 0 24 0 174 0 26 0 174 0 30 1 69 0 49] |
|
805 |
#[1 1 182 0 2 1 182 0 4 1 182 0 8 1 182 0 10 1 182 0 13 1 182 0 14 1 182 0 18 1 182 0 19 1 182 0 20 1 182 0 21 1 182 0 22 1 182 0 23 1 182 0 29 1 182 0 30 1 182 0 63 1 73 0 68] |
|
806 |
#[1 0 50 0 17 0 50 0 20 0 50 0 29 1 77 0 37] |
|
807 |
#[0 1 110 0 63] |
|
808 |
#[0 1 18 0 2 0 4 0 8 0 10 0 13 0 14 0 15 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 29 0 30 0 63] |
|
809 |
#[0 0 14 0 2 0 4 0 10 0 12 0 13 0 14 0 18 0 19 0 20 0 21 0 22 0 23 0 29 0 30 0 63] |
|
810 |
#[0 0 54 0 17 0 20 0 29] |
|
811 |
#[0 1 81 0 1] |
|
812 |
#[1 1 34 0 1 1 34 0 2 1 34 0 4 1 34 0 6 1 34 0 10 1 34 0 13 1 34 0 14 1 34 0 18 1 34 0 20 1 34 0 21 1 34 0 22 1 34 0 23 1 34 0 24 1 34 0 25 1 34 0 26 1 34 0 29 1 34 0 30 1 34 0 32 1 85 0 60] |
|
813 |
#[1 1 89 0 20 1 93 0 29] |
|
814 |
#[1 1 26 0 12 1 26 0 21 1 97 0 59] |
|
815 |
#[0 1 150 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
816 |
#[0 1 146 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
817 |
#[0 1 158 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
818 |
#[0 1 162 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
819 |
#[0 1 154 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
820 |
#[1 0 61 0 20 0 65 0 29 1 101 0 35] |
|
821 |
#[1 1 105 0 12 1 109 0 15 1 113 0 16 1 117 0 17] |
|
822 |
#[0 1 121 0 12] |
|
823 |
#[1 1 125 0 5 0 134 0 12 1 129 0 45 0 134 0 63] |
|
824 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 141 0 35 1 133 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 181 0 67] |
|
825 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 138 0 12 0 105 0 13 0 109 0 14 0 113 0 18 1 137 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 141 0 35 1 141 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 138 0 63 0 181 0 67] |
|
826 |
#[0 0 22 0 12 0 63] |
|
827 |
#[1 0 90 0 1 0 90 0 5 1 145 0 9 0 90 0 12 0 90 0 63] |
|
828 |
#[0 0 218 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
829 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 1 149 0 35 0 153 0 40 1 153 0 44 1 157 0 46 1 161 0 47 1 165 0 53 0 181 0 67] |
|
830 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 1 149 0 35 0 153 0 40 1 169 0 44 1 173 0 47 1 177 0 54 0 181 0 67] |
|
831 |
#[0 0 158 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
832 |
#[0 0 150 0 1 0 5 0 9 0 12 0 24 0 26 0 63] |
|
833 |
#[1 1 98 0 1 1 98 0 5 1 98 0 9 1 98 0 12 1 181 0 24 1 98 0 63] |
|
834 |
#[0 0 142 0 1 0 5 0 9 0 12 0 24 0 26 0 63] |
|
835 |
#[1 1 90 0 1 1 90 0 5 1 90 0 9 1 90 0 12 1 181 0 24 1 90 0 63] |
|
836 |
#[0 0 154 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
837 |
#[0 0 146 0 1 0 5 0 9 0 12 0 24 0 26 0 63] |
|
838 |
#[1 1 94 0 1 1 94 0 5 1 94 0 9 1 94 0 12 1 181 0 24 1 94 0 63] |
|
839 |
#[1 1 185 0 1 1 189 0 2 1 193 0 3 0 97 0 4 1 197 0 5 1 201 0 6 1 205 0 7 1 209 0 9 0 101 0 10 0 105 0 13 0 109 0 14 1 213 0 20 0 121 0 21 0 125 0 22 0 129 0 23 1 217 0 24 1 221 0 26 0 133 0 30 1 225 0 67] |
|
840 |
#[1 0 93 0 2 0 97 0 4 0 185 0 8 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 117 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 1 229 0 34 0 141 0 35 0 145 0 36 0 149 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 18 0 63 0 181 0 67] |
|
841 |
#[1 1 233 0 17 0 61 0 20 0 65 0 29 0 209 0 35] |
|
842 |
#[0 0 118 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
843 |
#[1 1 237 0 1 1 241 0 2 0 97 0 4 1 245 0 6 0 101 0 10 0 105 0 13 0 109 0 14 1 249 0 18 1 253 0 20 0 121 0 21 0 125 0 22 0 129 0 23 2 1 0 24 2 5 0 25 2 9 0 26 2 13 0 29 0 133 0 30 2 17 0 32 2 21 0 61 2 25 0 67] |
|
844 |
#[0 2 29 0 3] |
|
845 |
#[0 2 33 0 3] |
|
846 |
#[1 2 37 0 12 2 41 0 21] |
|
847 |
#[0 0 66 0 12 0 15 0 16 0 17] |
|
848 |
#[0 0 82 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
849 |
#[1 0 50 0 17 0 50 0 20 0 50 0 29 2 45 0 37] |
|
850 |
#[1 0 61 0 20 0 65 0 29 2 49 0 35] |
|
851 |
#[1 0 6 0 2 0 6 0 4 0 6 0 10 0 6 0 12 0 6 0 13 0 6 0 14 0 37 0 15 0 41 0 17 0 6 0 18 0 6 0 19 0 6 0 20 0 6 0 21 0 6 0 22 0 6 0 23 0 6 0 29 0 6 0 30 0 45 0 33 2 53 0 66] |
|
852 |
#[0 0 78 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
853 |
#[0 0 138 0 12 0 63] |
|
854 |
#[0 0 30 0 12 0 63] |
|
855 |
#[0 0 58 0 1 0 5 0 12 0 63] |
|
856 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 0 141 0 35 2 57 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 181 0 67] |
|
857 |
#[0 0 46 0 5 0 12 0 63] |
|
858 |
#[1 1 25 0 20 1 29 0 24 1 33 0 26 2 61 0 48 2 65 0 50 2 69 0 51 2 73 0 52] |
|
859 |
#[0 0 126 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
860 |
#[1 0 242 0 1 0 242 0 5 0 242 0 9 0 242 0 12 1 25 0 20 0 242 0 24 1 33 0 26 1 37 0 50 1 41 0 51 0 242 0 63] |
|
861 |
#[1 0 234 0 1 0 234 0 5 0 234 0 9 0 234 0 12 0 234 0 24 1 33 0 26 1 49 0 51 0 234 0 63] |
|
862 |
#[1 0 238 0 1 0 238 0 5 0 238 0 9 0 238 0 12 1 25 0 20 0 238 0 24 1 33 0 26 1 57 0 50 1 61 0 51 0 238 0 63] |
|
863 |
#[0 0 226 0 1 0 5 0 9 0 12 0 24 0 63] |
|
864 |
#[1 0 250 0 1 0 250 0 5 0 250 0 9 0 250 0 12 1 25 0 20 0 250 0 24 0 250 0 26 1 37 0 50 0 250 0 63] |
|
865 |
#[1 0 246 0 1 0 246 0 5 0 246 0 9 0 246 0 12 1 25 0 20 0 246 0 24 0 246 0 26 1 57 0 50 0 246 0 63] |
|
866 |
#[0 0 222 0 1 0 5 0 9 0 12 0 24 0 26 0 63] |
|
867 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 1 149 0 35 0 153 0 40 1 153 0 44 1 157 0 46 1 161 0 47 2 77 0 53 0 181 0 67] |
|
868 |
#[0 0 190 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
869 |
#[0 0 186 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
870 |
#[0 0 198 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
871 |
#[0 0 206 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
872 |
#[0 0 194 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
873 |
#[0 1 186 0 2 0 4 0 8 0 10 0 13 0 14 0 15 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 29 0 30 0 63] |
|
874 |
#[0 0 202 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
875 |
#[0 0 210 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
876 |
#[0 0 178 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
877 |
#[0 0 214 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
878 |
#[0 0 182 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 13 0 14 0 20 0 21 0 22 0 23 0 24 0 26 0 30] |
|
879 |
#[0 1 106 0 63] |
|
880 |
#[1 1 182 0 2 1 182 0 4 1 182 0 8 1 182 0 10 1 182 0 13 1 182 0 14 1 182 0 18 1 182 0 19 1 182 0 20 1 182 0 21 1 182 0 22 1 182 0 23 1 182 0 29 1 182 0 30 1 182 0 63 2 81 0 68] |
|
881 |
#[0 1 170 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
882 |
#[1 1 34 0 1 1 34 0 2 1 34 0 4 1 34 0 6 1 34 0 10 1 34 0 13 1 34 0 14 1 34 0 18 1 34 0 20 1 34 0 21 1 34 0 22 1 34 0 23 1 34 0 24 1 34 0 25 1 34 0 26 1 34 0 29 1 34 0 30 1 34 0 32 2 85 0 60] |
|
883 |
#[1 2 89 0 20 2 93 0 29] |
|
884 |
#[1 1 26 0 12 1 26 0 21 2 97 0 59] |
|
885 |
#[1 1 50 0 1 1 50 0 2 1 50 0 4 1 50 0 6 1 50 0 10 2 101 0 11 1 50 0 13 1 50 0 14 1 50 0 18 1 50 0 20 1 50 0 21 1 50 0 22 1 50 0 23 1 50 0 24 1 50 0 25 1 50 0 26 1 50 0 29 1 50 0 30 1 50 0 32] |
|
886 |
#[0 1 58 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
887 |
#[0 1 62 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
888 |
#[0 1 54 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
889 |
#[0 1 86 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
890 |
#[0 1 82 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
891 |
#[0 1 38 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
892 |
#[0 1 46 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
893 |
#[0 1 174 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
894 |
#[0 1 178 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
895 |
#[0 1 166 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 9 0 10 0 12 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32 0 63] |
|
896 |
#[0 1 30 0 12 0 21] |
|
897 |
#[1 2 105 0 17 0 61 0 20 0 65 0 29 0 209 0 35] |
|
898 |
#[0 0 70 0 12 0 15 0 16 0 17] |
|
899 |
#[0 2 109 0 12] |
|
900 |
#[1 1 125 0 5 0 134 0 12 2 113 0 45 0 134 0 63] |
|
901 |
#[0 0 114 0 1 0 5 0 9 0 12 0 63] |
|
902 |
#[0 0 162 0 1 0 5 0 9 0 12 0 63] |
|
903 |
#[0 0 166 0 1 0 5 0 9 0 12 0 63] |
|
904 |
#[1 0 170 0 1 0 170 0 5 0 170 0 9 0 170 0 12 1 181 0 24 0 170 0 63] |
|
905 |
#[0 0 230 0 1 0 5 0 9 0 12 0 24 0 63] |
|
906 |
#[1 0 93 0 2 0 97 0 4 0 185 0 8 0 101 0 10 0 105 0 13 0 109 0 14 0 113 0 18 0 117 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 2 117 0 34 0 141 0 35 0 145 0 36 0 149 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 18 0 63 0 181 0 67] |
|
907 |
#[1 2 121 0 1 1 241 0 2 0 97 0 4 1 245 0 6 0 101 0 10 0 105 0 13 0 109 0 14 1 249 0 18 1 253 0 20 0 121 0 21 0 125 0 22 0 129 0 23 2 1 0 24 2 5 0 25 2 9 0 26 2 13 0 29 0 133 0 30 2 17 0 32 2 21 0 61 2 25 0 67] |
|
908 |
#[0 2 125 0 3] |
|
909 |
#[0 2 129 0 3] |
|
910 |
#[1 2 133 0 12 2 41 0 21] |
|
911 |
#[0 1 42 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
912 |
#[1 0 93 0 2 0 97 0 4 0 101 0 10 0 18 0 12 0 105 0 13 0 109 0 14 0 113 0 18 0 117 0 19 0 61 0 20 0 121 0 21 0 125 0 22 0 129 0 23 0 65 0 29 0 133 0 30 2 137 0 34 0 141 0 35 0 145 0 36 0 149 0 38 0 153 0 40 0 157 0 41 0 161 0 42 0 165 0 44 0 169 0 46 0 173 0 47 0 177 0 62 0 181 0 67] |
|
913 |
#[0 0 74 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
914 |
#[0 0 26 0 12 0 63] |
|
915 |
#[0 1 102 0 63] |
|
916 |
#[0 1 74 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
917 |
#[0 1 66 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
918 |
#[0 1 70 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
919 |
#[0 1 78 0 1 0 2 0 4 0 6 0 10 0 13 0 14 0 18 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 29 0 30 0 32] |
|
920 |
#[0 2 141 0 12] |
|
921 |
#[0 0 86 0 1 0 5 0 9 0 12 0 20 0 24 0 26 0 63] |
|
922 |
) |
|
923 |
! ! |
|
924 |
||
925 |
!StParser methodsFor:'private'! |
|
926 |
||
927 |
actionForCurrentToken |
|
928 |
| ids action | |
|
929 |
ids := currentToken id. |
|
930 |
1 to: ids size |
|
931 |
do: |
|
932 |
[:i | |
|
933 |
action := self actionFor: (ids at: i). |
|
934 |
(action bitAnd: self actionMask) = self errorAction ifFalse: [^action]. |
|
935 |
(ids at: i) = scanner negative_numberId |
|
936 |
ifTrue: |
|
937 |
[currentToken := SmaCCToken |
|
938 |
value: '-' |
|
939 |
start: currentToken startPosition |
|
940 |
id: (Array with: scanner binary_symbolId). |
|
941 |
scanner position: currentToken stopPosition - 1. |
|
942 |
^self actionForCurrentToken]]. |
|
943 |
^self errorAction |
|
944 |
! |
|
945 |
||
946 |
createMessageNodeFrom: aCollection |
|
947 |
^RBMessageNode |
|
948 |
receiver: aCollection first |
|
949 |
selector: (aCollection at: 2) first contents asSymbol |
|
950 |
arguments: (aCollection at: 2) last |
|
951 |
! ! |
|
952 |
||
953 |
!StParser class methodsFor:'documentation'! |
|
954 |
||
955 |
version |
|
25
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
956 |
^ '$Id$' |
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
957 |
! |
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
958 |
|
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
959 |
version_SVN |
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
960 |
^ '$Id:: $' |
1 | 961 |
! ! |
25
5a6921729520
UI improvements: added menu items to show FIRST() and LAST() sets for non-terminal symbols.
vranyj1
parents:
1
diff
changeset
|
962 |