resin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. data/README.markdown +52 -0
  2. data/amber/css/amber.css +519 -0
  3. data/amber/css/documentation.css +84 -0
  4. data/amber/css/profstef.css +75 -0
  5. data/amber/css/style.css +313 -0
  6. data/amber/images/amber.png +0 -0
  7. data/amber/images/amber_small.png +0 -0
  8. data/amber/images/off.png +0 -0
  9. data/amber/images/offHover.png +0 -0
  10. data/amber/images/presentation.png +0 -0
  11. data/amber/images/profstef.png +0 -0
  12. data/amber/images/sprite.png +0 -0
  13. data/amber/images/tinylogo.png +0 -0
  14. data/amber/images/twitterwall.png +0 -0
  15. data/amber/js/Additional-Examples.deploy.js +15 -0
  16. data/amber/js/Additional-Examples.js +21 -0
  17. data/amber/js/Benchfib.deploy.js +132 -0
  18. data/amber/js/Benchfib.js +167 -0
  19. data/amber/js/Canvas.deploy.js +1304 -0
  20. data/amber/js/Canvas.js +1885 -0
  21. data/amber/js/Compiler.deploy.js +1871 -0
  22. data/amber/js/Compiler.js +2616 -0
  23. data/amber/js/Documentation.deploy.js +961 -0
  24. data/amber/js/Documentation.js +1376 -0
  25. data/amber/js/Examples.deploy.js +53 -0
  26. data/amber/js/Examples.js +73 -0
  27. data/amber/js/IDE.deploy.js +3468 -0
  28. data/amber/js/IDE.js +4883 -0
  29. data/amber/js/Kernel-Announcements.deploy.js +107 -0
  30. data/amber/js/Kernel-Announcements.js +152 -0
  31. data/amber/js/Kernel-Classes.deploy.js +675 -0
  32. data/amber/js/Kernel-Classes.js +956 -0
  33. data/amber/js/Kernel-Collections.deploy.js +3273 -0
  34. data/amber/js/Kernel-Collections.js +4644 -0
  35. data/amber/js/Kernel-Exceptions.deploy.js +244 -0
  36. data/amber/js/Kernel-Exceptions.js +349 -0
  37. data/amber/js/Kernel-Methods.deploy.js +510 -0
  38. data/amber/js/Kernel-Methods.js +739 -0
  39. data/amber/js/Kernel-Objects.deploy.js +2698 -0
  40. data/amber/js/Kernel-Objects.js +3858 -0
  41. data/amber/js/Kernel-Tests.deploy.js +1419 -0
  42. data/amber/js/Kernel-Tests.js +1929 -0
  43. data/amber/js/Kernel-Transcript.deploy.js +142 -0
  44. data/amber/js/Kernel-Transcript.js +202 -0
  45. data/amber/js/SUnit.deploy.js +351 -0
  46. data/amber/js/SUnit.js +501 -0
  47. data/amber/js/amber.js +250 -0
  48. data/amber/js/boot.js +587 -0
  49. data/amber/js/compat.js +22 -0
  50. data/amber/js/init.js +8 -0
  51. data/amber/js/lib/CodeMirror/LICENSE +19 -0
  52. data/amber/js/lib/CodeMirror/amber.css +21 -0
  53. data/amber/js/lib/CodeMirror/codemirror.css +67 -0
  54. data/amber/js/lib/CodeMirror/codemirror.js +2144 -0
  55. data/amber/js/lib/CodeMirror/smalltalk.js +134 -0
  56. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +167 -0
  57. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +4 -0
  58. data/amber/js/lib/jQuery/jquery-ui-1.8.16.custom.min.js +791 -0
  59. data/amber/js/lib/jQuery/jquery.textarea.js +267 -0
  60. data/amber/js/lib/peg-0.6.2.min.js +2 -0
  61. data/amber/js/lib/showdown.js +419 -0
  62. data/amber/js/parser.js +4005 -0
  63. data/amber/js/parser.pegjs +220 -0
  64. data/amber/st/Benchfib.st +124 -0
  65. data/amber/st/Canvas.st +556 -0
  66. data/amber/st/Compiler.st +1425 -0
  67. data/amber/st/Documentation.st +758 -0
  68. data/amber/st/Examples.st +38 -0
  69. data/amber/st/IDE.st +2336 -0
  70. data/amber/st/Kernel-Announcements.st +61 -0
  71. data/amber/st/Kernel-Classes.st +403 -0
  72. data/amber/st/Kernel-Collections.st +1673 -0
  73. data/amber/st/Kernel-Exceptions.st +124 -0
  74. data/amber/st/Kernel-Methods.st +287 -0
  75. data/amber/st/Kernel-Objects.st +1489 -0
  76. data/amber/st/Kernel-Tests.st +892 -0
  77. data/amber/st/Kernel-Transcript.st +70 -0
  78. data/amber/st/SUnit.st +172 -0
  79. data/bin/runresin +12 -0
  80. data/lib/resin.rb +0 -0
  81. data/lib/resin/app/app.rb +121 -0
  82. data/lib/resin/app/views/index.haml +10 -0
  83. metadata +216 -0
