rubinius-melbourne 1.1.0.1 → 1.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rubinius/melbourne/grammar.cpp +570 -480
- data/ext/rubinius/melbourne/grammar.y +129 -39
- data/ext/rubinius/melbourne/parser_state.hpp +7 -0
- data/lib/rubinius/melbourne/version.rb +1 -1
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d223a0973dae9a2e87f146c207c1df9b5e49d9ab
|
4
|
+
data.tar.gz: bd55f7b68993ba2c8d5289b1d4e5f9a35c430be0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b9314297b3ff1e2c62e13ccd0c5d06fd7b34225dcb1f5cb9be78d7ddda9c67dcdcb45f3de9514a368f129e7f5f4d442bbbc4158b067f8a5da205527c5cc19f1
|
7
|
+
data.tar.gz: 8cff81f8bbd3a4005880dce1d8ea0aeced83d0ae666d004f75618bb0b66f9d39ebdfd4118b7896aca112c941eb53a222ed6e84d903f9c1ee4b58fb86f3974d13
|
@@ -311,17 +311,105 @@ namespace MELBOURNE {
|
|
311
311
|
#define TRUE true
|
312
312
|
#define FALSE false
|
313
313
|
|
314
|
-
/*
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
314
|
+
/* Functions for multi-byte support imported from MRI 1.8.7
|
315
|
+
Created for grep multi-byte extension Jul., 1993 by t^2 (Takahiro Tanimoto)
|
316
|
+
Last change: Jul. 9, 1993 by t^2 */
|
317
|
+
static const unsigned char mbctab_ascii[] = {
|
318
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
319
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
320
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
321
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
322
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
323
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
324
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
325
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
326
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
327
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
328
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
329
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
330
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
331
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
332
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
333
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
334
|
+
};
|
335
|
+
|
336
|
+
static const unsigned char mbctab_euc[] = { /* 0xA1-0xFE */
|
337
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
338
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
339
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
340
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
341
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
342
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
343
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
344
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
345
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
|
346
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
347
|
+
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
348
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
349
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
350
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
351
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
352
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
|
353
|
+
};
|
354
|
+
|
355
|
+
static const unsigned char mbctab_sjis[] = { /* 0x81-0x9F,0xE0-0xFC */
|
356
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
357
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
358
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
359
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
360
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
361
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
362
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
363
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
364
|
+
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
365
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
366
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
367
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
368
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
369
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
370
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
371
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
|
372
|
+
};
|
373
|
+
|
374
|
+
static const unsigned char mbctab_sjis_trail[] = { /* 0x40-0x7E,0x80-0xFC */
|
375
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
376
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
377
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
378
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
379
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
380
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
381
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
382
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
|
383
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
384
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
385
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
386
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
387
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
388
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
389
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
390
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
|
391
|
+
};
|
392
|
+
|
393
|
+
static const unsigned char mbctab_utf8[] = {
|
394
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
395
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
396
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
397
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
398
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
399
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
400
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
401
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
402
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
403
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
404
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
405
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
406
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
407
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
408
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
409
|
+
3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 0, 0,
|
410
|
+
};
|
411
|
+
|
412
|
+
static const unsigned char* re_mbcinit();
|
325
413
|
|
326
414
|
#define string_new(ptr, len) blk2bstr(ptr, len)
|
327
415
|
#define string_new2(ptr) cstr2bstr(ptr)
|
@@ -364,11 +452,6 @@ mel_yyerror(const char *, rb_parser_state*);
|
|
364
452
|
((id)&ID_SCOPE_MASK) == ID_CLASS))
|
365
453
|
|
366
454
|
|
367
|
-
/* FIXME these went into the ruby_state instead of parser_state
|
368
|
-
because a ton of other crap depends on it
|
369
|
-
char *ruby_sourcefile; current source file
|
370
|
-
int ruby_sourceline; current line no.
|
371
|
-
*/
|
372
455
|
static int yylex(void*, void *);
|
373
456
|
|
374
457
|
|
@@ -478,6 +561,8 @@ rb_parser_state *parser_alloc_state() {
|
|
478
561
|
magic_comments = new std::vector<bstring>;
|
479
562
|
start_lines = new std::list<StartPosition>;
|
480
563
|
|
564
|
+
re_mbctab = re_mbcinit();
|
565
|
+
|
481
566
|
quark_indexes = new quark_map();
|
482
567
|
quarks = new quark_vector();
|
483
568
|
|
@@ -665,7 +750,7 @@ static NODE *extract_block_vars(rb_parser_state *parser_state, NODE* node, var_t
|
|
665
750
|
|
666
751
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
667
752
|
typedef union YYSTYPE
|
668
|
-
#line
|
753
|
+
#line 464 "grammar.y"
|
669
754
|
{
|
670
755
|
VALUE val;
|
671
756
|
NODE *node;
|
@@ -674,7 +759,7 @@ typedef union YYSTYPE
|
|
674
759
|
var_table vars;
|
675
760
|
}
|
676
761
|
/* Line 193 of yacc.c. */
|
677
|
-
#line
|
762
|
+
#line 763 "grammar.cpp"
|
678
763
|
YYSTYPE;
|
679
764
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
680
765
|
# define YYSTYPE_IS_DECLARED 1
|
@@ -687,7 +772,7 @@ typedef union YYSTYPE
|
|
687
772
|
|
688
773
|
|
689
774
|
/* Line 216 of yacc.c. */
|
690
|
-
#line
|
775
|
+
#line 776 "grammar.cpp"
|
691
776
|
|
692
777
|
#ifdef short
|
693
778
|
# undef short
|
@@ -1193,59 +1278,59 @@ static const yytype_int16 yyrhs[] =
|
|
1193
1278
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
1194
1279
|
static const yytype_uint16 yyrline[] =
|
1195
1280
|
{
|
1196
|
-
0,
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1281
|
+
0, 603, 603, 603, 626, 646, 653, 654, 658, 662,
|
1282
|
+
668, 668, 672, 676, 683, 688, 692, 701, 710, 722,
|
1283
|
+
734, 740, 739, 751, 759, 763, 769, 794, 810, 822,
|
1284
|
+
834, 846, 851, 855, 860, 865, 868, 869, 873, 877,
|
1285
|
+
881, 885, 888, 895, 896, 897, 901, 905, 911, 912,
|
1286
|
+
916, 923, 927, 922, 936, 941, 953, 958, 970, 975,
|
1287
|
+
987, 992, 999, 1000, 1006, 1007, 1013, 1017, 1021, 1025,
|
1288
|
+
1029, 1033, 1039, 1040, 1046, 1050, 1056, 1060, 1064, 1068,
|
1289
|
+
1072, 1076, 1082, 1088, 1095, 1099, 1103, 1107, 1111, 1115,
|
1290
|
+
1121, 1127, 1134, 1138, 1141, 1145, 1149, 1155, 1156, 1157,
|
1291
|
+
1158, 1163, 1170, 1171, 1174, 1178, 1181, 1185, 1185, 1191,
|
1292
|
+
1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201,
|
1293
|
+
1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211,
|
1294
|
+
1212, 1213, 1214, 1215, 1216, 1219, 1219, 1219, 1219, 1220,
|
1295
|
+
1220, 1220, 1220, 1220, 1220, 1220, 1221, 1221, 1221, 1221,
|
1296
|
+
1221, 1221, 1221, 1222, 1222, 1222, 1222, 1222, 1222, 1223,
|
1297
|
+
1223, 1223, 1223, 1223, 1223, 1223, 1224, 1224, 1224, 1224,
|
1298
|
+
1224, 1225, 1225, 1225, 1225, 1225, 1228, 1232, 1236, 1261,
|
1299
|
+
1277, 1289, 1301, 1313, 1318, 1323, 1328, 1334, 1340, 1344,
|
1300
|
+
1348, 1352, 1356, 1360, 1364, 1368, 1372, 1381, 1385, 1389,
|
1301
|
+
1393, 1397, 1401, 1405, 1409, 1413, 1417, 1421, 1425, 1429,
|
1302
|
+
1433, 1437, 1441, 1445, 1449, 1453, 1457, 1461, 1461, 1466,
|
1303
|
+
1466, 1472, 1478, 1485, 1486, 1491, 1495, 1500, 1504, 1511,
|
1304
|
+
1515, 1519, 1524, 1531, 1532, 1535, 1540, 1544, 1549, 1554,
|
1305
|
+
1559, 1564, 1570, 1574, 1577, 1581, 1585, 1590, 1595, 1600,
|
1306
|
+
1605, 1610, 1615, 1620, 1626, 1630, 1633, 1633, 1645, 1646,
|
1307
|
+
1646, 1651, 1651, 1658, 1664, 1668, 1671, 1675, 1681, 1685,
|
1308
|
+
1689, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703,
|
1309
|
+
1708, 1707, 1722, 1722, 1727, 1732, 1736, 1740, 1749, 1758,
|
1310
|
+
1762, 1766, 1770, 1774, 1778, 1778, 1783, 1789, 1790, 1799,
|
1311
|
+
1799, 1815, 1815, 1831, 1834, 1831, 1845, 1848, 1845, 1859,
|
1312
|
+
1859, 1869, 1869, 1876, 1876, 1883, 1885, 1885, 1883, 1894,
|
1313
|
+
1893, 1912, 1918, 1911, 1936, 1935, 1954, 1953, 1973, 1974,
|
1314
|
+
1973, 1990, 1994, 1998, 2002, 2008, 2015, 2016, 2017, 2018,
|
1315
|
+
2021, 2022, 2023, 2026, 2027, 2036, 2037, 2043, 2044, 2047,
|
1316
|
+
2051, 2057, 2066, 2070, 2074, 2078, 2082, 2086, 2090, 2094,
|
1317
|
+
2098, 2102, 2106, 2112, 2113, 2117, 2121, 2128, 2134, 2127,
|
1318
|
+
2146, 2155, 2159, 2165, 2170, 2175, 2180, 2184, 2189, 2194,
|
1319
|
+
2198, 2205, 2209, 2204, 2216, 2221, 2215, 2230, 2237, 2238,
|
1320
|
+
2242, 2248, 2249, 2252, 2263, 2266, 2270, 2271, 2274, 2278,
|
1321
|
+
2281, 2289, 2292, 2293, 2297, 2300, 2313, 2314, 2320, 2326,
|
1322
|
+
2349, 2379, 2383, 2390, 2393, 2399, 2400, 2406, 2410, 2417,
|
1323
|
+
2420, 2427, 2430, 2437, 2440, 2446, 2448, 2447, 2459, 2458,
|
1324
|
+
2478, 2479, 2480, 2481, 2484, 2491, 2492, 2493, 2494, 2497,
|
1325
|
+
2528, 2529, 2530, 2534, 2540, 2541, 2542, 2543, 2544, 2545,
|
1326
|
+
2546, 2547, 2548, 2549, 2550, 2553, 2559, 2565, 2566, 2569,
|
1327
|
+
2574, 2573, 2581, 2584, 2590, 2596, 2600, 2604, 2608, 2612,
|
1328
|
+
2616, 2620, 2624, 2629, 2634, 2638, 2642, 2646, 2650, 2661,
|
1329
|
+
2662, 2668, 2678, 2683, 2689, 2690, 2693, 2701, 2707, 2708,
|
1330
|
+
2711, 2721, 2725, 2728, 2733, 2733, 2758, 2759, 2763, 2772,
|
1331
|
+
2773, 2779, 2785, 2786, 2787, 2790, 2791, 2792, 2793, 2796,
|
1332
|
+
2797, 2798, 2801, 2802, 2805, 2806, 2809, 2810, 2813, 2814,
|
1333
|
+
2815, 2818, 2819, 2822, 2823, 2826
|
1249
1334
|
};
|
1250
1335
|
#endif
|
1251
1336
|
|
@@ -4613,7 +4698,7 @@ yyreduce:
|
|
4613
4698
|
switch (yyn)
|
4614
4699
|
{
|
4615
4700
|
case 2:
|
4616
|
-
#line
|
4701
|
+
#line 603 "grammar.y"
|
4617
4702
|
{
|
4618
4703
|
lex_state = EXPR_BEG;
|
4619
4704
|
variables = new LocalState(0);
|
@@ -4622,7 +4707,7 @@ yyreduce:
|
|
4622
4707
|
break;
|
4623
4708
|
|
4624
4709
|
case 3:
|
4625
|
-
#line
|
4710
|
+
#line 609 "grammar.y"
|
4626
4711
|
{
|
4627
4712
|
if ((yyvsp[(2) - (2)].node) && !compile_for_eval) {
|
4628
4713
|
/* last expression should not be void */
|
@@ -4641,7 +4726,7 @@ yyreduce:
|
|
4641
4726
|
break;
|
4642
4727
|
|
4643
4728
|
case 4:
|
4644
|
-
#line
|
4729
|
+
#line 630 "grammar.y"
|
4645
4730
|
{
|
4646
4731
|
(yyval.node) = (yyvsp[(1) - (4)].node);
|
4647
4732
|
if ((yyvsp[(2) - (4)].node)) {
|
@@ -4659,7 +4744,7 @@ yyreduce:
|
|
4659
4744
|
break;
|
4660
4745
|
|
4661
4746
|
case 5:
|
4662
|
-
#line
|
4747
|
+
#line 647 "grammar.y"
|
4663
4748
|
{
|
4664
4749
|
void_stmts((yyvsp[(1) - (2)].node), vps);
|
4665
4750
|
(yyval.node) = (yyvsp[(1) - (2)].node);
|
@@ -4667,47 +4752,47 @@ yyreduce:
|
|
4667
4752
|
break;
|
4668
4753
|
|
4669
4754
|
case 7:
|
4670
|
-
#line
|
4755
|
+
#line 655 "grammar.y"
|
4671
4756
|
{
|
4672
4757
|
(yyval.node) = newline_node(vps, (yyvsp[(1) - (1)].node));
|
4673
4758
|
;}
|
4674
4759
|
break;
|
4675
4760
|
|
4676
4761
|
case 8:
|
4677
|
-
#line
|
4762
|
+
#line 659 "grammar.y"
|
4678
4763
|
{
|
4679
4764
|
(yyval.node) = block_append(vps, (yyvsp[(1) - (3)].node), newline_node(vps, (yyvsp[(3) - (3)].node)));
|
4680
4765
|
;}
|
4681
4766
|
break;
|
4682
4767
|
|
4683
4768
|
case 9:
|
4684
|
-
#line
|
4769
|
+
#line 663 "grammar.y"
|
4685
4770
|
{
|
4686
4771
|
(yyval.node) = remove_begin((yyvsp[(2) - (2)].node), vps);
|
4687
4772
|
;}
|
4688
4773
|
break;
|
4689
4774
|
|
4690
4775
|
case 10:
|
4691
|
-
#line
|
4776
|
+
#line 668 "grammar.y"
|
4692
4777
|
{lex_state = EXPR_FNAME;;}
|
4693
4778
|
break;
|
4694
4779
|
|
4695
4780
|
case 11:
|
4696
|
-
#line
|
4781
|
+
#line 669 "grammar.y"
|
4697
4782
|
{
|
4698
4783
|
(yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node));
|
4699
4784
|
;}
|
4700
4785
|
break;
|
4701
4786
|
|
4702
4787
|
case 12:
|
4703
|
-
#line
|
4788
|
+
#line 673 "grammar.y"
|
4704
4789
|
{
|
4705
4790
|
(yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id));
|
4706
4791
|
;}
|
4707
4792
|
break;
|
4708
4793
|
|
4709
4794
|
case 13:
|
4710
|
-
#line
|
4795
|
+
#line 677 "grammar.y"
|
4711
4796
|
{
|
4712
4797
|
char buf[3];
|
4713
4798
|
|
@@ -4717,7 +4802,7 @@ yyreduce:
|
|
4717
4802
|
break;
|
4718
4803
|
|
4719
4804
|
case 14:
|
4720
|
-
#line
|
4805
|
+
#line 684 "grammar.y"
|
4721
4806
|
{
|
4722
4807
|
yyerror("can't make alias for the number variables");
|
4723
4808
|
(yyval.node) = 0;
|
@@ -4725,14 +4810,14 @@ yyreduce:
|
|
4725
4810
|
break;
|
4726
4811
|
|
4727
4812
|
case 15:
|
4728
|
-
#line
|
4813
|
+
#line 689 "grammar.y"
|
4729
4814
|
{
|
4730
4815
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
4731
4816
|
;}
|
4732
4817
|
break;
|
4733
4818
|
|
4734
4819
|
case 16:
|
4735
|
-
#line
|
4820
|
+
#line 693 "grammar.y"
|
4736
4821
|
{
|
4737
4822
|
(yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node), vps), remove_begin((yyvsp[(1) - (3)].node), vps), 0);
|
4738
4823
|
fixpos((yyval.node), (yyvsp[(3) - (3)].node));
|
@@ -4744,7 +4829,7 @@ yyreduce:
|
|
4744
4829
|
break;
|
4745
4830
|
|
4746
4831
|
case 17:
|
4747
|
-
#line
|
4832
|
+
#line 702 "grammar.y"
|
4748
4833
|
{
|
4749
4834
|
(yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node), vps), remove_begin((yyvsp[(1) - (3)].node), vps), 0);
|
4750
4835
|
fixpos((yyval.node), (yyvsp[(3) - (3)].node));
|
@@ -4756,7 +4841,7 @@ yyreduce:
|
|
4756
4841
|
break;
|
4757
4842
|
|
4758
4843
|
case 18:
|
4759
|
-
#line
|
4844
|
+
#line 711 "grammar.y"
|
4760
4845
|
{
|
4761
4846
|
if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
|
4762
4847
|
(yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node), vps), (yyvsp[(1) - (3)].node)->nd_body, 0);
|
@@ -4771,7 +4856,7 @@ yyreduce:
|
|
4771
4856
|
break;
|
4772
4857
|
|
4773
4858
|
case 19:
|
4774
|
-
#line
|
4859
|
+
#line 723 "grammar.y"
|
4775
4860
|
{
|
4776
4861
|
if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
|
4777
4862
|
(yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node), vps), (yyvsp[(1) - (3)].node)->nd_body, 0);
|
@@ -4786,7 +4871,7 @@ yyreduce:
|
|
4786
4871
|
break;
|
4787
4872
|
|
4788
4873
|
case 20:
|
4789
|
-
#line
|
4874
|
+
#line 735 "grammar.y"
|
4790
4875
|
{
|
4791
4876
|
NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node), vps), 0);
|
4792
4877
|
(yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node), vps), resq, 0);
|
@@ -4794,7 +4879,7 @@ yyreduce:
|
|
4794
4879
|
break;
|
4795
4880
|
|
4796
4881
|
case 21:
|
4797
|
-
#line
|
4882
|
+
#line 740 "grammar.y"
|
4798
4883
|
{
|
4799
4884
|
if (in_def || in_single) {
|
4800
4885
|
yyerror("BEGIN in method");
|
@@ -4804,7 +4889,7 @@ yyreduce:
|
|
4804
4889
|
break;
|
4805
4890
|
|
4806
4891
|
case 22:
|
4807
|
-
#line
|
4892
|
+
#line 747 "grammar.y"
|
4808
4893
|
{
|
4809
4894
|
local_pop();
|
4810
4895
|
(yyval.node) = NEW_ITER(0, NEW_PREEXE(), (yyvsp[(4) - (5)].node));
|
@@ -4812,7 +4897,7 @@ yyreduce:
|
|
4812
4897
|
break;
|
4813
4898
|
|
4814
4899
|
case 23:
|
4815
|
-
#line
|
4900
|
+
#line 752 "grammar.y"
|
4816
4901
|
{
|
4817
4902
|
if (in_def || in_single) {
|
4818
4903
|
rb_warn("END in method; use at_exit");
|
@@ -4823,14 +4908,14 @@ yyreduce:
|
|
4823
4908
|
break;
|
4824
4909
|
|
4825
4910
|
case 24:
|
4826
|
-
#line
|
4911
|
+
#line 760 "grammar.y"
|
4827
4912
|
{
|
4828
4913
|
(yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
4829
4914
|
;}
|
4830
4915
|
break;
|
4831
4916
|
|
4832
4917
|
case 25:
|
4833
|
-
#line
|
4918
|
+
#line 764 "grammar.y"
|
4834
4919
|
{
|
4835
4920
|
value_expr((yyvsp[(3) - (3)].node));
|
4836
4921
|
(yyvsp[(1) - (3)].node)->nd_value = ((yyvsp[(1) - (3)].node)->nd_head) ? NEW_TO_ARY((yyvsp[(3) - (3)].node)) : NEW_ARRAY((yyvsp[(3) - (3)].node));
|
@@ -4839,7 +4924,7 @@ yyreduce:
|
|
4839
4924
|
break;
|
4840
4925
|
|
4841
4926
|
case 26:
|
4842
|
-
#line
|
4927
|
+
#line 770 "grammar.y"
|
4843
4928
|
{
|
4844
4929
|
value_expr((yyvsp[(3) - (3)].node));
|
4845
4930
|
if ((yyvsp[(1) - (3)].node)) {
|
@@ -4867,7 +4952,7 @@ yyreduce:
|
|
4867
4952
|
break;
|
4868
4953
|
|
4869
4954
|
case 27:
|
4870
|
-
#line
|
4955
|
+
#line 795 "grammar.y"
|
4871
4956
|
{
|
4872
4957
|
NODE *args;
|
4873
4958
|
|
@@ -4886,7 +4971,7 @@ yyreduce:
|
|
4886
4971
|
break;
|
4887
4972
|
|
4888
4973
|
case 28:
|
4889
|
-
#line
|
4974
|
+
#line 811 "grammar.y"
|
4890
4975
|
{
|
4891
4976
|
value_expr((yyvsp[(5) - (5)].node));
|
4892
4977
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -4901,7 +4986,7 @@ yyreduce:
|
|
4901
4986
|
break;
|
4902
4987
|
|
4903
4988
|
case 29:
|
4904
|
-
#line
|
4989
|
+
#line 823 "grammar.y"
|
4905
4990
|
{
|
4906
4991
|
value_expr((yyvsp[(5) - (5)].node));
|
4907
4992
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -4916,7 +5001,7 @@ yyreduce:
|
|
4916
5001
|
break;
|
4917
5002
|
|
4918
5003
|
case 30:
|
4919
|
-
#line
|
5004
|
+
#line 835 "grammar.y"
|
4920
5005
|
{
|
4921
5006
|
value_expr((yyvsp[(5) - (5)].node));
|
4922
5007
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -4931,7 +5016,7 @@ yyreduce:
|
|
4931
5016
|
break;
|
4932
5017
|
|
4933
5018
|
case 31:
|
4934
|
-
#line
|
5019
|
+
#line 847 "grammar.y"
|
4935
5020
|
{
|
4936
5021
|
rb_backref_error((yyvsp[(1) - (3)].node), vps);
|
4937
5022
|
(yyval.node) = 0;
|
@@ -4939,14 +5024,14 @@ yyreduce:
|
|
4939
5024
|
break;
|
4940
5025
|
|
4941
5026
|
case 32:
|
4942
|
-
#line
|
5027
|
+
#line 852 "grammar.y"
|
4943
5028
|
{
|
4944
5029
|
(yyval.node) = node_assign((yyvsp[(1) - (3)].node), NEW_SVALUE((yyvsp[(3) - (3)].node)), vps);
|
4945
5030
|
;}
|
4946
5031
|
break;
|
4947
5032
|
|
4948
5033
|
case 33:
|
4949
|
-
#line
|
5034
|
+
#line 856 "grammar.y"
|
4950
5035
|
{
|
4951
5036
|
(yyvsp[(1) - (3)].node)->nd_value = ((yyvsp[(1) - (3)].node)->nd_head) ? NEW_TO_ARY((yyvsp[(3) - (3)].node)) : NEW_ARRAY((yyvsp[(3) - (3)].node));
|
4952
5037
|
(yyval.node) = (yyvsp[(1) - (3)].node);
|
@@ -4954,7 +5039,7 @@ yyreduce:
|
|
4954
5039
|
break;
|
4955
5040
|
|
4956
5041
|
case 34:
|
4957
|
-
#line
|
5042
|
+
#line 861 "grammar.y"
|
4958
5043
|
{
|
4959
5044
|
(yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
|
4960
5045
|
(yyval.node) = (yyvsp[(1) - (3)].node);
|
@@ -4962,35 +5047,35 @@ yyreduce:
|
|
4962
5047
|
break;
|
4963
5048
|
|
4964
5049
|
case 37:
|
4965
|
-
#line
|
5050
|
+
#line 870 "grammar.y"
|
4966
5051
|
{
|
4967
5052
|
(yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
4968
5053
|
;}
|
4969
5054
|
break;
|
4970
5055
|
|
4971
5056
|
case 38:
|
4972
|
-
#line
|
5057
|
+
#line 874 "grammar.y"
|
4973
5058
|
{
|
4974
5059
|
(yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
4975
5060
|
;}
|
4976
5061
|
break;
|
4977
5062
|
|
4978
5063
|
case 39:
|
4979
|
-
#line
|
5064
|
+
#line 878 "grammar.y"
|
4980
5065
|
{
|
4981
5066
|
(yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node), vps));
|
4982
5067
|
;}
|
4983
5068
|
break;
|
4984
5069
|
|
4985
5070
|
case 40:
|
4986
|
-
#line
|
5071
|
+
#line 882 "grammar.y"
|
4987
5072
|
{
|
4988
5073
|
(yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node), vps));
|
4989
5074
|
;}
|
4990
5075
|
break;
|
4991
5076
|
|
4992
5077
|
case 42:
|
4993
|
-
#line
|
5078
|
+
#line 889 "grammar.y"
|
4994
5079
|
{
|
4995
5080
|
value_expr((yyval.node));
|
4996
5081
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
@@ -4998,42 +5083,42 @@ yyreduce:
|
|
4998
5083
|
break;
|
4999
5084
|
|
5000
5085
|
case 45:
|
5001
|
-
#line
|
5086
|
+
#line 898 "grammar.y"
|
5002
5087
|
{
|
5003
5088
|
(yyval.node) = NEW_RETURN(ret_args(vps, (yyvsp[(2) - (2)].node)));
|
5004
5089
|
;}
|
5005
5090
|
break;
|
5006
5091
|
|
5007
5092
|
case 46:
|
5008
|
-
#line
|
5093
|
+
#line 902 "grammar.y"
|
5009
5094
|
{
|
5010
5095
|
(yyval.node) = NEW_BREAK(ret_args(vps, (yyvsp[(2) - (2)].node)));
|
5011
5096
|
;}
|
5012
5097
|
break;
|
5013
5098
|
|
5014
5099
|
case 47:
|
5015
|
-
#line
|
5100
|
+
#line 906 "grammar.y"
|
5016
5101
|
{
|
5017
5102
|
(yyval.node) = NEW_NEXT(ret_args(vps, (yyvsp[(2) - (2)].node)));
|
5018
5103
|
;}
|
5019
5104
|
break;
|
5020
5105
|
|
5021
5106
|
case 49:
|
5022
|
-
#line
|
5107
|
+
#line 913 "grammar.y"
|
5023
5108
|
{
|
5024
5109
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
5025
5110
|
;}
|
5026
5111
|
break;
|
5027
5112
|
|
5028
5113
|
case 50:
|
5029
|
-
#line
|
5114
|
+
#line 917 "grammar.y"
|
5030
5115
|
{
|
5031
5116
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
5032
5117
|
;}
|
5033
5118
|
break;
|
5034
5119
|
|
5035
5120
|
case 51:
|
5036
|
-
#line
|
5121
|
+
#line 923 "grammar.y"
|
5037
5122
|
{
|
5038
5123
|
(yyvsp[(1) - (1)].num) = sourceline;
|
5039
5124
|
reset_block(vps);
|
@@ -5041,12 +5126,12 @@ yyreduce:
|
|
5041
5126
|
break;
|
5042
5127
|
|
5043
5128
|
case 52:
|
5044
|
-
#line
|
5129
|
+
#line 927 "grammar.y"
|
5045
5130
|
{ (yyval.vars) = variables->block_vars; ;}
|
5046
5131
|
break;
|
5047
5132
|
|
5048
5133
|
case 53:
|
5049
|
-
#line
|
5134
|
+
#line 930 "grammar.y"
|
5050
5135
|
{
|
5051
5136
|
(yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, extract_block_vars(vps, (yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars)));
|
5052
5137
|
nd_set_line((yyval.node), (yyvsp[(1) - (6)].num));
|
@@ -5054,7 +5139,7 @@ yyreduce:
|
|
5054
5139
|
break;
|
5055
5140
|
|
5056
5141
|
case 54:
|
5057
|
-
#line
|
5142
|
+
#line 937 "grammar.y"
|
5058
5143
|
{
|
5059
5144
|
(yyval.node) = new_fcall(vps, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
|
5060
5145
|
fixpos((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -5062,7 +5147,7 @@ yyreduce:
|
|
5062
5147
|
break;
|
5063
5148
|
|
5064
5149
|
case 55:
|
5065
|
-
#line
|
5150
|
+
#line 942 "grammar.y"
|
5066
5151
|
{
|
5067
5152
|
(yyval.node) = new_fcall(vps, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node));
|
5068
5153
|
if ((yyvsp[(3) - (3)].node)) {
|
@@ -5077,7 +5162,7 @@ yyreduce:
|
|
5077
5162
|
break;
|
5078
5163
|
|
5079
5164
|
case 56:
|
5080
|
-
#line
|
5165
|
+
#line 954 "grammar.y"
|
5081
5166
|
{
|
5082
5167
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
5083
5168
|
fixpos((yyval.node), (yyvsp[(1) - (4)].node));
|
@@ -5085,7 +5170,7 @@ yyreduce:
|
|
5085
5170
|
break;
|
5086
5171
|
|
5087
5172
|
case 57:
|
5088
|
-
#line
|
5173
|
+
#line 959 "grammar.y"
|
5089
5174
|
{
|
5090
5175
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
|
5091
5176
|
if ((yyvsp[(5) - (5)].node)) {
|
@@ -5100,7 +5185,7 @@ yyreduce:
|
|
5100
5185
|
break;
|
5101
5186
|
|
5102
5187
|
case 58:
|
5103
|
-
#line
|
5188
|
+
#line 971 "grammar.y"
|
5104
5189
|
{
|
5105
5190
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
5106
5191
|
fixpos((yyval.node), (yyvsp[(1) - (4)].node));
|
@@ -5108,7 +5193,7 @@ yyreduce:
|
|
5108
5193
|
break;
|
5109
5194
|
|
5110
5195
|
case 59:
|
5111
|
-
#line
|
5196
|
+
#line 976 "grammar.y"
|
5112
5197
|
{
|
5113
5198
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node));
|
5114
5199
|
if ((yyvsp[(5) - (5)].node)) {
|
@@ -5123,7 +5208,7 @@ yyreduce:
|
|
5123
5208
|
break;
|
5124
5209
|
|
5125
5210
|
case 60:
|
5126
|
-
#line
|
5211
|
+
#line 988 "grammar.y"
|
5127
5212
|
{
|
5128
5213
|
(yyval.node) = new_super(vps, (yyvsp[(2) - (2)].node));
|
5129
5214
|
fixpos((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -5131,7 +5216,7 @@ yyreduce:
|
|
5131
5216
|
break;
|
5132
5217
|
|
5133
5218
|
case 61:
|
5134
|
-
#line
|
5219
|
+
#line 993 "grammar.y"
|
5135
5220
|
{
|
5136
5221
|
(yyval.node) = new_yield(vps, (yyvsp[(2) - (2)].node));
|
5137
5222
|
fixpos((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -5139,119 +5224,119 @@ yyreduce:
|
|
5139
5224
|
break;
|
5140
5225
|
|
5141
5226
|
case 63:
|
5142
|
-
#line
|
5227
|
+
#line 1001 "grammar.y"
|
5143
5228
|
{
|
5144
5229
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
5145
5230
|
;}
|
5146
5231
|
break;
|
5147
5232
|
|
5148
5233
|
case 65:
|
5149
|
-
#line
|
5234
|
+
#line 1008 "grammar.y"
|
5150
5235
|
{
|
5151
5236
|
(yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0);
|
5152
5237
|
;}
|
5153
5238
|
break;
|
5154
5239
|
|
5155
5240
|
case 66:
|
5156
|
-
#line
|
5241
|
+
#line 1014 "grammar.y"
|
5157
5242
|
{
|
5158
5243
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0);
|
5159
5244
|
;}
|
5160
5245
|
break;
|
5161
5246
|
|
5162
5247
|
case 67:
|
5163
|
-
#line
|
5248
|
+
#line 1018 "grammar.y"
|
5164
5249
|
{
|
5165
5250
|
(yyval.node) = NEW_MASGN(list_append(vps, (yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0);
|
5166
5251
|
;}
|
5167
5252
|
break;
|
5168
5253
|
|
5169
5254
|
case 68:
|
5170
|
-
#line
|
5255
|
+
#line 1022 "grammar.y"
|
5171
5256
|
{
|
5172
5257
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
5173
5258
|
;}
|
5174
5259
|
break;
|
5175
5260
|
|
5176
5261
|
case 69:
|
5177
|
-
#line
|
5262
|
+
#line 1026 "grammar.y"
|
5178
5263
|
{
|
5179
5264
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1);
|
5180
5265
|
;}
|
5181
5266
|
break;
|
5182
5267
|
|
5183
5268
|
case 70:
|
5184
|
-
#line
|
5269
|
+
#line 1030 "grammar.y"
|
5185
5270
|
{
|
5186
5271
|
(yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node));
|
5187
5272
|
;}
|
5188
5273
|
break;
|
5189
5274
|
|
5190
5275
|
case 71:
|
5191
|
-
#line
|
5276
|
+
#line 1034 "grammar.y"
|
5192
5277
|
{
|
5193
5278
|
(yyval.node) = NEW_MASGN(0, -1);
|
5194
5279
|
;}
|
5195
5280
|
break;
|
5196
5281
|
|
5197
5282
|
case 73:
|
5198
|
-
#line
|
5283
|
+
#line 1041 "grammar.y"
|
5199
5284
|
{
|
5200
5285
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
5201
5286
|
;}
|
5202
5287
|
break;
|
5203
5288
|
|
5204
5289
|
case 74:
|
5205
|
-
#line
|
5290
|
+
#line 1047 "grammar.y"
|
5206
5291
|
{
|
5207
5292
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node));
|
5208
5293
|
;}
|
5209
5294
|
break;
|
5210
5295
|
|
5211
5296
|
case 75:
|
5212
|
-
#line
|
5297
|
+
#line 1051 "grammar.y"
|
5213
5298
|
{
|
5214
5299
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
|
5215
5300
|
;}
|
5216
5301
|
break;
|
5217
5302
|
|
5218
5303
|
case 76:
|
5219
|
-
#line
|
5304
|
+
#line 1057 "grammar.y"
|
5220
5305
|
{
|
5221
5306
|
(yyval.node) = assignable((yyvsp[(1) - (1)].id), 0, vps);
|
5222
5307
|
;}
|
5223
5308
|
break;
|
5224
5309
|
|
5225
5310
|
case 77:
|
5226
|
-
#line
|
5311
|
+
#line 1061 "grammar.y"
|
5227
5312
|
{
|
5228
5313
|
(yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), vps);
|
5229
5314
|
;}
|
5230
5315
|
break;
|
5231
5316
|
|
5232
5317
|
case 78:
|
5233
|
-
#line
|
5318
|
+
#line 1065 "grammar.y"
|
5234
5319
|
{
|
5235
5320
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5236
5321
|
;}
|
5237
5322
|
break;
|
5238
5323
|
|
5239
5324
|
case 79:
|
5240
|
-
#line
|
5325
|
+
#line 1069 "grammar.y"
|
5241
5326
|
{
|
5242
5327
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5243
5328
|
;}
|
5244
5329
|
break;
|
5245
5330
|
|
5246
5331
|
case 80:
|
5247
|
-
#line
|
5332
|
+
#line 1073 "grammar.y"
|
5248
5333
|
{
|
5249
5334
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5250
5335
|
;}
|
5251
5336
|
break;
|
5252
5337
|
|
5253
5338
|
case 81:
|
5254
|
-
#line
|
5339
|
+
#line 1077 "grammar.y"
|
5255
5340
|
{
|
5256
5341
|
if (in_def || in_single)
|
5257
5342
|
yyerror("dynamic constant assignment");
|
@@ -5260,7 +5345,7 @@ yyreduce:
|
|
5260
5345
|
break;
|
5261
5346
|
|
5262
5347
|
case 82:
|
5263
|
-
#line
|
5348
|
+
#line 1083 "grammar.y"
|
5264
5349
|
{
|
5265
5350
|
if (in_def || in_single)
|
5266
5351
|
yyerror("dynamic constant assignment");
|
@@ -5269,7 +5354,7 @@ yyreduce:
|
|
5269
5354
|
break;
|
5270
5355
|
|
5271
5356
|
case 83:
|
5272
|
-
#line
|
5357
|
+
#line 1089 "grammar.y"
|
5273
5358
|
{
|
5274
5359
|
rb_backref_error((yyvsp[(1) - (1)].node), vps);
|
5275
5360
|
(yyval.node) = 0;
|
@@ -5277,42 +5362,42 @@ yyreduce:
|
|
5277
5362
|
break;
|
5278
5363
|
|
5279
5364
|
case 84:
|
5280
|
-
#line
|
5365
|
+
#line 1096 "grammar.y"
|
5281
5366
|
{
|
5282
5367
|
(yyval.node) = assignable((yyvsp[(1) - (1)].id), 0, vps);
|
5283
5368
|
;}
|
5284
5369
|
break;
|
5285
5370
|
|
5286
5371
|
case 85:
|
5287
|
-
#line
|
5372
|
+
#line 1100 "grammar.y"
|
5288
5373
|
{
|
5289
5374
|
(yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), vps);
|
5290
5375
|
;}
|
5291
5376
|
break;
|
5292
5377
|
|
5293
5378
|
case 86:
|
5294
|
-
#line
|
5379
|
+
#line 1104 "grammar.y"
|
5295
5380
|
{
|
5296
5381
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5297
5382
|
;}
|
5298
5383
|
break;
|
5299
5384
|
|
5300
5385
|
case 87:
|
5301
|
-
#line
|
5386
|
+
#line 1108 "grammar.y"
|
5302
5387
|
{
|
5303
5388
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5304
5389
|
;}
|
5305
5390
|
break;
|
5306
5391
|
|
5307
5392
|
case 88:
|
5308
|
-
#line
|
5393
|
+
#line 1112 "grammar.y"
|
5309
5394
|
{
|
5310
5395
|
(yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), vps);
|
5311
5396
|
;}
|
5312
5397
|
break;
|
5313
5398
|
|
5314
5399
|
case 89:
|
5315
|
-
#line
|
5400
|
+
#line 1116 "grammar.y"
|
5316
5401
|
{
|
5317
5402
|
if (in_def || in_single)
|
5318
5403
|
yyerror("dynamic constant assignment");
|
@@ -5321,7 +5406,7 @@ yyreduce:
|
|
5321
5406
|
break;
|
5322
5407
|
|
5323
5408
|
case 90:
|
5324
|
-
#line
|
5409
|
+
#line 1122 "grammar.y"
|
5325
5410
|
{
|
5326
5411
|
if (in_def || in_single)
|
5327
5412
|
yyerror("dynamic constant assignment");
|
@@ -5330,7 +5415,7 @@ yyreduce:
|
|
5330
5415
|
break;
|
5331
5416
|
|
5332
5417
|
case 91:
|
5333
|
-
#line
|
5418
|
+
#line 1128 "grammar.y"
|
5334
5419
|
{
|
5335
5420
|
rb_backref_error((yyvsp[(1) - (1)].node), vps);
|
5336
5421
|
(yyval.node) = 0;
|
@@ -5338,35 +5423,35 @@ yyreduce:
|
|
5338
5423
|
break;
|
5339
5424
|
|
5340
5425
|
case 92:
|
5341
|
-
#line
|
5426
|
+
#line 1135 "grammar.y"
|
5342
5427
|
{
|
5343
5428
|
yyerror("class/module name must be CONSTANT");
|
5344
5429
|
;}
|
5345
5430
|
break;
|
5346
5431
|
|
5347
5432
|
case 94:
|
5348
|
-
#line
|
5433
|
+
#line 1142 "grammar.y"
|
5349
5434
|
{
|
5350
5435
|
(yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
|
5351
5436
|
;}
|
5352
5437
|
break;
|
5353
5438
|
|
5354
5439
|
case 95:
|
5355
|
-
#line
|
5440
|
+
#line 1146 "grammar.y"
|
5356
5441
|
{
|
5357
5442
|
(yyval.node) = NEW_COLON2(0, (yyval.node));
|
5358
5443
|
;}
|
5359
5444
|
break;
|
5360
5445
|
|
5361
5446
|
case 96:
|
5362
|
-
#line
|
5447
|
+
#line 1150 "grammar.y"
|
5363
5448
|
{
|
5364
5449
|
(yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
|
5365
5450
|
;}
|
5366
5451
|
break;
|
5367
5452
|
|
5368
5453
|
case 100:
|
5369
|
-
#line
|
5454
|
+
#line 1159 "grammar.y"
|
5370
5455
|
{
|
5371
5456
|
lex_state = EXPR_END;
|
5372
5457
|
(yyval.id) = convert_op((rb_parser_state*)parser_state, (yyvsp[(1) - (1)].id));
|
@@ -5374,7 +5459,7 @@ yyreduce:
|
|
5374
5459
|
break;
|
5375
5460
|
|
5376
5461
|
case 101:
|
5377
|
-
#line
|
5462
|
+
#line 1164 "grammar.y"
|
5378
5463
|
{
|
5379
5464
|
lex_state = EXPR_END;
|
5380
5465
|
(yyval.id) = (yyvsp[(1) - (1)].id);
|
@@ -5382,177 +5467,177 @@ yyreduce:
|
|
5382
5467
|
break;
|
5383
5468
|
|
5384
5469
|
case 104:
|
5385
|
-
#line
|
5470
|
+
#line 1175 "grammar.y"
|
5386
5471
|
{
|
5387
5472
|
(yyval.node) = NEW_LIT(QUID2SYM((yyvsp[(1) - (1)].id)));
|
5388
5473
|
;}
|
5389
5474
|
break;
|
5390
5475
|
|
5391
5476
|
case 106:
|
5392
|
-
#line
|
5477
|
+
#line 1182 "grammar.y"
|
5393
5478
|
{
|
5394
5479
|
(yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node));
|
5395
5480
|
;}
|
5396
5481
|
break;
|
5397
5482
|
|
5398
5483
|
case 107:
|
5399
|
-
#line
|
5484
|
+
#line 1185 "grammar.y"
|
5400
5485
|
{lex_state = EXPR_FNAME;;}
|
5401
5486
|
break;
|
5402
5487
|
|
5403
5488
|
case 108:
|
5404
|
-
#line
|
5489
|
+
#line 1186 "grammar.y"
|
5405
5490
|
{
|
5406
5491
|
(yyval.node) = block_append(vps, (yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node)));
|
5407
5492
|
;}
|
5408
5493
|
break;
|
5409
5494
|
|
5410
5495
|
case 109:
|
5411
|
-
#line
|
5496
|
+
#line 1191 "grammar.y"
|
5412
5497
|
{ (yyval.id) = '|'; ;}
|
5413
5498
|
break;
|
5414
5499
|
|
5415
5500
|
case 110:
|
5416
|
-
#line
|
5501
|
+
#line 1192 "grammar.y"
|
5417
5502
|
{ (yyval.id) = '^'; ;}
|
5418
5503
|
break;
|
5419
5504
|
|
5420
5505
|
case 111:
|
5421
|
-
#line
|
5506
|
+
#line 1193 "grammar.y"
|
5422
5507
|
{ (yyval.id) = '&'; ;}
|
5423
5508
|
break;
|
5424
5509
|
|
5425
5510
|
case 112:
|
5426
|
-
#line
|
5511
|
+
#line 1194 "grammar.y"
|
5427
5512
|
{ (yyval.id) = tCMP; ;}
|
5428
5513
|
break;
|
5429
5514
|
|
5430
5515
|
case 113:
|
5431
|
-
#line
|
5516
|
+
#line 1195 "grammar.y"
|
5432
5517
|
{ (yyval.id) = tEQ; ;}
|
5433
5518
|
break;
|
5434
5519
|
|
5435
5520
|
case 114:
|
5436
|
-
#line
|
5521
|
+
#line 1196 "grammar.y"
|
5437
5522
|
{ (yyval.id) = tEQQ; ;}
|
5438
5523
|
break;
|
5439
5524
|
|
5440
5525
|
case 115:
|
5441
|
-
#line
|
5526
|
+
#line 1197 "grammar.y"
|
5442
5527
|
{ (yyval.id) = tMATCH; ;}
|
5443
5528
|
break;
|
5444
5529
|
|
5445
5530
|
case 116:
|
5446
|
-
#line
|
5531
|
+
#line 1198 "grammar.y"
|
5447
5532
|
{ (yyval.id) = '>'; ;}
|
5448
5533
|
break;
|
5449
5534
|
|
5450
5535
|
case 117:
|
5451
|
-
#line
|
5536
|
+
#line 1199 "grammar.y"
|
5452
5537
|
{ (yyval.id) = tGEQ; ;}
|
5453
5538
|
break;
|
5454
5539
|
|
5455
5540
|
case 118:
|
5456
|
-
#line
|
5541
|
+
#line 1200 "grammar.y"
|
5457
5542
|
{ (yyval.id) = '<'; ;}
|
5458
5543
|
break;
|
5459
5544
|
|
5460
5545
|
case 119:
|
5461
|
-
#line
|
5546
|
+
#line 1201 "grammar.y"
|
5462
5547
|
{ (yyval.id) = tLEQ; ;}
|
5463
5548
|
break;
|
5464
5549
|
|
5465
5550
|
case 120:
|
5466
|
-
#line
|
5551
|
+
#line 1202 "grammar.y"
|
5467
5552
|
{ (yyval.id) = tLSHFT; ;}
|
5468
5553
|
break;
|
5469
5554
|
|
5470
5555
|
case 121:
|
5471
|
-
#line
|
5556
|
+
#line 1203 "grammar.y"
|
5472
5557
|
{ (yyval.id) = tRSHFT; ;}
|
5473
5558
|
break;
|
5474
5559
|
|
5475
5560
|
case 122:
|
5476
|
-
#line
|
5561
|
+
#line 1204 "grammar.y"
|
5477
5562
|
{ (yyval.id) = '+'; ;}
|
5478
5563
|
break;
|
5479
5564
|
|
5480
5565
|
case 123:
|
5481
|
-
#line
|
5566
|
+
#line 1205 "grammar.y"
|
5482
5567
|
{ (yyval.id) = '-'; ;}
|
5483
5568
|
break;
|
5484
5569
|
|
5485
5570
|
case 124:
|
5486
|
-
#line
|
5571
|
+
#line 1206 "grammar.y"
|
5487
5572
|
{ (yyval.id) = '*'; ;}
|
5488
5573
|
break;
|
5489
5574
|
|
5490
5575
|
case 125:
|
5491
|
-
#line
|
5576
|
+
#line 1207 "grammar.y"
|
5492
5577
|
{ (yyval.id) = '*'; ;}
|
5493
5578
|
break;
|
5494
5579
|
|
5495
5580
|
case 126:
|
5496
|
-
#line
|
5581
|
+
#line 1208 "grammar.y"
|
5497
5582
|
{ (yyval.id) = '/'; ;}
|
5498
5583
|
break;
|
5499
5584
|
|
5500
5585
|
case 127:
|
5501
|
-
#line
|
5586
|
+
#line 1209 "grammar.y"
|
5502
5587
|
{ (yyval.id) = '%'; ;}
|
5503
5588
|
break;
|
5504
5589
|
|
5505
5590
|
case 128:
|
5506
|
-
#line
|
5591
|
+
#line 1210 "grammar.y"
|
5507
5592
|
{ (yyval.id) = tPOW; ;}
|
5508
5593
|
break;
|
5509
5594
|
|
5510
5595
|
case 129:
|
5511
|
-
#line
|
5596
|
+
#line 1211 "grammar.y"
|
5512
5597
|
{ (yyval.id) = '~'; ;}
|
5513
5598
|
break;
|
5514
5599
|
|
5515
5600
|
case 130:
|
5516
|
-
#line
|
5601
|
+
#line 1212 "grammar.y"
|
5517
5602
|
{ (yyval.id) = tUPLUS; ;}
|
5518
5603
|
break;
|
5519
5604
|
|
5520
5605
|
case 131:
|
5521
|
-
#line
|
5606
|
+
#line 1213 "grammar.y"
|
5522
5607
|
{ (yyval.id) = tUMINUS; ;}
|
5523
5608
|
break;
|
5524
5609
|
|
5525
5610
|
case 132:
|
5526
|
-
#line
|
5611
|
+
#line 1214 "grammar.y"
|
5527
5612
|
{ (yyval.id) = tAREF; ;}
|
5528
5613
|
break;
|
5529
5614
|
|
5530
5615
|
case 133:
|
5531
|
-
#line
|
5616
|
+
#line 1215 "grammar.y"
|
5532
5617
|
{ (yyval.id) = tASET; ;}
|
5533
5618
|
break;
|
5534
5619
|
|
5535
5620
|
case 134:
|
5536
|
-
#line
|
5621
|
+
#line 1216 "grammar.y"
|
5537
5622
|
{ (yyval.id) = '`'; ;}
|
5538
5623
|
break;
|
5539
5624
|
|
5540
5625
|
case 176:
|
5541
|
-
#line
|
5626
|
+
#line 1229 "grammar.y"
|
5542
5627
|
{
|
5543
5628
|
(yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
5544
5629
|
;}
|
5545
5630
|
break;
|
5546
5631
|
|
5547
5632
|
case 177:
|
5548
|
-
#line
|
5633
|
+
#line 1233 "grammar.y"
|
5549
5634
|
{
|
5550
5635
|
(yyval.node) = node_assign((yyvsp[(1) - (5)].node), NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0), vps);
|
5551
5636
|
;}
|
5552
5637
|
break;
|
5553
5638
|
|
5554
5639
|
case 178:
|
5555
|
-
#line
|
5640
|
+
#line 1237 "grammar.y"
|
5556
5641
|
{
|
5557
5642
|
value_expr((yyvsp[(3) - (3)].node));
|
5558
5643
|
if ((yyvsp[(1) - (3)].node)) {
|
@@ -5580,7 +5665,7 @@ yyreduce:
|
|
5580
5665
|
break;
|
5581
5666
|
|
5582
5667
|
case 179:
|
5583
|
-
#line
|
5668
|
+
#line 1262 "grammar.y"
|
5584
5669
|
{
|
5585
5670
|
NODE *args;
|
5586
5671
|
|
@@ -5599,7 +5684,7 @@ yyreduce:
|
|
5599
5684
|
break;
|
5600
5685
|
|
5601
5686
|
case 180:
|
5602
|
-
#line
|
5687
|
+
#line 1278 "grammar.y"
|
5603
5688
|
{
|
5604
5689
|
value_expr((yyvsp[(5) - (5)].node));
|
5605
5690
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -5614,7 +5699,7 @@ yyreduce:
|
|
5614
5699
|
break;
|
5615
5700
|
|
5616
5701
|
case 181:
|
5617
|
-
#line
|
5702
|
+
#line 1290 "grammar.y"
|
5618
5703
|
{
|
5619
5704
|
value_expr((yyvsp[(5) - (5)].node));
|
5620
5705
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -5629,7 +5714,7 @@ yyreduce:
|
|
5629
5714
|
break;
|
5630
5715
|
|
5631
5716
|
case 182:
|
5632
|
-
#line
|
5717
|
+
#line 1302 "grammar.y"
|
5633
5718
|
{
|
5634
5719
|
value_expr((yyvsp[(5) - (5)].node));
|
5635
5720
|
if ((yyvsp[(4) - (5)].id) == tOROP) {
|
@@ -5644,7 +5729,7 @@ yyreduce:
|
|
5644
5729
|
break;
|
5645
5730
|
|
5646
5731
|
case 183:
|
5647
|
-
#line
|
5732
|
+
#line 1314 "grammar.y"
|
5648
5733
|
{
|
5649
5734
|
yyerror("constant re-assignment");
|
5650
5735
|
(yyval.node) = 0;
|
@@ -5652,7 +5737,7 @@ yyreduce:
|
|
5652
5737
|
break;
|
5653
5738
|
|
5654
5739
|
case 184:
|
5655
|
-
#line
|
5740
|
+
#line 1319 "grammar.y"
|
5656
5741
|
{
|
5657
5742
|
yyerror("constant re-assignment");
|
5658
5743
|
(yyval.node) = 0;
|
@@ -5660,7 +5745,7 @@ yyreduce:
|
|
5660
5745
|
break;
|
5661
5746
|
|
5662
5747
|
case 185:
|
5663
|
-
#line
|
5748
|
+
#line 1324 "grammar.y"
|
5664
5749
|
{
|
5665
5750
|
rb_backref_error((yyvsp[(1) - (3)].node), vps);
|
5666
5751
|
(yyval.node) = 0;
|
@@ -5668,7 +5753,7 @@ yyreduce:
|
|
5668
5753
|
break;
|
5669
5754
|
|
5670
5755
|
case 186:
|
5671
|
-
#line
|
5756
|
+
#line 1329 "grammar.y"
|
5672
5757
|
{
|
5673
5758
|
value_expr((yyvsp[(1) - (3)].node));
|
5674
5759
|
value_expr((yyvsp[(3) - (3)].node));
|
@@ -5677,7 +5762,7 @@ yyreduce:
|
|
5677
5762
|
break;
|
5678
5763
|
|
5679
5764
|
case 187:
|
5680
|
-
#line
|
5765
|
+
#line 1335 "grammar.y"
|
5681
5766
|
{
|
5682
5767
|
value_expr((yyvsp[(1) - (3)].node));
|
5683
5768
|
value_expr((yyvsp[(3) - (3)].node));
|
@@ -5686,63 +5771,63 @@ yyreduce:
|
|
5686
5771
|
break;
|
5687
5772
|
|
5688
5773
|
case 188:
|
5689
|
-
#line
|
5774
|
+
#line 1341 "grammar.y"
|
5690
5775
|
{
|
5691
5776
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '+', 1, (yyvsp[(3) - (3)].node), vps);
|
5692
5777
|
;}
|
5693
5778
|
break;
|
5694
5779
|
|
5695
5780
|
case 189:
|
5696
|
-
#line
|
5781
|
+
#line 1345 "grammar.y"
|
5697
5782
|
{
|
5698
5783
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '-', 1, (yyvsp[(3) - (3)].node), vps);
|
5699
5784
|
;}
|
5700
5785
|
break;
|
5701
5786
|
|
5702
5787
|
case 190:
|
5703
|
-
#line
|
5788
|
+
#line 1349 "grammar.y"
|
5704
5789
|
{
|
5705
5790
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '*', 1, (yyvsp[(3) - (3)].node), vps);
|
5706
5791
|
;}
|
5707
5792
|
break;
|
5708
5793
|
|
5709
5794
|
case 191:
|
5710
|
-
#line
|
5795
|
+
#line 1353 "grammar.y"
|
5711
5796
|
{
|
5712
5797
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '/', 1, (yyvsp[(3) - (3)].node), vps);
|
5713
5798
|
;}
|
5714
5799
|
break;
|
5715
5800
|
|
5716
5801
|
case 192:
|
5717
|
-
#line
|
5802
|
+
#line 1357 "grammar.y"
|
5718
5803
|
{
|
5719
5804
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '%', 1, (yyvsp[(3) - (3)].node), vps);
|
5720
5805
|
;}
|
5721
5806
|
break;
|
5722
5807
|
|
5723
5808
|
case 193:
|
5724
|
-
#line
|
5809
|
+
#line 1361 "grammar.y"
|
5725
5810
|
{
|
5726
5811
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tPOW, 1, (yyvsp[(3) - (3)].node), vps);
|
5727
5812
|
;}
|
5728
5813
|
break;
|
5729
5814
|
|
5730
5815
|
case 194:
|
5731
|
-
#line
|
5816
|
+
#line 1365 "grammar.y"
|
5732
5817
|
{
|
5733
5818
|
(yyval.node) = call_op(call_op((yyvsp[(2) - (4)].node), tPOW, 1, (yyvsp[(4) - (4)].node), vps), tUMINUS, 0, 0, vps);
|
5734
5819
|
;}
|
5735
5820
|
break;
|
5736
5821
|
|
5737
5822
|
case 195:
|
5738
|
-
#line
|
5823
|
+
#line 1369 "grammar.y"
|
5739
5824
|
{
|
5740
5825
|
(yyval.node) = call_op(call_op((yyvsp[(2) - (4)].node), tPOW, 1, (yyvsp[(4) - (4)].node), vps), tUMINUS, 0, 0, vps);
|
5741
5826
|
;}
|
5742
5827
|
break;
|
5743
5828
|
|
5744
5829
|
case 196:
|
5745
|
-
#line
|
5830
|
+
#line 1373 "grammar.y"
|
5746
5831
|
{
|
5747
5832
|
if ((yyvsp[(2) - (2)].node) && nd_type((yyvsp[(2) - (2)].node)) == NODE_LIT) {
|
5748
5833
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
@@ -5754,152 +5839,152 @@ yyreduce:
|
|
5754
5839
|
break;
|
5755
5840
|
|
5756
5841
|
case 197:
|
5757
|
-
#line
|
5842
|
+
#line 1382 "grammar.y"
|
5758
5843
|
{
|
5759
5844
|
(yyval.node) = call_op((yyvsp[(2) - (2)].node), tUMINUS, 0, 0, vps);
|
5760
5845
|
;}
|
5761
5846
|
break;
|
5762
5847
|
|
5763
5848
|
case 198:
|
5764
|
-
#line
|
5849
|
+
#line 1386 "grammar.y"
|
5765
5850
|
{
|
5766
5851
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '|', 1, (yyvsp[(3) - (3)].node), vps);
|
5767
5852
|
;}
|
5768
5853
|
break;
|
5769
5854
|
|
5770
5855
|
case 199:
|
5771
|
-
#line
|
5856
|
+
#line 1390 "grammar.y"
|
5772
5857
|
{
|
5773
5858
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '^', 1, (yyvsp[(3) - (3)].node), vps);
|
5774
5859
|
;}
|
5775
5860
|
break;
|
5776
5861
|
|
5777
5862
|
case 200:
|
5778
|
-
#line
|
5863
|
+
#line 1394 "grammar.y"
|
5779
5864
|
{
|
5780
5865
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '&', 1, (yyvsp[(3) - (3)].node), vps);
|
5781
5866
|
;}
|
5782
5867
|
break;
|
5783
5868
|
|
5784
5869
|
case 201:
|
5785
|
-
#line
|
5870
|
+
#line 1398 "grammar.y"
|
5786
5871
|
{
|
5787
5872
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tCMP, 1, (yyvsp[(3) - (3)].node), vps);
|
5788
5873
|
;}
|
5789
5874
|
break;
|
5790
5875
|
|
5791
5876
|
case 202:
|
5792
|
-
#line
|
5877
|
+
#line 1402 "grammar.y"
|
5793
5878
|
{
|
5794
5879
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '>', 1, (yyvsp[(3) - (3)].node), vps);
|
5795
5880
|
;}
|
5796
5881
|
break;
|
5797
5882
|
|
5798
5883
|
case 203:
|
5799
|
-
#line
|
5884
|
+
#line 1406 "grammar.y"
|
5800
5885
|
{
|
5801
5886
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tGEQ, 1, (yyvsp[(3) - (3)].node), vps);
|
5802
5887
|
;}
|
5803
5888
|
break;
|
5804
5889
|
|
5805
5890
|
case 204:
|
5806
|
-
#line
|
5891
|
+
#line 1410 "grammar.y"
|
5807
5892
|
{
|
5808
5893
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), '<', 1, (yyvsp[(3) - (3)].node), vps);
|
5809
5894
|
;}
|
5810
5895
|
break;
|
5811
5896
|
|
5812
5897
|
case 205:
|
5813
|
-
#line
|
5898
|
+
#line 1414 "grammar.y"
|
5814
5899
|
{
|
5815
5900
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tLEQ, 1, (yyvsp[(3) - (3)].node), vps);
|
5816
5901
|
;}
|
5817
5902
|
break;
|
5818
5903
|
|
5819
5904
|
case 206:
|
5820
|
-
#line
|
5905
|
+
#line 1418 "grammar.y"
|
5821
5906
|
{
|
5822
5907
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tEQ, 1, (yyvsp[(3) - (3)].node), vps);
|
5823
5908
|
;}
|
5824
5909
|
break;
|
5825
5910
|
|
5826
5911
|
case 207:
|
5827
|
-
#line
|
5912
|
+
#line 1422 "grammar.y"
|
5828
5913
|
{
|
5829
5914
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tEQQ, 1, (yyvsp[(3) - (3)].node), vps);
|
5830
5915
|
;}
|
5831
5916
|
break;
|
5832
5917
|
|
5833
5918
|
case 208:
|
5834
|
-
#line
|
5919
|
+
#line 1426 "grammar.y"
|
5835
5920
|
{
|
5836
5921
|
(yyval.node) = NEW_NOT(call_op((yyvsp[(1) - (3)].node), tEQ, 1, (yyvsp[(3) - (3)].node), vps));
|
5837
5922
|
;}
|
5838
5923
|
break;
|
5839
5924
|
|
5840
5925
|
case 209:
|
5841
|
-
#line
|
5926
|
+
#line 1430 "grammar.y"
|
5842
5927
|
{
|
5843
5928
|
(yyval.node) = match_gen((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
5844
5929
|
;}
|
5845
5930
|
break;
|
5846
5931
|
|
5847
5932
|
case 210:
|
5848
|
-
#line
|
5933
|
+
#line 1434 "grammar.y"
|
5849
5934
|
{
|
5850
5935
|
(yyval.node) = NEW_NOT(match_gen((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps));
|
5851
5936
|
;}
|
5852
5937
|
break;
|
5853
5938
|
|
5854
5939
|
case 211:
|
5855
|
-
#line
|
5940
|
+
#line 1438 "grammar.y"
|
5856
5941
|
{
|
5857
5942
|
(yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node), vps));
|
5858
5943
|
;}
|
5859
5944
|
break;
|
5860
5945
|
|
5861
5946
|
case 212:
|
5862
|
-
#line
|
5947
|
+
#line 1442 "grammar.y"
|
5863
5948
|
{
|
5864
5949
|
(yyval.node) = call_op((yyvsp[(2) - (2)].node), '~', 0, 0, vps);
|
5865
5950
|
;}
|
5866
5951
|
break;
|
5867
5952
|
|
5868
5953
|
case 213:
|
5869
|
-
#line
|
5954
|
+
#line 1446 "grammar.y"
|
5870
5955
|
{
|
5871
5956
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tLSHFT, 1, (yyvsp[(3) - (3)].node), vps);
|
5872
5957
|
;}
|
5873
5958
|
break;
|
5874
5959
|
|
5875
5960
|
case 214:
|
5876
|
-
#line
|
5961
|
+
#line 1450 "grammar.y"
|
5877
5962
|
{
|
5878
5963
|
(yyval.node) = call_op((yyvsp[(1) - (3)].node), tRSHFT, 1, (yyvsp[(3) - (3)].node), vps);
|
5879
5964
|
;}
|
5880
5965
|
break;
|
5881
5966
|
|
5882
5967
|
case 215:
|
5883
|
-
#line
|
5968
|
+
#line 1454 "grammar.y"
|
5884
5969
|
{
|
5885
5970
|
(yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
5886
5971
|
;}
|
5887
5972
|
break;
|
5888
5973
|
|
5889
5974
|
case 216:
|
5890
|
-
#line
|
5975
|
+
#line 1458 "grammar.y"
|
5891
5976
|
{
|
5892
5977
|
(yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), vps);
|
5893
5978
|
;}
|
5894
5979
|
break;
|
5895
5980
|
|
5896
5981
|
case 217:
|
5897
|
-
#line
|
5982
|
+
#line 1461 "grammar.y"
|
5898
5983
|
{in_defined = 1;;}
|
5899
5984
|
break;
|
5900
5985
|
|
5901
5986
|
case 218:
|
5902
|
-
#line
|
5987
|
+
#line 1462 "grammar.y"
|
5903
5988
|
{
|
5904
5989
|
in_defined = 0;
|
5905
5990
|
(yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node));
|
@@ -5907,12 +5992,12 @@ yyreduce:
|
|
5907
5992
|
break;
|
5908
5993
|
|
5909
5994
|
case 219:
|
5910
|
-
#line
|
5995
|
+
#line 1466 "grammar.y"
|
5911
5996
|
{ternary_colon++;;}
|
5912
5997
|
break;
|
5913
5998
|
|
5914
5999
|
case 220:
|
5915
|
-
#line
|
6000
|
+
#line 1467 "grammar.y"
|
5916
6001
|
{
|
5917
6002
|
(yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node), vps), (yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node));
|
5918
6003
|
fixpos((yyval.node), (yyvsp[(1) - (6)].node));
|
@@ -5921,14 +6006,14 @@ yyreduce:
|
|
5921
6006
|
break;
|
5922
6007
|
|
5923
6008
|
case 221:
|
5924
|
-
#line
|
6009
|
+
#line 1473 "grammar.y"
|
5925
6010
|
{
|
5926
6011
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
5927
6012
|
;}
|
5928
6013
|
break;
|
5929
6014
|
|
5930
6015
|
case 222:
|
5931
|
-
#line
|
6016
|
+
#line 1479 "grammar.y"
|
5932
6017
|
{
|
5933
6018
|
value_expr((yyvsp[(1) - (1)].node));
|
5934
6019
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
@@ -5936,7 +6021,7 @@ yyreduce:
|
|
5936
6021
|
break;
|
5937
6022
|
|
5938
6023
|
case 224:
|
5939
|
-
#line
|
6024
|
+
#line 1487 "grammar.y"
|
5940
6025
|
{
|
5941
6026
|
rb_warn("parenthesize argument(s) for future version");
|
5942
6027
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node));
|
@@ -5944,14 +6029,14 @@ yyreduce:
|
|
5944
6029
|
break;
|
5945
6030
|
|
5946
6031
|
case 225:
|
5947
|
-
#line
|
6032
|
+
#line 1492 "grammar.y"
|
5948
6033
|
{
|
5949
6034
|
(yyval.node) = (yyvsp[(1) - (2)].node);
|
5950
6035
|
;}
|
5951
6036
|
break;
|
5952
6037
|
|
5953
6038
|
case 226:
|
5954
|
-
#line
|
6039
|
+
#line 1496 "grammar.y"
|
5955
6040
|
{
|
5956
6041
|
value_expr((yyvsp[(4) - (5)].node));
|
5957
6042
|
(yyval.node) = arg_concat(vps, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node));
|
@@ -5959,14 +6044,14 @@ yyreduce:
|
|
5959
6044
|
break;
|
5960
6045
|
|
5961
6046
|
case 227:
|
5962
|
-
#line
|
6047
|
+
#line 1501 "grammar.y"
|
5963
6048
|
{
|
5964
6049
|
(yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
|
5965
6050
|
;}
|
5966
6051
|
break;
|
5967
6052
|
|
5968
6053
|
case 228:
|
5969
|
-
#line
|
6054
|
+
#line 1505 "grammar.y"
|
5970
6055
|
{
|
5971
6056
|
value_expr((yyvsp[(2) - (3)].node));
|
5972
6057
|
(yyval.node) = NEW_NEWLINE(NEW_SPLAT((yyvsp[(2) - (3)].node)));
|
@@ -5974,21 +6059,21 @@ yyreduce:
|
|
5974
6059
|
break;
|
5975
6060
|
|
5976
6061
|
case 229:
|
5977
|
-
#line
|
6062
|
+
#line 1512 "grammar.y"
|
5978
6063
|
{
|
5979
6064
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
5980
6065
|
;}
|
5981
6066
|
break;
|
5982
6067
|
|
5983
6068
|
case 230:
|
5984
|
-
#line
|
6069
|
+
#line 1516 "grammar.y"
|
5985
6070
|
{
|
5986
6071
|
(yyval.node) = (yyvsp[(2) - (4)].node);
|
5987
6072
|
;}
|
5988
6073
|
break;
|
5989
6074
|
|
5990
6075
|
case 231:
|
5991
|
-
#line
|
6076
|
+
#line 1520 "grammar.y"
|
5992
6077
|
{
|
5993
6078
|
rb_warn("parenthesize argument for future version");
|
5994
6079
|
(yyval.node) = NEW_LIST((yyvsp[(2) - (4)].node));
|
@@ -5996,7 +6081,7 @@ yyreduce:
|
|
5996
6081
|
break;
|
5997
6082
|
|
5998
6083
|
case 232:
|
5999
|
-
#line
|
6084
|
+
#line 1525 "grammar.y"
|
6000
6085
|
{
|
6001
6086
|
rb_warn("parenthesize argument for future version");
|
6002
6087
|
(yyval.node) = list_append(vps, (yyvsp[(2) - (6)].node), (yyvsp[(4) - (6)].node));
|
@@ -6004,7 +6089,7 @@ yyreduce:
|
|
6004
6089
|
break;
|
6005
6090
|
|
6006
6091
|
case 235:
|
6007
|
-
#line
|
6092
|
+
#line 1536 "grammar.y"
|
6008
6093
|
{
|
6009
6094
|
rb_warn("parenthesize argument(s) for future version");
|
6010
6095
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
|
@@ -6012,14 +6097,14 @@ yyreduce:
|
|
6012
6097
|
break;
|
6013
6098
|
|
6014
6099
|
case 236:
|
6015
|
-
#line
|
6100
|
+
#line 1541 "grammar.y"
|
6016
6101
|
{
|
6017
6102
|
(yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
6018
6103
|
;}
|
6019
6104
|
break;
|
6020
6105
|
|
6021
6106
|
case 237:
|
6022
|
-
#line
|
6107
|
+
#line 1545 "grammar.y"
|
6023
6108
|
{
|
6024
6109
|
(yyval.node) = arg_concat(vps, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node));
|
6025
6110
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(5) - (5)].node));
|
@@ -6027,7 +6112,7 @@ yyreduce:
|
|
6027
6112
|
break;
|
6028
6113
|
|
6029
6114
|
case 238:
|
6030
|
-
#line
|
6115
|
+
#line 1550 "grammar.y"
|
6031
6116
|
{
|
6032
6117
|
(yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
|
6033
6118
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -6035,7 +6120,7 @@ yyreduce:
|
|
6035
6120
|
break;
|
6036
6121
|
|
6037
6122
|
case 239:
|
6038
|
-
#line
|
6123
|
+
#line 1555 "grammar.y"
|
6039
6124
|
{
|
6040
6125
|
(yyval.node) = arg_concat(vps, NEW_LIST(NEW_HASH((yyvsp[(1) - (5)].node))), (yyvsp[(4) - (5)].node));
|
6041
6126
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(5) - (5)].node));
|
@@ -6043,7 +6128,7 @@ yyreduce:
|
|
6043
6128
|
break;
|
6044
6129
|
|
6045
6130
|
case 240:
|
6046
|
-
#line
|
6131
|
+
#line 1560 "grammar.y"
|
6047
6132
|
{
|
6048
6133
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node)));
|
6049
6134
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node));
|
@@ -6051,7 +6136,7 @@ yyreduce:
|
|
6051
6136
|
break;
|
6052
6137
|
|
6053
6138
|
case 241:
|
6054
|
-
#line
|
6139
|
+
#line 1565 "grammar.y"
|
6055
6140
|
{
|
6056
6141
|
value_expr((yyvsp[(6) - (7)].node));
|
6057
6142
|
(yyval.node) = arg_concat(vps, list_append(vps, (yyvsp[(1) - (7)].node), NEW_HASH((yyvsp[(3) - (7)].node))), (yyvsp[(6) - (7)].node));
|
@@ -6060,28 +6145,28 @@ yyreduce:
|
|
6060
6145
|
break;
|
6061
6146
|
|
6062
6147
|
case 242:
|
6063
|
-
#line
|
6148
|
+
#line 1571 "grammar.y"
|
6064
6149
|
{
|
6065
6150
|
(yyval.node) = arg_blk_pass(NEW_SPLAT((yyvsp[(2) - (3)].node)), (yyvsp[(3) - (3)].node));
|
6066
6151
|
;}
|
6067
6152
|
break;
|
6068
6153
|
|
6069
6154
|
case 244:
|
6070
|
-
#line
|
6155
|
+
#line 1578 "grammar.y"
|
6071
6156
|
{
|
6072
6157
|
(yyval.node) = arg_blk_pass(list_concat(NEW_LIST((yyvsp[(1) - (4)].node)),(yyvsp[(3) - (4)].node)), (yyvsp[(4) - (4)].node));
|
6073
6158
|
;}
|
6074
6159
|
break;
|
6075
6160
|
|
6076
6161
|
case 245:
|
6077
|
-
#line
|
6162
|
+
#line 1582 "grammar.y"
|
6078
6163
|
{
|
6079
6164
|
(yyval.node) = arg_blk_pass((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
6080
6165
|
;}
|
6081
6166
|
break;
|
6082
6167
|
|
6083
6168
|
case 246:
|
6084
|
-
#line
|
6169
|
+
#line 1586 "grammar.y"
|
6085
6170
|
{
|
6086
6171
|
(yyval.node) = arg_concat(vps, NEW_LIST((yyvsp[(1) - (5)].node)), (yyvsp[(4) - (5)].node));
|
6087
6172
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(5) - (5)].node));
|
@@ -6089,7 +6174,7 @@ yyreduce:
|
|
6089
6174
|
break;
|
6090
6175
|
|
6091
6176
|
case 247:
|
6092
|
-
#line
|
6177
|
+
#line 1591 "grammar.y"
|
6093
6178
|
{
|
6094
6179
|
(yyval.node) = arg_concat(vps, list_concat(NEW_LIST((yyvsp[(1) - (7)].node)),(yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node));
|
6095
6180
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(7) - (7)].node));
|
@@ -6097,7 +6182,7 @@ yyreduce:
|
|
6097
6182
|
break;
|
6098
6183
|
|
6099
6184
|
case 248:
|
6100
|
-
#line
|
6185
|
+
#line 1596 "grammar.y"
|
6101
6186
|
{
|
6102
6187
|
(yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node)));
|
6103
6188
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -6105,7 +6190,7 @@ yyreduce:
|
|
6105
6190
|
break;
|
6106
6191
|
|
6107
6192
|
case 249:
|
6108
|
-
#line
|
6193
|
+
#line 1601 "grammar.y"
|
6109
6194
|
{
|
6110
6195
|
(yyval.node) = arg_concat(vps, NEW_LIST(NEW_HASH((yyvsp[(1) - (5)].node))), (yyvsp[(4) - (5)].node));
|
6111
6196
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(5) - (5)].node));
|
@@ -6113,7 +6198,7 @@ yyreduce:
|
|
6113
6198
|
break;
|
6114
6199
|
|
6115
6200
|
case 250:
|
6116
|
-
#line
|
6201
|
+
#line 1606 "grammar.y"
|
6117
6202
|
{
|
6118
6203
|
(yyval.node) = list_append(vps, NEW_LIST((yyvsp[(1) - (4)].node)), NEW_HASH((yyvsp[(3) - (4)].node)));
|
6119
6204
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node));
|
@@ -6121,7 +6206,7 @@ yyreduce:
|
|
6121
6206
|
break;
|
6122
6207
|
|
6123
6208
|
case 251:
|
6124
|
-
#line
|
6209
|
+
#line 1611 "grammar.y"
|
6125
6210
|
{
|
6126
6211
|
(yyval.node) = list_append(vps, list_concat(NEW_LIST((yyvsp[(1) - (6)].node)),(yyvsp[(3) - (6)].node)), NEW_HASH((yyvsp[(5) - (6)].node)));
|
6127
6212
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(6) - (6)].node));
|
@@ -6129,7 +6214,7 @@ yyreduce:
|
|
6129
6214
|
break;
|
6130
6215
|
|
6131
6216
|
case 252:
|
6132
|
-
#line
|
6217
|
+
#line 1616 "grammar.y"
|
6133
6218
|
{
|
6134
6219
|
(yyval.node) = arg_concat(vps, list_append(vps, NEW_LIST((yyvsp[(1) - (7)].node)), NEW_HASH((yyvsp[(3) - (7)].node))), (yyvsp[(6) - (7)].node));
|
6135
6220
|
(yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(7) - (7)].node));
|
@@ -6137,7 +6222,7 @@ yyreduce:
|
|
6137
6222
|
break;
|
6138
6223
|
|
6139
6224
|
case 253:
|
6140
|
-
#line
|
6225
|
+
#line 1621 "grammar.y"
|
6141
6226
|
{
|
6142
6227
|
(yyval.node) = arg_concat(vps, list_append(vps,
|
6143
6228
|
list_concat(NEW_LIST((yyvsp[(1) - (9)].node)), (yyvsp[(3) - (9)].node)), NEW_HASH((yyvsp[(5) - (9)].node))), (yyvsp[(8) - (9)].node));
|
@@ -6146,14 +6231,14 @@ yyreduce:
|
|
6146
6231
|
break;
|
6147
6232
|
|
6148
6233
|
case 254:
|
6149
|
-
#line
|
6234
|
+
#line 1627 "grammar.y"
|
6150
6235
|
{
|
6151
6236
|
(yyval.node) = arg_blk_pass(NEW_SPLAT((yyvsp[(2) - (3)].node)), (yyvsp[(3) - (3)].node));
|
6152
6237
|
;}
|
6153
6238
|
break;
|
6154
6239
|
|
6155
6240
|
case 256:
|
6156
|
-
#line
|
6241
|
+
#line 1633 "grammar.y"
|
6157
6242
|
{
|
6158
6243
|
(yyval.val) = cmdarg_stack;
|
6159
6244
|
CMDARG_PUSH(1);
|
@@ -6161,7 +6246,7 @@ yyreduce:
|
|
6161
6246
|
break;
|
6162
6247
|
|
6163
6248
|
case 257:
|
6164
|
-
#line
|
6249
|
+
#line 1638 "grammar.y"
|
6165
6250
|
{
|
6166
6251
|
/* CMDARG_POP() */
|
6167
6252
|
cmdarg_stack = (yyvsp[(1) - (2)].val);
|
@@ -6170,12 +6255,12 @@ yyreduce:
|
|
6170
6255
|
break;
|
6171
6256
|
|
6172
6257
|
case 259:
|
6173
|
-
#line
|
6258
|
+
#line 1646 "grammar.y"
|
6174
6259
|
{lex_state = EXPR_ENDARG;;}
|
6175
6260
|
break;
|
6176
6261
|
|
6177
6262
|
case 260:
|
6178
|
-
#line
|
6263
|
+
#line 1647 "grammar.y"
|
6179
6264
|
{
|
6180
6265
|
rb_warn("don't put space before argument parentheses");
|
6181
6266
|
(yyval.node) = 0;
|
@@ -6183,12 +6268,12 @@ yyreduce:
|
|
6183
6268
|
break;
|
6184
6269
|
|
6185
6270
|
case 261:
|
6186
|
-
#line
|
6271
|
+
#line 1651 "grammar.y"
|
6187
6272
|
{lex_state = EXPR_ENDARG;;}
|
6188
6273
|
break;
|
6189
6274
|
|
6190
6275
|
case 262:
|
6191
|
-
#line
|
6276
|
+
#line 1652 "grammar.y"
|
6192
6277
|
{
|
6193
6278
|
rb_warn("don't put space before argument parentheses");
|
6194
6279
|
(yyval.node) = (yyvsp[(2) - (4)].node);
|
@@ -6196,63 +6281,63 @@ yyreduce:
|
|
6196
6281
|
break;
|
6197
6282
|
|
6198
6283
|
case 263:
|
6199
|
-
#line
|
6284
|
+
#line 1659 "grammar.y"
|
6200
6285
|
{
|
6201
6286
|
(yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node));
|
6202
6287
|
;}
|
6203
6288
|
break;
|
6204
6289
|
|
6205
6290
|
case 264:
|
6206
|
-
#line
|
6291
|
+
#line 1665 "grammar.y"
|
6207
6292
|
{
|
6208
6293
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
6209
6294
|
;}
|
6210
6295
|
break;
|
6211
6296
|
|
6212
6297
|
case 266:
|
6213
|
-
#line
|
6298
|
+
#line 1672 "grammar.y"
|
6214
6299
|
{
|
6215
6300
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
|
6216
6301
|
;}
|
6217
6302
|
break;
|
6218
6303
|
|
6219
6304
|
case 267:
|
6220
|
-
#line
|
6305
|
+
#line 1676 "grammar.y"
|
6221
6306
|
{
|
6222
6307
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
6223
6308
|
;}
|
6224
6309
|
break;
|
6225
6310
|
|
6226
6311
|
case 268:
|
6227
|
-
#line
|
6312
|
+
#line 1682 "grammar.y"
|
6228
6313
|
{
|
6229
6314
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
6230
6315
|
;}
|
6231
6316
|
break;
|
6232
6317
|
|
6233
6318
|
case 269:
|
6234
|
-
#line
|
6319
|
+
#line 1686 "grammar.y"
|
6235
6320
|
{
|
6236
6321
|
(yyval.node) = arg_concat(vps, (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
|
6237
6322
|
;}
|
6238
6323
|
break;
|
6239
6324
|
|
6240
6325
|
case 270:
|
6241
|
-
#line
|
6326
|
+
#line 1690 "grammar.y"
|
6242
6327
|
{
|
6243
6328
|
(yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
|
6244
6329
|
;}
|
6245
6330
|
break;
|
6246
6331
|
|
6247
6332
|
case 279:
|
6248
|
-
#line
|
6333
|
+
#line 1704 "grammar.y"
|
6249
6334
|
{
|
6250
6335
|
(yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0);
|
6251
6336
|
;}
|
6252
6337
|
break;
|
6253
6338
|
|
6254
6339
|
case 280:
|
6255
|
-
#line
|
6340
|
+
#line 1708 "grammar.y"
|
6256
6341
|
{
|
6257
6342
|
(yyvsp[(1) - (1)].num) = sourceline;
|
6258
6343
|
PUSH_LINE("begin");
|
@@ -6260,7 +6345,7 @@ yyreduce:
|
|
6260
6345
|
break;
|
6261
6346
|
|
6262
6347
|
case 281:
|
6263
|
-
#line
|
6348
|
+
#line 1714 "grammar.y"
|
6264
6349
|
{
|
6265
6350
|
POP_LINE();
|
6266
6351
|
if ((yyvsp[(3) - (4)].node) == NULL)
|
@@ -6272,12 +6357,12 @@ yyreduce:
|
|
6272
6357
|
break;
|
6273
6358
|
|
6274
6359
|
case 282:
|
6275
|
-
#line
|
6360
|
+
#line 1722 "grammar.y"
|
6276
6361
|
{lex_state = EXPR_ENDARG;;}
|
6277
6362
|
break;
|
6278
6363
|
|
6279
6364
|
case 283:
|
6280
|
-
#line
|
6365
|
+
#line 1723 "grammar.y"
|
6281
6366
|
{
|
6282
6367
|
rb_warning("(...) interpreted as grouped expression");
|
6283
6368
|
(yyval.node) = (yyvsp[(2) - (5)].node);
|
@@ -6285,7 +6370,7 @@ yyreduce:
|
|
6285
6370
|
break;
|
6286
6371
|
|
6287
6372
|
case 284:
|
6288
|
-
#line
|
6373
|
+
#line 1728 "grammar.y"
|
6289
6374
|
{
|
6290
6375
|
if (!(yyvsp[(2) - (3)].node)) (yyval.node) = NEW_NIL();
|
6291
6376
|
else (yyval.node) = (yyvsp[(2) - (3)].node);
|
@@ -6293,21 +6378,21 @@ yyreduce:
|
|
6293
6378
|
break;
|
6294
6379
|
|
6295
6380
|
case 285:
|
6296
|
-
#line
|
6381
|
+
#line 1733 "grammar.y"
|
6297
6382
|
{
|
6298
6383
|
(yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
|
6299
6384
|
;}
|
6300
6385
|
break;
|
6301
6386
|
|
6302
6387
|
case 286:
|
6303
|
-
#line
|
6388
|
+
#line 1737 "grammar.y"
|
6304
6389
|
{
|
6305
6390
|
(yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
|
6306
6391
|
;}
|
6307
6392
|
break;
|
6308
6393
|
|
6309
6394
|
case 287:
|
6310
|
-
#line
|
6395
|
+
#line 1741 "grammar.y"
|
6311
6396
|
{
|
6312
6397
|
if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) {
|
6313
6398
|
(yyval.node) = NEW_FCALL(convert_op((rb_parser_state*) parser_state, tAREF), (yyvsp[(3) - (4)].node));
|
@@ -6319,7 +6404,7 @@ yyreduce:
|
|
6319
6404
|
break;
|
6320
6405
|
|
6321
6406
|
case 288:
|
6322
|
-
#line
|
6407
|
+
#line 1750 "grammar.y"
|
6323
6408
|
{
|
6324
6409
|
if ((yyvsp[(2) - (3)].node) == 0) {
|
6325
6410
|
(yyval.node) = NEW_ZARRAY(); /* zero length array*/
|
@@ -6331,47 +6416,47 @@ yyreduce:
|
|
6331
6416
|
break;
|
6332
6417
|
|
6333
6418
|
case 289:
|
6334
|
-
#line
|
6419
|
+
#line 1759 "grammar.y"
|
6335
6420
|
{
|
6336
6421
|
(yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node));
|
6337
6422
|
;}
|
6338
6423
|
break;
|
6339
6424
|
|
6340
6425
|
case 290:
|
6341
|
-
#line
|
6426
|
+
#line 1763 "grammar.y"
|
6342
6427
|
{
|
6343
6428
|
(yyval.node) = NEW_RETURN(0);
|
6344
6429
|
;}
|
6345
6430
|
break;
|
6346
6431
|
|
6347
6432
|
case 291:
|
6348
|
-
#line
|
6433
|
+
#line 1767 "grammar.y"
|
6349
6434
|
{
|
6350
6435
|
(yyval.node) = new_yield(vps, (yyvsp[(3) - (4)].node));
|
6351
6436
|
;}
|
6352
6437
|
break;
|
6353
6438
|
|
6354
6439
|
case 292:
|
6355
|
-
#line
|
6440
|
+
#line 1771 "grammar.y"
|
6356
6441
|
{
|
6357
6442
|
(yyval.node) = NEW_YIELD(0, Qfalse);
|
6358
6443
|
;}
|
6359
6444
|
break;
|
6360
6445
|
|
6361
6446
|
case 293:
|
6362
|
-
#line
|
6447
|
+
#line 1775 "grammar.y"
|
6363
6448
|
{
|
6364
6449
|
(yyval.node) = NEW_YIELD(0, Qfalse);
|
6365
6450
|
;}
|
6366
6451
|
break;
|
6367
6452
|
|
6368
6453
|
case 294:
|
6369
|
-
#line
|
6454
|
+
#line 1778 "grammar.y"
|
6370
6455
|
{in_defined = 1;;}
|
6371
6456
|
break;
|
6372
6457
|
|
6373
6458
|
case 295:
|
6374
|
-
#line
|
6459
|
+
#line 1779 "grammar.y"
|
6375
6460
|
{
|
6376
6461
|
in_defined = 0;
|
6377
6462
|
(yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node));
|
@@ -6379,7 +6464,7 @@ yyreduce:
|
|
6379
6464
|
break;
|
6380
6465
|
|
6381
6466
|
case 296:
|
6382
|
-
#line
|
6467
|
+
#line 1784 "grammar.y"
|
6383
6468
|
{
|
6384
6469
|
(yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0);
|
6385
6470
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
@@ -6388,7 +6473,7 @@ yyreduce:
|
|
6388
6473
|
break;
|
6389
6474
|
|
6390
6475
|
case 298:
|
6391
|
-
#line
|
6476
|
+
#line 1791 "grammar.y"
|
6392
6477
|
{
|
6393
6478
|
if ((yyvsp[(1) - (2)].node) && nd_type((yyvsp[(1) - (2)].node)) == NODE_BLOCK_PASS) {
|
6394
6479
|
rb_compile_error(vps, "both block arg and actual block given");
|
@@ -6400,14 +6485,14 @@ yyreduce:
|
|
6400
6485
|
break;
|
6401
6486
|
|
6402
6487
|
case 299:
|
6403
|
-
#line
|
6488
|
+
#line 1799 "grammar.y"
|
6404
6489
|
{
|
6405
6490
|
PUSH_LINE("if");
|
6406
6491
|
;}
|
6407
6492
|
break;
|
6408
6493
|
|
6409
6494
|
case 300:
|
6410
|
-
#line
|
6495
|
+
#line 1805 "grammar.y"
|
6411
6496
|
{
|
6412
6497
|
POP_LINE();
|
6413
6498
|
(yyval.node) = NEW_IF(cond((yyvsp[(3) - (7)].node), vps), (yyvsp[(5) - (7)].node), (yyvsp[(6) - (7)].node));
|
@@ -6421,14 +6506,14 @@ yyreduce:
|
|
6421
6506
|
break;
|
6422
6507
|
|
6423
6508
|
case 301:
|
6424
|
-
#line
|
6509
|
+
#line 1815 "grammar.y"
|
6425
6510
|
{
|
6426
6511
|
PUSH_LINE("unless");
|
6427
6512
|
;}
|
6428
6513
|
break;
|
6429
6514
|
|
6430
6515
|
case 302:
|
6431
|
-
#line
|
6516
|
+
#line 1821 "grammar.y"
|
6432
6517
|
{
|
6433
6518
|
POP_LINE();
|
6434
6519
|
(yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (7)].node), vps), (yyvsp[(5) - (7)].node), (yyvsp[(6) - (7)].node));
|
@@ -6442,7 +6527,7 @@ yyreduce:
|
|
6442
6527
|
break;
|
6443
6528
|
|
6444
6529
|
case 303:
|
6445
|
-
#line
|
6530
|
+
#line 1831 "grammar.y"
|
6446
6531
|
{
|
6447
6532
|
PUSH_LINE("while");
|
6448
6533
|
COND_PUSH(1);
|
@@ -6450,12 +6535,12 @@ yyreduce:
|
|
6450
6535
|
break;
|
6451
6536
|
|
6452
6537
|
case 304:
|
6453
|
-
#line
|
6538
|
+
#line 1834 "grammar.y"
|
6454
6539
|
{COND_POP();;}
|
6455
6540
|
break;
|
6456
6541
|
|
6457
6542
|
case 305:
|
6458
|
-
#line
|
6543
|
+
#line 1837 "grammar.y"
|
6459
6544
|
{
|
6460
6545
|
POP_LINE();
|
6461
6546
|
(yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node), vps), (yyvsp[(6) - (7)].node), 1);
|
@@ -6467,7 +6552,7 @@ yyreduce:
|
|
6467
6552
|
break;
|
6468
6553
|
|
6469
6554
|
case 306:
|
6470
|
-
#line
|
6555
|
+
#line 1845 "grammar.y"
|
6471
6556
|
{
|
6472
6557
|
PUSH_LINE("until");
|
6473
6558
|
COND_PUSH(1);
|
@@ -6475,12 +6560,12 @@ yyreduce:
|
|
6475
6560
|
break;
|
6476
6561
|
|
6477
6562
|
case 307:
|
6478
|
-
#line
|
6563
|
+
#line 1848 "grammar.y"
|
6479
6564
|
{COND_POP();;}
|
6480
6565
|
break;
|
6481
6566
|
|
6482
6567
|
case 308:
|
6483
|
-
#line
|
6568
|
+
#line 1851 "grammar.y"
|
6484
6569
|
{
|
6485
6570
|
POP_LINE();
|
6486
6571
|
(yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node), vps), (yyvsp[(6) - (7)].node), 1);
|
@@ -6492,14 +6577,14 @@ yyreduce:
|
|
6492
6577
|
break;
|
6493
6578
|
|
6494
6579
|
case 309:
|
6495
|
-
#line
|
6580
|
+
#line 1859 "grammar.y"
|
6496
6581
|
{
|
6497
6582
|
PUSH_LINE("case");
|
6498
6583
|
;}
|
6499
6584
|
break;
|
6500
6585
|
|
6501
6586
|
case 310:
|
6502
|
-
#line
|
6587
|
+
#line 1864 "grammar.y"
|
6503
6588
|
{
|
6504
6589
|
POP_LINE();
|
6505
6590
|
(yyval.node) = NEW_CASE((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node));
|
@@ -6508,14 +6593,14 @@ yyreduce:
|
|
6508
6593
|
break;
|
6509
6594
|
|
6510
6595
|
case 311:
|
6511
|
-
#line
|
6596
|
+
#line 1869 "grammar.y"
|
6512
6597
|
{
|
6513
6598
|
push_start_line((rb_parser_state*)parser_state, sourceline - 1, "case");
|
6514
6599
|
;}
|
6515
6600
|
break;
|
6516
6601
|
|
6517
6602
|
case 312:
|
6518
|
-
#line
|
6603
|
+
#line 1872 "grammar.y"
|
6519
6604
|
{
|
6520
6605
|
POP_LINE();
|
6521
6606
|
(yyval.node) = (yyvsp[(4) - (5)].node);
|
@@ -6523,14 +6608,14 @@ yyreduce:
|
|
6523
6608
|
break;
|
6524
6609
|
|
6525
6610
|
case 313:
|
6526
|
-
#line
|
6611
|
+
#line 1876 "grammar.y"
|
6527
6612
|
{
|
6528
6613
|
push_start_line((rb_parser_state*)parser_state, sourceline - 1, "case");
|
6529
6614
|
;}
|
6530
6615
|
break;
|
6531
6616
|
|
6532
6617
|
case 314:
|
6533
|
-
#line
|
6618
|
+
#line 1879 "grammar.y"
|
6534
6619
|
{
|
6535
6620
|
POP_LINE();
|
6536
6621
|
(yyval.node) = (yyvsp[(5) - (6)].node);
|
@@ -6538,24 +6623,24 @@ yyreduce:
|
|
6538
6623
|
break;
|
6539
6624
|
|
6540
6625
|
case 315:
|
6541
|
-
#line
|
6626
|
+
#line 1883 "grammar.y"
|
6542
6627
|
{
|
6543
6628
|
PUSH_LINE("for");
|
6544
6629
|
;}
|
6545
6630
|
break;
|
6546
6631
|
|
6547
6632
|
case 316:
|
6548
|
-
#line
|
6633
|
+
#line 1885 "grammar.y"
|
6549
6634
|
{COND_PUSH(1);;}
|
6550
6635
|
break;
|
6551
6636
|
|
6552
6637
|
case 317:
|
6553
|
-
#line
|
6638
|
+
#line 1885 "grammar.y"
|
6554
6639
|
{COND_POP();;}
|
6555
6640
|
break;
|
6556
6641
|
|
6557
6642
|
case 318:
|
6558
|
-
#line
|
6643
|
+
#line 1888 "grammar.y"
|
6559
6644
|
{
|
6560
6645
|
POP_LINE();
|
6561
6646
|
(yyval.node) = NEW_FOR((yyvsp[(3) - (10)].node), (yyvsp[(6) - (10)].node), (yyvsp[(9) - (10)].node));
|
@@ -6564,7 +6649,7 @@ yyreduce:
|
|
6564
6649
|
break;
|
6565
6650
|
|
6566
6651
|
case 319:
|
6567
|
-
#line
|
6652
|
+
#line 1894 "grammar.y"
|
6568
6653
|
{
|
6569
6654
|
PUSH_LINE("class");
|
6570
6655
|
if (in_def || in_single)
|
@@ -6576,7 +6661,7 @@ yyreduce:
|
|
6576
6661
|
break;
|
6577
6662
|
|
6578
6663
|
case 320:
|
6579
|
-
#line
|
6664
|
+
#line 1904 "grammar.y"
|
6580
6665
|
{
|
6581
6666
|
POP_LINE();
|
6582
6667
|
(yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node));
|
@@ -6587,7 +6672,7 @@ yyreduce:
|
|
6587
6672
|
break;
|
6588
6673
|
|
6589
6674
|
case 321:
|
6590
|
-
#line
|
6675
|
+
#line 1912 "grammar.y"
|
6591
6676
|
{
|
6592
6677
|
PUSH_LINE("class");
|
6593
6678
|
(yyval.num) = in_def;
|
@@ -6596,7 +6681,7 @@ yyreduce:
|
|
6596
6681
|
break;
|
6597
6682
|
|
6598
6683
|
case 322:
|
6599
|
-
#line
|
6684
|
+
#line 1918 "grammar.y"
|
6600
6685
|
{
|
6601
6686
|
(yyval.num) = in_single;
|
6602
6687
|
in_single = 0;
|
@@ -6606,7 +6691,7 @@ yyreduce:
|
|
6606
6691
|
break;
|
6607
6692
|
|
6608
6693
|
case 323:
|
6609
|
-
#line
|
6694
|
+
#line 1926 "grammar.y"
|
6610
6695
|
{
|
6611
6696
|
POP_LINE();
|
6612
6697
|
(yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node));
|
@@ -6619,7 +6704,7 @@ yyreduce:
|
|
6619
6704
|
break;
|
6620
6705
|
|
6621
6706
|
case 324:
|
6622
|
-
#line
|
6707
|
+
#line 1936 "grammar.y"
|
6623
6708
|
{
|
6624
6709
|
PUSH_LINE("module");
|
6625
6710
|
if (in_def || in_single)
|
@@ -6631,7 +6716,7 @@ yyreduce:
|
|
6631
6716
|
break;
|
6632
6717
|
|
6633
6718
|
case 325:
|
6634
|
-
#line
|
6719
|
+
#line 1946 "grammar.y"
|
6635
6720
|
{
|
6636
6721
|
POP_LINE();
|
6637
6722
|
(yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
|
@@ -6642,7 +6727,7 @@ yyreduce:
|
|
6642
6727
|
break;
|
6643
6728
|
|
6644
6729
|
case 326:
|
6645
|
-
#line
|
6730
|
+
#line 1954 "grammar.y"
|
6646
6731
|
{
|
6647
6732
|
PUSH_LINE("def");
|
6648
6733
|
(yyval.id) = cur_mid;
|
@@ -6653,7 +6738,7 @@ yyreduce:
|
|
6653
6738
|
break;
|
6654
6739
|
|
6655
6740
|
case 327:
|
6656
|
-
#line
|
6741
|
+
#line 1964 "grammar.y"
|
6657
6742
|
{
|
6658
6743
|
POP_LINE();
|
6659
6744
|
if (!(yyvsp[(5) - (6)].node)) (yyvsp[(5) - (6)].node) = NEW_NIL();
|
@@ -6666,12 +6751,12 @@ yyreduce:
|
|
6666
6751
|
break;
|
6667
6752
|
|
6668
6753
|
case 328:
|
6669
|
-
#line
|
6754
|
+
#line 1973 "grammar.y"
|
6670
6755
|
{lex_state = EXPR_FNAME;;}
|
6671
6756
|
break;
|
6672
6757
|
|
6673
6758
|
case 329:
|
6674
|
-
#line
|
6759
|
+
#line 1974 "grammar.y"
|
6675
6760
|
{
|
6676
6761
|
PUSH_LINE("def");
|
6677
6762
|
in_single++;
|
@@ -6681,7 +6766,7 @@ yyreduce:
|
|
6681
6766
|
break;
|
6682
6767
|
|
6683
6768
|
case 330:
|
6684
|
-
#line
|
6769
|
+
#line 1983 "grammar.y"
|
6685
6770
|
{
|
6686
6771
|
POP_LINE();
|
6687
6772
|
(yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), (yyvsp[(8) - (9)].node));
|
@@ -6692,35 +6777,35 @@ yyreduce:
|
|
6692
6777
|
break;
|
6693
6778
|
|
6694
6779
|
case 331:
|
6695
|
-
#line
|
6780
|
+
#line 1991 "grammar.y"
|
6696
6781
|
{
|
6697
6782
|
(yyval.node) = NEW_BREAK(0);
|
6698
6783
|
;}
|
6699
6784
|
break;
|
6700
6785
|
|
6701
6786
|
case 332:
|
6702
|
-
#line
|
6787
|
+
#line 1995 "grammar.y"
|
6703
6788
|
{
|
6704
6789
|
(yyval.node) = NEW_NEXT(0);
|
6705
6790
|
;}
|
6706
6791
|
break;
|
6707
6792
|
|
6708
6793
|
case 333:
|
6709
|
-
#line
|
6794
|
+
#line 1999 "grammar.y"
|
6710
6795
|
{
|
6711
6796
|
(yyval.node) = NEW_REDO();
|
6712
6797
|
;}
|
6713
6798
|
break;
|
6714
6799
|
|
6715
6800
|
case 334:
|
6716
|
-
#line
|
6801
|
+
#line 2003 "grammar.y"
|
6717
6802
|
{
|
6718
6803
|
(yyval.node) = NEW_RETRY();
|
6719
6804
|
;}
|
6720
6805
|
break;
|
6721
6806
|
|
6722
6807
|
case 335:
|
6723
|
-
#line
|
6808
|
+
#line 2009 "grammar.y"
|
6724
6809
|
{
|
6725
6810
|
value_expr((yyvsp[(1) - (1)].node));
|
6726
6811
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
@@ -6728,7 +6813,7 @@ yyreduce:
|
|
6728
6813
|
break;
|
6729
6814
|
|
6730
6815
|
case 344:
|
6731
|
-
#line
|
6816
|
+
#line 2030 "grammar.y"
|
6732
6817
|
{
|
6733
6818
|
(yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node), vps), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
|
6734
6819
|
fixpos((yyval.node), (yyvsp[(2) - (5)].node));
|
@@ -6736,28 +6821,28 @@ yyreduce:
|
|
6736
6821
|
break;
|
6737
6822
|
|
6738
6823
|
case 346:
|
6739
|
-
#line
|
6824
|
+
#line 2038 "grammar.y"
|
6740
6825
|
{
|
6741
6826
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
6742
6827
|
;}
|
6743
6828
|
break;
|
6744
6829
|
|
6745
6830
|
case 349:
|
6746
|
-
#line
|
6831
|
+
#line 2048 "grammar.y"
|
6747
6832
|
{
|
6748
6833
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
|
6749
6834
|
;}
|
6750
6835
|
break;
|
6751
6836
|
|
6752
6837
|
case 350:
|
6753
|
-
#line
|
6838
|
+
#line 2052 "grammar.y"
|
6754
6839
|
{
|
6755
6840
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
6756
6841
|
;}
|
6757
6842
|
break;
|
6758
6843
|
|
6759
6844
|
case 351:
|
6760
|
-
#line
|
6845
|
+
#line 2058 "grammar.y"
|
6761
6846
|
{
|
6762
6847
|
if ((yyvsp[(1) - (1)].node)->nd_alen == 1) {
|
6763
6848
|
(yyval.node) = (yyvsp[(1) - (1)].node)->nd_head;
|
@@ -6769,105 +6854,105 @@ yyreduce:
|
|
6769
6854
|
break;
|
6770
6855
|
|
6771
6856
|
case 352:
|
6772
|
-
#line
|
6857
|
+
#line 2067 "grammar.y"
|
6773
6858
|
{
|
6774
6859
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), 0);
|
6775
6860
|
;}
|
6776
6861
|
break;
|
6777
6862
|
|
6778
6863
|
case 353:
|
6779
|
-
#line
|
6864
|
+
#line 2071 "grammar.y"
|
6780
6865
|
{
|
6781
6866
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(4) - (4)].node), NEW_MASGN((yyvsp[(1) - (4)].node), 0));
|
6782
6867
|
;}
|
6783
6868
|
break;
|
6784
6869
|
|
6785
6870
|
case 354:
|
6786
|
-
#line
|
6871
|
+
#line 2075 "grammar.y"
|
6787
6872
|
{
|
6788
6873
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(7) - (7)].node), NEW_MASGN((yyvsp[(1) - (7)].node), (yyvsp[(4) - (7)].node)));
|
6789
6874
|
;}
|
6790
6875
|
break;
|
6791
6876
|
|
6792
6877
|
case 355:
|
6793
|
-
#line
|
6878
|
+
#line 2079 "grammar.y"
|
6794
6879
|
{
|
6795
6880
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(6) - (6)].node), NEW_MASGN((yyvsp[(1) - (6)].node), -1));
|
6796
6881
|
;}
|
6797
6882
|
break;
|
6798
6883
|
|
6799
6884
|
case 356:
|
6800
|
-
#line
|
6885
|
+
#line 2083 "grammar.y"
|
6801
6886
|
{
|
6802
6887
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node));
|
6803
6888
|
;}
|
6804
6889
|
break;
|
6805
6890
|
|
6806
6891
|
case 357:
|
6807
|
-
#line
|
6892
|
+
#line 2087 "grammar.y"
|
6808
6893
|
{
|
6809
6894
|
(yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1);
|
6810
6895
|
;}
|
6811
6896
|
break;
|
6812
6897
|
|
6813
6898
|
case 358:
|
6814
|
-
#line
|
6899
|
+
#line 2091 "grammar.y"
|
6815
6900
|
{
|
6816
6901
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(5) - (5)].node), NEW_MASGN(0, (yyvsp[(2) - (5)].node)));
|
6817
6902
|
;}
|
6818
6903
|
break;
|
6819
6904
|
|
6820
6905
|
case 359:
|
6821
|
-
#line
|
6906
|
+
#line 2095 "grammar.y"
|
6822
6907
|
{
|
6823
6908
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(4) - (4)].node), NEW_MASGN(0, -1));
|
6824
6909
|
;}
|
6825
6910
|
break;
|
6826
6911
|
|
6827
6912
|
case 360:
|
6828
|
-
#line
|
6913
|
+
#line 2099 "grammar.y"
|
6829
6914
|
{
|
6830
6915
|
(yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node));
|
6831
6916
|
;}
|
6832
6917
|
break;
|
6833
6918
|
|
6834
6919
|
case 361:
|
6835
|
-
#line
|
6920
|
+
#line 2103 "grammar.y"
|
6836
6921
|
{
|
6837
6922
|
(yyval.node) = NEW_MASGN(0, -1);
|
6838
6923
|
;}
|
6839
6924
|
break;
|
6840
6925
|
|
6841
6926
|
case 362:
|
6842
|
-
#line
|
6927
|
+
#line 2107 "grammar.y"
|
6843
6928
|
{
|
6844
6929
|
(yyval.node) = NEW_BLOCK_VAR((yyvsp[(2) - (2)].node), (NODE*)1);
|
6845
6930
|
;}
|
6846
6931
|
break;
|
6847
6932
|
|
6848
6933
|
case 364:
|
6849
|
-
#line
|
6934
|
+
#line 2114 "grammar.y"
|
6850
6935
|
{
|
6851
6936
|
(yyval.node) = (NODE*)1;
|
6852
6937
|
;}
|
6853
6938
|
break;
|
6854
6939
|
|
6855
6940
|
case 365:
|
6856
|
-
#line
|
6941
|
+
#line 2118 "grammar.y"
|
6857
6942
|
{
|
6858
6943
|
(yyval.node) = (NODE*)1;
|
6859
6944
|
;}
|
6860
6945
|
break;
|
6861
6946
|
|
6862
6947
|
case 366:
|
6863
|
-
#line
|
6948
|
+
#line 2122 "grammar.y"
|
6864
6949
|
{
|
6865
6950
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
6866
6951
|
;}
|
6867
6952
|
break;
|
6868
6953
|
|
6869
6954
|
case 367:
|
6870
|
-
#line
|
6955
|
+
#line 2128 "grammar.y"
|
6871
6956
|
{
|
6872
6957
|
PUSH_LINE("do");
|
6873
6958
|
(yyvsp[(1) - (1)].num) = sourceline;
|
@@ -6876,14 +6961,14 @@ yyreduce:
|
|
6876
6961
|
break;
|
6877
6962
|
|
6878
6963
|
case 368:
|
6879
|
-
#line
|
6964
|
+
#line 2134 "grammar.y"
|
6880
6965
|
{
|
6881
6966
|
(yyval.vars) = variables->block_vars;
|
6882
6967
|
;}
|
6883
6968
|
break;
|
6884
6969
|
|
6885
6970
|
case 369:
|
6886
|
-
#line
|
6971
|
+
#line 2139 "grammar.y"
|
6887
6972
|
{
|
6888
6973
|
POP_LINE();
|
6889
6974
|
(yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, extract_block_vars(vps, (yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars)));
|
@@ -6892,7 +6977,7 @@ yyreduce:
|
|
6892
6977
|
break;
|
6893
6978
|
|
6894
6979
|
case 370:
|
6895
|
-
#line
|
6980
|
+
#line 2147 "grammar.y"
|
6896
6981
|
{
|
6897
6982
|
if ((yyvsp[(1) - (2)].node) && nd_type((yyvsp[(1) - (2)].node)) == NODE_BLOCK_PASS) {
|
6898
6983
|
rb_compile_error(vps, "both block arg and actual block given");
|
@@ -6904,21 +6989,21 @@ yyreduce:
|
|
6904
6989
|
break;
|
6905
6990
|
|
6906
6991
|
case 371:
|
6907
|
-
#line
|
6992
|
+
#line 2156 "grammar.y"
|
6908
6993
|
{
|
6909
6994
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
6910
6995
|
;}
|
6911
6996
|
break;
|
6912
6997
|
|
6913
6998
|
case 372:
|
6914
|
-
#line
|
6999
|
+
#line 2160 "grammar.y"
|
6915
7000
|
{
|
6916
7001
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
6917
7002
|
;}
|
6918
7003
|
break;
|
6919
7004
|
|
6920
7005
|
case 373:
|
6921
|
-
#line
|
7006
|
+
#line 2166 "grammar.y"
|
6922
7007
|
{
|
6923
7008
|
(yyval.node) = new_fcall(vps, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node));
|
6924
7009
|
fixpos((yyval.node), (yyvsp[(2) - (2)].node));
|
@@ -6926,7 +7011,7 @@ yyreduce:
|
|
6926
7011
|
break;
|
6927
7012
|
|
6928
7013
|
case 374:
|
6929
|
-
#line
|
7014
|
+
#line 2171 "grammar.y"
|
6930
7015
|
{
|
6931
7016
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
6932
7017
|
fixpos((yyval.node), (yyvsp[(1) - (4)].node));
|
@@ -6934,7 +7019,7 @@ yyreduce:
|
|
6934
7019
|
break;
|
6935
7020
|
|
6936
7021
|
case 375:
|
6937
|
-
#line
|
7022
|
+
#line 2176 "grammar.y"
|
6938
7023
|
{
|
6939
7024
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node));
|
6940
7025
|
fixpos((yyval.node), (yyvsp[(1) - (4)].node));
|
@@ -6942,14 +7027,14 @@ yyreduce:
|
|
6942
7027
|
break;
|
6943
7028
|
|
6944
7029
|
case 376:
|
6945
|
-
#line
|
7030
|
+
#line 2181 "grammar.y"
|
6946
7031
|
{
|
6947
7032
|
(yyval.node) = new_call(vps, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0);
|
6948
7033
|
;}
|
6949
7034
|
break;
|
6950
7035
|
|
6951
7036
|
case 377:
|
6952
|
-
#line
|
7037
|
+
#line 2185 "grammar.y"
|
6953
7038
|
{
|
6954
7039
|
(yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_parser_sym((rb_parser_state*) parser_state, "get_reference"),
|
6955
7040
|
NEW_LIST(NEW_LIT(QUID2SYM((yyvsp[(3) - (3)].id)))));
|
@@ -6957,7 +7042,7 @@ yyreduce:
|
|
6957
7042
|
break;
|
6958
7043
|
|
6959
7044
|
case 378:
|
6960
|
-
#line
|
7045
|
+
#line 2190 "grammar.y"
|
6961
7046
|
{
|
6962
7047
|
(yyval.node) = NEW_FCALL(rb_parser_sym((rb_parser_state*) parser_state, "get_reference"),
|
6963
7048
|
NEW_LIST(NEW_LIT(QUID2SYM((yyvsp[(2) - (2)].id)))));
|
@@ -6965,21 +7050,21 @@ yyreduce:
|
|
6965
7050
|
break;
|
6966
7051
|
|
6967
7052
|
case 379:
|
6968
|
-
#line
|
7053
|
+
#line 2195 "grammar.y"
|
6969
7054
|
{
|
6970
7055
|
(yyval.node) = new_super(vps, (yyvsp[(2) - (2)].node));
|
6971
7056
|
;}
|
6972
7057
|
break;
|
6973
7058
|
|
6974
7059
|
case 380:
|
6975
|
-
#line
|
7060
|
+
#line 2199 "grammar.y"
|
6976
7061
|
{
|
6977
7062
|
(yyval.node) = NEW_ZSUPER();
|
6978
7063
|
;}
|
6979
7064
|
break;
|
6980
7065
|
|
6981
7066
|
case 381:
|
6982
|
-
#line
|
7067
|
+
#line 2205 "grammar.y"
|
6983
7068
|
{
|
6984
7069
|
(yyvsp[(1) - (1)].num) = sourceline;
|
6985
7070
|
reset_block(vps);
|
@@ -6987,12 +7072,12 @@ yyreduce:
|
|
6987
7072
|
break;
|
6988
7073
|
|
6989
7074
|
case 382:
|
6990
|
-
#line
|
7075
|
+
#line 2209 "grammar.y"
|
6991
7076
|
{ (yyval.vars) = variables->block_vars; ;}
|
6992
7077
|
break;
|
6993
7078
|
|
6994
7079
|
case 383:
|
6995
|
-
#line
|
7080
|
+
#line 2211 "grammar.y"
|
6996
7081
|
{
|
6997
7082
|
(yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, extract_block_vars(vps, (yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars)));
|
6998
7083
|
nd_set_line((yyval.node), (yyvsp[(1) - (6)].num));
|
@@ -7000,7 +7085,7 @@ yyreduce:
|
|
7000
7085
|
break;
|
7001
7086
|
|
7002
7087
|
case 384:
|
7003
|
-
#line
|
7088
|
+
#line 2216 "grammar.y"
|
7004
7089
|
{
|
7005
7090
|
PUSH_LINE("do");
|
7006
7091
|
(yyvsp[(1) - (1)].num) = sourceline;
|
@@ -7009,12 +7094,12 @@ yyreduce:
|
|
7009
7094
|
break;
|
7010
7095
|
|
7011
7096
|
case 385:
|
7012
|
-
#line
|
7097
|
+
#line 2221 "grammar.y"
|
7013
7098
|
{ (yyval.vars) = variables->block_vars; ;}
|
7014
7099
|
break;
|
7015
7100
|
|
7016
7101
|
case 386:
|
7017
|
-
#line
|
7102
|
+
#line 2223 "grammar.y"
|
7018
7103
|
{
|
7019
7104
|
POP_LINE();
|
7020
7105
|
(yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, extract_block_vars(vps, (yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars)));
|
@@ -7023,28 +7108,28 @@ yyreduce:
|
|
7023
7108
|
break;
|
7024
7109
|
|
7025
7110
|
case 387:
|
7026
|
-
#line
|
7111
|
+
#line 2233 "grammar.y"
|
7027
7112
|
{
|
7028
7113
|
(yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
|
7029
7114
|
;}
|
7030
7115
|
break;
|
7031
7116
|
|
7032
7117
|
case 389:
|
7033
|
-
#line
|
7118
|
+
#line 2239 "grammar.y"
|
7034
7119
|
{
|
7035
7120
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (4)].node), NEW_WHEN((yyvsp[(4) - (4)].node), 0, 0));
|
7036
7121
|
;}
|
7037
7122
|
break;
|
7038
7123
|
|
7039
7124
|
case 390:
|
7040
|
-
#line
|
7125
|
+
#line 2243 "grammar.y"
|
7041
7126
|
{
|
7042
7127
|
(yyval.node) = NEW_LIST(NEW_WHEN((yyvsp[(2) - (2)].node), 0, 0));
|
7043
7128
|
;}
|
7044
7129
|
break;
|
7045
7130
|
|
7046
7131
|
case 393:
|
7047
|
-
#line
|
7132
|
+
#line 2255 "grammar.y"
|
7048
7133
|
{
|
7049
7134
|
if ((yyvsp[(3) - (6)].node)) {
|
7050
7135
|
(yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_GVAR(rb_parser_sym((rb_parser_state*) parser_state, "$!")), vps);
|
@@ -7056,21 +7141,21 @@ yyreduce:
|
|
7056
7141
|
break;
|
7057
7142
|
|
7058
7143
|
case 395:
|
7059
|
-
#line
|
7144
|
+
#line 2267 "grammar.y"
|
7060
7145
|
{
|
7061
7146
|
(yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node));
|
7062
7147
|
;}
|
7063
7148
|
break;
|
7064
7149
|
|
7065
7150
|
case 398:
|
7066
|
-
#line
|
7151
|
+
#line 2275 "grammar.y"
|
7067
7152
|
{
|
7068
7153
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
7069
7154
|
;}
|
7070
7155
|
break;
|
7071
7156
|
|
7072
7157
|
case 400:
|
7073
|
-
#line
|
7158
|
+
#line 2282 "grammar.y"
|
7074
7159
|
{
|
7075
7160
|
if ((yyvsp[(2) - (2)].node))
|
7076
7161
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
@@ -7081,14 +7166,14 @@ yyreduce:
|
|
7081
7166
|
break;
|
7082
7167
|
|
7083
7168
|
case 403:
|
7084
|
-
#line
|
7169
|
+
#line 2294 "grammar.y"
|
7085
7170
|
{
|
7086
7171
|
(yyval.node) = NEW_LIT(QUID2SYM((yyvsp[(1) - (1)].id)));
|
7087
7172
|
;}
|
7088
7173
|
break;
|
7089
7174
|
|
7090
7175
|
case 405:
|
7091
|
-
#line
|
7176
|
+
#line 2301 "grammar.y"
|
7092
7177
|
{
|
7093
7178
|
NODE *node = (yyvsp[(1) - (1)].node);
|
7094
7179
|
if (!node) {
|
@@ -7102,21 +7187,21 @@ yyreduce:
|
|
7102
7187
|
break;
|
7103
7188
|
|
7104
7189
|
case 407:
|
7105
|
-
#line
|
7190
|
+
#line 2315 "grammar.y"
|
7106
7191
|
{
|
7107
7192
|
(yyval.node) = literal_concat(vps, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
7108
7193
|
;}
|
7109
7194
|
break;
|
7110
7195
|
|
7111
7196
|
case 408:
|
7112
|
-
#line
|
7197
|
+
#line 2321 "grammar.y"
|
7113
7198
|
{
|
7114
7199
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
7115
7200
|
;}
|
7116
7201
|
break;
|
7117
7202
|
|
7118
7203
|
case 409:
|
7119
|
-
#line
|
7204
|
+
#line 2327 "grammar.y"
|
7120
7205
|
{
|
7121
7206
|
NODE *node = (yyvsp[(2) - (3)].node);
|
7122
7207
|
if (!node) {
|
@@ -7140,7 +7225,7 @@ yyreduce:
|
|
7140
7225
|
break;
|
7141
7226
|
|
7142
7227
|
case 410:
|
7143
|
-
#line
|
7228
|
+
#line 2350 "grammar.y"
|
7144
7229
|
{
|
7145
7230
|
intptr_t options = (yyvsp[(3) - (3)].num);
|
7146
7231
|
NODE *node = (yyvsp[(2) - (3)].node);
|
@@ -7171,98 +7256,98 @@ yyreduce:
|
|
7171
7256
|
break;
|
7172
7257
|
|
7173
7258
|
case 411:
|
7174
|
-
#line
|
7259
|
+
#line 2380 "grammar.y"
|
7175
7260
|
{
|
7176
7261
|
(yyval.node) = NEW_ZARRAY();
|
7177
7262
|
;}
|
7178
7263
|
break;
|
7179
7264
|
|
7180
7265
|
case 412:
|
7181
|
-
#line
|
7266
|
+
#line 2384 "grammar.y"
|
7182
7267
|
{
|
7183
7268
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
7184
7269
|
;}
|
7185
7270
|
break;
|
7186
7271
|
|
7187
7272
|
case 413:
|
7188
|
-
#line
|
7273
|
+
#line 2390 "grammar.y"
|
7189
7274
|
{
|
7190
7275
|
(yyval.node) = 0;
|
7191
7276
|
;}
|
7192
7277
|
break;
|
7193
7278
|
|
7194
7279
|
case 414:
|
7195
|
-
#line
|
7280
|
+
#line 2394 "grammar.y"
|
7196
7281
|
{
|
7197
7282
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), evstr2dstr(vps, (yyvsp[(2) - (3)].node)));
|
7198
7283
|
;}
|
7199
7284
|
break;
|
7200
7285
|
|
7201
7286
|
case 416:
|
7202
|
-
#line
|
7287
|
+
#line 2401 "grammar.y"
|
7203
7288
|
{
|
7204
7289
|
(yyval.node) = literal_concat(vps, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
7205
7290
|
;}
|
7206
7291
|
break;
|
7207
7292
|
|
7208
7293
|
case 417:
|
7209
|
-
#line
|
7294
|
+
#line 2407 "grammar.y"
|
7210
7295
|
{
|
7211
7296
|
(yyval.node) = NEW_ZARRAY();
|
7212
7297
|
;}
|
7213
7298
|
break;
|
7214
7299
|
|
7215
7300
|
case 418:
|
7216
|
-
#line
|
7301
|
+
#line 2411 "grammar.y"
|
7217
7302
|
{
|
7218
7303
|
(yyval.node) = (yyvsp[(2) - (3)].node);
|
7219
7304
|
;}
|
7220
7305
|
break;
|
7221
7306
|
|
7222
7307
|
case 419:
|
7223
|
-
#line
|
7308
|
+
#line 2417 "grammar.y"
|
7224
7309
|
{
|
7225
7310
|
(yyval.node) = 0;
|
7226
7311
|
;}
|
7227
7312
|
break;
|
7228
7313
|
|
7229
7314
|
case 420:
|
7230
|
-
#line
|
7315
|
+
#line 2421 "grammar.y"
|
7231
7316
|
{
|
7232
7317
|
(yyval.node) = list_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
|
7233
7318
|
;}
|
7234
7319
|
break;
|
7235
7320
|
|
7236
7321
|
case 421:
|
7237
|
-
#line
|
7322
|
+
#line 2427 "grammar.y"
|
7238
7323
|
{
|
7239
7324
|
(yyval.node) = 0;
|
7240
7325
|
;}
|
7241
7326
|
break;
|
7242
7327
|
|
7243
7328
|
case 422:
|
7244
|
-
#line
|
7329
|
+
#line 2431 "grammar.y"
|
7245
7330
|
{
|
7246
7331
|
(yyval.node) = literal_concat(vps, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
7247
7332
|
;}
|
7248
7333
|
break;
|
7249
7334
|
|
7250
7335
|
case 423:
|
7251
|
-
#line
|
7336
|
+
#line 2437 "grammar.y"
|
7252
7337
|
{
|
7253
7338
|
(yyval.node) = 0;
|
7254
7339
|
;}
|
7255
7340
|
break;
|
7256
7341
|
|
7257
7342
|
case 424:
|
7258
|
-
#line
|
7343
|
+
#line 2441 "grammar.y"
|
7259
7344
|
{
|
7260
7345
|
(yyval.node) = literal_concat(vps, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
7261
7346
|
;}
|
7262
7347
|
break;
|
7263
7348
|
|
7264
7349
|
case 426:
|
7265
|
-
#line
|
7350
|
+
#line 2448 "grammar.y"
|
7266
7351
|
{
|
7267
7352
|
(yyval.node) = lex_strterm;
|
7268
7353
|
lex_strterm = 0;
|
@@ -7271,7 +7356,7 @@ yyreduce:
|
|
7271
7356
|
break;
|
7272
7357
|
|
7273
7358
|
case 427:
|
7274
|
-
#line
|
7359
|
+
#line 2454 "grammar.y"
|
7275
7360
|
{
|
7276
7361
|
lex_strterm = (yyvsp[(2) - (3)].node);
|
7277
7362
|
(yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node));
|
@@ -7279,7 +7364,7 @@ yyreduce:
|
|
7279
7364
|
break;
|
7280
7365
|
|
7281
7366
|
case 428:
|
7282
|
-
#line
|
7367
|
+
#line 2459 "grammar.y"
|
7283
7368
|
{
|
7284
7369
|
(yyval.node) = lex_strterm;
|
7285
7370
|
lex_strterm = 0;
|
@@ -7290,7 +7375,7 @@ yyreduce:
|
|
7290
7375
|
break;
|
7291
7376
|
|
7292
7377
|
case 429:
|
7293
|
-
#line
|
7378
|
+
#line 2467 "grammar.y"
|
7294
7379
|
{
|
7295
7380
|
lex_strterm = (yyvsp[(2) - (4)].node);
|
7296
7381
|
COND_LEXPOP();
|
@@ -7303,22 +7388,22 @@ yyreduce:
|
|
7303
7388
|
break;
|
7304
7389
|
|
7305
7390
|
case 430:
|
7306
|
-
#line
|
7391
|
+
#line 2478 "grammar.y"
|
7307
7392
|
{(yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id));;}
|
7308
7393
|
break;
|
7309
7394
|
|
7310
7395
|
case 431:
|
7311
|
-
#line
|
7396
|
+
#line 2479 "grammar.y"
|
7312
7397
|
{(yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id));;}
|
7313
7398
|
break;
|
7314
7399
|
|
7315
7400
|
case 432:
|
7316
|
-
#line
|
7401
|
+
#line 2480 "grammar.y"
|
7317
7402
|
{(yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id));;}
|
7318
7403
|
break;
|
7319
7404
|
|
7320
7405
|
case 434:
|
7321
|
-
#line
|
7406
|
+
#line 2485 "grammar.y"
|
7322
7407
|
{
|
7323
7408
|
lex_state = EXPR_END;
|
7324
7409
|
(yyval.id) = (yyvsp[(2) - (2)].id);
|
@@ -7326,7 +7411,7 @@ yyreduce:
|
|
7326
7411
|
break;
|
7327
7412
|
|
7328
7413
|
case 439:
|
7329
|
-
#line
|
7414
|
+
#line 2498 "grammar.y"
|
7330
7415
|
{
|
7331
7416
|
lex_state = EXPR_END;
|
7332
7417
|
if (!((yyval.node) = (yyvsp[(2) - (3)].node))) {
|
@@ -7358,91 +7443,91 @@ yyreduce:
|
|
7358
7443
|
break;
|
7359
7444
|
|
7360
7445
|
case 442:
|
7361
|
-
#line
|
7446
|
+
#line 2531 "grammar.y"
|
7362
7447
|
{
|
7363
7448
|
(yyval.node) = NEW_NEGATE((yyvsp[(2) - (2)].node));
|
7364
7449
|
;}
|
7365
7450
|
break;
|
7366
7451
|
|
7367
7452
|
case 443:
|
7368
|
-
#line
|
7453
|
+
#line 2535 "grammar.y"
|
7369
7454
|
{
|
7370
7455
|
(yyval.node) = NEW_NEGATE((yyvsp[(2) - (2)].node));
|
7371
7456
|
;}
|
7372
7457
|
break;
|
7373
7458
|
|
7374
7459
|
case 449:
|
7375
|
-
#line
|
7460
|
+
#line 2545 "grammar.y"
|
7376
7461
|
{(yyval.id) = kNIL;;}
|
7377
7462
|
break;
|
7378
7463
|
|
7379
7464
|
case 450:
|
7380
|
-
#line
|
7465
|
+
#line 2546 "grammar.y"
|
7381
7466
|
{(yyval.id) = kSELF;;}
|
7382
7467
|
break;
|
7383
7468
|
|
7384
7469
|
case 451:
|
7385
|
-
#line
|
7470
|
+
#line 2547 "grammar.y"
|
7386
7471
|
{(yyval.id) = kTRUE;;}
|
7387
7472
|
break;
|
7388
7473
|
|
7389
7474
|
case 452:
|
7390
|
-
#line
|
7475
|
+
#line 2548 "grammar.y"
|
7391
7476
|
{(yyval.id) = kFALSE;;}
|
7392
7477
|
break;
|
7393
7478
|
|
7394
7479
|
case 453:
|
7395
|
-
#line
|
7480
|
+
#line 2549 "grammar.y"
|
7396
7481
|
{(yyval.id) = k__FILE__;;}
|
7397
7482
|
break;
|
7398
7483
|
|
7399
7484
|
case 454:
|
7400
|
-
#line
|
7485
|
+
#line 2550 "grammar.y"
|
7401
7486
|
{(yyval.id) = k__LINE__;;}
|
7402
7487
|
break;
|
7403
7488
|
|
7404
7489
|
case 455:
|
7405
|
-
#line
|
7490
|
+
#line 2554 "grammar.y"
|
7406
7491
|
{
|
7407
7492
|
(yyval.node) = gettable((yyvsp[(1) - (1)].id));
|
7408
7493
|
;}
|
7409
7494
|
break;
|
7410
7495
|
|
7411
7496
|
case 456:
|
7412
|
-
#line
|
7497
|
+
#line 2560 "grammar.y"
|
7413
7498
|
{
|
7414
7499
|
(yyval.node) = assignable((yyvsp[(1) - (1)].id), 0, vps);
|
7415
7500
|
;}
|
7416
7501
|
break;
|
7417
7502
|
|
7418
7503
|
case 459:
|
7419
|
-
#line
|
7504
|
+
#line 2570 "grammar.y"
|
7420
7505
|
{
|
7421
7506
|
(yyval.node) = 0;
|
7422
7507
|
;}
|
7423
7508
|
break;
|
7424
7509
|
|
7425
7510
|
case 460:
|
7426
|
-
#line
|
7511
|
+
#line 2574 "grammar.y"
|
7427
7512
|
{
|
7428
7513
|
lex_state = EXPR_BEG;
|
7429
7514
|
;}
|
7430
7515
|
break;
|
7431
7516
|
|
7432
7517
|
case 461:
|
7433
|
-
#line
|
7518
|
+
#line 2578 "grammar.y"
|
7434
7519
|
{
|
7435
7520
|
(yyval.node) = (yyvsp[(3) - (4)].node);
|
7436
7521
|
;}
|
7437
7522
|
break;
|
7438
7523
|
|
7439
7524
|
case 462:
|
7440
|
-
#line
|
7525
|
+
#line 2581 "grammar.y"
|
7441
7526
|
{yyerrok; (yyval.node) = 0;;}
|
7442
7527
|
break;
|
7443
7528
|
|
7444
7529
|
case 463:
|
7445
|
-
#line
|
7530
|
+
#line 2585 "grammar.y"
|
7446
7531
|
{
|
7447
7532
|
(yyval.node) = (yyvsp[(2) - (4)].node);
|
7448
7533
|
lex_state = EXPR_BEG;
|
@@ -7451,105 +7536,105 @@ yyreduce:
|
|
7451
7536
|
break;
|
7452
7537
|
|
7453
7538
|
case 464:
|
7454
|
-
#line
|
7539
|
+
#line 2591 "grammar.y"
|
7455
7540
|
{
|
7456
7541
|
(yyval.node) = (yyvsp[(1) - (2)].node);
|
7457
7542
|
;}
|
7458
7543
|
break;
|
7459
7544
|
|
7460
7545
|
case 465:
|
7461
|
-
#line
|
7546
|
+
#line 2597 "grammar.y"
|
7462
7547
|
{
|
7463
7548
|
(yyval.node) = block_append(vps, NEW_ARGS((intptr_t)(yyvsp[(1) - (6)].num), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id)), (yyvsp[(6) - (6)].node));
|
7464
7549
|
;}
|
7465
7550
|
break;
|
7466
7551
|
|
7467
7552
|
case 466:
|
7468
|
-
#line
|
7553
|
+
#line 2601 "grammar.y"
|
7469
7554
|
{
|
7470
7555
|
(yyval.node) = block_append(vps, NEW_ARGS((intptr_t)(yyvsp[(1) - (4)].num), (yyvsp[(3) - (4)].node), 0), (yyvsp[(4) - (4)].node));
|
7471
7556
|
;}
|
7472
7557
|
break;
|
7473
7558
|
|
7474
7559
|
case 467:
|
7475
|
-
#line
|
7560
|
+
#line 2605 "grammar.y"
|
7476
7561
|
{
|
7477
7562
|
(yyval.node) = block_append(vps, NEW_ARGS((intptr_t)(yyvsp[(1) - (4)].num), 0, (yyvsp[(3) - (4)].id)), (yyvsp[(4) - (4)].node));
|
7478
7563
|
;}
|
7479
7564
|
break;
|
7480
7565
|
|
7481
7566
|
case 468:
|
7482
|
-
#line
|
7567
|
+
#line 2609 "grammar.y"
|
7483
7568
|
{
|
7484
7569
|
(yyval.node) = block_append(vps, NEW_ARGS((intptr_t)(yyvsp[(1) - (2)].num), 0, 0), (yyvsp[(2) - (2)].node));
|
7485
7570
|
;}
|
7486
7571
|
break;
|
7487
7572
|
|
7488
7573
|
case 469:
|
7489
|
-
#line
|
7574
|
+
#line 2613 "grammar.y"
|
7490
7575
|
{
|
7491
7576
|
(yyval.node) = block_append(vps, NEW_ARGS(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id)), (yyvsp[(4) - (4)].node));
|
7492
7577
|
;}
|
7493
7578
|
break;
|
7494
7579
|
|
7495
7580
|
case 470:
|
7496
|
-
#line
|
7581
|
+
#line 2617 "grammar.y"
|
7497
7582
|
{
|
7498
7583
|
(yyval.node) = block_append(vps, NEW_ARGS(0, (yyvsp[(1) - (2)].node), 0), (yyvsp[(2) - (2)].node));
|
7499
7584
|
;}
|
7500
7585
|
break;
|
7501
7586
|
|
7502
7587
|
case 471:
|
7503
|
-
#line
|
7588
|
+
#line 2621 "grammar.y"
|
7504
7589
|
{
|
7505
7590
|
(yyval.node) = block_append(vps, NEW_ARGS(0, 0, (yyvsp[(1) - (2)].id)), (yyvsp[(2) - (2)].node));
|
7506
7591
|
;}
|
7507
7592
|
break;
|
7508
7593
|
|
7509
7594
|
case 472:
|
7510
|
-
#line
|
7595
|
+
#line 2625 "grammar.y"
|
7511
7596
|
{
|
7512
7597
|
(yyval.node) = block_append(vps, NEW_ARGS(0, 0, 0), (yyvsp[(1) - (1)].node));
|
7513
7598
|
;}
|
7514
7599
|
break;
|
7515
7600
|
|
7516
7601
|
case 473:
|
7517
|
-
#line
|
7602
|
+
#line 2629 "grammar.y"
|
7518
7603
|
{
|
7519
7604
|
(yyval.node) = NEW_ARGS(0, 0, 0);
|
7520
7605
|
;}
|
7521
7606
|
break;
|
7522
7607
|
|
7523
7608
|
case 474:
|
7524
|
-
#line
|
7609
|
+
#line 2635 "grammar.y"
|
7525
7610
|
{
|
7526
7611
|
yyerror("formal argument cannot be a constant");
|
7527
7612
|
;}
|
7528
7613
|
break;
|
7529
7614
|
|
7530
7615
|
case 475:
|
7531
|
-
#line
|
7616
|
+
#line 2639 "grammar.y"
|
7532
7617
|
{
|
7533
7618
|
yyerror("formal argument cannot be an instance variable");
|
7534
7619
|
;}
|
7535
7620
|
break;
|
7536
7621
|
|
7537
7622
|
case 476:
|
7538
|
-
#line
|
7623
|
+
#line 2643 "grammar.y"
|
7539
7624
|
{
|
7540
7625
|
yyerror("formal argument cannot be a global variable");
|
7541
7626
|
;}
|
7542
7627
|
break;
|
7543
7628
|
|
7544
7629
|
case 477:
|
7545
|
-
#line
|
7630
|
+
#line 2647 "grammar.y"
|
7546
7631
|
{
|
7547
7632
|
yyerror("formal argument cannot be a class variable");
|
7548
7633
|
;}
|
7549
7634
|
break;
|
7550
7635
|
|
7551
7636
|
case 478:
|
7552
|
-
#line
|
7637
|
+
#line 2651 "grammar.y"
|
7553
7638
|
{
|
7554
7639
|
if (!is_local_id((yyvsp[(1) - (1)].id)))
|
7555
7640
|
yyerror("formal argument must be local variable");
|
@@ -7561,14 +7646,14 @@ yyreduce:
|
|
7561
7646
|
break;
|
7562
7647
|
|
7563
7648
|
case 480:
|
7564
|
-
#line
|
7649
|
+
#line 2663 "grammar.y"
|
7565
7650
|
{
|
7566
7651
|
(yyval.num) += 1;
|
7567
7652
|
;}
|
7568
7653
|
break;
|
7569
7654
|
|
7570
7655
|
case 481:
|
7571
|
-
#line
|
7656
|
+
#line 2669 "grammar.y"
|
7572
7657
|
{
|
7573
7658
|
if (!is_local_id((yyvsp[(1) - (3)].id)))
|
7574
7659
|
yyerror("formal argument must be local variable");
|
@@ -7579,7 +7664,7 @@ yyreduce:
|
|
7579
7664
|
break;
|
7580
7665
|
|
7581
7666
|
case 482:
|
7582
|
-
#line
|
7667
|
+
#line 2679 "grammar.y"
|
7583
7668
|
{
|
7584
7669
|
(yyval.node) = NEW_BLOCK((yyvsp[(1) - (1)].node));
|
7585
7670
|
(yyval.node)->nd_end = (yyval.node);
|
@@ -7587,14 +7672,14 @@ yyreduce:
|
|
7587
7672
|
break;
|
7588
7673
|
|
7589
7674
|
case 483:
|
7590
|
-
#line
|
7675
|
+
#line 2684 "grammar.y"
|
7591
7676
|
{
|
7592
7677
|
(yyval.node) = block_append(vps, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
7593
7678
|
;}
|
7594
7679
|
break;
|
7595
7680
|
|
7596
7681
|
case 486:
|
7597
|
-
#line
|
7682
|
+
#line 2694 "grammar.y"
|
7598
7683
|
{
|
7599
7684
|
if (!is_local_id((yyvsp[(2) - (2)].id)))
|
7600
7685
|
yyerror("rest argument must be local variable");
|
@@ -7605,14 +7690,14 @@ yyreduce:
|
|
7605
7690
|
break;
|
7606
7691
|
|
7607
7692
|
case 487:
|
7608
|
-
#line
|
7693
|
+
#line 2702 "grammar.y"
|
7609
7694
|
{
|
7610
7695
|
(yyval.id) = -2;
|
7611
7696
|
;}
|
7612
7697
|
break;
|
7613
7698
|
|
7614
7699
|
case 490:
|
7615
|
-
#line
|
7700
|
+
#line 2712 "grammar.y"
|
7616
7701
|
{
|
7617
7702
|
if (!is_local_id((yyvsp[(2) - (2)].id)))
|
7618
7703
|
yyerror("block argument must be local variable");
|
@@ -7623,14 +7708,14 @@ yyreduce:
|
|
7623
7708
|
break;
|
7624
7709
|
|
7625
7710
|
case 491:
|
7626
|
-
#line
|
7711
|
+
#line 2722 "grammar.y"
|
7627
7712
|
{
|
7628
7713
|
(yyval.node) = (yyvsp[(2) - (2)].node);
|
7629
7714
|
;}
|
7630
7715
|
break;
|
7631
7716
|
|
7632
7717
|
case 493:
|
7633
|
-
#line
|
7718
|
+
#line 2729 "grammar.y"
|
7634
7719
|
{
|
7635
7720
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
7636
7721
|
value_expr((yyval.node));
|
@@ -7638,12 +7723,12 @@ yyreduce:
|
|
7638
7723
|
break;
|
7639
7724
|
|
7640
7725
|
case 494:
|
7641
|
-
#line
|
7726
|
+
#line 2733 "grammar.y"
|
7642
7727
|
{lex_state = EXPR_BEG;;}
|
7643
7728
|
break;
|
7644
7729
|
|
7645
7730
|
case 495:
|
7646
|
-
#line
|
7731
|
+
#line 2734 "grammar.y"
|
7647
7732
|
{
|
7648
7733
|
if ((yyvsp[(3) - (5)].node) == 0) {
|
7649
7734
|
yyerror("can't define singleton method for ().");
|
@@ -7669,14 +7754,14 @@ yyreduce:
|
|
7669
7754
|
break;
|
7670
7755
|
|
7671
7756
|
case 497:
|
7672
|
-
#line
|
7757
|
+
#line 2760 "grammar.y"
|
7673
7758
|
{
|
7674
7759
|
(yyval.node) = (yyvsp[(1) - (2)].node);
|
7675
7760
|
;}
|
7676
7761
|
break;
|
7677
7762
|
|
7678
7763
|
case 498:
|
7679
|
-
#line
|
7764
|
+
#line 2764 "grammar.y"
|
7680
7765
|
{
|
7681
7766
|
if ((yyvsp[(1) - (2)].node)->nd_alen%2 != 0) {
|
7682
7767
|
yyerror("odd number list for Hash");
|
@@ -7686,37 +7771,37 @@ yyreduce:
|
|
7686
7771
|
break;
|
7687
7772
|
|
7688
7773
|
case 500:
|
7689
|
-
#line
|
7774
|
+
#line 2774 "grammar.y"
|
7690
7775
|
{
|
7691
7776
|
(yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
7692
7777
|
;}
|
7693
7778
|
break;
|
7694
7779
|
|
7695
7780
|
case 501:
|
7696
|
-
#line
|
7781
|
+
#line 2780 "grammar.y"
|
7697
7782
|
{
|
7698
7783
|
(yyval.node) = list_append(vps, NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node));
|
7699
7784
|
;}
|
7700
7785
|
break;
|
7701
7786
|
|
7702
7787
|
case 521:
|
7703
|
-
#line
|
7788
|
+
#line 2818 "grammar.y"
|
7704
7789
|
{yyerrok;;}
|
7705
7790
|
break;
|
7706
7791
|
|
7707
7792
|
case 524:
|
7708
|
-
#line
|
7793
|
+
#line 2823 "grammar.y"
|
7709
7794
|
{yyerrok;;}
|
7710
7795
|
break;
|
7711
7796
|
|
7712
7797
|
case 525:
|
7713
|
-
#line
|
7798
|
+
#line 2826 "grammar.y"
|
7714
7799
|
{(yyval.node) = 0;;}
|
7715
7800
|
break;
|
7716
7801
|
|
7717
7802
|
|
7718
7803
|
/* Line 1267 of yacc.c. */
|
7719
|
-
#line
|
7804
|
+
#line 7805 "grammar.cpp"
|
7720
7805
|
default: break;
|
7721
7806
|
}
|
7722
7807
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
@@ -7930,7 +8015,7 @@ yyreturn:
|
|
7930
8015
|
}
|
7931
8016
|
|
7932
8017
|
|
7933
|
-
#line
|
8018
|
+
#line 2828 "grammar.y"
|
7934
8019
|
|
7935
8020
|
|
7936
8021
|
/* We remove any previous definition of `SIGN_EXTEND_CHAR',
|
@@ -7946,8 +8031,6 @@ yyreturn:
|
|
7946
8031
|
#endif
|
7947
8032
|
#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
|
7948
8033
|
|
7949
|
-
#define LEAVE_BS 1
|
7950
|
-
|
7951
8034
|
static int
|
7952
8035
|
mel_yyerror(const char *msg, rb_parser_state *parser_state)
|
7953
8036
|
{
|
@@ -7982,6 +8065,28 @@ yycompile(rb_parser_state *parser_state, char *f, int line)
|
|
7982
8065
|
return n;
|
7983
8066
|
}
|
7984
8067
|
|
8068
|
+
static const unsigned char*
|
8069
|
+
re_mbcinit()
|
8070
|
+
{
|
8071
|
+
const char* code = rb_get_kcode();
|
8072
|
+
|
8073
|
+
switch(code[0]) {
|
8074
|
+
case 'E':
|
8075
|
+
return mbctab_euc;
|
8076
|
+
|
8077
|
+
case 'S':
|
8078
|
+
return mbctab_sjis;
|
8079
|
+
|
8080
|
+
case 'U':
|
8081
|
+
return mbctab_utf8;
|
8082
|
+
|
8083
|
+
case 'N':
|
8084
|
+
case 'A':
|
8085
|
+
default:
|
8086
|
+
return mbctab_ascii;
|
8087
|
+
}
|
8088
|
+
}
|
8089
|
+
|
7985
8090
|
static bool
|
7986
8091
|
lex_get_str(rb_parser_state *parser_state)
|
7987
8092
|
{
|
@@ -9693,18 +9798,11 @@ yylex(void *yylval_v, void *vstate)
|
|
9693
9798
|
c = 'Q';
|
9694
9799
|
}
|
9695
9800
|
else {
|
9696
|
-
|
9697
|
-
|
9698
|
-
|
9699
|
-
|
9700
|
-
|
9701
|
-
*cur++ = term;
|
9702
|
-
term = nextc();
|
9703
|
-
}
|
9704
|
-
*cur = 0;
|
9705
|
-
c = 1;
|
9706
|
-
|
9707
|
-
}
|
9801
|
+
term = nextc();
|
9802
|
+
if(ISALNUM(term) || ismbchar(term)) {
|
9803
|
+
yyerror("unknown type of %string");
|
9804
|
+
return 0;
|
9805
|
+
}
|
9708
9806
|
}
|
9709
9807
|
if (c == -1 || term == -1) {
|
9710
9808
|
rb_compile_error(parser_state, "unterminated quoted string meets end of file");
|
@@ -9752,17 +9850,9 @@ yylex(void *yylval_v, void *vstate)
|
|
9752
9850
|
lex_state = EXPR_FNAME;
|
9753
9851
|
return tSYMBEG;
|
9754
9852
|
|
9755
|
-
case 1:
|
9756
|
-
lex_strterm = NEW_STRTERM(str_xquote, term, paren);
|
9757
|
-
pslval->id = rb_parser_sym(parser_state, tmpstr);
|
9758
|
-
return tXSTRING_BEG;
|
9759
|
-
|
9760
9853
|
default:
|
9761
|
-
|
9762
|
-
|
9763
|
-
tmpstr[1] = 0;
|
9764
|
-
pslval->id = rb_parser_sym(parser_state, tmpstr);
|
9765
|
-
return tXSTRING_BEG;
|
9854
|
+
yyerror("unknown type of %string");
|
9855
|
+
return 0;
|
9766
9856
|
}
|
9767
9857
|
}
|
9768
9858
|
if ((c = nextc()) == '=') {
|