@@ -0,0 +1,4005 @@
1
+ smalltalk.parser = (function(){
2
+ /* Generated by PEG.js 0.6.2 (http://pegjs.majda.cz/). */
3
+
4
+ var result = {
5
+ /*
6
+ * Parses the input with a generated parser. If the parsing is successfull,
7
+ * returns a value explicitly or implicitly specified by the grammar from
8
+ * which the parser was generated (see |PEG.buildParser|). If the parsing is
9
+ * unsuccessful, throws |PEG.parser.SyntaxError| describing the error.
10
+ */
11
+ parse: function(input, startRule) {
12
+ var parseFunctions = {
13
+ "assignment": parse_assignment,
14
+ "binaryMessage": parse_binaryMessage,
15
+ "binaryPattern": parse_binaryPattern,
16
+ "binarySelector": parse_binarySelector,
17
+ "binarySend": parse_binarySend,
18
+ "binaryTail": parse_binaryTail,
19
+ "block": parse_block,
20
+ "blockParamList": parse_blockParamList,
21
+ "cascade": parse_cascade,
22
+ "className": parse_className,
23
+ "classReference": parse_classReference,
24
+ "comments": parse_comments,
25
+ "dynamicArray": parse_dynamicArray,
26
+ "dynamicDictionary": parse_dynamicDictionary,
27
+ "expression": parse_expression,
28
+ "expressionList": parse_expressionList,
29
+ "expressions": parse_expressions,
30
+ "float": parse_float,
31
+ "identifier": parse_identifier,
32
+ "integer": parse_integer,
33
+ "jsStatement": parse_jsStatement,
34
+ "keyword": parse_keyword,
35
+ "keywordMessage": parse_keywordMessage,
36
+ "keywordPair": parse_keywordPair,
37
+ "keywordPattern": parse_keywordPattern,
38
+ "keywordSend": parse_keywordSend,
39
+ "literal": parse_literal,
40
+ "literalArray": parse_literalArray,
41
+ "message": parse_message,
42
+ "method": parse_method,
43
+ "number": parse_number,
44
+ "operand": parse_operand,
45
+ "pseudoVariable": parse_pseudoVariable,
46
+ "reference": parse_reference,
47
+ "ret": parse_ret,
48
+ "separator": parse_separator,
49
+ "sequence": parse_sequence,
50
+ "statements": parse_statements,
51
+ "string": parse_string,
52
+ "subexpression": parse_subexpression,
53
+ "symbol": parse_symbol,
54
+ "temps": parse_temps,
55
+ "unaryMessage": parse_unaryMessage,
56
+ "unaryPattern": parse_unaryPattern,
57
+ "unarySend": parse_unarySend,
58
+ "unaryTail": parse_unaryTail,
59
+ "variable": parse_variable,
60
+ "ws": parse_ws
61
+ };
62
+
63
+ if (startRule !== undefined) {
64
+ if (parseFunctions[startRule] === undefined) {
65
+ throw new Error("Invalid rule name: " + quote(startRule) + ".");
66
+ }
67
+ } else {
68
+ startRule = "method";
69
+ }
70
+
71
+ var pos = 0;
72
+ var reportMatchFailures = true;
73
+ var rightmostMatchFailuresPos = 0;
74
+ var rightmostMatchFailuresExpected = [];
75
+ var cache = {};
76
+
77
+ function padLeft(input, padding, length) {
78
+ var result = input;
79
+
80
+ var padLength = length - input.length;
81
+ for (var i = 0; i < padLength; i++) {
82
+ result = padding + result;
83
+ }
84
+
85
+ return result;
86
+ }
87
+
88
+ function escape(ch) {
89
+ var charCode = ch.charCodeAt(0);
90
+
91
+ if (charCode <= 0xFF) {
92
+ var escapeChar = 'x';
93
+ var length = 2;
94
+ } else {
95
+ var escapeChar = 'u';
96
+ var length = 4;
97
+ }
98
+
99
+ return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length);
100
+ }
101
+
102
+ function quote(s) {
103
+ /*
104
+ * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a
105
+ * string literal except for the closing quote character, backslash,
106
+ * carriage return, line separator, paragraph separator, and line feed.
107
+ * Any character may appear in the form of an escape sequence.
108
+ */
109
+ return '"' + s
110
+ .replace(/\\/g, '\\\\') // backslash
111
+ .replace(/"/g, '\\"') // closing quote character
112
+ .replace(/\r/g, '\\r') // carriage return
113
+ .replace(/\n/g, '\\n') // line feed
114
+ .replace(/[\x80-\uFFFF]/g, escape) // non-ASCII characters
115
+ + '"';
116
+ }
117
+
118
+ function matchFailed(failure) {
119
+ if (pos < rightmostMatchFailuresPos) {
120
+ return;
121
+ }
122
+
123
+ if (pos > rightmostMatchFailuresPos) {
124
+ rightmostMatchFailuresPos = pos;
125
+ rightmostMatchFailuresExpected = [];
126
+ }
127
+
128
+ rightmostMatchFailuresExpected.push(failure);
129
+ }
130
+
131
+ function parse_separator() {
132
+ var cacheKey = 'separator@' + pos;
133
+ var cachedResult = cache[cacheKey];
134
+ if (cachedResult) {
135
+ pos = cachedResult.nextPos;
136
+ return cachedResult.result;
137
+ }
138
+
139
+
140
+ if (input.substr(pos).match(/^[ \xA0\uFEFF\n\r\u2028\u2029]/) !== null) {
141
+ var result1 = input.charAt(pos);
142
+ pos++;
143
+ } else {
144
+ var result1 = null;
145
+ if (reportMatchFailures) {
146
+ matchFailed("[ \\xA0\\uFEFF\\n\\r\\u2028\\u2029]");
147
+ }
148
+ }
149
+ if (result1 !== null) {
150
+ var result0 = [];
151
+ while (result1 !== null) {
152
+ result0.push(result1);
153
+ if (input.substr(pos).match(/^[ \xA0\uFEFF\n\r\u2028\u2029]/) !== null) {
154
+ var result1 = input.charAt(pos);
155
+ pos++;
156
+ } else {
157
+ var result1 = null;
158
+ if (reportMatchFailures) {
159
+ matchFailed("[ \\xA0\\uFEFF\\n\\r\\u2028\\u2029]");
160
+ }
161
+ }
162
+ }
163
+ } else {
164
+ var result0 = null;
165
+ }
166
+
167
+
168
+
169
+ cache[cacheKey] = {
170
+ nextPos: pos,
171
+ result: result0
172
+ };
173
+ return result0;
174
+ }
175
+
176
+ function parse_comments() {
177
+ var cacheKey = 'comments@' + pos;
178
+ var cachedResult = cache[cacheKey];
179
+ if (cachedResult) {
180
+ pos = cachedResult.nextPos;
181
+ return cachedResult.result;
182
+ }
183
+
184
+
185
+ var savedPos0 = pos;
186
+ if (input.substr(pos).match(/^["]/) !== null) {
187
+ var result2 = input.charAt(pos);
188
+ pos++;
189
+ } else {
190
+ var result2 = null;
191
+ if (reportMatchFailures) {
192
+ matchFailed("[\"]");
193
+ }
194
+ }
195
+ if (result2 !== null) {
196
+ var result3 = [];
197
+ if (input.substr(pos).match(/^[^"]/) !== null) {
198
+ var result5 = input.charAt(pos);
199
+ pos++;
200
+ } else {
201
+ var result5 = null;
202
+ if (reportMatchFailures) {
203
+ matchFailed("[^\"]");
204
+ }
205
+ }
206
+ while (result5 !== null) {
207
+ result3.push(result5);
208
+ if (input.substr(pos).match(/^[^"]/) !== null) {
209
+ var result5 = input.charAt(pos);
210
+ pos++;
211
+ } else {
212
+ var result5 = null;
213
+ if (reportMatchFailures) {
214
+ matchFailed("[^\"]");
215
+ }
216
+ }
217
+ }
218
+ if (result3 !== null) {
219
+ if (input.substr(pos).match(/^["]/) !== null) {
220
+ var result4 = input.charAt(pos);
221
+ pos++;
222
+ } else {
223
+ var result4 = null;
224
+ if (reportMatchFailures) {
225
+ matchFailed("[\"]");
226
+ }
227
+ }
228
+ if (result4 !== null) {
229
+ var result1 = [result2, result3, result4];
230
+ } else {
231
+ var result1 = null;
232
+ pos = savedPos0;
233
+ }
234
+ } else {
235
+ var result1 = null;
236
+ pos = savedPos0;
237
+ }
238
+ } else {
239
+ var result1 = null;
240
+ pos = savedPos0;
241
+ }
242
+ if (result1 !== null) {
243
+ var result0 = [];
244
+ while (result1 !== null) {
245
+ result0.push(result1);
246
+ var savedPos0 = pos;
247
+ if (input.substr(pos).match(/^["]/) !== null) {
248
+ var result2 = input.charAt(pos);
249
+ pos++;
250
+ } else {
251
+ var result2 = null;
252
+ if (reportMatchFailures) {
253
+ matchFailed("[\"]");
254
+ }
255
+ }
256
+ if (result2 !== null) {
257
+ var result3 = [];
258
+ if (input.substr(pos).match(/^[^"]/) !== null) {
259
+ var result5 = input.charAt(pos);
260
+ pos++;
261
+ } else {
262
+ var result5 = null;
263
+ if (reportMatchFailures) {
264
+ matchFailed("[^\"]");
265
+ }
266
+ }
267
+ while (result5 !== null) {
268
+ result3.push(result5);
269
+ if (input.substr(pos).match(/^[^"]/) !== null) {
270
+ var result5 = input.charAt(pos);
271
+ pos++;
272
+ } else {
273
+ var result5 = null;
274
+ if (reportMatchFailures) {
275
+ matchFailed("[^\"]");
276
+ }
277
+ }
278
+ }
279
+ if (result3 !== null) {
280
+ if (input.substr(pos).match(/^["]/) !== null) {
281
+ var result4 = input.charAt(pos);
282
+ pos++;
283
+ } else {
284
+ var result4 = null;
285
+ if (reportMatchFailures) {
286
+ matchFailed("[\"]");
287
+ }
288
+ }
289
+ if (result4 !== null) {
290
+ var result1 = [result2, result3, result4];
291
+ } else {
292
+ var result1 = null;
293
+ pos = savedPos0;
294
+ }
295
+ } else {
296
+ var result1 = null;
297
+ pos = savedPos0;
298
+ }
299
+ } else {
300
+ var result1 = null;
301
+ pos = savedPos0;
302
+ }
303
+ }
304
+ } else {
305
+ var result0 = null;
306
+ }
307
+
308
+
309
+
310
+ cache[cacheKey] = {
311
+ nextPos: pos,
312
+ result: result0
313
+ };
314
+ return result0;
315
+ }
316
+
317
+ function parse_ws() {
318
+ var cacheKey = 'ws@' + pos;
319
+ var cachedResult = cache[cacheKey];
320
+ if (cachedResult) {
321
+ pos = cachedResult.nextPos;
322
+ return cachedResult.result;
323
+ }
324
+
325
+
326
+ var result0 = [];
327
+ var result3 = parse_separator();
328
+ if (result3 !== null) {
329
+ var result1 = result3;
330
+ } else {
331
+ var result2 = parse_comments();
332
+ if (result2 !== null) {
333
+ var result1 = result2;
334
+ } else {
335
+ var result1 = null;;
336
+ };
337
+ }
338
+ while (result1 !== null) {
339
+ result0.push(result1);
340
+ var result3 = parse_separator();
341
+ if (result3 !== null) {
342
+ var result1 = result3;
343
+ } else {
344
+ var result2 = parse_comments();
345
+ if (result2 !== null) {
346
+ var result1 = result2;
347
+ } else {
348
+ var result1 = null;;
349
+ };
350
+ }
351
+ }
352
+
353
+
354
+
355
+ cache[cacheKey] = {
356
+ nextPos: pos,
357
+ result: result0
358
+ };
359
+ return result0;
360
+ }
361
+
362
+ function parse_identifier() {
363
+ var cacheKey = 'identifier@' + pos;
364
+ var cachedResult = cache[cacheKey];
365
+ if (cachedResult) {
366
+ pos = cachedResult.nextPos;
367
+ return cachedResult.result;
368
+ }
369
+
370
+
371
+ var savedPos0 = pos;
372
+ var savedPos1 = pos;
373
+ if (input.substr(pos).match(/^[a-z]/) !== null) {
374
+ var result3 = input.charAt(pos);
375
+ pos++;
376
+ } else {
377
+ var result3 = null;
378
+ if (reportMatchFailures) {
379
+ matchFailed("[a-z]");
380
+ }
381
+ }
382
+ if (result3 !== null) {
383
+ var result4 = [];
384
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
385
+ var result5 = input.charAt(pos);
386
+ pos++;
387
+ } else {
388
+ var result5 = null;
389
+ if (reportMatchFailures) {
390
+ matchFailed("[a-zA-Z0-9]");
391
+ }
392
+ }
393
+ while (result5 !== null) {
394
+ result4.push(result5);
395
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
396
+ var result5 = input.charAt(pos);
397
+ pos++;
398
+ } else {
399
+ var result5 = null;
400
+ if (reportMatchFailures) {
401
+ matchFailed("[a-zA-Z0-9]");
402
+ }
403
+ }
404
+ }
405
+ if (result4 !== null) {
406
+ var result1 = [result3, result4];
407
+ } else {
408
+ var result1 = null;
409
+ pos = savedPos1;
410
+ }
411
+ } else {
412
+ var result1 = null;
413
+ pos = savedPos1;
414
+ }
415
+ var result2 = result1 !== null
416
+ ? (function(first, others) {return first + others.join("")})(result1[0], result1[1])
417
+ : null;
418
+ if (result2 !== null) {
419
+ var result0 = result2;
420
+ } else {
421
+ var result0 = null;
422
+ pos = savedPos0;
423
+ }
424
+
425
+
426
+
427
+ cache[cacheKey] = {
428
+ nextPos: pos,
429
+ result: result0
430
+ };
431
+ return result0;
432
+ }
433
+
434
+ function parse_keyword() {
435
+ var cacheKey = 'keyword@' + pos;
436
+ var cachedResult = cache[cacheKey];
437
+ if (cachedResult) {
438
+ pos = cachedResult.nextPos;
439
+ return cachedResult.result;
440
+ }
441
+
442
+
443
+ var savedPos0 = pos;
444
+ var savedPos1 = pos;
445
+ var result3 = parse_identifier();
446
+ if (result3 !== null) {
447
+ if (input.substr(pos).match(/^[:]/) !== null) {
448
+ var result4 = input.charAt(pos);
449
+ pos++;
450
+ } else {
451
+ var result4 = null;
452
+ if (reportMatchFailures) {
453
+ matchFailed("[:]");
454
+ }
455
+ }
456
+ if (result4 !== null) {
457
+ var result1 = [result3, result4];
458
+ } else {
459
+ var result1 = null;
460
+ pos = savedPos1;
461
+ }
462
+ } else {
463
+ var result1 = null;
464
+ pos = savedPos1;
465
+ }
466
+ var result2 = result1 !== null
467
+ ? (function(first, last) {return first + last})(result1[0], result1[1])
468
+ : null;
469
+ if (result2 !== null) {
470
+ var result0 = result2;
471
+ } else {
472
+ var result0 = null;
473
+ pos = savedPos0;
474
+ }
475
+
476
+
477
+
478
+ cache[cacheKey] = {
479
+ nextPos: pos,
480
+ result: result0
481
+ };
482
+ return result0;
483
+ }
484
+
485
+ function parse_className() {
486
+ var cacheKey = 'className@' + pos;
487
+ var cachedResult = cache[cacheKey];
488
+ if (cachedResult) {
489
+ pos = cachedResult.nextPos;
490
+ return cachedResult.result;
491
+ }
492
+
493
+
494
+ var savedPos0 = pos;
495
+ var savedPos1 = pos;
496
+ if (input.substr(pos).match(/^[A-Z]/) !== null) {
497
+ var result3 = input.charAt(pos);
498
+ pos++;
499
+ } else {
500
+ var result3 = null;
501
+ if (reportMatchFailures) {
502
+ matchFailed("[A-Z]");
503
+ }
504
+ }
505
+ if (result3 !== null) {
506
+ var result4 = [];
507
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
508
+ var result5 = input.charAt(pos);
509
+ pos++;
510
+ } else {
511
+ var result5 = null;
512
+ if (reportMatchFailures) {
513
+ matchFailed("[a-zA-Z0-9]");
514
+ }
515
+ }
516
+ while (result5 !== null) {
517
+ result4.push(result5);
518
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
519
+ var result5 = input.charAt(pos);
520
+ pos++;
521
+ } else {
522
+ var result5 = null;
523
+ if (reportMatchFailures) {
524
+ matchFailed("[a-zA-Z0-9]");
525
+ }
526
+ }
527
+ }
528
+ if (result4 !== null) {
529
+ var result1 = [result3, result4];
530
+ } else {
531
+ var result1 = null;
532
+ pos = savedPos1;
533
+ }
534
+ } else {
535
+ var result1 = null;
536
+ pos = savedPos1;
537
+ }
538
+ var result2 = result1 !== null
539
+ ? (function(first, others) {return first + others.join("")})(result1[0], result1[1])
540
+ : null;
541
+ if (result2 !== null) {
542
+ var result0 = result2;
543
+ } else {
544
+ var result0 = null;
545
+ pos = savedPos0;
546
+ }
547
+
548
+
549
+
550
+ cache[cacheKey] = {
551
+ nextPos: pos,
552
+ result: result0
553
+ };
554
+ return result0;
555
+ }
556
+
557
+ function parse_string() {
558
+ var cacheKey = 'string@' + pos;
559
+ var cachedResult = cache[cacheKey];
560
+ if (cachedResult) {
561
+ pos = cachedResult.nextPos;
562
+ return cachedResult.result;
563
+ }
564
+
565
+
566
+ var savedPos0 = pos;
567
+ var savedPos1 = pos;
568
+ if (input.substr(pos).match(/^[']/) !== null) {
569
+ var result3 = input.charAt(pos);
570
+ pos++;
571
+ } else {
572
+ var result3 = null;
573
+ if (reportMatchFailures) {
574
+ matchFailed("[']");
575
+ }
576
+ }
577
+ if (result3 !== null) {
578
+ var result4 = [];
579
+ var savedPos2 = pos;
580
+ if (input.substr(pos, 2) === "''") {
581
+ var result9 = "''";
582
+ pos += 2;
583
+ } else {
584
+ var result9 = null;
585
+ if (reportMatchFailures) {
586
+ matchFailed("\"''\"");
587
+ }
588
+ }
589
+ var result10 = result9 !== null
590
+ ? (function() {return "'"})()
591
+ : null;
592
+ if (result10 !== null) {
593
+ var result8 = result10;
594
+ } else {
595
+ var result8 = null;
596
+ pos = savedPos2;
597
+ }
598
+ if (result8 !== null) {
599
+ var result6 = result8;
600
+ } else {
601
+ if (input.substr(pos).match(/^[^']/) !== null) {
602
+ var result7 = input.charAt(pos);
603
+ pos++;
604
+ } else {
605
+ var result7 = null;
606
+ if (reportMatchFailures) {
607
+ matchFailed("[^']");
608
+ }
609
+ }
610
+ if (result7 !== null) {
611
+ var result6 = result7;
612
+ } else {
613
+ var result6 = null;;
614
+ };
615
+ }
616
+ while (result6 !== null) {
617
+ result4.push(result6);
618
+ var savedPos2 = pos;
619
+ if (input.substr(pos, 2) === "''") {
620
+ var result9 = "''";
621
+ pos += 2;
622
+ } else {
623
+ var result9 = null;
624
+ if (reportMatchFailures) {
625
+ matchFailed("\"''\"");
626
+ }
627
+ }
628
+ var result10 = result9 !== null
629
+ ? (function() {return "'"})()
630
+ : null;
631
+ if (result10 !== null) {
632
+ var result8 = result10;
633
+ } else {
634
+ var result8 = null;
635
+ pos = savedPos2;
636
+ }
637
+ if (result8 !== null) {
638
+ var result6 = result8;
639
+ } else {
640
+ if (input.substr(pos).match(/^[^']/) !== null) {
641
+ var result7 = input.charAt(pos);
642
+ pos++;
643
+ } else {
644
+ var result7 = null;
645
+ if (reportMatchFailures) {
646
+ matchFailed("[^']");
647
+ }
648
+ }
649
+ if (result7 !== null) {
650
+ var result6 = result7;
651
+ } else {
652
+ var result6 = null;;
653
+ };
654
+ }
655
+ }
656
+ if (result4 !== null) {
657
+ if (input.substr(pos).match(/^[']/) !== null) {
658
+ var result5 = input.charAt(pos);
659
+ pos++;
660
+ } else {
661
+ var result5 = null;
662
+ if (reportMatchFailures) {
663
+ matchFailed("[']");
664
+ }
665
+ }
666
+ if (result5 !== null) {
667
+ var result1 = [result3, result4, result5];
668
+ } else {
669
+ var result1 = null;
670
+ pos = savedPos1;
671
+ }
672
+ } else {
673
+ var result1 = null;
674
+ pos = savedPos1;
675
+ }
676
+ } else {
677
+ var result1 = null;
678
+ pos = savedPos1;
679
+ }
680
+ var result2 = result1 !== null
681
+ ? (function(val) {
682
+ return smalltalk.ValueNode._new()
683
+ ._value_(val.join("").replace(/\"/ig, '"'))
684
+ })(result1[1])
685
+ : null;
686
+ if (result2 !== null) {
687
+ var result0 = result2;
688
+ } else {
689
+ var result0 = null;
690
+ pos = savedPos0;
691
+ }
692
+
693
+
694
+
695
+ cache[cacheKey] = {
696
+ nextPos: pos,
697
+ result: result0
698
+ };
699
+ return result0;
700
+ }
701
+
702
+ function parse_symbol() {
703
+ var cacheKey = 'symbol@' + pos;
704
+ var cachedResult = cache[cacheKey];
705
+ if (cachedResult) {
706
+ pos = cachedResult.nextPos;
707
+ return cachedResult.result;
708
+ }
709
+
710
+
711
+ var savedPos0 = pos;
712
+ var savedPos1 = pos;
713
+ if (input.substr(pos, 1) === "#") {
714
+ var result3 = "#";
715
+ pos += 1;
716
+ } else {
717
+ var result3 = null;
718
+ if (reportMatchFailures) {
719
+ matchFailed("\"#\"");
720
+ }
721
+ }
722
+ if (result3 !== null) {
723
+ var result4 = [];
724
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
725
+ var result5 = input.charAt(pos);
726
+ pos++;
727
+ } else {
728
+ var result5 = null;
729
+ if (reportMatchFailures) {
730
+ matchFailed("[a-zA-Z0-9]");
731
+ }
732
+ }
733
+ while (result5 !== null) {
734
+ result4.push(result5);
735
+ if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
736
+ var result5 = input.charAt(pos);
737
+ pos++;
738
+ } else {
739
+ var result5 = null;
740
+ if (reportMatchFailures) {
741
+ matchFailed("[a-zA-Z0-9]");
742
+ }
743
+ }
744
+ }
745
+ if (result4 !== null) {
746
+ var result1 = [result3, result4];
747
+ } else {
748
+ var result1 = null;
749
+ pos = savedPos1;
750
+ }
751
+ } else {
752
+ var result1 = null;
753
+ pos = savedPos1;
754
+ }
755
+ var result2 = result1 !== null
756
+ ? (function(val) {
757
+ return smalltalk.ValueNode._new()
758
+ ._value_(smalltalk.symbolFor(val.join("").replace(/\"/ig, '"')))
759
+ })(result1[1])
760
+ : null;
761
+ if (result2 !== null) {
762
+ var result0 = result2;
763
+ } else {
764
+ var result0 = null;
765
+ pos = savedPos0;
766
+ }
767
+
768
+
769
+
770
+ cache[cacheKey] = {
771
+ nextPos: pos,
772
+ result: result0
773
+ };
774
+ return result0;
775
+ }
776
+
777
+ function parse_number() {
778
+ var cacheKey = 'number@' + pos;
779
+ var cachedResult = cache[cacheKey];
780
+ if (cachedResult) {
781
+ pos = cachedResult.nextPos;
782
+ return cachedResult.result;
783
+ }
784
+
785
+
786
+ var savedPos0 = pos;
787
+ var result4 = parse_float();
788
+ if (result4 !== null) {
789
+ var result1 = result4;
790
+ } else {
791
+ var result3 = parse_integer();
792
+ if (result3 !== null) {
793
+ var result1 = result3;
794
+ } else {
795
+ var result1 = null;;
796
+ };
797
+ }
798
+ var result2 = result1 !== null
799
+ ? (function(n) {
800
+ return smalltalk.ValueNode._new()
801
+ ._value_(n)
802
+ })(result1)
803
+ : null;
804
+ if (result2 !== null) {
805
+ var result0 = result2;
806
+ } else {
807
+ var result0 = null;
808
+ pos = savedPos0;
809
+ }
810
+
811
+
812
+
813
+ cache[cacheKey] = {
814
+ nextPos: pos,
815
+ result: result0
816
+ };
817
+ return result0;
818
+ }
819
+
820
+ function parse_float() {
821
+ var cacheKey = 'float@' + pos;
822
+ var cachedResult = cache[cacheKey];
823
+ if (cachedResult) {
824
+ pos = cachedResult.nextPos;
825
+ return cachedResult.result;
826
+ }
827
+
828
+
829
+ var savedPos0 = pos;
830
+ var savedPos1 = pos;
831
+ if (input.substr(pos).match(/^[\-]/) !== null) {
832
+ var result7 = input.charAt(pos);
833
+ pos++;
834
+ } else {
835
+ var result7 = null;
836
+ if (reportMatchFailures) {
837
+ matchFailed("[\\-]");
838
+ }
839
+ }
840
+ var result3 = result7 !== null ? result7 : '';
841
+ if (result3 !== null) {
842
+ var result4 = parse_integer();
843
+ if (result4 !== null) {
844
+ if (input.substr(pos, 1) === ".") {
845
+ var result5 = ".";
846
+ pos += 1;
847
+ } else {
848
+ var result5 = null;
849
+ if (reportMatchFailures) {
850
+ matchFailed("\".\"");
851
+ }
852
+ }
853
+ if (result5 !== null) {
854
+ var result6 = parse_integer();
855
+ if (result6 !== null) {
856
+ var result1 = [result3, result4, result5, result6];
857
+ } else {
858
+ var result1 = null;
859
+ pos = savedPos1;
860
+ }
861
+ } else {
862
+ var result1 = null;
863
+ pos = savedPos1;
864
+ }
865
+ } else {
866
+ var result1 = null;
867
+ pos = savedPos1;
868
+ }
869
+ } else {
870
+ var result1 = null;
871
+ pos = savedPos1;
872
+ }
873
+ var result2 = result1 !== null
874
+ ? (function(neg, int, dec) {return parseFloat((neg+int+"."+dec), 10)})(result1[0], result1[1], result1[3])
875
+ : null;
876
+ if (result2 !== null) {
877
+ var result0 = result2;
878
+ } else {
879
+ var result0 = null;
880
+ pos = savedPos0;
881
+ }
882
+
883
+
884
+
885
+ cache[cacheKey] = {
886
+ nextPos: pos,
887
+ result: result0
888
+ };
889
+ return result0;
890
+ }
891
+
892
+ function parse_integer() {
893
+ var cacheKey = 'integer@' + pos;
894
+ var cachedResult = cache[cacheKey];
895
+ if (cachedResult) {
896
+ pos = cachedResult.nextPos;
897
+ return cachedResult.result;
898
+ }
899
+
900
+
901
+ var savedPos0 = pos;
902
+ var savedPos1 = pos;
903
+ if (input.substr(pos).match(/^[\-]/) !== null) {
904
+ var result6 = input.charAt(pos);
905
+ pos++;
906
+ } else {
907
+ var result6 = null;
908
+ if (reportMatchFailures) {
909
+ matchFailed("[\\-]");
910
+ }
911
+ }
912
+ var result3 = result6 !== null ? result6 : '';
913
+ if (result3 !== null) {
914
+ if (input.substr(pos).match(/^[0-9]/) !== null) {
915
+ var result5 = input.charAt(pos);
916
+ pos++;
917
+ } else {
918
+ var result5 = null;
919
+ if (reportMatchFailures) {
920
+ matchFailed("[0-9]");
921
+ }
922
+ }
923
+ if (result5 !== null) {
924
+ var result4 = [];
925
+ while (result5 !== null) {
926
+ result4.push(result5);
927
+ if (input.substr(pos).match(/^[0-9]/) !== null) {
928
+ var result5 = input.charAt(pos);
929
+ pos++;
930
+ } else {
931
+ var result5 = null;
932
+ if (reportMatchFailures) {
933
+ matchFailed("[0-9]");
934
+ }
935
+ }
936
+ }
937
+ } else {
938
+ var result4 = null;
939
+ }
940
+ if (result4 !== null) {
941
+ var result1 = [result3, result4];
942
+ } else {
943
+ var result1 = null;
944
+ pos = savedPos1;
945
+ }
946
+ } else {
947
+ var result1 = null;
948
+ pos = savedPos1;
949
+ }
950
+ var result2 = result1 !== null
951
+ ? (function(neg, digits) {return (parseInt(neg+digits.join(""), 10))})(result1[0], result1[1])
952
+ : null;
953
+ if (result2 !== null) {
954
+ var result0 = result2;
955
+ } else {
956
+ var result0 = null;
957
+ pos = savedPos0;
958
+ }
959
+
960
+
961
+
962
+ cache[cacheKey] = {
963
+ nextPos: pos,
964
+ result: result0
965
+ };
966
+ return result0;
967
+ }
968
+
969
+ function parse_literalArray() {
970
+ var cacheKey = 'literalArray@' + pos;
971
+ var cachedResult = cache[cacheKey];
972
+ if (cachedResult) {
973
+ pos = cachedResult.nextPos;
974
+ return cachedResult.result;
975
+ }
976
+
977
+
978
+ var savedPos0 = pos;
979
+ var savedPos1 = pos;
980
+ if (input.substr(pos, 2) === "#(") {
981
+ var result3 = "#(";
982
+ pos += 2;
983
+ } else {
984
+ var result3 = null;
985
+ if (reportMatchFailures) {
986
+ matchFailed("\"#(\"");
987
+ }
988
+ }
989
+ if (result3 !== null) {
990
+ var result4 = parse_ws();
991
+ if (result4 !== null) {
992
+ var result5 = [];
993
+ var savedPos2 = pos;
994
+ var savedPos3 = pos;
995
+ var result11 = parse_literal();
996
+ if (result11 !== null) {
997
+ var result12 = parse_ws();
998
+ if (result12 !== null) {
999
+ var result9 = [result11, result12];
1000
+ } else {
1001
+ var result9 = null;
1002
+ pos = savedPos3;
1003
+ }
1004
+ } else {
1005
+ var result9 = null;
1006
+ pos = savedPos3;
1007
+ }
1008
+ var result10 = result9 !== null
1009
+ ? (function(lit) {return lit._value()})(result9[0])
1010
+ : null;
1011
+ if (result10 !== null) {
1012
+ var result8 = result10;
1013
+ } else {
1014
+ var result8 = null;
1015
+ pos = savedPos2;
1016
+ }
1017
+ while (result8 !== null) {
1018
+ result5.push(result8);
1019
+ var savedPos2 = pos;
1020
+ var savedPos3 = pos;
1021
+ var result11 = parse_literal();
1022
+ if (result11 !== null) {
1023
+ var result12 = parse_ws();
1024
+ if (result12 !== null) {
1025
+ var result9 = [result11, result12];
1026
+ } else {
1027
+ var result9 = null;
1028
+ pos = savedPos3;
1029
+ }
1030
+ } else {
1031
+ var result9 = null;
1032
+ pos = savedPos3;
1033
+ }
1034
+ var result10 = result9 !== null
1035
+ ? (function(lit) {return lit._value()})(result9[0])
1036
+ : null;
1037
+ if (result10 !== null) {
1038
+ var result8 = result10;
1039
+ } else {
1040
+ var result8 = null;
1041
+ pos = savedPos2;
1042
+ }
1043
+ }
1044
+ if (result5 !== null) {
1045
+ var result6 = parse_ws();
1046
+ if (result6 !== null) {
1047
+ if (input.substr(pos, 1) === ")") {
1048
+ var result7 = ")";
1049
+ pos += 1;
1050
+ } else {
1051
+ var result7 = null;
1052
+ if (reportMatchFailures) {
1053
+ matchFailed("\")\"");
1054
+ }
1055
+ }
1056
+ if (result7 !== null) {
1057
+ var result1 = [result3, result4, result5, result6, result7];
1058
+ } else {
1059
+ var result1 = null;
1060
+ pos = savedPos1;
1061
+ }
1062
+ } else {
1063
+ var result1 = null;
1064
+ pos = savedPos1;
1065
+ }
1066
+ } else {
1067
+ var result1 = null;
1068
+ pos = savedPos1;
1069
+ }
1070
+ } else {
1071
+ var result1 = null;
1072
+ pos = savedPos1;
1073
+ }
1074
+ } else {
1075
+ var result1 = null;
1076
+ pos = savedPos1;
1077
+ }
1078
+ var result2 = result1 !== null
1079
+ ? (function(lits) {
1080
+ return smalltalk.ValueNode._new()
1081
+ ._value_(lits)
1082
+ })(result1[2])
1083
+ : null;
1084
+ if (result2 !== null) {
1085
+ var result0 = result2;
1086
+ } else {
1087
+ var result0 = null;
1088
+ pos = savedPos0;
1089
+ }
1090
+
1091
+
1092
+
1093
+ cache[cacheKey] = {
1094
+ nextPos: pos,
1095
+ result: result0
1096
+ };
1097
+ return result0;
1098
+ }
1099
+
1100
+ function parse_dynamicArray() {
1101
+ var cacheKey = 'dynamicArray@' + pos;
1102
+ var cachedResult = cache[cacheKey];
1103
+ if (cachedResult) {
1104
+ pos = cachedResult.nextPos;
1105
+ return cachedResult.result;
1106
+ }
1107
+
1108
+
1109
+ var savedPos0 = pos;
1110
+ var savedPos1 = pos;
1111
+ if (input.substr(pos, 1) === "{") {
1112
+ var result3 = "{";
1113
+ pos += 1;
1114
+ } else {
1115
+ var result3 = null;
1116
+ if (reportMatchFailures) {
1117
+ matchFailed("\"{\"");
1118
+ }
1119
+ }
1120
+ if (result3 !== null) {
1121
+ var result4 = parse_ws();
1122
+ if (result4 !== null) {
1123
+ var result8 = parse_expressions();
1124
+ var result5 = result8 !== null ? result8 : '';
1125
+ if (result5 !== null) {
1126
+ var result6 = parse_ws();
1127
+ if (result6 !== null) {
1128
+ if (input.substr(pos, 1) === "}") {
1129
+ var result7 = "}";
1130
+ pos += 1;
1131
+ } else {
1132
+ var result7 = null;
1133
+ if (reportMatchFailures) {
1134
+ matchFailed("\"}\"");
1135
+ }
1136
+ }
1137
+ if (result7 !== null) {
1138
+ var result1 = [result3, result4, result5, result6, result7];
1139
+ } else {
1140
+ var result1 = null;
1141
+ pos = savedPos1;
1142
+ }
1143
+ } else {
1144
+ var result1 = null;
1145
+ pos = savedPos1;
1146
+ }
1147
+ } else {
1148
+ var result1 = null;
1149
+ pos = savedPos1;
1150
+ }
1151
+ } else {
1152
+ var result1 = null;
1153
+ pos = savedPos1;
1154
+ }
1155
+ } else {
1156
+ var result1 = null;
1157
+ pos = savedPos1;
1158
+ }
1159
+ var result2 = result1 !== null
1160
+ ? (function(expressions) {
1161
+ return smalltalk.DynamicArrayNode._new()
1162
+ ._nodes_(expressions)
1163
+ })(result1[2])
1164
+ : null;
1165
+ if (result2 !== null) {
1166
+ var result0 = result2;
1167
+ } else {
1168
+ var result0 = null;
1169
+ pos = savedPos0;
1170
+ }
1171
+
1172
+
1173
+
1174
+ cache[cacheKey] = {
1175
+ nextPos: pos,
1176
+ result: result0
1177
+ };
1178
+ return result0;
1179
+ }
1180
+
1181
+ function parse_dynamicDictionary() {
1182
+ var cacheKey = 'dynamicDictionary@' + pos;
1183
+ var cachedResult = cache[cacheKey];
1184
+ if (cachedResult) {
1185
+ pos = cachedResult.nextPos;
1186
+ return cachedResult.result;
1187
+ }
1188
+
1189
+
1190
+ var savedPos0 = pos;
1191
+ var savedPos1 = pos;
1192
+ if (input.substr(pos, 2) === "#{") {
1193
+ var result3 = "#{";
1194
+ pos += 2;
1195
+ } else {
1196
+ var result3 = null;
1197
+ if (reportMatchFailures) {
1198
+ matchFailed("\"#{\"");
1199
+ }
1200
+ }
1201
+ if (result3 !== null) {
1202
+ var result4 = parse_ws();
1203
+ if (result4 !== null) {
1204
+ var result8 = parse_expressions();
1205
+ var result5 = result8 !== null ? result8 : '';
1206
+ if (result5 !== null) {
1207
+ var result6 = parse_ws();
1208
+ if (result6 !== null) {
1209
+ if (input.substr(pos, 1) === "}") {
1210
+ var result7 = "}";
1211
+ pos += 1;
1212
+ } else {
1213
+ var result7 = null;
1214
+ if (reportMatchFailures) {
1215
+ matchFailed("\"}\"");
1216
+ }
1217
+ }
1218
+ if (result7 !== null) {
1219
+ var result1 = [result3, result4, result5, result6, result7];
1220
+ } else {
1221
+ var result1 = null;
1222
+ pos = savedPos1;
1223
+ }
1224
+ } else {
1225
+ var result1 = null;
1226
+ pos = savedPos1;
1227
+ }
1228
+ } else {
1229
+ var result1 = null;
1230
+ pos = savedPos1;
1231
+ }
1232
+ } else {
1233
+ var result1 = null;
1234
+ pos = savedPos1;
1235
+ }
1236
+ } else {
1237
+ var result1 = null;
1238
+ pos = savedPos1;
1239
+ }
1240
+ var result2 = result1 !== null
1241
+ ? (function(expressions) {
1242
+ return smalltalk.DynamicDictionaryNode._new()
1243
+ ._nodes_(expressions)
1244
+ })(result1[2])
1245
+ : null;
1246
+ if (result2 !== null) {
1247
+ var result0 = result2;
1248
+ } else {
1249
+ var result0 = null;
1250
+ pos = savedPos0;
1251
+ }
1252
+
1253
+
1254
+
1255
+ cache[cacheKey] = {
1256
+ nextPos: pos,
1257
+ result: result0
1258
+ };
1259
+ return result0;
1260
+ }
1261
+
1262
+ function parse_pseudoVariable() {
1263
+ var cacheKey = 'pseudoVariable@' + pos;
1264
+ var cachedResult = cache[cacheKey];
1265
+ if (cachedResult) {
1266
+ pos = cachedResult.nextPos;
1267
+ return cachedResult.result;
1268
+ }
1269
+
1270
+
1271
+ var savedPos0 = pos;
1272
+ var savedPos3 = pos;
1273
+ if (input.substr(pos, 4) === "true") {
1274
+ var result10 = "true";
1275
+ pos += 4;
1276
+ } else {
1277
+ var result10 = null;
1278
+ if (reportMatchFailures) {
1279
+ matchFailed("\"true\"");
1280
+ }
1281
+ }
1282
+ var result11 = result10 !== null
1283
+ ? (function() {return true})()
1284
+ : null;
1285
+ if (result11 !== null) {
1286
+ var result9 = result11;
1287
+ } else {
1288
+ var result9 = null;
1289
+ pos = savedPos3;
1290
+ }
1291
+ if (result9 !== null) {
1292
+ var result1 = result9;
1293
+ } else {
1294
+ var savedPos2 = pos;
1295
+ if (input.substr(pos, 5) === "false") {
1296
+ var result7 = "false";
1297
+ pos += 5;
1298
+ } else {
1299
+ var result7 = null;
1300
+ if (reportMatchFailures) {
1301
+ matchFailed("\"false\"");
1302
+ }
1303
+ }
1304
+ var result8 = result7 !== null
1305
+ ? (function() {return false})()
1306
+ : null;
1307
+ if (result8 !== null) {
1308
+ var result6 = result8;
1309
+ } else {
1310
+ var result6 = null;
1311
+ pos = savedPos2;
1312
+ }
1313
+ if (result6 !== null) {
1314
+ var result1 = result6;
1315
+ } else {
1316
+ var savedPos1 = pos;
1317
+ if (input.substr(pos, 3) === "nil") {
1318
+ var result4 = "nil";
1319
+ pos += 3;
1320
+ } else {
1321
+ var result4 = null;
1322
+ if (reportMatchFailures) {
1323
+ matchFailed("\"nil\"");
1324
+ }
1325
+ }
1326
+ var result5 = result4 !== null
1327
+ ? (function() {return nil})()
1328
+ : null;
1329
+ if (result5 !== null) {
1330
+ var result3 = result5;
1331
+ } else {
1332
+ var result3 = null;
1333
+ pos = savedPos1;
1334
+ }
1335
+ if (result3 !== null) {
1336
+ var result1 = result3;
1337
+ } else {
1338
+ var result1 = null;;
1339
+ };
1340
+ };
1341
+ }
1342
+ var result2 = result1 !== null
1343
+ ? (function(val) {
1344
+ return smalltalk.ValueNode._new()._value_(val)
1345
+ })(result1)
1346
+ : null;
1347
+ if (result2 !== null) {
1348
+ var result0 = result2;
1349
+ } else {
1350
+ var result0 = null;
1351
+ pos = savedPos0;
1352
+ }
1353
+
1354
+
1355
+
1356
+ cache[cacheKey] = {
1357
+ nextPos: pos,
1358
+ result: result0
1359
+ };
1360
+ return result0;
1361
+ }
1362
+
1363
+ function parse_literal() {
1364
+ var cacheKey = 'literal@' + pos;
1365
+ var cachedResult = cache[cacheKey];
1366
+ if (cachedResult) {
1367
+ pos = cachedResult.nextPos;
1368
+ return cachedResult.result;
1369
+ }
1370
+
1371
+
1372
+ var result8 = parse_pseudoVariable();
1373
+ if (result8 !== null) {
1374
+ var result0 = result8;
1375
+ } else {
1376
+ var result7 = parse_number();
1377
+ if (result7 !== null) {
1378
+ var result0 = result7;
1379
+ } else {
1380
+ var result6 = parse_literalArray();
1381
+ if (result6 !== null) {
1382
+ var result0 = result6;
1383
+ } else {
1384
+ var result5 = parse_dynamicDictionary();
1385
+ if (result5 !== null) {
1386
+ var result0 = result5;
1387
+ } else {
1388
+ var result4 = parse_dynamicArray();
1389
+ if (result4 !== null) {
1390
+ var result0 = result4;
1391
+ } else {
1392
+ var result3 = parse_string();
1393
+ if (result3 !== null) {
1394
+ var result0 = result3;
1395
+ } else {
1396
+ var result2 = parse_symbol();
1397
+ if (result2 !== null) {
1398
+ var result0 = result2;
1399
+ } else {
1400
+ var result1 = parse_block();
1401
+ if (result1 !== null) {
1402
+ var result0 = result1;
1403
+ } else {
1404
+ var result0 = null;;
1405
+ };
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ };
1412
+ }
1413
+
1414
+
1415
+
1416
+ cache[cacheKey] = {
1417
+ nextPos: pos,
1418
+ result: result0
1419
+ };
1420
+ return result0;
1421
+ }
1422
+
1423
+ function parse_variable() {
1424
+ var cacheKey = 'variable@' + pos;
1425
+ var cachedResult = cache[cacheKey];
1426
+ if (cachedResult) {
1427
+ pos = cachedResult.nextPos;
1428
+ return cachedResult.result;
1429
+ }
1430
+
1431
+
1432
+ var savedPos0 = pos;
1433
+ var result1 = parse_identifier();
1434
+ var result2 = result1 !== null
1435
+ ? (function(identifier) {
1436
+ return smalltalk.VariableNode._new()
1437
+ ._value_(identifier)
1438
+ })(result1)
1439
+ : null;
1440
+ if (result2 !== null) {
1441
+ var result0 = result2;
1442
+ } else {
1443
+ var result0 = null;
1444
+ pos = savedPos0;
1445
+ }
1446
+
1447
+
1448
+
1449
+ cache[cacheKey] = {
1450
+ nextPos: pos,
1451
+ result: result0
1452
+ };
1453
+ return result0;
1454
+ }
1455
+
1456
+ function parse_classReference() {
1457
+ var cacheKey = 'classReference@' + pos;
1458
+ var cachedResult = cache[cacheKey];
1459
+ if (cachedResult) {
1460
+ pos = cachedResult.nextPos;
1461
+ return cachedResult.result;
1462
+ }
1463
+
1464
+
1465
+ var savedPos0 = pos;
1466
+ var result1 = parse_className();
1467
+ var result2 = result1 !== null
1468
+ ? (function(className) {
1469
+ return smalltalk.ClassReferenceNode._new()
1470
+ ._value_(className)
1471
+ })(result1)
1472
+ : null;
1473
+ if (result2 !== null) {
1474
+ var result0 = result2;
1475
+ } else {
1476
+ var result0 = null;
1477
+ pos = savedPos0;
1478
+ }
1479
+
1480
+
1481
+
1482
+ cache[cacheKey] = {
1483
+ nextPos: pos,
1484
+ result: result0
1485
+ };
1486
+ return result0;
1487
+ }
1488
+
1489
+ function parse_reference() {
1490
+ var cacheKey = 'reference@' + pos;
1491
+ var cachedResult = cache[cacheKey];
1492
+ if (cachedResult) {
1493
+ pos = cachedResult.nextPos;
1494
+ return cachedResult.result;
1495
+ }
1496
+
1497
+
1498
+ var result2 = parse_variable();
1499
+ if (result2 !== null) {
1500
+ var result0 = result2;
1501
+ } else {
1502
+ var result1 = parse_classReference();
1503
+ if (result1 !== null) {
1504
+ var result0 = result1;
1505
+ } else {
1506
+ var result0 = null;;
1507
+ };
1508
+ }
1509
+
1510
+
1511
+
1512
+ cache[cacheKey] = {
1513
+ nextPos: pos,
1514
+ result: result0
1515
+ };
1516
+ return result0;
1517
+ }
1518
+
1519
+ function parse_keywordPair() {
1520
+ var cacheKey = 'keywordPair@' + pos;
1521
+ var cachedResult = cache[cacheKey];
1522
+ if (cachedResult) {
1523
+ pos = cachedResult.nextPos;
1524
+ return cachedResult.result;
1525
+ }
1526
+
1527
+
1528
+ var savedPos0 = pos;
1529
+ var savedPos1 = pos;
1530
+ var result3 = parse_keyword();
1531
+ if (result3 !== null) {
1532
+ var result4 = parse_ws();
1533
+ if (result4 !== null) {
1534
+ var result5 = parse_binarySend();
1535
+ if (result5 !== null) {
1536
+ var result6 = parse_ws();
1537
+ if (result6 !== null) {
1538
+ var result1 = [result3, result4, result5, result6];
1539
+ } else {
1540
+ var result1 = null;
1541
+ pos = savedPos1;
1542
+ }
1543
+ } else {
1544
+ var result1 = null;
1545
+ pos = savedPos1;
1546
+ }
1547
+ } else {
1548
+ var result1 = null;
1549
+ pos = savedPos1;
1550
+ }
1551
+ } else {
1552
+ var result1 = null;
1553
+ pos = savedPos1;
1554
+ }
1555
+ var result2 = result1 !== null
1556
+ ? (function(key, arg) {return {key:key, arg: arg}})(result1[0], result1[2])
1557
+ : null;
1558
+ if (result2 !== null) {
1559
+ var result0 = result2;
1560
+ } else {
1561
+ var result0 = null;
1562
+ pos = savedPos0;
1563
+ }
1564
+
1565
+
1566
+
1567
+ cache[cacheKey] = {
1568
+ nextPos: pos,
1569
+ result: result0
1570
+ };
1571
+ return result0;
1572
+ }
1573
+
1574
+ function parse_binarySelector() {
1575
+ var cacheKey = 'binarySelector@' + pos;
1576
+ var cachedResult = cache[cacheKey];
1577
+ if (cachedResult) {
1578
+ pos = cachedResult.nextPos;
1579
+ return cachedResult.result;
1580
+ }
1581
+
1582
+
1583
+ var savedPos0 = pos;
1584
+ if (input.substr(pos).match(/^[\\+*\/=><,@%~|&\-]/) !== null) {
1585
+ var result3 = input.charAt(pos);
1586
+ pos++;
1587
+ } else {
1588
+ var result3 = null;
1589
+ if (reportMatchFailures) {
1590
+ matchFailed("[\\\\+*\\/=><,@%~|&\\-]");
1591
+ }
1592
+ }
1593
+ if (result3 !== null) {
1594
+ var result1 = [];
1595
+ while (result3 !== null) {
1596
+ result1.push(result3);
1597
+ if (input.substr(pos).match(/^[\\+*\/=><,@%~|&\-]/) !== null) {
1598
+ var result3 = input.charAt(pos);
1599
+ pos++;
1600
+ } else {
1601
+ var result3 = null;
1602
+ if (reportMatchFailures) {
1603
+ matchFailed("[\\\\+*\\/=><,@%~|&\\-]");
1604
+ }
1605
+ }
1606
+ }
1607
+ } else {
1608
+ var result1 = null;
1609
+ }
1610
+ var result2 = result1 !== null
1611
+ ? (function(bin) {return bin.join("").replace(/\\/g, '\\\\')})(result1)
1612
+ : null;
1613
+ if (result2 !== null) {
1614
+ var result0 = result2;
1615
+ } else {
1616
+ var result0 = null;
1617
+ pos = savedPos0;
1618
+ }
1619
+
1620
+
1621
+
1622
+ cache[cacheKey] = {
1623
+ nextPos: pos,
1624
+ result: result0
1625
+ };
1626
+ return result0;
1627
+ }
1628
+
1629
+ function parse_keywordPattern() {
1630
+ var cacheKey = 'keywordPattern@' + pos;
1631
+ var cachedResult = cache[cacheKey];
1632
+ if (cachedResult) {
1633
+ pos = cachedResult.nextPos;
1634
+ return cachedResult.result;
1635
+ }
1636
+
1637
+
1638
+ var savedPos0 = pos;
1639
+ var savedPos1 = pos;
1640
+ var savedPos2 = pos;
1641
+ var result6 = parse_ws();
1642
+ if (result6 !== null) {
1643
+ var result7 = parse_keyword();
1644
+ if (result7 !== null) {
1645
+ var result8 = parse_ws();
1646
+ if (result8 !== null) {
1647
+ var result9 = parse_identifier();
1648
+ if (result9 !== null) {
1649
+ var result4 = [result6, result7, result8, result9];
1650
+ } else {
1651
+ var result4 = null;
1652
+ pos = savedPos2;
1653
+ }
1654
+ } else {
1655
+ var result4 = null;
1656
+ pos = savedPos2;
1657
+ }
1658
+ } else {
1659
+ var result4 = null;
1660
+ pos = savedPos2;
1661
+ }
1662
+ } else {
1663
+ var result4 = null;
1664
+ pos = savedPos2;
1665
+ }
1666
+ var result5 = result4 !== null
1667
+ ? (function(key, arg) {return {key:key, arg: arg}})(result4[1], result4[3])
1668
+ : null;
1669
+ if (result5 !== null) {
1670
+ var result3 = result5;
1671
+ } else {
1672
+ var result3 = null;
1673
+ pos = savedPos1;
1674
+ }
1675
+ if (result3 !== null) {
1676
+ var result1 = [];
1677
+ while (result3 !== null) {
1678
+ result1.push(result3);
1679
+ var savedPos1 = pos;
1680
+ var savedPos2 = pos;
1681
+ var result6 = parse_ws();
1682
+ if (result6 !== null) {
1683
+ var result7 = parse_keyword();
1684
+ if (result7 !== null) {
1685
+ var result8 = parse_ws();
1686
+ if (result8 !== null) {
1687
+ var result9 = parse_identifier();
1688
+ if (result9 !== null) {
1689
+ var result4 = [result6, result7, result8, result9];
1690
+ } else {
1691
+ var result4 = null;
1692
+ pos = savedPos2;
1693
+ }
1694
+ } else {
1695
+ var result4 = null;
1696
+ pos = savedPos2;
1697
+ }
1698
+ } else {
1699
+ var result4 = null;
1700
+ pos = savedPos2;
1701
+ }
1702
+ } else {
1703
+ var result4 = null;
1704
+ pos = savedPos2;
1705
+ }
1706
+ var result5 = result4 !== null
1707
+ ? (function(key, arg) {return {key:key, arg: arg}})(result4[1], result4[3])
1708
+ : null;
1709
+ if (result5 !== null) {
1710
+ var result3 = result5;
1711
+ } else {
1712
+ var result3 = null;
1713
+ pos = savedPos1;
1714
+ }
1715
+ }
1716
+ } else {
1717
+ var result1 = null;
1718
+ }
1719
+ var result2 = result1 !== null
1720
+ ? (function(pairs) {
1721
+ var keywords = [];
1722
+ var params = [];
1723
+ for(var i=0;i<pairs.length;i++){
1724
+ keywords.push(pairs[i].key);
1725
+ }
1726
+ for(var i=0;i<pairs.length;i++){
1727
+ params.push(pairs[i].arg);
1728
+ }
1729
+ return [keywords.join(""), params]
1730
+ })(result1)
1731
+ : null;
1732
+ if (result2 !== null) {
1733
+ var result0 = result2;
1734
+ } else {
1735
+ var result0 = null;
1736
+ pos = savedPos0;
1737
+ }
1738
+
1739
+
1740
+
1741
+ cache[cacheKey] = {
1742
+ nextPos: pos,
1743
+ result: result0
1744
+ };
1745
+ return result0;
1746
+ }
1747
+
1748
+ function parse_binaryPattern() {
1749
+ var cacheKey = 'binaryPattern@' + pos;
1750
+ var cachedResult = cache[cacheKey];
1751
+ if (cachedResult) {
1752
+ pos = cachedResult.nextPos;
1753
+ return cachedResult.result;
1754
+ }
1755
+
1756
+
1757
+ var savedPos0 = pos;
1758
+ var savedPos1 = pos;
1759
+ var result3 = parse_ws();
1760
+ if (result3 !== null) {
1761
+ var result4 = parse_binarySelector();
1762
+ if (result4 !== null) {
1763
+ var result5 = parse_ws();
1764
+ if (result5 !== null) {
1765
+ var result6 = parse_identifier();
1766
+ if (result6 !== null) {
1767
+ var result1 = [result3, result4, result5, result6];
1768
+ } else {
1769
+ var result1 = null;
1770
+ pos = savedPos1;
1771
+ }
1772
+ } else {
1773
+ var result1 = null;
1774
+ pos = savedPos1;
1775
+ }
1776
+ } else {
1777
+ var result1 = null;
1778
+ pos = savedPos1;
1779
+ }
1780
+ } else {
1781
+ var result1 = null;
1782
+ pos = savedPos1;
1783
+ }
1784
+ var result2 = result1 !== null
1785
+ ? (function(selector, arg) {return [selector, [arg]]})(result1[1], result1[3])
1786
+ : null;
1787
+ if (result2 !== null) {
1788
+ var result0 = result2;
1789
+ } else {
1790
+ var result0 = null;
1791
+ pos = savedPos0;
1792
+ }
1793
+
1794
+
1795
+
1796
+ cache[cacheKey] = {
1797
+ nextPos: pos,
1798
+ result: result0
1799
+ };
1800
+ return result0;
1801
+ }
1802
+
1803
+ function parse_unaryPattern() {
1804
+ var cacheKey = 'unaryPattern@' + pos;
1805
+ var cachedResult = cache[cacheKey];
1806
+ if (cachedResult) {
1807
+ pos = cachedResult.nextPos;
1808
+ return cachedResult.result;
1809
+ }
1810
+
1811
+
1812
+ var savedPos0 = pos;
1813
+ var savedPos1 = pos;
1814
+ var result3 = parse_ws();
1815
+ if (result3 !== null) {
1816
+ var result4 = parse_identifier();
1817
+ if (result4 !== null) {
1818
+ var result1 = [result3, result4];
1819
+ } else {
1820
+ var result1 = null;
1821
+ pos = savedPos1;
1822
+ }
1823
+ } else {
1824
+ var result1 = null;
1825
+ pos = savedPos1;
1826
+ }
1827
+ var result2 = result1 !== null
1828
+ ? (function(selector) {return [selector, []]})(result1[1])
1829
+ : null;
1830
+ if (result2 !== null) {
1831
+ var result0 = result2;
1832
+ } else {
1833
+ var result0 = null;
1834
+ pos = savedPos0;
1835
+ }
1836
+
1837
+
1838
+
1839
+ cache[cacheKey] = {
1840
+ nextPos: pos,
1841
+ result: result0
1842
+ };
1843
+ return result0;
1844
+ }
1845
+
1846
+ function parse_expression() {
1847
+ var cacheKey = 'expression@' + pos;
1848
+ var cachedResult = cache[cacheKey];
1849
+ if (cachedResult) {
1850
+ pos = cachedResult.nextPos;
1851
+ return cachedResult.result;
1852
+ }
1853
+
1854
+
1855
+ var result5 = parse_assignment();
1856
+ if (result5 !== null) {
1857
+ var result0 = result5;
1858
+ } else {
1859
+ var result4 = parse_cascade();
1860
+ if (result4 !== null) {
1861
+ var result0 = result4;
1862
+ } else {
1863
+ var result3 = parse_keywordSend();
1864
+ if (result3 !== null) {
1865
+ var result0 = result3;
1866
+ } else {
1867
+ var result2 = parse_binarySend();
1868
+ if (result2 !== null) {
1869
+ var result0 = result2;
1870
+ } else {
1871
+ var result1 = parse_jsStatement();
1872
+ if (result1 !== null) {
1873
+ var result0 = result1;
1874
+ } else {
1875
+ var result0 = null;;
1876
+ };
1877
+ };
1878
+ };
1879
+ };
1880
+ }
1881
+
1882
+
1883
+
1884
+ cache[cacheKey] = {
1885
+ nextPos: pos,
1886
+ result: result0
1887
+ };
1888
+ return result0;
1889
+ }
1890
+
1891
+ function parse_expressionList() {
1892
+ var cacheKey = 'expressionList@' + pos;
1893
+ var cachedResult = cache[cacheKey];
1894
+ if (cachedResult) {
1895
+ pos = cachedResult.nextPos;
1896
+ return cachedResult.result;
1897
+ }
1898
+
1899
+
1900
+ var savedPos0 = pos;
1901
+ var savedPos1 = pos;
1902
+ var result3 = parse_ws();
1903
+ if (result3 !== null) {
1904
+ if (input.substr(pos, 1) === ".") {
1905
+ var result4 = ".";
1906
+ pos += 1;
1907
+ } else {
1908
+ var result4 = null;
1909
+ if (reportMatchFailures) {
1910
+ matchFailed("\".\"");
1911
+ }
1912
+ }
1913
+ if (result4 !== null) {
1914
+ var result5 = parse_ws();
1915
+ if (result5 !== null) {
1916
+ var result6 = parse_expression();
1917
+ if (result6 !== null) {
1918
+ var result1 = [result3, result4, result5, result6];
1919
+ } else {
1920
+ var result1 = null;
1921
+ pos = savedPos1;
1922
+ }
1923
+ } else {
1924
+ var result1 = null;
1925
+ pos = savedPos1;
1926
+ }
1927
+ } else {
1928
+ var result1 = null;
1929
+ pos = savedPos1;
1930
+ }
1931
+ } else {
1932
+ var result1 = null;
1933
+ pos = savedPos1;
1934
+ }
1935
+ var result2 = result1 !== null
1936
+ ? (function(expression) {return expression})(result1[3])
1937
+ : null;
1938
+ if (result2 !== null) {
1939
+ var result0 = result2;
1940
+ } else {
1941
+ var result0 = null;
1942
+ pos = savedPos0;
1943
+ }
1944
+
1945
+
1946
+
1947
+ cache[cacheKey] = {
1948
+ nextPos: pos,
1949
+ result: result0
1950
+ };
1951
+ return result0;
1952
+ }
1953
+
1954
+ function parse_expressions() {
1955
+ var cacheKey = 'expressions@' + pos;
1956
+ var cachedResult = cache[cacheKey];
1957
+ if (cachedResult) {
1958
+ pos = cachedResult.nextPos;
1959
+ return cachedResult.result;
1960
+ }
1961
+
1962
+
1963
+ var savedPos0 = pos;
1964
+ var savedPos1 = pos;
1965
+ var result3 = parse_expression();
1966
+ if (result3 !== null) {
1967
+ var result4 = [];
1968
+ var result5 = parse_expressionList();
1969
+ while (result5 !== null) {
1970
+ result4.push(result5);
1971
+ var result5 = parse_expressionList();
1972
+ }
1973
+ if (result4 !== null) {
1974
+ var result1 = [result3, result4];
1975
+ } else {
1976
+ var result1 = null;
1977
+ pos = savedPos1;
1978
+ }
1979
+ } else {
1980
+ var result1 = null;
1981
+ pos = savedPos1;
1982
+ }
1983
+ var result2 = result1 !== null
1984
+ ? (function(first, others) {
1985
+ var result = [first];
1986
+ for(var i=0;i<others.length;i++) {
1987
+ result.push(others[i]);
1988
+ }
1989
+ return result;
1990
+ })(result1[0], result1[1])
1991
+ : null;
1992
+ if (result2 !== null) {
1993
+ var result0 = result2;
1994
+ } else {
1995
+ var result0 = null;
1996
+ pos = savedPos0;
1997
+ }
1998
+
1999
+
2000
+
2001
+ cache[cacheKey] = {
2002
+ nextPos: pos,
2003
+ result: result0
2004
+ };
2005
+ return result0;
2006
+ }
2007
+
2008
+ function parse_assignment() {
2009
+ var cacheKey = 'assignment@' + pos;
2010
+ var cachedResult = cache[cacheKey];
2011
+ if (cachedResult) {
2012
+ pos = cachedResult.nextPos;
2013
+ return cachedResult.result;
2014
+ }
2015
+
2016
+
2017
+ var savedPos0 = pos;
2018
+ var savedPos1 = pos;
2019
+ var result3 = parse_variable();
2020
+ if (result3 !== null) {
2021
+ var result4 = parse_ws();
2022
+ if (result4 !== null) {
2023
+ if (input.substr(pos, 2) === ":=") {
2024
+ var result5 = ":=";
2025
+ pos += 2;
2026
+ } else {
2027
+ var result5 = null;
2028
+ if (reportMatchFailures) {
2029
+ matchFailed("\":=\"");
2030
+ }
2031
+ }
2032
+ if (result5 !== null) {
2033
+ var result6 = parse_ws();
2034
+ if (result6 !== null) {
2035
+ var result7 = parse_expression();
2036
+ if (result7 !== null) {
2037
+ var result1 = [result3, result4, result5, result6, result7];
2038
+ } else {
2039
+ var result1 = null;
2040
+ pos = savedPos1;
2041
+ }
2042
+ } else {
2043
+ var result1 = null;
2044
+ pos = savedPos1;
2045
+ }
2046
+ } else {
2047
+ var result1 = null;
2048
+ pos = savedPos1;
2049
+ }
2050
+ } else {
2051
+ var result1 = null;
2052
+ pos = savedPos1;
2053
+ }
2054
+ } else {
2055
+ var result1 = null;
2056
+ pos = savedPos1;
2057
+ }
2058
+ var result2 = result1 !== null
2059
+ ? (function(variable, expression) {
2060
+ return smalltalk.AssignmentNode._new()
2061
+ ._left_(variable)
2062
+ ._right_(expression)
2063
+ })(result1[0], result1[4])
2064
+ : null;
2065
+ if (result2 !== null) {
2066
+ var result0 = result2;
2067
+ } else {
2068
+ var result0 = null;
2069
+ pos = savedPos0;
2070
+ }
2071
+
2072
+
2073
+
2074
+ cache[cacheKey] = {
2075
+ nextPos: pos,
2076
+ result: result0
2077
+ };
2078
+ return result0;
2079
+ }
2080
+
2081
+ function parse_ret() {
2082
+ var cacheKey = 'ret@' + pos;
2083
+ var cachedResult = cache[cacheKey];
2084
+ if (cachedResult) {
2085
+ pos = cachedResult.nextPos;
2086
+ return cachedResult.result;
2087
+ }
2088
+
2089
+
2090
+ var savedPos0 = pos;
2091
+ var savedPos1 = pos;
2092
+ if (input.substr(pos, 1) === "^") {
2093
+ var result3 = "^";
2094
+ pos += 1;
2095
+ } else {
2096
+ var result3 = null;
2097
+ if (reportMatchFailures) {
2098
+ matchFailed("\"^\"");
2099
+ }
2100
+ }
2101
+ if (result3 !== null) {
2102
+ var result4 = parse_ws();
2103
+ if (result4 !== null) {
2104
+ var result5 = parse_expression();
2105
+ if (result5 !== null) {
2106
+ var result6 = parse_ws();
2107
+ if (result6 !== null) {
2108
+ if (input.substr(pos, 1) === ".") {
2109
+ var result8 = ".";
2110
+ pos += 1;
2111
+ } else {
2112
+ var result8 = null;
2113
+ if (reportMatchFailures) {
2114
+ matchFailed("\".\"");
2115
+ }
2116
+ }
2117
+ var result7 = result8 !== null ? result8 : '';
2118
+ if (result7 !== null) {
2119
+ var result1 = [result3, result4, result5, result6, result7];
2120
+ } else {
2121
+ var result1 = null;
2122
+ pos = savedPos1;
2123
+ }
2124
+ } else {
2125
+ var result1 = null;
2126
+ pos = savedPos1;
2127
+ }
2128
+ } else {
2129
+ var result1 = null;
2130
+ pos = savedPos1;
2131
+ }
2132
+ } else {
2133
+ var result1 = null;
2134
+ pos = savedPos1;
2135
+ }
2136
+ } else {
2137
+ var result1 = null;
2138
+ pos = savedPos1;
2139
+ }
2140
+ var result2 = result1 !== null
2141
+ ? (function(expression) {
2142
+ return smalltalk.ReturnNode._new()
2143
+ ._nodes_([expression])
2144
+ })(result1[2])
2145
+ : null;
2146
+ if (result2 !== null) {
2147
+ var result0 = result2;
2148
+ } else {
2149
+ var result0 = null;
2150
+ pos = savedPos0;
2151
+ }
2152
+
2153
+
2154
+
2155
+ cache[cacheKey] = {
2156
+ nextPos: pos,
2157
+ result: result0
2158
+ };
2159
+ return result0;
2160
+ }
2161
+
2162
+ function parse_temps() {
2163
+ var cacheKey = 'temps@' + pos;
2164
+ var cachedResult = cache[cacheKey];
2165
+ if (cachedResult) {
2166
+ pos = cachedResult.nextPos;
2167
+ return cachedResult.result;
2168
+ }
2169
+
2170
+
2171
+ var savedPos0 = pos;
2172
+ var savedPos1 = pos;
2173
+ if (input.substr(pos, 1) === "|") {
2174
+ var result3 = "|";
2175
+ pos += 1;
2176
+ } else {
2177
+ var result3 = null;
2178
+ if (reportMatchFailures) {
2179
+ matchFailed("\"|\"");
2180
+ }
2181
+ }
2182
+ if (result3 !== null) {
2183
+ var result4 = [];
2184
+ var savedPos2 = pos;
2185
+ var savedPos3 = pos;
2186
+ var result9 = parse_ws();
2187
+ if (result9 !== null) {
2188
+ var result10 = parse_identifier();
2189
+ if (result10 !== null) {
2190
+ var result11 = parse_ws();
2191
+ if (result11 !== null) {
2192
+ var result7 = [result9, result10, result11];
2193
+ } else {
2194
+ var result7 = null;
2195
+ pos = savedPos3;
2196
+ }
2197
+ } else {
2198
+ var result7 = null;
2199
+ pos = savedPos3;
2200
+ }
2201
+ } else {
2202
+ var result7 = null;
2203
+ pos = savedPos3;
2204
+ }
2205
+ var result8 = result7 !== null
2206
+ ? (function(variable) {return variable})(result7[1])
2207
+ : null;
2208
+ if (result8 !== null) {
2209
+ var result6 = result8;
2210
+ } else {
2211
+ var result6 = null;
2212
+ pos = savedPos2;
2213
+ }
2214
+ while (result6 !== null) {
2215
+ result4.push(result6);
2216
+ var savedPos2 = pos;
2217
+ var savedPos3 = pos;
2218
+ var result9 = parse_ws();
2219
+ if (result9 !== null) {
2220
+ var result10 = parse_identifier();
2221
+ if (result10 !== null) {
2222
+ var result11 = parse_ws();
2223
+ if (result11 !== null) {
2224
+ var result7 = [result9, result10, result11];
2225
+ } else {
2226
+ var result7 = null;
2227
+ pos = savedPos3;
2228
+ }
2229
+ } else {
2230
+ var result7 = null;
2231
+ pos = savedPos3;
2232
+ }
2233
+ } else {
2234
+ var result7 = null;
2235
+ pos = savedPos3;
2236
+ }
2237
+ var result8 = result7 !== null
2238
+ ? (function(variable) {return variable})(result7[1])
2239
+ : null;
2240
+ if (result8 !== null) {
2241
+ var result6 = result8;
2242
+ } else {
2243
+ var result6 = null;
2244
+ pos = savedPos2;
2245
+ }
2246
+ }
2247
+ if (result4 !== null) {
2248
+ if (input.substr(pos, 1) === "|") {
2249
+ var result5 = "|";
2250
+ pos += 1;
2251
+ } else {
2252
+ var result5 = null;
2253
+ if (reportMatchFailures) {
2254
+ matchFailed("\"|\"");
2255
+ }
2256
+ }
2257
+ if (result5 !== null) {
2258
+ var result1 = [result3, result4, result5];
2259
+ } else {
2260
+ var result1 = null;
2261
+ pos = savedPos1;
2262
+ }
2263
+ } else {
2264
+ var result1 = null;
2265
+ pos = savedPos1;
2266
+ }
2267
+ } else {
2268
+ var result1 = null;
2269
+ pos = savedPos1;
2270
+ }
2271
+ var result2 = result1 !== null
2272
+ ? (function(vars) {return vars})(result1[1])
2273
+ : null;
2274
+ if (result2 !== null) {
2275
+ var result0 = result2;
2276
+ } else {
2277
+ var result0 = null;
2278
+ pos = savedPos0;
2279
+ }
2280
+
2281
+
2282
+
2283
+ cache[cacheKey] = {
2284
+ nextPos: pos,
2285
+ result: result0
2286
+ };
2287
+ return result0;
2288
+ }
2289
+
2290
+ function parse_blockParamList() {
2291
+ var cacheKey = 'blockParamList@' + pos;
2292
+ var cachedResult = cache[cacheKey];
2293
+ if (cachedResult) {
2294
+ pos = cachedResult.nextPos;
2295
+ return cachedResult.result;
2296
+ }
2297
+
2298
+
2299
+ var savedPos0 = pos;
2300
+ var savedPos1 = pos;
2301
+ var savedPos2 = pos;
2302
+ var savedPos3 = pos;
2303
+ var result9 = parse_ws();
2304
+ if (result9 !== null) {
2305
+ if (input.substr(pos, 1) === ":") {
2306
+ var result10 = ":";
2307
+ pos += 1;
2308
+ } else {
2309
+ var result10 = null;
2310
+ if (reportMatchFailures) {
2311
+ matchFailed("\":\"");
2312
+ }
2313
+ }
2314
+ if (result10 !== null) {
2315
+ var result11 = parse_ws();
2316
+ if (result11 !== null) {
2317
+ var result12 = parse_identifier();
2318
+ if (result12 !== null) {
2319
+ var result7 = [result9, result10, result11, result12];
2320
+ } else {
2321
+ var result7 = null;
2322
+ pos = savedPos3;
2323
+ }
2324
+ } else {
2325
+ var result7 = null;
2326
+ pos = savedPos3;
2327
+ }
2328
+ } else {
2329
+ var result7 = null;
2330
+ pos = savedPos3;
2331
+ }
2332
+ } else {
2333
+ var result7 = null;
2334
+ pos = savedPos3;
2335
+ }
2336
+ var result8 = result7 !== null
2337
+ ? (function(param) {return param})(result7[3])
2338
+ : null;
2339
+ if (result8 !== null) {
2340
+ var result6 = result8;
2341
+ } else {
2342
+ var result6 = null;
2343
+ pos = savedPos2;
2344
+ }
2345
+ if (result6 !== null) {
2346
+ var result3 = [];
2347
+ while (result6 !== null) {
2348
+ result3.push(result6);
2349
+ var savedPos2 = pos;
2350
+ var savedPos3 = pos;
2351
+ var result9 = parse_ws();
2352
+ if (result9 !== null) {
2353
+ if (input.substr(pos, 1) === ":") {
2354
+ var result10 = ":";
2355
+ pos += 1;
2356
+ } else {
2357
+ var result10 = null;
2358
+ if (reportMatchFailures) {
2359
+ matchFailed("\":\"");
2360
+ }
2361
+ }
2362
+ if (result10 !== null) {
2363
+ var result11 = parse_ws();
2364
+ if (result11 !== null) {
2365
+ var result12 = parse_identifier();
2366
+ if (result12 !== null) {
2367
+ var result7 = [result9, result10, result11, result12];
2368
+ } else {
2369
+ var result7 = null;
2370
+ pos = savedPos3;
2371
+ }
2372
+ } else {
2373
+ var result7 = null;
2374
+ pos = savedPos3;
2375
+ }
2376
+ } else {
2377
+ var result7 = null;
2378
+ pos = savedPos3;
2379
+ }
2380
+ } else {
2381
+ var result7 = null;
2382
+ pos = savedPos3;
2383
+ }
2384
+ var result8 = result7 !== null
2385
+ ? (function(param) {return param})(result7[3])
2386
+ : null;
2387
+ if (result8 !== null) {
2388
+ var result6 = result8;
2389
+ } else {
2390
+ var result6 = null;
2391
+ pos = savedPos2;
2392
+ }
2393
+ }
2394
+ } else {
2395
+ var result3 = null;
2396
+ }
2397
+ if (result3 !== null) {
2398
+ var result4 = parse_ws();
2399
+ if (result4 !== null) {
2400
+ if (input.substr(pos, 1) === "|") {
2401
+ var result5 = "|";
2402
+ pos += 1;
2403
+ } else {
2404
+ var result5 = null;
2405
+ if (reportMatchFailures) {
2406
+ matchFailed("\"|\"");
2407
+ }
2408
+ }
2409
+ if (result5 !== null) {
2410
+ var result1 = [result3, result4, result5];
2411
+ } else {
2412
+ var result1 = null;
2413
+ pos = savedPos1;
2414
+ }
2415
+ } else {
2416
+ var result1 = null;
2417
+ pos = savedPos1;
2418
+ }
2419
+ } else {
2420
+ var result1 = null;
2421
+ pos = savedPos1;
2422
+ }
2423
+ var result2 = result1 !== null
2424
+ ? (function(params) {return params})(result1[0])
2425
+ : null;
2426
+ if (result2 !== null) {
2427
+ var result0 = result2;
2428
+ } else {
2429
+ var result0 = null;
2430
+ pos = savedPos0;
2431
+ }
2432
+
2433
+
2434
+
2435
+ cache[cacheKey] = {
2436
+ nextPos: pos,
2437
+ result: result0
2438
+ };
2439
+ return result0;
2440
+ }
2441
+
2442
+ function parse_subexpression() {
2443
+ var cacheKey = 'subexpression@' + pos;
2444
+ var cachedResult = cache[cacheKey];
2445
+ if (cachedResult) {
2446
+ pos = cachedResult.nextPos;
2447
+ return cachedResult.result;
2448
+ }
2449
+
2450
+
2451
+ var savedPos0 = pos;
2452
+ var savedPos1 = pos;
2453
+ if (input.substr(pos, 1) === "(") {
2454
+ var result3 = "(";
2455
+ pos += 1;
2456
+ } else {
2457
+ var result3 = null;
2458
+ if (reportMatchFailures) {
2459
+ matchFailed("\"(\"");
2460
+ }
2461
+ }
2462
+ if (result3 !== null) {
2463
+ var result4 = parse_ws();
2464
+ if (result4 !== null) {
2465
+ var result5 = parse_expression();
2466
+ if (result5 !== null) {
2467
+ var result6 = parse_ws();
2468
+ if (result6 !== null) {
2469
+ if (input.substr(pos, 1) === ")") {
2470
+ var result7 = ")";
2471
+ pos += 1;
2472
+ } else {
2473
+ var result7 = null;
2474
+ if (reportMatchFailures) {
2475
+ matchFailed("\")\"");
2476
+ }
2477
+ }
2478
+ if (result7 !== null) {
2479
+ var result1 = [result3, result4, result5, result6, result7];
2480
+ } else {
2481
+ var result1 = null;
2482
+ pos = savedPos1;
2483
+ }
2484
+ } else {
2485
+ var result1 = null;
2486
+ pos = savedPos1;
2487
+ }
2488
+ } else {
2489
+ var result1 = null;
2490
+ pos = savedPos1;
2491
+ }
2492
+ } else {
2493
+ var result1 = null;
2494
+ pos = savedPos1;
2495
+ }
2496
+ } else {
2497
+ var result1 = null;
2498
+ pos = savedPos1;
2499
+ }
2500
+ var result2 = result1 !== null
2501
+ ? (function(expression) {return expression})(result1[2])
2502
+ : null;
2503
+ if (result2 !== null) {
2504
+ var result0 = result2;
2505
+ } else {
2506
+ var result0 = null;
2507
+ pos = savedPos0;
2508
+ }
2509
+
2510
+
2511
+
2512
+ cache[cacheKey] = {
2513
+ nextPos: pos,
2514
+ result: result0
2515
+ };
2516
+ return result0;
2517
+ }
2518
+
2519
+ function parse_statements() {
2520
+ var cacheKey = 'statements@' + pos;
2521
+ var cachedResult = cache[cacheKey];
2522
+ if (cachedResult) {
2523
+ pos = cachedResult.nextPos;
2524
+ return cachedResult.result;
2525
+ }
2526
+
2527
+
2528
+ var savedPos4 = pos;
2529
+ var savedPos5 = pos;
2530
+ var result22 = parse_ret();
2531
+ if (result22 !== null) {
2532
+ var result23 = [];
2533
+ if (input.substr(pos).match(/^[.]/) !== null) {
2534
+ var result24 = input.charAt(pos);
2535
+ pos++;
2536
+ } else {
2537
+ var result24 = null;
2538
+ if (reportMatchFailures) {
2539
+ matchFailed("[.]");
2540
+ }
2541
+ }
2542
+ while (result24 !== null) {
2543
+ result23.push(result24);
2544
+ if (input.substr(pos).match(/^[.]/) !== null) {
2545
+ var result24 = input.charAt(pos);
2546
+ pos++;
2547
+ } else {
2548
+ var result24 = null;
2549
+ if (reportMatchFailures) {
2550
+ matchFailed("[.]");
2551
+ }
2552
+ }
2553
+ }
2554
+ if (result23 !== null) {
2555
+ var result20 = [result22, result23];
2556
+ } else {
2557
+ var result20 = null;
2558
+ pos = savedPos5;
2559
+ }
2560
+ } else {
2561
+ var result20 = null;
2562
+ pos = savedPos5;
2563
+ }
2564
+ var result21 = result20 !== null
2565
+ ? (function(ret) {return [ret]})(result20[0])
2566
+ : null;
2567
+ if (result21 !== null) {
2568
+ var result19 = result21;
2569
+ } else {
2570
+ var result19 = null;
2571
+ pos = savedPos4;
2572
+ }
2573
+ if (result19 !== null) {
2574
+ var result0 = result19;
2575
+ } else {
2576
+ var savedPos2 = pos;
2577
+ var savedPos3 = pos;
2578
+ var result11 = parse_expressions();
2579
+ if (result11 !== null) {
2580
+ var result12 = parse_ws();
2581
+ if (result12 !== null) {
2582
+ if (input.substr(pos).match(/^[.]/) !== null) {
2583
+ var result18 = input.charAt(pos);
2584
+ pos++;
2585
+ } else {
2586
+ var result18 = null;
2587
+ if (reportMatchFailures) {
2588
+ matchFailed("[.]");
2589
+ }
2590
+ }
2591
+ if (result18 !== null) {
2592
+ var result13 = [];
2593
+ while (result18 !== null) {
2594
+ result13.push(result18);
2595
+ if (input.substr(pos).match(/^[.]/) !== null) {
2596
+ var result18 = input.charAt(pos);
2597
+ pos++;
2598
+ } else {
2599
+ var result18 = null;
2600
+ if (reportMatchFailures) {
2601
+ matchFailed("[.]");
2602
+ }
2603
+ }
2604
+ }
2605
+ } else {
2606
+ var result13 = null;
2607
+ }
2608
+ if (result13 !== null) {
2609
+ var result14 = parse_ws();
2610
+ if (result14 !== null) {
2611
+ var result15 = parse_ret();
2612
+ if (result15 !== null) {
2613
+ var result16 = [];
2614
+ if (input.substr(pos).match(/^[.]/) !== null) {
2615
+ var result17 = input.charAt(pos);
2616
+ pos++;
2617
+ } else {
2618
+ var result17 = null;
2619
+ if (reportMatchFailures) {
2620
+ matchFailed("[.]");
2621
+ }
2622
+ }
2623
+ while (result17 !== null) {
2624
+ result16.push(result17);
2625
+ if (input.substr(pos).match(/^[.]/) !== null) {
2626
+ var result17 = input.charAt(pos);
2627
+ pos++;
2628
+ } else {
2629
+ var result17 = null;
2630
+ if (reportMatchFailures) {
2631
+ matchFailed("[.]");
2632
+ }
2633
+ }
2634
+ }
2635
+ if (result16 !== null) {
2636
+ var result9 = [result11, result12, result13, result14, result15, result16];
2637
+ } else {
2638
+ var result9 = null;
2639
+ pos = savedPos3;
2640
+ }
2641
+ } else {
2642
+ var result9 = null;
2643
+ pos = savedPos3;
2644
+ }
2645
+ } else {
2646
+ var result9 = null;
2647
+ pos = savedPos3;
2648
+ }
2649
+ } else {
2650
+ var result9 = null;
2651
+ pos = savedPos3;
2652
+ }
2653
+ } else {
2654
+ var result9 = null;
2655
+ pos = savedPos3;
2656
+ }
2657
+ } else {
2658
+ var result9 = null;
2659
+ pos = savedPos3;
2660
+ }
2661
+ var result10 = result9 !== null
2662
+ ? (function(exps, ret) {
2663
+ var expressions = exps;
2664
+ expressions.push(ret);
2665
+ return expressions
2666
+ })(result9[0], result9[4])
2667
+ : null;
2668
+ if (result10 !== null) {
2669
+ var result8 = result10;
2670
+ } else {
2671
+ var result8 = null;
2672
+ pos = savedPos2;
2673
+ }
2674
+ if (result8 !== null) {
2675
+ var result0 = result8;
2676
+ } else {
2677
+ var savedPos0 = pos;
2678
+ var savedPos1 = pos;
2679
+ var result7 = parse_expressions();
2680
+ var result4 = result7 !== null ? result7 : '';
2681
+ if (result4 !== null) {
2682
+ var result5 = [];
2683
+ if (input.substr(pos).match(/^[.]/) !== null) {
2684
+ var result6 = input.charAt(pos);
2685
+ pos++;
2686
+ } else {
2687
+ var result6 = null;
2688
+ if (reportMatchFailures) {
2689
+ matchFailed("[.]");
2690
+ }
2691
+ }
2692
+ while (result6 !== null) {
2693
+ result5.push(result6);
2694
+ if (input.substr(pos).match(/^[.]/) !== null) {
2695
+ var result6 = input.charAt(pos);
2696
+ pos++;
2697
+ } else {
2698
+ var result6 = null;
2699
+ if (reportMatchFailures) {
2700
+ matchFailed("[.]");
2701
+ }
2702
+ }
2703
+ }
2704
+ if (result5 !== null) {
2705
+ var result2 = [result4, result5];
2706
+ } else {
2707
+ var result2 = null;
2708
+ pos = savedPos1;
2709
+ }
2710
+ } else {
2711
+ var result2 = null;
2712
+ pos = savedPos1;
2713
+ }
2714
+ var result3 = result2 !== null
2715
+ ? (function(expressions) {
2716
+ return expressions || []
2717
+ })(result2[0])
2718
+ : null;
2719
+ if (result3 !== null) {
2720
+ var result1 = result3;
2721
+ } else {
2722
+ var result1 = null;
2723
+ pos = savedPos0;
2724
+ }
2725
+ if (result1 !== null) {
2726
+ var result0 = result1;
2727
+ } else {
2728
+ var result0 = null;;
2729
+ };
2730
+ };
2731
+ }
2732
+
2733
+
2734
+
2735
+ cache[cacheKey] = {
2736
+ nextPos: pos,
2737
+ result: result0
2738
+ };
2739
+ return result0;
2740
+ }
2741
+
2742
+ function parse_sequence() {
2743
+ var cacheKey = 'sequence@' + pos;
2744
+ var cachedResult = cache[cacheKey];
2745
+ if (cachedResult) {
2746
+ pos = cachedResult.nextPos;
2747
+ return cachedResult.result;
2748
+ }
2749
+
2750
+
2751
+ var savedPos0 = pos;
2752
+ var savedPos1 = pos;
2753
+ var result8 = parse_temps();
2754
+ var result3 = result8 !== null ? result8 : '';
2755
+ if (result3 !== null) {
2756
+ var result4 = parse_ws();
2757
+ if (result4 !== null) {
2758
+ var result7 = parse_statements();
2759
+ var result5 = result7 !== null ? result7 : '';
2760
+ if (result5 !== null) {
2761
+ var result6 = parse_ws();
2762
+ if (result6 !== null) {
2763
+ var result1 = [result3, result4, result5, result6];
2764
+ } else {
2765
+ var result1 = null;
2766
+ pos = savedPos1;
2767
+ }
2768
+ } else {
2769
+ var result1 = null;
2770
+ pos = savedPos1;
2771
+ }
2772
+ } else {
2773
+ var result1 = null;
2774
+ pos = savedPos1;
2775
+ }
2776
+ } else {
2777
+ var result1 = null;
2778
+ pos = savedPos1;
2779
+ }
2780
+ var result2 = result1 !== null
2781
+ ? (function(temps, statements) {
2782
+ return smalltalk.SequenceNode._new()
2783
+ ._temps_(temps || [])
2784
+ ._nodes_(statements || [])
2785
+ })(result1[0], result1[2])
2786
+ : null;
2787
+ if (result2 !== null) {
2788
+ var result0 = result2;
2789
+ } else {
2790
+ var result0 = null;
2791
+ pos = savedPos0;
2792
+ }
2793
+
2794
+
2795
+
2796
+ cache[cacheKey] = {
2797
+ nextPos: pos,
2798
+ result: result0
2799
+ };
2800
+ return result0;
2801
+ }
2802
+
2803
+ function parse_block() {
2804
+ var cacheKey = 'block@' + pos;
2805
+ var cachedResult = cache[cacheKey];
2806
+ if (cachedResult) {
2807
+ pos = cachedResult.nextPos;
2808
+ return cachedResult.result;
2809
+ }
2810
+
2811
+
2812
+ var savedPos0 = pos;
2813
+ var savedPos1 = pos;
2814
+ if (input.substr(pos, 1) === "[") {
2815
+ var result3 = "[";
2816
+ pos += 1;
2817
+ } else {
2818
+ var result3 = null;
2819
+ if (reportMatchFailures) {
2820
+ matchFailed("\"[\"");
2821
+ }
2822
+ }
2823
+ if (result3 !== null) {
2824
+ var result4 = parse_ws();
2825
+ if (result4 !== null) {
2826
+ var result11 = parse_blockParamList();
2827
+ var result5 = result11 !== null ? result11 : '';
2828
+ if (result5 !== null) {
2829
+ var result6 = parse_ws();
2830
+ if (result6 !== null) {
2831
+ var result10 = parse_sequence();
2832
+ var result7 = result10 !== null ? result10 : '';
2833
+ if (result7 !== null) {
2834
+ var result8 = parse_ws();
2835
+ if (result8 !== null) {
2836
+ if (input.substr(pos, 1) === "]") {
2837
+ var result9 = "]";
2838
+ pos += 1;
2839
+ } else {
2840
+ var result9 = null;
2841
+ if (reportMatchFailures) {
2842
+ matchFailed("\"]\"");
2843
+ }
2844
+ }
2845
+ if (result9 !== null) {
2846
+ var result1 = [result3, result4, result5, result6, result7, result8, result9];
2847
+ } else {
2848
+ var result1 = null;
2849
+ pos = savedPos1;
2850
+ }
2851
+ } else {
2852
+ var result1 = null;
2853
+ pos = savedPos1;
2854
+ }
2855
+ } else {
2856
+ var result1 = null;
2857
+ pos = savedPos1;
2858
+ }
2859
+ } else {
2860
+ var result1 = null;
2861
+ pos = savedPos1;
2862
+ }
2863
+ } else {
2864
+ var result1 = null;
2865
+ pos = savedPos1;
2866
+ }
2867
+ } else {
2868
+ var result1 = null;
2869
+ pos = savedPos1;
2870
+ }
2871
+ } else {
2872
+ var result1 = null;
2873
+ pos = savedPos1;
2874
+ }
2875
+ var result2 = result1 !== null
2876
+ ? (function(params, sequence) {
2877
+ return smalltalk.BlockNode._new()
2878
+ ._parameters_(params || [])
2879
+ ._nodes_([sequence._asBlockSequenceNode()])
2880
+ })(result1[2], result1[4])
2881
+ : null;
2882
+ if (result2 !== null) {
2883
+ var result0 = result2;
2884
+ } else {
2885
+ var result0 = null;
2886
+ pos = savedPos0;
2887
+ }
2888
+
2889
+
2890
+
2891
+ cache[cacheKey] = {
2892
+ nextPos: pos,
2893
+ result: result0
2894
+ };
2895
+ return result0;
2896
+ }
2897
+
2898
+ function parse_operand() {
2899
+ var cacheKey = 'operand@' + pos;
2900
+ var cachedResult = cache[cacheKey];
2901
+ if (cachedResult) {
2902
+ pos = cachedResult.nextPos;
2903
+ return cachedResult.result;
2904
+ }
2905
+
2906
+
2907
+ var result3 = parse_literal();
2908
+ if (result3 !== null) {
2909
+ var result0 = result3;
2910
+ } else {
2911
+ var result2 = parse_reference();
2912
+ if (result2 !== null) {
2913
+ var result0 = result2;
2914
+ } else {
2915
+ var result1 = parse_subexpression();
2916
+ if (result1 !== null) {
2917
+ var result0 = result1;
2918
+ } else {
2919
+ var result0 = null;;
2920
+ };
2921
+ };
2922
+ }
2923
+
2924
+
2925
+
2926
+ cache[cacheKey] = {
2927
+ nextPos: pos,
2928
+ result: result0
2929
+ };
2930
+ return result0;
2931
+ }
2932
+
2933
+ function parse_unaryMessage() {
2934
+ var cacheKey = 'unaryMessage@' + pos;
2935
+ var cachedResult = cache[cacheKey];
2936
+ if (cachedResult) {
2937
+ pos = cachedResult.nextPos;
2938
+ return cachedResult.result;
2939
+ }
2940
+
2941
+
2942
+ var savedPos0 = pos;
2943
+ var savedPos1 = pos;
2944
+ var result3 = parse_ws();
2945
+ if (result3 !== null) {
2946
+ var result4 = parse_identifier();
2947
+ if (result4 !== null) {
2948
+ var savedPos2 = pos;
2949
+ var savedReportMatchFailuresVar0 = reportMatchFailures;
2950
+ reportMatchFailures = false;
2951
+ if (input.substr(pos).match(/^[:]/) !== null) {
2952
+ var result6 = input.charAt(pos);
2953
+ pos++;
2954
+ } else {
2955
+ var result6 = null;
2956
+ if (reportMatchFailures) {
2957
+ matchFailed("[:]");
2958
+ }
2959
+ }
2960
+ reportMatchFailures = savedReportMatchFailuresVar0;
2961
+ if (result6 === null) {
2962
+ var result5 = '';
2963
+ } else {
2964
+ var result5 = null;
2965
+ pos = savedPos2;
2966
+ }
2967
+ if (result5 !== null) {
2968
+ var result1 = [result3, result4, result5];
2969
+ } else {
2970
+ var result1 = null;
2971
+ pos = savedPos1;
2972
+ }
2973
+ } else {
2974
+ var result1 = null;
2975
+ pos = savedPos1;
2976
+ }
2977
+ } else {
2978
+ var result1 = null;
2979
+ pos = savedPos1;
2980
+ }
2981
+ var result2 = result1 !== null
2982
+ ? (function(selector) {
2983
+ return smalltalk.SendNode._new()
2984
+ ._selector_(selector)
2985
+ })(result1[1])
2986
+ : null;
2987
+ if (result2 !== null) {
2988
+ var result0 = result2;
2989
+ } else {
2990
+ var result0 = null;
2991
+ pos = savedPos0;
2992
+ }
2993
+
2994
+
2995
+
2996
+ cache[cacheKey] = {
2997
+ nextPos: pos,
2998
+ result: result0
2999
+ };
3000
+ return result0;
3001
+ }
3002
+
3003
+ function parse_unaryTail() {
3004
+ var cacheKey = 'unaryTail@' + pos;
3005
+ var cachedResult = cache[cacheKey];
3006
+ if (cachedResult) {
3007
+ pos = cachedResult.nextPos;
3008
+ return cachedResult.result;
3009
+ }
3010
+
3011
+
3012
+ var savedPos0 = pos;
3013
+ var savedPos1 = pos;
3014
+ var result3 = parse_unaryMessage();
3015
+ if (result3 !== null) {
3016
+ var result4 = parse_ws();
3017
+ if (result4 !== null) {
3018
+ var result7 = parse_unaryTail();
3019
+ var result5 = result7 !== null ? result7 : '';
3020
+ if (result5 !== null) {
3021
+ var result6 = parse_ws();
3022
+ if (result6 !== null) {
3023
+ var result1 = [result3, result4, result5, result6];
3024
+ } else {
3025
+ var result1 = null;
3026
+ pos = savedPos1;
3027
+ }
3028
+ } else {
3029
+ var result1 = null;
3030
+ pos = savedPos1;
3031
+ }
3032
+ } else {
3033
+ var result1 = null;
3034
+ pos = savedPos1;
3035
+ }
3036
+ } else {
3037
+ var result1 = null;
3038
+ pos = savedPos1;
3039
+ }
3040
+ var result2 = result1 !== null
3041
+ ? (function(message, tail) {
3042
+ if(tail) {
3043
+ return tail._valueForReceiver_(message);
3044
+ }
3045
+ else {
3046
+ return message;
3047
+ }
3048
+ })(result1[0], result1[2])
3049
+ : null;
3050
+ if (result2 !== null) {
3051
+ var result0 = result2;
3052
+ } else {
3053
+ var result0 = null;
3054
+ pos = savedPos0;
3055
+ }
3056
+
3057
+
3058
+
3059
+ cache[cacheKey] = {
3060
+ nextPos: pos,
3061
+ result: result0
3062
+ };
3063
+ return result0;
3064
+ }
3065
+
3066
+ function parse_unarySend() {
3067
+ var cacheKey = 'unarySend@' + pos;
3068
+ var cachedResult = cache[cacheKey];
3069
+ if (cachedResult) {
3070
+ pos = cachedResult.nextPos;
3071
+ return cachedResult.result;
3072
+ }
3073
+
3074
+
3075
+ var savedPos0 = pos;
3076
+ var savedPos1 = pos;
3077
+ var result3 = parse_operand();
3078
+ if (result3 !== null) {
3079
+ var result4 = parse_ws();
3080
+ if (result4 !== null) {
3081
+ var result6 = parse_unaryTail();
3082
+ var result5 = result6 !== null ? result6 : '';
3083
+ if (result5 !== null) {
3084
+ var result1 = [result3, result4, result5];
3085
+ } else {
3086
+ var result1 = null;
3087
+ pos = savedPos1;
3088
+ }
3089
+ } else {
3090
+ var result1 = null;
3091
+ pos = savedPos1;
3092
+ }
3093
+ } else {
3094
+ var result1 = null;
3095
+ pos = savedPos1;
3096
+ }
3097
+ var result2 = result1 !== null
3098
+ ? (function(receiver, tail) {
3099
+ if(tail) {
3100
+ return tail._valueForReceiver_(receiver);
3101
+ }
3102
+ else {
3103
+ return receiver;
3104
+ }
3105
+ })(result1[0], result1[2])
3106
+ : null;
3107
+ if (result2 !== null) {
3108
+ var result0 = result2;
3109
+ } else {
3110
+ var result0 = null;
3111
+ pos = savedPos0;
3112
+ }
3113
+
3114
+
3115
+
3116
+ cache[cacheKey] = {
3117
+ nextPos: pos,
3118
+ result: result0
3119
+ };
3120
+ return result0;
3121
+ }
3122
+
3123
+ function parse_binaryMessage() {
3124
+ var cacheKey = 'binaryMessage@' + pos;
3125
+ var cachedResult = cache[cacheKey];
3126
+ if (cachedResult) {
3127
+ pos = cachedResult.nextPos;
3128
+ return cachedResult.result;
3129
+ }
3130
+
3131
+
3132
+ var savedPos0 = pos;
3133
+ var savedPos1 = pos;
3134
+ var result3 = parse_ws();
3135
+ if (result3 !== null) {
3136
+ var result4 = parse_binarySelector();
3137
+ if (result4 !== null) {
3138
+ var result5 = parse_ws();
3139
+ if (result5 !== null) {
3140
+ var result8 = parse_unarySend();
3141
+ if (result8 !== null) {
3142
+ var result6 = result8;
3143
+ } else {
3144
+ var result7 = parse_operand();
3145
+ if (result7 !== null) {
3146
+ var result6 = result7;
3147
+ } else {
3148
+ var result6 = null;;
3149
+ };
3150
+ }
3151
+ if (result6 !== null) {
3152
+ var result1 = [result3, result4, result5, result6];
3153
+ } else {
3154
+ var result1 = null;
3155
+ pos = savedPos1;
3156
+ }
3157
+ } else {
3158
+ var result1 = null;
3159
+ pos = savedPos1;
3160
+ }
3161
+ } else {
3162
+ var result1 = null;
3163
+ pos = savedPos1;
3164
+ }
3165
+ } else {
3166
+ var result1 = null;
3167
+ pos = savedPos1;
3168
+ }
3169
+ var result2 = result1 !== null
3170
+ ? (function(selector, arg) {
3171
+ return smalltalk.SendNode._new()
3172
+ ._selector_(selector)
3173
+ ._arguments_([arg])
3174
+ })(result1[1], result1[3])
3175
+ : null;
3176
+ if (result2 !== null) {
3177
+ var result0 = result2;
3178
+ } else {
3179
+ var result0 = null;
3180
+ pos = savedPos0;
3181
+ }
3182
+
3183
+
3184
+
3185
+ cache[cacheKey] = {
3186
+ nextPos: pos,
3187
+ result: result0
3188
+ };
3189
+ return result0;
3190
+ }
3191
+
3192
+ function parse_binaryTail() {
3193
+ var cacheKey = 'binaryTail@' + pos;
3194
+ var cachedResult = cache[cacheKey];
3195
+ if (cachedResult) {
3196
+ pos = cachedResult.nextPos;
3197
+ return cachedResult.result;
3198
+ }
3199
+
3200
+
3201
+ var savedPos0 = pos;
3202
+ var savedPos1 = pos;
3203
+ var result3 = parse_binaryMessage();
3204
+ if (result3 !== null) {
3205
+ var result5 = parse_binaryTail();
3206
+ var result4 = result5 !== null ? result5 : '';
3207
+ if (result4 !== null) {
3208
+ var result1 = [result3, result4];
3209
+ } else {
3210
+ var result1 = null;
3211
+ pos = savedPos1;
3212
+ }
3213
+ } else {
3214
+ var result1 = null;
3215
+ pos = savedPos1;
3216
+ }
3217
+ var result2 = result1 !== null
3218
+ ? (function(message, tail) {
3219
+ if(tail) {
3220
+ return tail._valueForReceiver_(message);
3221
+ }
3222
+ else {
3223
+ return message;
3224
+ }
3225
+ })(result1[0], result1[1])
3226
+ : null;
3227
+ if (result2 !== null) {
3228
+ var result0 = result2;
3229
+ } else {
3230
+ var result0 = null;
3231
+ pos = savedPos0;
3232
+ }
3233
+
3234
+
3235
+
3236
+ cache[cacheKey] = {
3237
+ nextPos: pos,
3238
+ result: result0
3239
+ };
3240
+ return result0;
3241
+ }
3242
+
3243
+ function parse_binarySend() {
3244
+ var cacheKey = 'binarySend@' + pos;
3245
+ var cachedResult = cache[cacheKey];
3246
+ if (cachedResult) {
3247
+ pos = cachedResult.nextPos;
3248
+ return cachedResult.result;
3249
+ }
3250
+
3251
+
3252
+ var savedPos0 = pos;
3253
+ var savedPos1 = pos;
3254
+ var result3 = parse_unarySend();
3255
+ if (result3 !== null) {
3256
+ var result5 = parse_binaryTail();
3257
+ var result4 = result5 !== null ? result5 : '';
3258
+ if (result4 !== null) {
3259
+ var result1 = [result3, result4];
3260
+ } else {
3261
+ var result1 = null;
3262
+ pos = savedPos1;
3263
+ }
3264
+ } else {
3265
+ var result1 = null;
3266
+ pos = savedPos1;
3267
+ }
3268
+ var result2 = result1 !== null
3269
+ ? (function(receiver, tail) {
3270
+ if(tail) {
3271
+ return tail._valueForReceiver_(receiver);
3272
+ }
3273
+ else {
3274
+ return receiver;
3275
+ }
3276
+ })(result1[0], result1[1])
3277
+ : null;
3278
+ if (result2 !== null) {
3279
+ var result0 = result2;
3280
+ } else {
3281
+ var result0 = null;
3282
+ pos = savedPos0;
3283
+ }
3284
+
3285
+
3286
+
3287
+ cache[cacheKey] = {
3288
+ nextPos: pos,
3289
+ result: result0
3290
+ };
3291
+ return result0;
3292
+ }
3293
+
3294
+ function parse_keywordMessage() {
3295
+ var cacheKey = 'keywordMessage@' + pos;
3296
+ var cachedResult = cache[cacheKey];
3297
+ if (cachedResult) {
3298
+ pos = cachedResult.nextPos;
3299
+ return cachedResult.result;
3300
+ }
3301
+
3302
+
3303
+ var savedPos0 = pos;
3304
+ var savedPos1 = pos;
3305
+ var result3 = parse_ws();
3306
+ if (result3 !== null) {
3307
+ var savedPos2 = pos;
3308
+ var savedPos3 = pos;
3309
+ var result8 = parse_keywordPair();
3310
+ if (result8 !== null) {
3311
+ var result9 = parse_ws();
3312
+ if (result9 !== null) {
3313
+ var result6 = [result8, result9];
3314
+ } else {
3315
+ var result6 = null;
3316
+ pos = savedPos3;
3317
+ }
3318
+ } else {
3319
+ var result6 = null;
3320
+ pos = savedPos3;
3321
+ }
3322
+ var result7 = result6 !== null
3323
+ ? (function(pair) {return pair})(result6[0])
3324
+ : null;
3325
+ if (result7 !== null) {
3326
+ var result5 = result7;
3327
+ } else {
3328
+ var result5 = null;
3329
+ pos = savedPos2;
3330
+ }
3331
+ if (result5 !== null) {
3332
+ var result4 = [];
3333
+ while (result5 !== null) {
3334
+ result4.push(result5);
3335
+ var savedPos2 = pos;
3336
+ var savedPos3 = pos;
3337
+ var result8 = parse_keywordPair();
3338
+ if (result8 !== null) {
3339
+ var result9 = parse_ws();
3340
+ if (result9 !== null) {
3341
+ var result6 = [result8, result9];
3342
+ } else {
3343
+ var result6 = null;
3344
+ pos = savedPos3;
3345
+ }
3346
+ } else {
3347
+ var result6 = null;
3348
+ pos = savedPos3;
3349
+ }
3350
+ var result7 = result6 !== null
3351
+ ? (function(pair) {return pair})(result6[0])
3352
+ : null;
3353
+ if (result7 !== null) {
3354
+ var result5 = result7;
3355
+ } else {
3356
+ var result5 = null;
3357
+ pos = savedPos2;
3358
+ }
3359
+ }
3360
+ } else {
3361
+ var result4 = null;
3362
+ }
3363
+ if (result4 !== null) {
3364
+ var result1 = [result3, result4];
3365
+ } else {
3366
+ var result1 = null;
3367
+ pos = savedPos1;
3368
+ }
3369
+ } else {
3370
+ var result1 = null;
3371
+ pos = savedPos1;
3372
+ }
3373
+ var result2 = result1 !== null
3374
+ ? (function(pairs) {
3375
+ var selector = [];
3376
+ var args = [];
3377
+ for(var i=0;i<pairs.length;i++) {
3378
+ selector.push(pairs[i].key);
3379
+ args.push(pairs[i].arg);
3380
+ }
3381
+ return smalltalk.SendNode._new()
3382
+ ._selector_(selector.join(""))
3383
+ ._arguments_(args)
3384
+ })(result1[1])
3385
+ : null;
3386
+ if (result2 !== null) {
3387
+ var result0 = result2;
3388
+ } else {
3389
+ var result0 = null;
3390
+ pos = savedPos0;
3391
+ }
3392
+
3393
+
3394
+
3395
+ cache[cacheKey] = {
3396
+ nextPos: pos,
3397
+ result: result0
3398
+ };
3399
+ return result0;
3400
+ }
3401
+
3402
+ function parse_keywordSend() {
3403
+ var cacheKey = 'keywordSend@' + pos;
3404
+ var cachedResult = cache[cacheKey];
3405
+ if (cachedResult) {
3406
+ pos = cachedResult.nextPos;
3407
+ return cachedResult.result;
3408
+ }
3409
+
3410
+
3411
+ var savedPos0 = pos;
3412
+ var savedPos1 = pos;
3413
+ var result3 = parse_binarySend();
3414
+ if (result3 !== null) {
3415
+ var result4 = parse_keywordMessage();
3416
+ if (result4 !== null) {
3417
+ var result1 = [result3, result4];
3418
+ } else {
3419
+ var result1 = null;
3420
+ pos = savedPos1;
3421
+ }
3422
+ } else {
3423
+ var result1 = null;
3424
+ pos = savedPos1;
3425
+ }
3426
+ var result2 = result1 !== null
3427
+ ? (function(receiver, tail) {
3428
+ return tail._valueForReceiver_(receiver);
3429
+ })(result1[0], result1[1])
3430
+ : null;
3431
+ if (result2 !== null) {
3432
+ var result0 = result2;
3433
+ } else {
3434
+ var result0 = null;
3435
+ pos = savedPos0;
3436
+ }
3437
+
3438
+
3439
+
3440
+ cache[cacheKey] = {
3441
+ nextPos: pos,
3442
+ result: result0
3443
+ };
3444
+ return result0;
3445
+ }
3446
+
3447
+ function parse_message() {
3448
+ var cacheKey = 'message@' + pos;
3449
+ var cachedResult = cache[cacheKey];
3450
+ if (cachedResult) {
3451
+ pos = cachedResult.nextPos;
3452
+ return cachedResult.result;
3453
+ }
3454
+
3455
+
3456
+ var result3 = parse_binaryMessage();
3457
+ if (result3 !== null) {
3458
+ var result0 = result3;
3459
+ } else {
3460
+ var result2 = parse_unaryMessage();
3461
+ if (result2 !== null) {
3462
+ var result0 = result2;
3463
+ } else {
3464
+ var result1 = parse_keywordMessage();
3465
+ if (result1 !== null) {
3466
+ var result0 = result1;
3467
+ } else {
3468
+ var result0 = null;;
3469
+ };
3470
+ };
3471
+ }
3472
+
3473
+
3474
+
3475
+ cache[cacheKey] = {
3476
+ nextPos: pos,
3477
+ result: result0
3478
+ };
3479
+ return result0;
3480
+ }
3481
+
3482
+ function parse_cascade() {
3483
+ var cacheKey = 'cascade@' + pos;
3484
+ var cachedResult = cache[cacheKey];
3485
+ if (cachedResult) {
3486
+ pos = cachedResult.nextPos;
3487
+ return cachedResult.result;
3488
+ }
3489
+
3490
+
3491
+ var savedPos0 = pos;
3492
+ var savedPos1 = pos;
3493
+ var result3 = parse_ws();
3494
+ if (result3 !== null) {
3495
+ var result15 = parse_keywordSend();
3496
+ if (result15 !== null) {
3497
+ var result4 = result15;
3498
+ } else {
3499
+ var result14 = parse_binarySend();
3500
+ if (result14 !== null) {
3501
+ var result4 = result14;
3502
+ } else {
3503
+ var result4 = null;;
3504
+ };
3505
+ }
3506
+ if (result4 !== null) {
3507
+ var savedPos2 = pos;
3508
+ var savedPos3 = pos;
3509
+ var result9 = parse_ws();
3510
+ if (result9 !== null) {
3511
+ if (input.substr(pos, 1) === ";") {
3512
+ var result10 = ";";
3513
+ pos += 1;
3514
+ } else {
3515
+ var result10 = null;
3516
+ if (reportMatchFailures) {
3517
+ matchFailed("\";\"");
3518
+ }
3519
+ }
3520
+ if (result10 !== null) {
3521
+ var result11 = parse_ws();
3522
+ if (result11 !== null) {
3523
+ var result12 = parse_message();
3524
+ if (result12 !== null) {
3525
+ var result13 = parse_ws();
3526
+ if (result13 !== null) {
3527
+ var result7 = [result9, result10, result11, result12, result13];
3528
+ } else {
3529
+ var result7 = null;
3530
+ pos = savedPos3;
3531
+ }
3532
+ } else {
3533
+ var result7 = null;
3534
+ pos = savedPos3;
3535
+ }
3536
+ } else {
3537
+ var result7 = null;
3538
+ pos = savedPos3;
3539
+ }
3540
+ } else {
3541
+ var result7 = null;
3542
+ pos = savedPos3;
3543
+ }
3544
+ } else {
3545
+ var result7 = null;
3546
+ pos = savedPos3;
3547
+ }
3548
+ var result8 = result7 !== null
3549
+ ? (function(mess) {return mess})(result7[3])
3550
+ : null;
3551
+ if (result8 !== null) {
3552
+ var result6 = result8;
3553
+ } else {
3554
+ var result6 = null;
3555
+ pos = savedPos2;
3556
+ }
3557
+ if (result6 !== null) {
3558
+ var result5 = [];
3559
+ while (result6 !== null) {
3560
+ result5.push(result6);
3561
+ var savedPos2 = pos;
3562
+ var savedPos3 = pos;
3563
+ var result9 = parse_ws();
3564
+ if (result9 !== null) {
3565
+ if (input.substr(pos, 1) === ";") {
3566
+ var result10 = ";";
3567
+ pos += 1;
3568
+ } else {
3569
+ var result10 = null;
3570
+ if (reportMatchFailures) {
3571
+ matchFailed("\";\"");
3572
+ }
3573
+ }
3574
+ if (result10 !== null) {
3575
+ var result11 = parse_ws();
3576
+ if (result11 !== null) {
3577
+ var result12 = parse_message();
3578
+ if (result12 !== null) {
3579
+ var result13 = parse_ws();
3580
+ if (result13 !== null) {
3581
+ var result7 = [result9, result10, result11, result12, result13];
3582
+ } else {
3583
+ var result7 = null;
3584
+ pos = savedPos3;
3585
+ }
3586
+ } else {
3587
+ var result7 = null;
3588
+ pos = savedPos3;
3589
+ }
3590
+ } else {
3591
+ var result7 = null;
3592
+ pos = savedPos3;
3593
+ }
3594
+ } else {
3595
+ var result7 = null;
3596
+ pos = savedPos3;
3597
+ }
3598
+ } else {
3599
+ var result7 = null;
3600
+ pos = savedPos3;
3601
+ }
3602
+ var result8 = result7 !== null
3603
+ ? (function(mess) {return mess})(result7[3])
3604
+ : null;
3605
+ if (result8 !== null) {
3606
+ var result6 = result8;
3607
+ } else {
3608
+ var result6 = null;
3609
+ pos = savedPos2;
3610
+ }
3611
+ }
3612
+ } else {
3613
+ var result5 = null;
3614
+ }
3615
+ if (result5 !== null) {
3616
+ var result1 = [result3, result4, result5];
3617
+ } else {
3618
+ var result1 = null;
3619
+ pos = savedPos1;
3620
+ }
3621
+ } else {
3622
+ var result1 = null;
3623
+ pos = savedPos1;
3624
+ }
3625
+ } else {
3626
+ var result1 = null;
3627
+ pos = savedPos1;
3628
+ }
3629
+ var result2 = result1 !== null
3630
+ ? (function(send, messages) {
3631
+ var cascade = [];
3632
+ cascade.push(send);
3633
+ for(var i=0;i<messages.length;i++) {
3634
+ cascade.push(messages[i]);
3635
+ }
3636
+ return smalltalk.CascadeNode._new()
3637
+ ._receiver_(send._receiver())
3638
+ ._nodes_(cascade)
3639
+ })(result1[1], result1[2])
3640
+ : null;
3641
+ if (result2 !== null) {
3642
+ var result0 = result2;
3643
+ } else {
3644
+ var result0 = null;
3645
+ pos = savedPos0;
3646
+ }
3647
+
3648
+
3649
+
3650
+ cache[cacheKey] = {
3651
+ nextPos: pos,
3652
+ result: result0
3653
+ };
3654
+ return result0;
3655
+ }
3656
+
3657
+ function parse_jsStatement() {
3658
+ var cacheKey = 'jsStatement@' + pos;
3659
+ var cachedResult = cache[cacheKey];
3660
+ if (cachedResult) {
3661
+ pos = cachedResult.nextPos;
3662
+ return cachedResult.result;
3663
+ }
3664
+
3665
+
3666
+ var savedPos0 = pos;
3667
+ var savedPos1 = pos;
3668
+ if (input.substr(pos, 1) === "<") {
3669
+ var result3 = "<";
3670
+ pos += 1;
3671
+ } else {
3672
+ var result3 = null;
3673
+ if (reportMatchFailures) {
3674
+ matchFailed("\"<\"");
3675
+ }
3676
+ }
3677
+ if (result3 !== null) {
3678
+ var result4 = [];
3679
+ var savedPos2 = pos;
3680
+ if (input.substr(pos, 2) === ">>") {
3681
+ var result9 = ">>";
3682
+ pos += 2;
3683
+ } else {
3684
+ var result9 = null;
3685
+ if (reportMatchFailures) {
3686
+ matchFailed("\">>\"");
3687
+ }
3688
+ }
3689
+ var result10 = result9 !== null
3690
+ ? (function() {return ">"})()
3691
+ : null;
3692
+ if (result10 !== null) {
3693
+ var result8 = result10;
3694
+ } else {
3695
+ var result8 = null;
3696
+ pos = savedPos2;
3697
+ }
3698
+ if (result8 !== null) {
3699
+ var result6 = result8;
3700
+ } else {
3701
+ if (input.substr(pos).match(/^[^>]/) !== null) {
3702
+ var result7 = input.charAt(pos);
3703
+ pos++;
3704
+ } else {
3705
+ var result7 = null;
3706
+ if (reportMatchFailures) {
3707
+ matchFailed("[^>]");
3708
+ }
3709
+ }
3710
+ if (result7 !== null) {
3711
+ var result6 = result7;
3712
+ } else {
3713
+ var result6 = null;;
3714
+ };
3715
+ }
3716
+ while (result6 !== null) {
3717
+ result4.push(result6);
3718
+ var savedPos2 = pos;
3719
+ if (input.substr(pos, 2) === ">>") {
3720
+ var result9 = ">>";
3721
+ pos += 2;
3722
+ } else {
3723
+ var result9 = null;
3724
+ if (reportMatchFailures) {
3725
+ matchFailed("\">>\"");
3726
+ }
3727
+ }
3728
+ var result10 = result9 !== null
3729
+ ? (function() {return ">"})()
3730
+ : null;
3731
+ if (result10 !== null) {
3732
+ var result8 = result10;
3733
+ } else {
3734
+ var result8 = null;
3735
+ pos = savedPos2;
3736
+ }
3737
+ if (result8 !== null) {
3738
+ var result6 = result8;
3739
+ } else {
3740
+ if (input.substr(pos).match(/^[^>]/) !== null) {
3741
+ var result7 = input.charAt(pos);
3742
+ pos++;
3743
+ } else {
3744
+ var result7 = null;
3745
+ if (reportMatchFailures) {
3746
+ matchFailed("[^>]");
3747
+ }
3748
+ }
3749
+ if (result7 !== null) {
3750
+ var result6 = result7;
3751
+ } else {
3752
+ var result6 = null;;
3753
+ };
3754
+ }
3755
+ }
3756
+ if (result4 !== null) {
3757
+ if (input.substr(pos, 1) === ">") {
3758
+ var result5 = ">";
3759
+ pos += 1;
3760
+ } else {
3761
+ var result5 = null;
3762
+ if (reportMatchFailures) {
3763
+ matchFailed("\">\"");
3764
+ }
3765
+ }
3766
+ if (result5 !== null) {
3767
+ var result1 = [result3, result4, result5];
3768
+ } else {
3769
+ var result1 = null;
3770
+ pos = savedPos1;
3771
+ }
3772
+ } else {
3773
+ var result1 = null;
3774
+ pos = savedPos1;
3775
+ }
3776
+ } else {
3777
+ var result1 = null;
3778
+ pos = savedPos1;
3779
+ }
3780
+ var result2 = result1 !== null
3781
+ ? (function(val) {
3782
+ return smalltalk.JSStatementNode._new()
3783
+ ._source_(val.join(""))
3784
+ })(result1[1])
3785
+ : null;
3786
+ if (result2 !== null) {
3787
+ var result0 = result2;
3788
+ } else {
3789
+ var result0 = null;
3790
+ pos = savedPos0;
3791
+ }
3792
+
3793
+
3794
+
3795
+ cache[cacheKey] = {
3796
+ nextPos: pos,
3797
+ result: result0
3798
+ };
3799
+ return result0;
3800
+ }
3801
+
3802
+ function parse_method() {
3803
+ var cacheKey = 'method@' + pos;
3804
+ var cachedResult = cache[cacheKey];
3805
+ if (cachedResult) {
3806
+ pos = cachedResult.nextPos;
3807
+ return cachedResult.result;
3808
+ }
3809
+
3810
+
3811
+ var savedPos0 = pos;
3812
+ var savedPos1 = pos;
3813
+ var result3 = parse_ws();
3814
+ if (result3 !== null) {
3815
+ var result11 = parse_keywordPattern();
3816
+ if (result11 !== null) {
3817
+ var result4 = result11;
3818
+ } else {
3819
+ var result10 = parse_binaryPattern();
3820
+ if (result10 !== null) {
3821
+ var result4 = result10;
3822
+ } else {
3823
+ var result9 = parse_unaryPattern();
3824
+ if (result9 !== null) {
3825
+ var result4 = result9;
3826
+ } else {
3827
+ var result4 = null;;
3828
+ };
3829
+ };
3830
+ }
3831
+ if (result4 !== null) {
3832
+ var result5 = parse_ws();
3833
+ if (result5 !== null) {
3834
+ var result8 = parse_sequence();
3835
+ var result6 = result8 !== null ? result8 : '';
3836
+ if (result6 !== null) {
3837
+ var result7 = parse_ws();
3838
+ if (result7 !== null) {
3839
+ var result1 = [result3, result4, result5, result6, result7];
3840
+ } else {
3841
+ var result1 = null;
3842
+ pos = savedPos1;
3843
+ }
3844
+ } else {
3845
+ var result1 = null;
3846
+ pos = savedPos1;
3847
+ }
3848
+ } else {
3849
+ var result1 = null;
3850
+ pos = savedPos1;
3851
+ }
3852
+ } else {
3853
+ var result1 = null;
3854
+ pos = savedPos1;
3855
+ }
3856
+ } else {
3857
+ var result1 = null;
3858
+ pos = savedPos1;
3859
+ }
3860
+ var result2 = result1 !== null
3861
+ ? (function(pattern, sequence) {
3862
+ return smalltalk.MethodNode._new()
3863
+ ._selector_(pattern[0])
3864
+ ._arguments_(pattern[1])
3865
+ ._nodes_([sequence])
3866
+ })(result1[1], result1[3])
3867
+ : null;
3868
+ if (result2 !== null) {
3869
+ var result0 = result2;
3870
+ } else {
3871
+ var result0 = null;
3872
+ pos = savedPos0;
3873
+ }
3874
+
3875
+
3876
+
3877
+ cache[cacheKey] = {
3878
+ nextPos: pos,
3879
+ result: result0
3880
+ };
3881
+ return result0;
3882
+ }
3883
+
3884
+ function buildErrorMessage() {
3885
+ function buildExpected(failuresExpected) {
3886
+ failuresExpected.sort();
3887
+
3888
+ var lastFailure = null;
3889
+ var failuresExpectedUnique = [];
3890
+ for (var i = 0; i < failuresExpected.length; i++) {
3891
+ if (failuresExpected[i] !== lastFailure) {
3892
+ failuresExpectedUnique.push(failuresExpected[i]);
3893
+ lastFailure = failuresExpected[i];
3894
+ }
3895
+ }
3896
+
3897
+ switch (failuresExpectedUnique.length) {
3898
+ case 0:
3899
+ return 'end of input';
3900
+ case 1:
3901
+ return failuresExpectedUnique[0];
3902
+ default:
3903
+ return failuresExpectedUnique.slice(0, failuresExpectedUnique.length - 1).join(', ')
3904
+ + ' or '
3905
+ + failuresExpectedUnique[failuresExpectedUnique.length - 1];
3906
+ }
3907
+ }
3908
+
3909
+ var expected = buildExpected(rightmostMatchFailuresExpected);
3910
+ var actualPos = Math.max(pos, rightmostMatchFailuresPos);
3911
+ var actual = actualPos < input.length
3912
+ ? quote(input.charAt(actualPos))
3913
+ : 'end of input';
3914
+
3915
+ return 'Expected ' + expected + ' but ' + actual + ' found.';
3916
+ }
3917
+
3918
+ function computeErrorPosition() {
3919
+ /*
3920
+ * The first idea was to use |String.split| to break the input up to the
3921
+ * error position along newlines and derive the line and column from
3922
+ * there. However IE's |split| implementation is so broken that it was
3923
+ * enough to prevent it.
3924
+ */
3925
+
3926
+ var line = 1;
3927
+ var column = 1;
3928
+ var seenCR = false;
3929
+
3930
+ for (var i = 0; i < rightmostMatchFailuresPos; i++) {
3931
+ var ch = input.charAt(i);
3932
+ if (ch === '\n') {
3933
+ if (!seenCR) { line++; }
3934
+ column = 1;
3935
+ seenCR = false;
3936
+ } else if (ch === '\r' | ch === '\u2028' || ch === '\u2029') {
3937
+ line++;
3938
+ column = 1;
3939
+ seenCR = true;
3940
+ } else {
3941
+ column++;
3942
+ seenCR = false;
3943
+ }
3944
+ }
3945
+
3946
+ return { line: line, column: column };
3947
+ }
3948
+
3949
+
3950
+
3951
+ var result = parseFunctions[startRule]();
3952
+
3953
+ /*
3954
+ * The parser is now in one of the following three states:
3955
+ *
3956
+ * 1. The parser successfully parsed the whole input.
3957
+ *
3958
+ * - |result !== null|
3959
+ * - |pos === input.length|
3960
+ * - |rightmostMatchFailuresExpected| may or may not contain something
3961
+ *
3962
+ * 2. The parser successfully parsed only a part of the input.
3963
+ *
3964
+ * - |result !== null|
3965
+ * - |pos < input.length|
3966
+ * - |rightmostMatchFailuresExpected| may or may not contain something
3967
+ *
3968
+ * 3. The parser did not successfully parse any part of the input.
3969
+ *
3970
+ * - |result === null|
3971
+ * - |pos === 0|
3972
+ * - |rightmostMatchFailuresExpected| contains at least one failure
3973
+ *
3974
+ * All code following this comment (including called functions) must
3975
+ * handle these states.
3976
+ */
3977
+ if (result === null || pos !== input.length) {
3978
+ var errorPosition = computeErrorPosition();
3979
+ throw new this.SyntaxError(
3980
+ buildErrorMessage(),
3981
+ errorPosition.line,
3982
+ errorPosition.column
3983
+ );
3984
+ }
3985
+
3986
+ return result;
3987
+ },
3988
+
3989
+ /* Returns the parser source code. */
3990
+ toSource: function() { return this._source; }
3991
+ };
3992
+
3993
+ /* Thrown when a parser encounters a syntax error. */
3994
+
3995
+ result.SyntaxError = function(message, line, column) {
3996
+ this.name = 'SyntaxError';
3997
+ this.message = message;
3998
+ this.line = line;
3999
+ this.column = column;
4000
+ };
4001
+
4002
+ result.SyntaxError.prototype = Error.prototype;
4003
+
4004
+ return result;
4005
+ })();