From 0a082d113a573e29537cfd2b7da62c16f493b809 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Mon, 3 Jul 2023 18:24:37 +0200 Subject: [PATCH] Support .a.[] and .a.[]? each syntax Fixes #1699 --- src/parser.c | 1606 +++++++++++++++++++++++++------------------------ src/parser.y | 6 + tests/jq.test | 5 + 3 files changed, 828 insertions(+), 789 deletions(-) diff --git a/src/parser.c b/src/parser.c index 28d47c5016..e823a48af1 100644 --- a/src/parser.c +++ b/src/parser.c @@ -893,16 +893,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 27 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2143 +#define YYLAST 2209 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 69 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 30 /* YYNRULES -- Number of rules. */ -#define YYNRULES 170 +#define YYNRULES 172 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 326 +#define YYNSTATES 328 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 302 @@ -966,14 +966,14 @@ static const yytype_int16 yyrline[] = 626, 631, 634, 637, 643, 646, 649, 657, 661, 664, 667, 670, 673, 676, 679, 682, 685, 689, 695, 698, 701, 704, 707, 710, 713, 716, 719, 722, 725, 728, - 731, 734, 737, 740, 743, 746, 749, 771, 775, 779, - 788, 800, 805, 806, 807, 808, 811, 814, 819, 824, - 827, 832, 835, 840, 844, 847, 852, 855, 860, 863, - 868, 871, 874, 877, 880, 883, 891, 897, 900, 903, + 731, 734, 737, 740, 743, 746, 749, 752, 755, 777, + 781, 785, 794, 806, 811, 812, 813, 814, 817, 820, + 825, 830, 833, 838, 841, 846, 850, 853, 858, 861, + 866, 869, 874, 877, 880, 883, 886, 889, 897, 903, 906, 909, 912, 915, 918, 921, 924, 927, 930, 933, - 936, 939, 942, 945, 948, 951, 956, 959, 960, 961, - 964, 967, 970, 973, 977, 981, 985, 989, 993, 997, - 1005 + 936, 939, 942, 945, 948, 951, 954, 957, 962, 965, + 966, 967, 970, 973, 976, 979, 983, 987, 991, 995, + 999, 1003, 1011 }; #endif @@ -1014,12 +1014,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-120) +#define YYPACT_NINF (-118) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-157) +#define YYTABLE_NINF (-159) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -1028,39 +1028,39 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 13, 775, 14, 49, -55, 11, -120, 7, -120, 32, - 775, 508, 508, 775, 19, 2, -120, 775, 525, 887, - 292, 458, 358, 1391, 775, -120, 6, -120, -3, -3, - 775, 49, 683, 775, -120, -120, 52, 1797, 8, 10, - 48, 79, -120, 106, -120, 66, 50, 1221, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, 61, -120, - -120, 124, 7, 68, 62, -120, 968, -22, 64, 775, - 2084, 69, 71, 63, 87, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, -120, - -120, 1965, 78, -20, 15, 169, 125, -120, -120, -120, - 1965, 775, -120, -120, 1442, 1965, -10, -120, -120, -2, - 775, 590, -20, -20, 655, 90, -120, 12, -120, -120, - 77, -120, -120, -120, -120, 415, 443, -120, 443, 1255, - 81, -120, 443, 443, -120, 415, 1999, 353, 353, 214, - 571, 2031, 1999, 1999, 1999, 1999, 1999, 1999, 353, 353, - 1965, 214, 1999, 353, 353, 66, 66, 82, 82, 82, - -120, 138, -20, 837, 105, 99, 113, 775, 96, 93, - 775, 103, 918, 20, -120, -120, 775, -120, 16, -120, - 2112, 18, -120, 1493, -120, 1697, 102, 104, -120, -120, - 775, -120, 775, -120, 159, -11, -120, 443, 119, 3, - 119, 108, 443, 119, 119, -120, -120, -120, -13, 109, - 115, 775, 163, 116, -38, -120, 118, -20, 775, 1018, - -120, -120, 1068, -120, 747, 110, -120, 165, -120, -120, - -120, -120, -2, 121, -120, 775, 775, -120, -120, 775, - 775, 1965, 1831, -120, -120, 443, 443, 119, -20, -120, - -20, -20, 1289, 122, -20, 837, -120, -20, 150, 1965, - 136, 139, 142, 1118, -120, -120, -120, 775, 1881, 1931, - 1544, 1595, -120, 119, 119, -120, -120, -120, 140, -20, - -120, -120, -120, -120, -120, -120, 143, 1646, -120, 775, - 775, 775, -20, -120, -120, -120, 1747, 1323, 1168, -120, - -120, -120, 775, -120, 1357, -120 + -10, 841, 14, 94, -8, -16, -118, 23, -118, 51, + 841, 510, 510, 841, 4, 1, -118, 841, 527, 953, + 294, 460, 360, 1457, 841, -118, 6, -118, -3, -3, + 841, 94, 685, 841, -118, -118, -24, 1863, 8, 10, + 31, 65, -118, 104, -118, 67, 56, 1287, -118, -118, + -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, + -118, -118, -118, -118, -118, -118, -118, -118, 50, -118, + -118, 123, 23, 68, 61, -118, 1034, -22, 69, 841, + 2150, 71, 72, 60, 83, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 841, 841, -118, + -118, 2031, 78, -11, -4, 169, 124, -118, -118, -118, + 2031, 841, -118, -118, 1508, 2031, -14, -118, -118, 18, + 841, 592, -11, -11, 657, 91, -118, 15, -118, -118, + 77, -118, -118, -118, -118, 417, 445, -118, 445, 1321, + 79, -118, 445, 445, -118, 417, 2065, 355, 355, 214, + 573, 2097, 2065, 2065, 2065, 2065, 2065, 2065, 355, 355, + 2031, 214, 2065, 355, 355, 67, 67, 82, 82, 82, + -118, 140, -11, 903, 105, 99, 109, 749, 93, 87, + 841, 98, 984, 20, -118, -118, 841, -118, 34, -118, + 2178, 22, -118, 1559, -118, 1763, 97, 106, -118, -118, + 841, -118, 841, -118, 155, -20, -118, 445, 117, 3, + 117, 108, 445, 117, 117, -118, -118, -118, -13, 115, + 116, 841, 163, 118, -38, -118, 122, -11, 841, 110, + 1084, -118, -118, 1134, -118, 777, 111, -118, 168, -118, + -118, -118, -118, 18, 127, -118, 841, 841, -118, -118, + 841, 841, 2031, 1897, -118, -118, 445, 445, 117, -11, + -118, -11, -11, 1355, 130, -11, 903, -118, -11, 154, + 2031, -118, 142, 143, 144, 1184, -118, -118, -118, 841, + 1947, 1997, 1610, 1661, -118, 117, 117, -118, -118, -118, + 141, -11, -118, -118, -118, -118, -118, -118, 145, 1712, + -118, 841, 841, 841, -11, -118, -118, -118, 1813, 1389, + 1234, -118, -118, -118, 841, -118, 1423, -118 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1068,54 +1068,54 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 4, 0, 0, 6, 110, 83, 100, 102, 75, 0, + 4, 0, 0, 6, 112, 83, 102, 104, 75, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, - 0, 0, 0, 0, 0, 101, 48, 1, 0, 0, + 0, 0, 0, 0, 0, 103, 48, 1, 0, 0, 8, 6, 0, 0, 79, 64, 0, 0, 0, 0, - 19, 0, 77, 0, 66, 33, 0, 0, 108, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 0, 109, - 86, 0, 0, 85, 0, 105, 0, 0, 167, 0, - 0, 163, 168, 0, 157, 0, 0, 0, 0, 0, + 19, 0, 77, 0, 66, 33, 0, 0, 110, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 0, 111, + 86, 0, 0, 85, 0, 107, 0, 0, 169, 0, + 0, 165, 170, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 5, 10, 82, 0, 0, 0, 0, 54, 53, 3, - 2, 8, 7, 49, 0, 118, 0, 116, 66, 0, - 0, 0, 0, 0, 0, 0, 76, 0, 112, 103, - 0, 87, 81, 113, 104, 0, 0, 115, 0, 0, - 165, 166, 0, 0, 106, 0, 41, 42, 43, 26, + 2, 8, 7, 49, 0, 120, 0, 118, 66, 0, + 0, 0, 0, 0, 0, 0, 76, 0, 114, 105, + 0, 87, 81, 115, 106, 0, 0, 117, 0, 0, + 167, 168, 0, 0, 108, 0, 41, 42, 43, 26, 25, 24, 28, 32, 35, 37, 40, 27, 46, 47, 29, 30, 23, 44, 45, 31, 34, 36, 38, 39, - 78, 0, 0, 0, 0, 0, 122, 0, 84, 0, - 0, 93, 0, 0, 9, 50, 0, 111, 0, 61, + 78, 0, 0, 0, 0, 0, 124, 0, 84, 0, + 0, 93, 0, 0, 9, 50, 0, 113, 0, 61, 0, 0, 57, 0, 17, 0, 0, 0, 20, 18, - 0, 67, 0, 63, 0, 0, 159, 0, 170, 73, - 160, 0, 0, 162, 161, 158, 123, 126, 0, 0, - 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, - 80, 114, 0, 92, 0, 89, 52, 0, 117, 65, - 59, 60, 0, 0, 55, 0, 0, 16, 15, 0, - 0, 21, 0, 107, 72, 0, 0, 164, 0, 124, - 0, 0, 0, 130, 0, 0, 125, 0, 121, 11, - 91, 99, 98, 0, 88, 51, 58, 0, 0, 0, - 0, 0, 68, 71, 169, 127, 136, 132, 0, 0, - 134, 129, 133, 90, 96, 95, 97, 0, 70, 0, - 0, 0, 0, 131, 94, 56, 0, 0, 0, 135, - 69, 12, 0, 14, 0, 13 + 0, 67, 0, 63, 0, 0, 161, 0, 172, 73, + 162, 0, 0, 164, 163, 160, 125, 128, 0, 0, + 0, 0, 0, 0, 0, 130, 0, 0, 0, 95, + 0, 80, 116, 0, 92, 0, 89, 52, 0, 119, + 65, 59, 60, 0, 0, 55, 0, 0, 16, 15, + 0, 0, 21, 0, 109, 72, 0, 0, 166, 0, + 126, 0, 0, 0, 132, 0, 0, 127, 0, 123, + 11, 94, 91, 101, 100, 0, 88, 51, 58, 0, + 0, 0, 0, 0, 68, 71, 171, 129, 138, 134, + 0, 0, 136, 131, 135, 90, 98, 97, 99, 0, + 70, 0, 0, 0, 0, 133, 96, 56, 0, 0, + 0, 137, 69, 12, 0, 14, 0, 13 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -120, -120, -120, 171, 83, -1, -120, -120, 176, -12, - -120, -46, 5, -120, -120, 80, -103, -109, -5, -120, - 22, -120, -16, -119, -120, -120, -68, -18, -105, -120 + -118, -118, -118, 149, 84, -1, -118, -118, 177, -12, + -118, -46, 5, -118, -118, 80, -103, -104, -5, -118, + 17, -118, -17, -117, -118, -118, -62, -18, -105, -118 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 2, 3, 30, 119, 111, 31, 32, 116, 24, - 201, 202, 25, 44, 128, 137, 258, 218, 26, 126, + 201, 202, 25, 44, 128, 137, 259, 218, 26, 126, 127, 184, 185, 186, 228, 234, 235, 82, 83, 84 }; @@ -1124,350 +1124,366 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 23, 69, 199, 42, 72, 33, 38, 39, 112, 37, - 275, 112, 40, 112, 27, 112, 45, 47, 121, 113, - 76, 132, 72, 133, 246, 73, 145, 81, 1, 120, - 276, 124, 125, 117, 117, 268, 36, 145, 16, 220, - 216, 146, 181, 223, 224, 182, 147, 183, 35, 196, - 225, 197, 146, 269, 211, 212, 16, 213, 211, 212, - 200, 249, 151, 227, 43, 28, 29, 114, 115, 34, - 114, 115, 114, 115, 114, 115, 134, 252, 149, 253, - 187, 41, 247, 135, 156, 157, 158, 159, 160, 161, + 23, 69, 42, 72, 72, 1, 38, 39, 112, 37, + 276, 112, 40, 112, 27, 112, 45, 47, 121, 113, + 76, 132, 199, 133, 247, 73, 145, 81, 145, 120, + 277, 124, 125, 117, 117, 269, 129, 16, 16, 130, + 216, 146, 34, 146, 220, 196, 147, 197, 223, 224, + 225, 181, 33, 270, 182, 36, 183, 211, 212, 134, + 213, 187, 151, 43, 35, 227, 41, 114, 115, 135, + 114, 115, 114, 115, 114, 115, 211, 212, 149, 250, + 200, 253, 248, 254, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 264, 121, - 136, 138, 129, 267, 192, 130, 206, 207, 278, 188, - 106, 107, 108, 140, 109, 141, 142, 148, 143, 203, - 205, 154, 152, 209, 153, 155, 180, 210, 193, 214, - 109, 219, 226, 219, 222, 237, 238, 219, 219, 295, - 81, 296, 297, -120, 240, 300, 293, 294, 302, 241, - 81, 243, 259, 263, 260, 236, 265, 273, 284, 285, - 189, 266, 270, 4, 5, 6, 7, 8, 271, 274, - 313, 277, 251, 9, 287, 299, 239, 10, 233, 242, - -119, 11, 12, 319, 303, 125, 13, 304, 14, 15, - 305, 314, 122, 312, 194, 118, 286, 301, 198, 261, - 16, 262, 219, 320, 0, 0, 0, 219, 248, 0, + 172, 173, 174, 175, 176, 177, 178, 179, 136, 121, + 28, 29, 140, 265, 192, 206, 207, 138, 268, 188, + 279, 106, 107, 108, 141, 109, 142, 143, 154, 203, + 205, 155, 148, 209, 152, 153, 180, 193, 210, 214, + 109, 219, 222, 219, 226, 237, 238, 219, 219, -122, + 81, 241, 297, 242, 298, 299, 244, 260, 302, 264, + 81, 304, 295, 296, 266, 236, 261, 274, 281, 286, + 189, 267, 287, 4, 5, 6, 7, 8, 271, 272, + 122, 275, 252, 9, 315, 278, 240, 10, 233, 243, + 289, 11, 12, 301, -121, 125, 13, 321, 14, 15, + 305, 306, 307, 316, 314, 194, 118, 288, 198, 262, + 16, 263, 219, 249, 303, 322, 0, 219, 0, 0, 0, 0, 17, 85, 86, 87, 88, 0, 0, 18, - 272, 19, 190, 20, 21, 191, 22, 279, 0, 89, - 90, 0, 0, 283, 0, 0, 91, 92, 93, 94, - 95, 96, 97, 98, 288, 289, 0, 236, 290, 291, - 219, 219, 0, 101, 102, 103, 104, 105, 106, 107, + 273, 19, 190, 20, 21, 191, 22, 280, 0, 89, + 90, 0, 0, 0, 285, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 290, 291, 0, 236, 292, + 293, 219, 219, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, 0, 0, 0, 0, 0, 0, 0, - 233, 0, 0, 0, 0, 0, 307, 0, 0, 0, - 0, 0, -74, 70, 0, 0, 71, -74, 0, 72, - 0, -74, -74, -74, -74, -74, 0, 0, 316, 317, - 318, -74, -74, -74, 0, 0, -74, -74, -74, 0, - -74, 324, 0, 0, -74, -74, -74, -74, -74, -74, - -74, -74, 0, 16, 0, 0, -74, 0, 0, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, 0, - -74, -74, 0, -74, 0, -74, -74, -74, -74, 77, - -74, 0, 78, -157, -157, 72, 0, 0, 0, 0, - 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 0, -157, -157, 0, 0, 0, 0, 0, 0, 16, - 0, 0, 0, -157, -157, 104, 105, 106, 107, 108, - 0, 109, 0, 0, 0, 0, 215, 0, 79, 78, - 80, 0, 72, 0, 0, 0, -156, 0, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 4, 5, 6, - 7, 8, 0, 0, 0, 0, 16, 0, 0, 74, - 0, 0, 4, 5, 6, 7, 8, 0, 0, 0, - 0, 0, 9, 15, 0, 79, 10, 80, 0, 0, - 11, 12, 0, -156, 16, 13, 0, 14, 15, 0, - 0, 0, 0, 0, 0, 0, 217, 0, 0, 16, - 0, 0, 0, 18, 0, 19, 0, 20, 21, 0, - 22, 17, 4, 5, 6, 7, 8, 0, 18, 0, - 19, 0, 20, 21, 75, 22, 46, 0, 0, 4, - 5, 6, 7, 8, 0, 0, 0, 0, 15, 9, - 0, 0, 0, 10, 0, 0, 0, 11, 12, 16, - 0, 0, 13, 0, 14, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 0, 18, 0, - 19, 0, 20, 21, 0, 22, 0, 0, 17, 0, - 0, 86, 87, 0, 0, 18, 0, 19, 0, 20, - 21, 204, 22, 0, 4, 5, 6, 7, 8, 0, - 0, 0, 0, 0, 9, 0, 0, 0, 10, 97, - 98, 0, 11, 12, 0, 0, 0, 13, 0, 14, - 15, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 18, 0, 19, 0, 20, 21, 208, 22, 0, 4, - 5, 6, 7, 8, 0, 0, 0, 0, 0, 9, - 0, 0, 0, 10, 0, 0, 0, 11, 12, 0, - 0, 0, 13, 0, 14, 15, 0, 4, 5, 6, - 7, 8, 0, 0, 0, 0, 16, 9, 0, 0, - 0, 10, 0, 0, 0, 11, 12, 0, 17, 0, - 13, 0, 14, 15, 0, 18, 0, 19, 0, 20, - 21, 0, 22, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 123, 18, 0, 19, 0, 20, 21, 0, - 22, 4, 5, 6, 7, 8, 0, 0, 0, 0, + 0, 233, 0, 0, 0, 0, 0, 0, 309, 0, + 0, 0, 0, 0, -74, 70, 0, 0, 71, -74, + 0, 72, 0, -74, -74, -74, -74, -74, 0, 0, + 318, 319, 320, -74, -74, -74, 0, 0, -74, -74, + -74, 0, -74, 326, 0, 0, -74, -74, -74, -74, + -74, -74, -74, -74, 0, 16, 0, 0, -74, 0, + 0, -74, -74, -74, -74, -74, -74, -74, -74, -74, + -74, 0, -74, -74, 0, -74, 0, -74, -74, -74, + -74, 77, -74, 0, 78, -159, -159, 72, 0, 0, + 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 0, -159, -159, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, -159, -159, 104, 105, 106, + 107, 108, 0, 109, 0, 0, 0, 0, 215, 0, + 79, 78, 80, 0, 72, 0, 0, 0, -158, 0, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 4, + 5, 6, 7, 8, 0, 0, 0, 0, 16, 0, + 0, 74, 0, 0, 4, 5, 6, 7, 8, 0, + 0, 0, 0, 0, 9, 15, 0, 79, 10, 80, + 0, 0, 11, 12, 0, -158, 16, 13, 0, 14, + 15, 0, 0, 0, 0, 0, 0, 0, 217, 0, + 0, 16, 0, 0, 0, 18, 0, 19, 0, 20, + 21, 0, 22, 17, 4, 5, 6, 7, 8, 0, + 18, 0, 19, 0, 20, 21, 75, 22, 46, 0, + 0, 4, 5, 6, 7, 8, 0, 0, 0, 0, + 15, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 12, 16, 0, 0, 13, 0, 14, 15, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 18, 0, 19, 0, 20, 21, 0, 22, 0, 0, + 17, 0, 0, 86, 87, 0, 0, 18, 0, 19, + 0, 20, 21, 204, 22, 0, 4, 5, 6, 7, + 8, 0, 0, 0, 0, 0, 9, 0, 0, 0, + 10, 97, 98, 0, 11, 12, 0, 0, 0, 13, + 0, 14, 15, 102, 103, 104, 105, 106, 107, 108, + 0, 109, 0, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 18, 0, 19, 0, 20, 21, 208, 22, + 0, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 12, 0, 0, 0, 13, 0, 14, 15, 0, 4, 5, 6, 7, 8, 0, 0, 0, 0, 16, 9, 0, 0, 0, 10, 0, 0, 0, 11, 12, 0, 17, 0, 13, 0, 14, 15, 0, 18, 0, 19, - 0, 20, 21, 282, 22, 0, 16, 0, 0, 0, + 0, 20, 21, 0, 22, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 18, 0, 19, 229, 20, - 21, 230, 22, 0, 72, 0, 0, 0, 0, 0, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 0, 0, 123, 18, 0, 19, 0, 20, + 21, 0, 22, 4, 5, 6, 7, 8, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 12, 0, 0, 0, 13, 0, 14, 15, + 0, 4, 5, 6, 7, 8, 0, 0, 0, 0, + 16, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 12, 0, 17, 0, 13, 0, 14, 15, 0, 18, + 0, 19, 0, 20, 21, 239, 22, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 48, 0, 0, 0, 0, 0, 231, 0, 232, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 86, 87, - 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 68, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, - 88, 244, 0, 0, 245, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, - 88, 0, 0, 0, 144, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, - 88, 0, 0, 0, 280, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, - 88, 0, 0, 0, 281, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, - 88, 0, 0, 0, 306, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 0, 109, 322, 0, 323, - 85, 86, 87, 88, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 89, 90, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 18, 0, 19, + 0, 20, 21, 284, 22, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 11, 12, 0, 0, 0, 13, 0, + 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 18, 0, 19, 229, 20, 21, 230, 22, 0, + 72, 0, 0, 0, 0, 0, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 0, 0, 0, 231, 0, 232, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, + 0, 0, 0, 85, 86, 87, 88, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 68, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 85, 86, 87, 88, 245, 0, 0, + 246, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 85, 86, 87, 88, 0, 0, 0, + 144, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 85, 86, 87, 88, 0, 0, 0, + 282, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 85, 86, 87, 88, 0, 0, 0, + 283, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 85, 86, 87, 88, 0, 0, 0, + 308, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, + 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, + 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 0, 109, 324, 0, 325, 85, 86, 87, 88, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 89, 90, 0, 0, 0, 0, 0, 91, + 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, + 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 0, 109, 89, 90, 139, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 89, 90, 139, 0, 0, 0, 0, 91, 92, 93, + 89, 90, 221, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 0, 109, 89, 90, 221, 0, 0, 0, + 107, 108, 0, 109, 89, 90, 300, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, 89, 90, - 298, 0, 0, 0, 0, 91, 92, 93, 94, 95, + 323, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 0, 109, 89, 90, 321, 0, 0, 0, 0, 91, + 0, 109, 89, 90, 327, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, - 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 0, 109, 89, 90, 325, 0, + 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 0, 109, 110, 85, 86, 87, + 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, + 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, + 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 0, 109, 195, 85, 86, + 87, 88, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 89, 90, 0, 0, 0, 0, + 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, + 0, 0, 0, 0, 0, 0, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 0, 109, 255, 85, + 86, 87, 88, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 89, 90, 0, 0, 0, + 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, + 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 0, 109, 312, + 85, 86, 87, 88, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 110, 85, 86, 87, 88, 0, 0, 0, 0, 0, + 313, 85, 86, 87, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, - 109, 195, 85, 86, 87, 88, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 89, 90, + 109, 317, 85, 86, 87, 88, 0, 0, 0, 0, + 0, 0, 0, 256, 257, 0, 0, 258, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 0, 109, 254, 85, 86, 87, 88, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, - 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, - 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 0, 109, 310, 85, 86, 87, 88, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, - 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, - 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 0, 109, 311, 85, 86, 87, 88, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 89, 90, 0, 0, 0, 0, 0, 91, 92, - 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, - 0, 0, 0, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 0, 109, 315, 85, 86, 87, 88, - 0, 0, 0, 0, 0, 0, 0, 255, 256, 0, - 0, 257, 89, 90, 0, 0, 0, 0, 0, 91, + 0, 109, 85, 86, 87, 88, 0, 0, 0, 0, + 0, 0, 0, 256, 257, 0, 0, 0, 89, 90, + 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, + 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 0, 109, 85, 86, 87, 88, 0, 0, 0, 0, + 0, 0, 131, 0, 0, 0, 0, 0, 89, 90, + 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, + 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 0, 109, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, - 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, + 0, 294, 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, 88, - 0, 0, 0, 0, 0, 0, 0, 255, 256, 0, - 0, 0, 89, 90, 0, 0, 0, 0, 0, 91, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 310, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, 85, 86, 87, 88, - 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, - 98, 0, 0, 0, 0, 292, 0, 0, 99, 100, + 98, 0, 0, 0, -159, 86, 87, 0, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 85, 86, 87, 88, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 308, 89, 90, 0, 0, - 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, - 98, 0, 0, 0, 0, 0, 0, 0, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 85, 86, 87, 88, 0, 0, 0, 0, 0, 0, - 309, 0, 0, 0, 0, 0, 89, 90, 0, 0, - 0, 0, 0, 91, 92, 93, 94, 95, 96, 97, - 98, 0, 0, 0, 85, 86, 87, 88, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 0, 109, - 89, 90, 0, 0, 0, 0, 0, 91, 92, 93, - 94, 95, 96, 97, 98, 0, 0, 0, -157, 86, - 87, 0, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 0, 109, 89, 90, 0, 0, 0, 0, - 0, -157, -157, -157, -157, -157, -157, 97, 98, 0, - 0, 86, 87, 0, 0, 0, 0, 0, -157, 102, - 103, 104, 105, 106, 107, 108, 89, 109, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, - 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 102, 103, 104, 105, 106, 107, 108, 150, 109, - 0, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 250, 0, 0, 0, - 0, 0, 0, 0, 0, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67 + 89, 90, 0, 0, 0, 0, 0, -159, -159, -159, + -159, -159, -159, 97, 98, 0, 0, 86, 87, 0, + 0, 0, 0, 0, -159, 102, 103, 104, 105, 106, + 107, 108, 89, 109, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 97, 98, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 102, 103, 104, + 105, 106, 107, 108, 150, 109, 0, 0, 0, 0, + 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 251, 0, 0, 0, 0, 0, 0, 0, + 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 }; static const yytype_int16 yycheck[] = { - 1, 19, 4, 1, 7, 60, 11, 12, 5, 10, + 1, 19, 1, 7, 7, 15, 11, 12, 5, 10, 48, 5, 13, 5, 0, 5, 17, 18, 30, 13, - 21, 13, 7, 13, 4, 20, 48, 22, 15, 30, - 68, 32, 33, 28, 29, 48, 4, 48, 41, 148, - 145, 63, 62, 152, 153, 65, 68, 67, 41, 59, - 155, 61, 63, 66, 42, 43, 41, 45, 42, 43, - 62, 45, 80, 182, 62, 16, 17, 64, 65, 58, - 64, 65, 64, 65, 64, 65, 28, 59, 79, 61, - 65, 62, 62, 4, 85, 86, 87, 88, 89, 90, + 21, 13, 4, 13, 4, 20, 48, 22, 48, 30, + 68, 32, 33, 28, 29, 48, 60, 41, 41, 63, + 145, 63, 58, 63, 148, 59, 68, 61, 152, 153, + 155, 62, 60, 66, 65, 4, 67, 42, 43, 28, + 45, 65, 80, 62, 41, 182, 62, 64, 65, 4, + 64, 65, 64, 65, 64, 65, 42, 43, 79, 45, + 62, 59, 62, 61, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 217, 121, - 4, 61, 60, 222, 115, 63, 132, 133, 237, 114, - 54, 55, 56, 62, 58, 1, 58, 63, 66, 130, - 131, 68, 63, 134, 63, 48, 58, 47, 13, 62, - 58, 146, 4, 148, 63, 40, 47, 152, 153, 268, - 145, 270, 271, 40, 58, 274, 265, 266, 277, 66, - 155, 58, 60, 4, 60, 183, 47, 4, 58, 4, - 1, 63, 63, 4, 5, 6, 7, 8, 63, 63, - 299, 63, 200, 14, 63, 63, 187, 18, 183, 190, - 40, 22, 23, 312, 58, 196, 27, 58, 29, 30, - 58, 58, 31, 63, 121, 29, 252, 275, 128, 210, - 41, 212, 217, 316, -1, -1, -1, 222, 196, -1, + 101, 102, 103, 104, 105, 106, 107, 108, 4, 121, + 16, 17, 62, 217, 115, 132, 133, 61, 222, 114, + 237, 54, 55, 56, 1, 58, 58, 66, 68, 130, + 131, 48, 63, 134, 63, 63, 58, 13, 47, 62, + 58, 146, 63, 148, 4, 40, 47, 152, 153, 40, + 145, 58, 269, 66, 271, 272, 58, 60, 275, 4, + 155, 278, 266, 267, 47, 183, 60, 4, 58, 58, + 1, 63, 4, 4, 5, 6, 7, 8, 63, 63, + 31, 63, 200, 14, 301, 63, 187, 18, 183, 190, + 63, 22, 23, 63, 40, 196, 27, 314, 29, 30, + 58, 58, 58, 58, 63, 121, 29, 253, 128, 210, + 41, 212, 217, 196, 276, 318, -1, 222, -1, -1, -1, -1, 53, 9, 10, 11, 12, -1, -1, 60, 231, 62, 63, 64, 65, 66, 67, 238, -1, 25, - 26, -1, -1, 244, -1, -1, 32, 33, 34, 35, - 36, 37, 38, 39, 255, 256, -1, 275, 259, 260, - 265, 266, -1, 49, 50, 51, 52, 53, 54, 55, + 26, -1, -1, -1, 245, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, 256, 257, -1, 276, 260, + 261, 266, 267, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, -1, -1, -1, -1, -1, -1, -1, - 275, -1, -1, -1, -1, -1, 287, -1, -1, -1, - -1, -1, 0, 1, -1, -1, 4, 5, -1, 7, - -1, 9, 10, 11, 12, 13, -1, -1, 309, 310, - 311, 19, 20, 21, -1, -1, 24, 25, 26, -1, - 28, 322, -1, -1, 32, 33, 34, 35, 36, 37, - 38, 39, -1, 41, -1, -1, 44, -1, -1, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, -1, 61, -1, 63, 64, 65, 66, 1, - 68, -1, 4, 10, 11, 7, -1, -1, -1, -1, - -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - -1, 38, 39, -1, -1, -1, -1, -1, -1, 41, - -1, -1, -1, 50, 51, 52, 53, 54, 55, 56, - -1, 58, -1, -1, -1, -1, 1, -1, 60, 4, - 62, -1, 7, -1, -1, -1, 68, -1, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 4, 5, 6, - 7, 8, -1, -1, -1, -1, 41, -1, -1, 1, - -1, -1, 4, 5, 6, 7, 8, -1, -1, -1, - -1, -1, 14, 30, -1, 60, 18, 62, -1, -1, - 22, 23, -1, 68, 41, 27, -1, 29, 30, -1, - -1, -1, -1, -1, -1, -1, 53, -1, -1, 41, - -1, -1, -1, 60, -1, 62, -1, 64, 65, -1, - 67, 53, 4, 5, 6, 7, 8, -1, 60, -1, - 62, -1, 64, 65, 66, 67, 1, -1, -1, 4, - 5, 6, 7, 8, -1, -1, -1, -1, 30, 14, - -1, -1, -1, 18, -1, -1, -1, 22, 23, 41, - -1, -1, 27, -1, 29, 30, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, -1, 60, -1, - 62, -1, 64, 65, -1, 67, -1, -1, 53, -1, - -1, 10, 11, -1, -1, 60, -1, 62, -1, 64, - 65, 1, 67, -1, 4, 5, 6, 7, 8, -1, - -1, -1, -1, -1, 14, -1, -1, -1, 18, 38, - 39, -1, 22, 23, -1, -1, -1, 27, -1, 29, - 30, 50, 51, 52, 53, 54, 55, 56, -1, 58, - -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, - 60, -1, 62, -1, 64, 65, 1, 67, -1, 4, - 5, 6, 7, 8, -1, -1, -1, -1, -1, 14, - -1, -1, -1, 18, -1, -1, -1, 22, 23, -1, - -1, -1, 27, -1, 29, 30, -1, 4, 5, 6, - 7, 8, -1, -1, -1, -1, 41, 14, -1, -1, - -1, 18, -1, -1, -1, 22, 23, -1, 53, -1, - 27, -1, 29, 30, -1, 60, -1, 62, -1, 64, - 65, -1, 67, -1, 41, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, - -1, -1, 59, 60, -1, 62, -1, 64, 65, -1, - 67, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, 276, -1, -1, -1, -1, -1, -1, 289, -1, + -1, -1, -1, -1, 0, 1, -1, -1, 4, 5, + -1, 7, -1, 9, 10, 11, 12, 13, -1, -1, + 311, 312, 313, 19, 20, 21, -1, -1, 24, 25, + 26, -1, 28, 324, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, 41, -1, -1, 44, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 59, -1, 61, -1, 63, 64, 65, + 66, 1, 68, -1, 4, 10, 11, 7, -1, -1, + -1, -1, -1, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, -1, 38, 39, -1, -1, -1, -1, -1, + -1, 41, -1, -1, -1, 50, 51, 52, 53, 54, + 55, 56, -1, 58, -1, -1, -1, -1, 1, -1, + 60, 4, 62, -1, 7, -1, -1, -1, 68, -1, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 4, + 5, 6, 7, 8, -1, -1, -1, -1, 41, -1, + -1, 1, -1, -1, 4, 5, 6, 7, 8, -1, + -1, -1, -1, -1, 14, 30, -1, 60, 18, 62, + -1, -1, 22, 23, -1, 68, 41, 27, -1, 29, + 30, -1, -1, -1, -1, -1, -1, -1, 53, -1, + -1, 41, -1, -1, -1, 60, -1, 62, -1, 64, + 65, -1, 67, 53, 4, 5, 6, 7, 8, -1, + 60, -1, 62, -1, 64, 65, 66, 67, 1, -1, + -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, + 30, 14, -1, -1, -1, 18, -1, -1, -1, 22, + 23, 41, -1, -1, 27, -1, 29, 30, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + 60, -1, 62, -1, 64, 65, -1, 67, -1, -1, + 53, -1, -1, 10, 11, -1, -1, 60, -1, 62, + -1, 64, 65, 1, 67, -1, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, 14, -1, -1, -1, + 18, 38, 39, -1, 22, 23, -1, -1, -1, 27, + -1, 29, 30, 50, 51, 52, 53, 54, 55, 56, + -1, 58, -1, 41, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, + -1, -1, 60, -1, 62, -1, 64, 65, 1, 67, + -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, 14, -1, -1, -1, 18, -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, 29, 30, -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, 41, 14, -1, -1, -1, 18, -1, -1, -1, 22, 23, -1, 53, -1, 27, -1, 29, 30, -1, 60, -1, 62, - -1, 64, 65, 66, 67, -1, 41, -1, -1, -1, + -1, 64, 65, -1, 67, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, - -1, -1, -1, -1, -1, 60, -1, 62, 1, 64, - 65, 4, 67, -1, 7, -1, -1, -1, -1, -1, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, -1, -1, -1, 59, 60, -1, 62, -1, 64, + 65, -1, 67, 4, 5, 6, 7, 8, -1, -1, + -1, -1, -1, 14, -1, -1, -1, 18, -1, -1, + -1, 22, 23, -1, -1, -1, 27, -1, 29, 30, + -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, + 41, 14, -1, -1, -1, 18, -1, -1, -1, 22, + 23, -1, 53, -1, 27, -1, 29, 30, -1, 60, + -1, 62, -1, 64, 65, 66, 67, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 4, -1, -1, -1, -1, -1, 60, -1, 62, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, - -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, - 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, 62, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, - 12, 63, -1, -1, 66, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, - 12, -1, -1, -1, 66, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, - 12, -1, -1, -1, 66, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, - 12, -1, -1, -1, 66, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, - 12, -1, -1, -1, 66, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 59, -1, 61, - 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, + 53, -1, -1, -1, -1, -1, -1, 60, -1, 62, + -1, 64, 65, 66, 67, 4, 5, 6, 7, 8, + -1, -1, -1, -1, -1, 14, -1, -1, -1, 18, + -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, + 29, 30, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, + -1, 60, -1, 62, 1, 64, 65, 4, 67, -1, + 7, -1, -1, -1, -1, -1, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, + -1, -1, -1, 60, -1, 62, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, + -1, -1, -1, 9, 10, 11, 12, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, 62, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 9, 10, 11, 12, 63, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 9, 10, 11, 12, -1, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 9, 10, 11, 12, -1, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 9, 10, 11, 12, -1, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 9, 10, 11, 12, -1, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, 59, -1, 61, 9, 10, 11, 12, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 25, 26, -1, -1, -1, -1, -1, 32, + 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, + 9, 10, 11, 12, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, -1, 58, 25, 26, 61, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, 9, 10, 11, 12, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, @@ -1483,8 +1499,25 @@ static const yytype_int16 yycheck[] = 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 25, 26, 61, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, - 9, 10, 11, 12, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, -1, 58, 25, 26, 61, -1, + -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, -1, 58, 59, 9, 10, 11, + 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, + 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, + -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, -1, 58, 59, 9, 10, + 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 25, 26, -1, -1, -1, -1, + -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, + -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, -1, 58, 59, 9, + 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 25, 26, -1, -1, -1, + -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, + -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, + 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, @@ -1494,33 +1527,26 @@ static const yytype_int16 yycheck[] = 38, 39, -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, 9, 10, 11, 12, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, + -1, -1, -1, 20, 21, -1, -1, 24, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - -1, 58, 59, 9, 10, 11, 12, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, - 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, - 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, - -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, -1, 58, 59, 9, 10, 11, 12, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, - -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, -1, 58, 59, 9, 10, 11, 12, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 25, 26, -1, -1, -1, -1, -1, 32, 33, - 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, - -1, -1, -1, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 9, 10, 11, 12, - -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, - -1, 24, 25, 26, -1, -1, -1, -1, -1, 32, + -1, 58, 9, 10, 11, 12, -1, -1, -1, -1, + -1, -1, -1, 20, 21, -1, -1, -1, 25, 26, + -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, + 37, 38, 39, -1, -1, -1, -1, -1, -1, -1, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + -1, 58, 9, 10, 11, 12, -1, -1, -1, -1, + -1, -1, 19, -1, -1, -1, -1, -1, 25, 26, + -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, + 37, 38, 39, -1, -1, -1, 9, 10, 11, 12, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + -1, 58, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, - -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, + -1, 44, -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, 12, - -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, - -1, -1, 25, 26, -1, -1, -1, -1, -1, 32, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 24, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 9, 10, 11, 12, @@ -1530,34 +1556,20 @@ static const yytype_int16 yycheck[] = 9, 10, 11, 12, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, - 39, -1, -1, -1, -1, 44, -1, -1, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, - 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 24, 25, 26, -1, -1, - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, - 39, -1, -1, -1, -1, -1, -1, -1, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, - 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, - 19, -1, -1, -1, -1, -1, 25, 26, -1, -1, - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, - 39, -1, -1, -1, 9, 10, 11, 12, 47, 48, + 39, -1, -1, -1, 9, 10, 11, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, 25, 26, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, -1, -1, -1, 9, 10, - 11, -1, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, -1, 58, 25, 26, -1, -1, -1, -1, - -1, 32, 33, 34, 35, 36, 37, 38, 39, -1, - -1, 10, 11, -1, -1, -1, -1, -1, 49, 50, - 51, 52, 53, 54, 55, 56, 25, 58, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 50, 51, 52, 53, 54, 55, 56, 4, 58, - -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 4, -1, -1, -1, - -1, -1, -1, -1, -1, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31 + 35, 36, 37, 38, 39, -1, -1, 10, 11, -1, + -1, -1, -1, -1, 49, 50, 51, 52, 53, 54, + 55, 56, 25, 58, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 50, 51, 52, + 53, 54, 55, 56, 4, 58, -1, -1, -1, -1, + -1, -1, -1, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 4, -1, -1, -1, -1, -1, -1, -1, + -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1587,16 +1599,16 @@ static const yytype_int8 yystos[] = 62, 79, 80, 74, 1, 74, 91, 91, 1, 74, 47, 42, 43, 45, 62, 1, 97, 53, 86, 87, 86, 61, 63, 86, 86, 97, 4, 92, 93, 1, - 4, 60, 62, 81, 94, 95, 96, 40, 47, 74, - 58, 66, 74, 58, 63, 66, 4, 62, 89, 45, - 4, 96, 59, 61, 59, 20, 21, 24, 85, 60, - 60, 74, 74, 4, 86, 47, 63, 86, 48, 66, - 63, 63, 74, 4, 63, 48, 68, 63, 92, 74, - 66, 66, 66, 74, 58, 4, 80, 63, 74, 74, - 74, 74, 44, 86, 86, 92, 92, 92, 61, 63, - 92, 95, 92, 58, 58, 58, 66, 74, 24, 19, - 59, 59, 63, 92, 58, 59, 74, 74, 74, 92, - 85, 61, 59, 61, 74, 61 + 4, 60, 62, 81, 94, 95, 96, 40, 47, 66, + 74, 58, 66, 74, 58, 63, 66, 4, 62, 89, + 45, 4, 96, 59, 61, 59, 20, 21, 24, 85, + 60, 60, 74, 74, 4, 86, 47, 63, 86, 48, + 66, 63, 63, 74, 4, 63, 48, 68, 63, 92, + 74, 58, 66, 66, 66, 74, 58, 4, 80, 63, + 74, 74, 74, 74, 44, 86, 86, 92, 92, 92, + 61, 63, 92, 95, 92, 58, 58, 58, 66, 74, + 24, 19, 59, 59, 63, 92, 58, 59, 74, 74, + 74, 92, 85, 61, 59, 61, 74, 61 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1613,13 +1625,13 @@ static const yytype_int8 yyr1[] = 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 88, 88, 89, 90, - 90, 91, 91, 92, 92, 92, 93, 93, 94, 94, - 95, 95, 95, 95, 95, 95, 95, 96, 96, 96, + 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, + 89, 90, 90, 91, 91, 92, 92, 92, 93, 93, + 94, 94, 95, 95, 95, 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98 + 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, + 97, 97, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1634,15 +1646,15 @@ static const yytype_int8 yyr2[] = 2, 1, 0, 4, 0, 5, 0, 2, 4, 5, 3, 3, 2, 1, 1, 1, 3, 2, 3, 2, 4, 3, 2, 1, 3, 2, 2, 3, 5, 4, - 6, 5, 4, 3, 7, 6, 6, 6, 5, 5, - 1, 1, 1, 3, 3, 2, 3, 5, 2, 2, - 1, 4, 3, 3, 4, 3, 1, 3, 1, 3, - 1, 3, 1, 2, 3, 3, 1, 3, 1, 3, - 2, 4, 3, 3, 3, 5, 3, 1, 1, 1, + 6, 5, 4, 3, 5, 4, 7, 6, 6, 6, + 5, 5, 1, 1, 1, 3, 3, 2, 3, 5, + 2, 2, 1, 4, 3, 3, 4, 3, 1, 3, + 1, 3, 1, 3, 1, 2, 3, 3, 1, 3, + 1, 3, 2, 4, 3, 3, 3, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 3, 3, - 3, 3, 3, 1, 4, 2, 2, 1, 1, 5, - 3 + 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, + 3, 3, 3, 3, 3, 1, 4, 2, 2, 1, + 1, 5, 3 }; @@ -2212,187 +2224,187 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENT: /* IDENT */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2216 "src/parser.c" +#line 2228 "src/parser.c" break; case YYSYMBOL_FIELD: /* FIELD */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2222 "src/parser.c" +#line 2234 "src/parser.c" break; case YYSYMBOL_LITERAL: /* LITERAL */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2228 "src/parser.c" +#line 2240 "src/parser.c" break; case YYSYMBOL_FORMAT: /* FORMAT */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2234 "src/parser.c" +#line 2246 "src/parser.c" break; case YYSYMBOL_QQSTRING_TEXT: /* QQSTRING_TEXT */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2240 "src/parser.c" +#line 2252 "src/parser.c" break; case YYSYMBOL_Module: /* Module */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2246 "src/parser.c" +#line 2258 "src/parser.c" break; case YYSYMBOL_Imports: /* Imports */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2252 "src/parser.c" +#line 2264 "src/parser.c" break; case YYSYMBOL_FuncDefs: /* FuncDefs */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2258 "src/parser.c" +#line 2270 "src/parser.c" break; case YYSYMBOL_Exp: /* Exp */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2264 "src/parser.c" +#line 2276 "src/parser.c" break; case YYSYMBOL_Import: /* Import */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2270 "src/parser.c" +#line 2282 "src/parser.c" break; case YYSYMBOL_ImportWhat: /* ImportWhat */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2276 "src/parser.c" +#line 2288 "src/parser.c" break; case YYSYMBOL_ImportFrom: /* ImportFrom */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2282 "src/parser.c" +#line 2294 "src/parser.c" break; case YYSYMBOL_FuncDef: /* FuncDef */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2288 "src/parser.c" +#line 2300 "src/parser.c" break; case YYSYMBOL_Params: /* Params */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2294 "src/parser.c" +#line 2306 "src/parser.c" break; case YYSYMBOL_Param: /* Param */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2300 "src/parser.c" +#line 2312 "src/parser.c" break; case YYSYMBOL_String: /* String */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2306 "src/parser.c" +#line 2318 "src/parser.c" break; case YYSYMBOL_QQString: /* QQString */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2312 "src/parser.c" +#line 2324 "src/parser.c" break; case YYSYMBOL_ElseBody: /* ElseBody */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2318 "src/parser.c" +#line 2330 "src/parser.c" break; case YYSYMBOL_ExpD: /* ExpD */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2324 "src/parser.c" +#line 2336 "src/parser.c" break; case YYSYMBOL_Term: /* Term */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2330 "src/parser.c" +#line 2342 "src/parser.c" break; case YYSYMBOL_Args: /* Args */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2336 "src/parser.c" +#line 2348 "src/parser.c" break; case YYSYMBOL_Arg: /* Arg */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2342 "src/parser.c" +#line 2354 "src/parser.c" break; case YYSYMBOL_RepPatterns: /* RepPatterns */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2348 "src/parser.c" +#line 2360 "src/parser.c" break; case YYSYMBOL_Patterns: /* Patterns */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2354 "src/parser.c" +#line 2366 "src/parser.c" break; case YYSYMBOL_Pattern: /* Pattern */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2360 "src/parser.c" +#line 2372 "src/parser.c" break; case YYSYMBOL_ArrayPats: /* ArrayPats */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2366 "src/parser.c" +#line 2378 "src/parser.c" break; case YYSYMBOL_ObjPats: /* ObjPats */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2372 "src/parser.c" +#line 2384 "src/parser.c" break; case YYSYMBOL_ObjPat: /* ObjPat */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2378 "src/parser.c" +#line 2390 "src/parser.c" break; case YYSYMBOL_Keyword: /* Keyword */ #line 36 "src/parser.y" { jv_free(((*yyvaluep).literal)); } -#line 2384 "src/parser.c" +#line 2396 "src/parser.c" break; case YYSYMBOL_MkDict: /* MkDict */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2390 "src/parser.c" +#line 2402 "src/parser.c" break; case YYSYMBOL_MkDictPair: /* MkDictPair */ #line 37 "src/parser.y" { block_free(((*yyvaluep).blk)); } -#line 2396 "src/parser.c" +#line 2408 "src/parser.c" break; default: @@ -2700,7 +2712,7 @@ YYLTYPE yylloc = yyloc_default; { *answer = BLOCK((yyvsp[-2].blk), (yyvsp[-1].blk), gen_op_simple(TOP), (yyvsp[0].blk)); } -#line 2704 "src/parser.c" +#line 2716 "src/parser.c" break; case 3: /* TopLevel: Module Imports FuncDefs */ @@ -2708,7 +2720,7 @@ YYLTYPE yylloc = yyloc_default; { *answer = BLOCK((yyvsp[-2].blk), (yyvsp[-1].blk), (yyvsp[0].blk)); } -#line 2712 "src/parser.c" +#line 2724 "src/parser.c" break; case 4: /* Module: %empty */ @@ -2716,7 +2728,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_noop(); } -#line 2720 "src/parser.c" +#line 2732 "src/parser.c" break; case 5: /* Module: "module" Exp ';' */ @@ -2734,7 +2746,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_module((yyvsp[-1].blk)); } } -#line 2738 "src/parser.c" +#line 2750 "src/parser.c" break; case 6: /* Imports: %empty */ @@ -2742,7 +2754,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_noop(); } -#line 2746 "src/parser.c" +#line 2758 "src/parser.c" break; case 7: /* Imports: Import Imports */ @@ -2750,7 +2762,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = BLOCK((yyvsp[-1].blk), (yyvsp[0].blk)); } -#line 2754 "src/parser.c" +#line 2766 "src/parser.c" break; case 8: /* FuncDefs: %empty */ @@ -2758,7 +2770,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_noop(); } -#line 2762 "src/parser.c" +#line 2774 "src/parser.c" break; case 9: /* FuncDefs: FuncDef FuncDefs */ @@ -2766,7 +2778,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_join((yyvsp[-1].blk), (yyvsp[0].blk)); } -#line 2770 "src/parser.c" +#line 2782 "src/parser.c" break; case 10: /* Exp: FuncDef Exp */ @@ -2774,7 +2786,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_bind_referenced((yyvsp[-1].blk), (yyvsp[0].blk), OP_IS_CALL_PSEUDO); } -#line 2778 "src/parser.c" +#line 2790 "src/parser.c" break; case 11: /* Exp: Term "as" Patterns '|' Exp */ @@ -2782,7 +2794,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_destructure((yyvsp[-4].blk), (yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2786 "src/parser.c" +#line 2798 "src/parser.c" break; case 12: /* Exp: "reduce" Term "as" Patterns '(' Exp ';' Exp ')' */ @@ -2790,7 +2802,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_reduce((yyvsp[-7].blk), (yyvsp[-5].blk), (yyvsp[-3].blk), (yyvsp[-1].blk)); } -#line 2794 "src/parser.c" +#line 2806 "src/parser.c" break; case 13: /* Exp: "foreach" Term "as" Patterns '(' Exp ';' Exp ';' Exp ')' */ @@ -2798,7 +2810,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_foreach((yyvsp[-9].blk), (yyvsp[-7].blk), (yyvsp[-5].blk), (yyvsp[-3].blk), (yyvsp[-1].blk)); } -#line 2802 "src/parser.c" +#line 2814 "src/parser.c" break; case 14: /* Exp: "foreach" Term "as" Patterns '(' Exp ';' Exp ')' */ @@ -2806,7 +2818,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_foreach((yyvsp[-7].blk), (yyvsp[-5].blk), (yyvsp[-3].blk), (yyvsp[-1].blk), gen_noop()); } -#line 2810 "src/parser.c" +#line 2822 "src/parser.c" break; case 15: /* Exp: "if" Exp "then" Exp ElseBody */ @@ -2814,7 +2826,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_cond((yyvsp[-3].blk), (yyvsp[-1].blk), (yyvsp[0].blk)); } -#line 2818 "src/parser.c" +#line 2830 "src/parser.c" break; case 16: /* Exp: "if" Exp "then" Exp "end" */ @@ -2822,7 +2834,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_cond((yyvsp[-3].blk), (yyvsp[-1].blk), gen_noop()); } -#line 2826 "src/parser.c" +#line 2838 "src/parser.c" break; case 17: /* Exp: "if" Exp "then" error */ @@ -2831,7 +2843,7 @@ YYLTYPE yylloc = yyloc_default; FAIL((yyloc), "Possibly unterminated 'if' statement"); (yyval.blk) = (yyvsp[-2].blk); } -#line 2835 "src/parser.c" +#line 2847 "src/parser.c" break; case 18: /* Exp: "try" Exp "catch" Exp */ @@ -2840,7 +2852,7 @@ YYLTYPE yylloc = yyloc_default; //$$ = BLOCK(gen_op_target(FORK_OPT, $2), $2, $4); (yyval.blk) = gen_try((yyvsp[-2].blk), gen_try_handler((yyvsp[0].blk))); } -#line 2844 "src/parser.c" +#line 2856 "src/parser.c" break; case 19: /* Exp: "try" Exp */ @@ -2849,7 +2861,7 @@ YYLTYPE yylloc = yyloc_default; //$$ = BLOCK(gen_op_target(FORK_OPT, $2), $2, gen_op_simple(BACKTRACK)); (yyval.blk) = gen_try((yyvsp[0].blk), gen_op_simple(BACKTRACK)); } -#line 2853 "src/parser.c" +#line 2865 "src/parser.c" break; case 20: /* Exp: "try" Exp "catch" error */ @@ -2858,7 +2870,7 @@ YYLTYPE yylloc = yyloc_default; FAIL((yyloc), "Possibly unterminated 'try' statement"); (yyval.blk) = (yyvsp[-2].blk); } -#line 2862 "src/parser.c" +#line 2874 "src/parser.c" break; case 21: /* Exp: "label" '$' IDENT '|' Exp */ @@ -2869,7 +2881,7 @@ YYLTYPE yylloc = yyloc_default; jv_free((yyvsp[-2].literal)); jv_free(v); } -#line 2873 "src/parser.c" +#line 2885 "src/parser.c" break; case 22: /* Exp: Exp '?' */ @@ -2877,7 +2889,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_try((yyvsp[-1].blk), gen_op_simple(BACKTRACK)); } -#line 2881 "src/parser.c" +#line 2893 "src/parser.c" break; case 23: /* Exp: Exp '=' Exp */ @@ -2885,7 +2897,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_call("_assign", BLOCK(gen_lambda((yyvsp[-2].blk)), gen_lambda((yyvsp[0].blk)))); } -#line 2889 "src/parser.c" +#line 2901 "src/parser.c" break; case 24: /* Exp: Exp "or" Exp */ @@ -2893,7 +2905,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_or((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2897 "src/parser.c" +#line 2909 "src/parser.c" break; case 25: /* Exp: Exp "and" Exp */ @@ -2901,7 +2913,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_and((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2905 "src/parser.c" +#line 2917 "src/parser.c" break; case 26: /* Exp: Exp "//" Exp */ @@ -2909,7 +2921,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_definedor((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2913 "src/parser.c" +#line 2925 "src/parser.c" break; case 27: /* Exp: Exp "//=" Exp */ @@ -2917,7 +2929,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_definedor_assign((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2921 "src/parser.c" +#line 2933 "src/parser.c" break; case 28: /* Exp: Exp "|=" Exp */ @@ -2925,7 +2937,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_call("_modify", BLOCK(gen_lambda((yyvsp[-2].blk)), gen_lambda((yyvsp[0].blk)))); } -#line 2929 "src/parser.c" +#line 2941 "src/parser.c" break; case 29: /* Exp: Exp '|' Exp */ @@ -2933,7 +2945,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_join((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2937 "src/parser.c" +#line 2949 "src/parser.c" break; case 30: /* Exp: Exp ',' Exp */ @@ -2941,7 +2953,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_both((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 2945 "src/parser.c" +#line 2957 "src/parser.c" break; case 31: /* Exp: Exp '+' Exp */ @@ -2949,7 +2961,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), '+'); } -#line 2953 "src/parser.c" +#line 2965 "src/parser.c" break; case 32: /* Exp: Exp "+=" Exp */ @@ -2957,7 +2969,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_update((yyvsp[-2].blk), (yyvsp[0].blk), '+'); } -#line 2961 "src/parser.c" +#line 2973 "src/parser.c" break; case 33: /* Exp: '-' Exp */ @@ -2965,7 +2977,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = BLOCK((yyvsp[0].blk), gen_call("_negate", gen_noop())); } -#line 2969 "src/parser.c" +#line 2981 "src/parser.c" break; case 34: /* Exp: Exp '-' Exp */ @@ -2973,7 +2985,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), '-'); } -#line 2977 "src/parser.c" +#line 2989 "src/parser.c" break; case 35: /* Exp: Exp "-=" Exp */ @@ -2981,7 +2993,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_update((yyvsp[-2].blk), (yyvsp[0].blk), '-'); } -#line 2985 "src/parser.c" +#line 2997 "src/parser.c" break; case 36: /* Exp: Exp '*' Exp */ @@ -2989,7 +3001,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), '*'); } -#line 2993 "src/parser.c" +#line 3005 "src/parser.c" break; case 37: /* Exp: Exp "*=" Exp */ @@ -2997,7 +3009,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_update((yyvsp[-2].blk), (yyvsp[0].blk), '*'); } -#line 3001 "src/parser.c" +#line 3013 "src/parser.c" break; case 38: /* Exp: Exp '/' Exp */ @@ -3007,7 +3019,7 @@ YYLTYPE yylloc = yyloc_default; if (block_is_const_inf((yyval.blk))) FAIL((yyloc), "Division by zero?"); } -#line 3011 "src/parser.c" +#line 3023 "src/parser.c" break; case 39: /* Exp: Exp '%' Exp */ @@ -3017,7 +3029,7 @@ YYLTYPE yylloc = yyloc_default; if (block_is_const_inf((yyval.blk))) FAIL((yyloc), "Remainder by zero?"); } -#line 3021 "src/parser.c" +#line 3033 "src/parser.c" break; case 40: /* Exp: Exp "/=" Exp */ @@ -3025,7 +3037,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_update((yyvsp[-2].blk), (yyvsp[0].blk), '/'); } -#line 3029 "src/parser.c" +#line 3041 "src/parser.c" break; case 41: /* Exp: Exp "%=" Exp */ @@ -3033,7 +3045,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_update((yyvsp[-2].blk), (yyvsp[0].blk), '%'); } -#line 3037 "src/parser.c" +#line 3049 "src/parser.c" break; case 42: /* Exp: Exp "==" Exp */ @@ -3041,7 +3053,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), EQ); } -#line 3045 "src/parser.c" +#line 3057 "src/parser.c" break; case 43: /* Exp: Exp "!=" Exp */ @@ -3049,7 +3061,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), NEQ); } -#line 3053 "src/parser.c" +#line 3065 "src/parser.c" break; case 44: /* Exp: Exp '<' Exp */ @@ -3057,7 +3069,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), '<'); } -#line 3061 "src/parser.c" +#line 3073 "src/parser.c" break; case 45: /* Exp: Exp '>' Exp */ @@ -3065,7 +3077,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), '>'); } -#line 3069 "src/parser.c" +#line 3081 "src/parser.c" break; case 46: /* Exp: Exp "<=" Exp */ @@ -3073,7 +3085,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), LESSEQ); } -#line 3077 "src/parser.c" +#line 3089 "src/parser.c" break; case 47: /* Exp: Exp ">=" Exp */ @@ -3081,7 +3093,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-2].blk), (yyvsp[0].blk), GREATEREQ); } -#line 3085 "src/parser.c" +#line 3097 "src/parser.c" break; case 48: /* Exp: Term */ @@ -3089,7 +3101,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = (yyvsp[0].blk); } -#line 3093 "src/parser.c" +#line 3105 "src/parser.c" break; case 49: /* Import: ImportWhat ';' */ @@ -3097,7 +3109,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = (yyvsp[-1].blk); } -#line 3101 "src/parser.c" +#line 3113 "src/parser.c" break; case 50: /* Import: ImportWhat Exp ';' */ @@ -3117,7 +3129,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_import_meta((yyvsp[-2].blk), (yyvsp[-1].blk)); } } -#line 3121 "src/parser.c" +#line 3133 "src/parser.c" break; case 51: /* ImportWhat: "import" ImportFrom "as" '$' IDENT */ @@ -3131,7 +3143,7 @@ YYLTYPE yylloc = yyloc_default; jv_free((yyvsp[0].literal)); jv_free(v); } -#line 3135 "src/parser.c" +#line 3147 "src/parser.c" break; case 52: /* ImportWhat: "import" ImportFrom "as" IDENT */ @@ -3143,7 +3155,7 @@ YYLTYPE yylloc = yyloc_default; jv_free((yyvsp[0].literal)); jv_free(v); } -#line 3147 "src/parser.c" +#line 3159 "src/parser.c" break; case 53: /* ImportWhat: "include" ImportFrom */ @@ -3154,7 +3166,7 @@ YYLTYPE yylloc = yyloc_default; block_free((yyvsp[0].blk)); jv_free(v); } -#line 3158 "src/parser.c" +#line 3170 "src/parser.c" break; case 54: /* ImportFrom: String */ @@ -3168,7 +3180,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = (yyvsp[0].blk); } } -#line 3172 "src/parser.c" +#line 3184 "src/parser.c" break; case 55: /* FuncDef: "def" IDENT ':' Exp ';' */ @@ -3177,7 +3189,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_function(jv_string_value((yyvsp[-3].literal)), gen_noop(), (yyvsp[-1].blk)); jv_free((yyvsp[-3].literal)); } -#line 3181 "src/parser.c" +#line 3193 "src/parser.c" break; case 56: /* FuncDef: "def" IDENT '(' Params ')' ':' Exp ';' */ @@ -3186,7 +3198,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_function(jv_string_value((yyvsp[-6].literal)), (yyvsp[-4].blk), (yyvsp[-1].blk)); jv_free((yyvsp[-6].literal)); } -#line 3190 "src/parser.c" +#line 3202 "src/parser.c" break; case 57: /* Params: Param */ @@ -3194,7 +3206,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = (yyvsp[0].blk); } -#line 3198 "src/parser.c" +#line 3210 "src/parser.c" break; case 58: /* Params: Params ';' Param */ @@ -3202,7 +3214,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = BLOCK((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3206 "src/parser.c" +#line 3218 "src/parser.c" break; case 59: /* Param: '$' IDENT */ @@ -3211,7 +3223,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_param_regular(jv_string_value((yyvsp[0].literal))); jv_free((yyvsp[0].literal)); } -#line 3215 "src/parser.c" +#line 3227 "src/parser.c" break; case 60: /* Param: '$' Keyword */ @@ -3220,7 +3232,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_param_regular(jv_string_value((yyvsp[0].literal))); jv_free((yyvsp[0].literal)); } -#line 3224 "src/parser.c" +#line 3236 "src/parser.c" break; case 61: /* Param: IDENT */ @@ -3229,13 +3241,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_param(jv_string_value((yyvsp[0].literal))); jv_free((yyvsp[0].literal)); } -#line 3233 "src/parser.c" +#line 3245 "src/parser.c" break; case 62: /* @1: %empty */ #line 600 "src/parser.y" { (yyval.literal) = jv_string("text"); } -#line 3239 "src/parser.c" +#line 3251 "src/parser.c" break; case 63: /* String: QQSTRING_START @1 QQString QQSTRING_END */ @@ -3244,13 +3256,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = (yyvsp[-1].blk); jv_free((yyvsp[-2].literal)); } -#line 3248 "src/parser.c" +#line 3260 "src/parser.c" break; case 64: /* @2: %empty */ #line 604 "src/parser.y" { (yyval.literal) = (yyvsp[-1].literal); } -#line 3254 "src/parser.c" +#line 3266 "src/parser.c" break; case 65: /* String: FORMAT QQSTRING_START @2 QQString QQSTRING_END */ @@ -3259,7 +3271,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = (yyvsp[-1].blk); jv_free((yyvsp[-2].literal)); } -#line 3263 "src/parser.c" +#line 3275 "src/parser.c" break; case 66: /* QQString: %empty */ @@ -3267,7 +3279,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_const(jv_string("")); } -#line 3271 "src/parser.c" +#line 3283 "src/parser.c" break; case 67: /* QQString: QQString QQSTRING_TEXT */ @@ -3275,7 +3287,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-1].blk), gen_const((yyvsp[0].literal)), '+'); } -#line 3279 "src/parser.c" +#line 3291 "src/parser.c" break; case 68: /* QQString: QQString QQSTRING_INTERP_START Exp QQSTRING_INTERP_END */ @@ -3283,7 +3295,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_binop((yyvsp[-3].blk), gen_format((yyvsp[-1].blk), jv_copy((yyvsp[-4].literal))), '+'); } -#line 3287 "src/parser.c" +#line 3299 "src/parser.c" break; case 69: /* ElseBody: "elif" Exp "then" Exp ElseBody */ @@ -3291,7 +3303,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_cond((yyvsp[-3].blk), (yyvsp[-1].blk), (yyvsp[0].blk)); } -#line 3295 "src/parser.c" +#line 3307 "src/parser.c" break; case 70: /* ElseBody: "else" Exp "end" */ @@ -3299,7 +3311,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = (yyvsp[-1].blk); } -#line 3303 "src/parser.c" +#line 3315 "src/parser.c" break; case 71: /* ExpD: ExpD '|' ExpD */ @@ -3307,7 +3319,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_join((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3311 "src/parser.c" +#line 3323 "src/parser.c" break; case 72: /* ExpD: '-' ExpD */ @@ -3315,7 +3327,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = BLOCK((yyvsp[0].blk), gen_call("_negate", gen_noop())); } -#line 3319 "src/parser.c" +#line 3331 "src/parser.c" break; case 73: /* ExpD: Term */ @@ -3323,7 +3335,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = (yyvsp[0].blk); } -#line 3327 "src/parser.c" +#line 3339 "src/parser.c" break; case 74: /* Term: '.' */ @@ -3331,7 +3343,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_noop(); } -#line 3335 "src/parser.c" +#line 3347 "src/parser.c" break; case 75: /* Term: ".." */ @@ -3339,7 +3351,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_call("recurse", gen_noop()); } -#line 3343 "src/parser.c" +#line 3355 "src/parser.c" break; case 76: /* Term: "break" '$' IDENT */ @@ -3352,7 +3364,7 @@ YYLTYPE yylloc = yyloc_default; jv_free(v); jv_free((yyvsp[0].literal)); } -#line 3356 "src/parser.c" +#line 3368 "src/parser.c" break; case 77: /* Term: "break" error */ @@ -3361,7 +3373,7 @@ YYLTYPE yylloc = yyloc_default; FAIL((yyloc), "break requires a label to break to"); (yyval.blk) = gen_noop(); } -#line 3365 "src/parser.c" +#line 3377 "src/parser.c" break; case 78: /* Term: Term FIELD '?' */ @@ -3369,7 +3381,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt((yyvsp[-2].blk), gen_const((yyvsp[-1].literal))); } -#line 3373 "src/parser.c" +#line 3385 "src/parser.c" break; case 79: /* Term: FIELD '?' */ @@ -3377,7 +3389,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt(gen_noop(), gen_const((yyvsp[-1].literal))); } -#line 3381 "src/parser.c" +#line 3393 "src/parser.c" break; case 80: /* Term: Term '.' String '?' */ @@ -3385,7 +3397,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt((yyvsp[-3].blk), (yyvsp[-1].blk)); } -#line 3389 "src/parser.c" +#line 3401 "src/parser.c" break; case 81: /* Term: '.' String '?' */ @@ -3393,7 +3405,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt(gen_noop(), (yyvsp[-1].blk)); } -#line 3397 "src/parser.c" +#line 3409 "src/parser.c" break; case 82: /* Term: Term FIELD */ @@ -3401,7 +3413,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index((yyvsp[-1].blk), gen_const((yyvsp[0].literal))); } -#line 3405 "src/parser.c" +#line 3417 "src/parser.c" break; case 83: /* Term: FIELD */ @@ -3409,7 +3421,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index(gen_noop(), gen_const((yyvsp[0].literal))); } -#line 3413 "src/parser.c" +#line 3425 "src/parser.c" break; case 84: /* Term: Term '.' String */ @@ -3417,7 +3429,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3421 "src/parser.c" +#line 3433 "src/parser.c" break; case 85: /* Term: '.' String */ @@ -3425,7 +3437,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index(gen_noop(), (yyvsp[0].blk)); } -#line 3429 "src/parser.c" +#line 3441 "src/parser.c" break; case 86: /* Term: '.' error */ @@ -3434,7 +3446,7 @@ YYLTYPE yylloc = yyloc_default; FAIL((yyloc), "try .[\"field\"] instead of .field for unusually named fields"); (yyval.blk) = gen_noop(); } -#line 3438 "src/parser.c" +#line 3450 "src/parser.c" break; case 87: /* Term: '.' IDENT error */ @@ -3444,7 +3456,7 @@ YYLTYPE yylloc = yyloc_default; FAIL((yyloc), "try .[\"field\"] instead of .field for unusually named fields"); (yyval.blk) = gen_noop(); } -#line 3448 "src/parser.c" +#line 3460 "src/parser.c" break; case 88: /* Term: Term '[' Exp ']' '?' */ @@ -3452,7 +3464,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt((yyvsp[-4].blk), (yyvsp[-2].blk)); } -#line 3456 "src/parser.c" +#line 3468 "src/parser.c" break; case 89: /* Term: Term '[' Exp ']' */ @@ -3460,7 +3472,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index((yyvsp[-3].blk), (yyvsp[-1].blk)); } -#line 3464 "src/parser.c" +#line 3476 "src/parser.c" break; case 90: /* Term: Term '.' '[' Exp ']' '?' */ @@ -3468,7 +3480,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index_opt((yyvsp[-5].blk), (yyvsp[-2].blk)); } -#line 3472 "src/parser.c" +#line 3484 "src/parser.c" break; case 91: /* Term: Term '.' '[' Exp ']' */ @@ -3476,7 +3488,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = gen_index((yyvsp[-4].blk), (yyvsp[-1].blk)); } -#line 3480 "src/parser.c" +#line 3492 "src/parser.c" break; case 92: /* Term: Term '[' ']' '?' */ @@ -3484,7 +3496,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_join((yyvsp[-3].blk), gen_op_simple(EACH_OPT)); } -#line 3488 "src/parser.c" +#line 3500 "src/parser.c" break; case 93: /* Term: Term '[' ']' */ @@ -3492,107 +3504,123 @@ YYLTYPE yylloc = yyloc_default; { (yyval.blk) = block_join((yyvsp[-2].blk), gen_op_simple(EACH)); } -#line 3496 "src/parser.c" +#line 3508 "src/parser.c" break; - case 94: /* Term: Term '[' Exp ':' Exp ']' '?' */ + case 94: /* Term: Term '.' '[' ']' '?' */ #line 713 "src/parser.y" + { + (yyval.blk) = block_join((yyvsp[-4].blk), gen_op_simple(EACH_OPT)); +} +#line 3516 "src/parser.c" + break; + + case 95: /* Term: Term '.' '[' ']' */ +#line 716 "src/parser.y" + { + (yyval.blk) = block_join((yyvsp[-3].blk), gen_op_simple(EACH)); +} +#line 3524 "src/parser.c" + break; + + case 96: /* Term: Term '[' Exp ':' Exp ']' '?' */ +#line 719 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-6].blk), (yyvsp[-4].blk), (yyvsp[-2].blk), INDEX_OPT); } -#line 3504 "src/parser.c" +#line 3532 "src/parser.c" break; - case 95: /* Term: Term '[' Exp ':' ']' '?' */ -#line 716 "src/parser.y" + case 97: /* Term: Term '[' Exp ':' ']' '?' */ +#line 722 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-5].blk), (yyvsp[-3].blk), gen_const(jv_null()), INDEX_OPT); } -#line 3512 "src/parser.c" +#line 3540 "src/parser.c" break; - case 96: /* Term: Term '[' ':' Exp ']' '?' */ -#line 719 "src/parser.y" + case 98: /* Term: Term '[' ':' Exp ']' '?' */ +#line 725 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-5].blk), gen_const(jv_null()), (yyvsp[-2].blk), INDEX_OPT); } -#line 3520 "src/parser.c" +#line 3548 "src/parser.c" break; - case 97: /* Term: Term '[' Exp ':' Exp ']' */ -#line 722 "src/parser.y" + case 99: /* Term: Term '[' Exp ':' Exp ']' */ +#line 728 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-5].blk), (yyvsp[-3].blk), (yyvsp[-1].blk), INDEX); } -#line 3528 "src/parser.c" +#line 3556 "src/parser.c" break; - case 98: /* Term: Term '[' Exp ':' ']' */ -#line 725 "src/parser.y" + case 100: /* Term: Term '[' Exp ':' ']' */ +#line 731 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-4].blk), (yyvsp[-2].blk), gen_const(jv_null()), INDEX); } -#line 3536 "src/parser.c" +#line 3564 "src/parser.c" break; - case 99: /* Term: Term '[' ':' Exp ']' */ -#line 728 "src/parser.y" + case 101: /* Term: Term '[' ':' Exp ']' */ +#line 734 "src/parser.y" { (yyval.blk) = gen_slice_index((yyvsp[-4].blk), gen_const(jv_null()), (yyvsp[-1].blk), INDEX); } -#line 3544 "src/parser.c" +#line 3572 "src/parser.c" break; - case 100: /* Term: LITERAL */ -#line 731 "src/parser.y" + case 102: /* Term: LITERAL */ +#line 737 "src/parser.y" { (yyval.blk) = gen_const((yyvsp[0].literal)); } -#line 3552 "src/parser.c" +#line 3580 "src/parser.c" break; - case 101: /* Term: String */ -#line 734 "src/parser.y" + case 103: /* Term: String */ +#line 740 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 3560 "src/parser.c" +#line 3588 "src/parser.c" break; - case 102: /* Term: FORMAT */ -#line 737 "src/parser.y" + case 104: /* Term: FORMAT */ +#line 743 "src/parser.y" { (yyval.blk) = gen_format(gen_noop(), (yyvsp[0].literal)); } -#line 3568 "src/parser.c" +#line 3596 "src/parser.c" break; - case 103: /* Term: '(' Exp ')' */ -#line 740 "src/parser.y" + case 105: /* Term: '(' Exp ')' */ +#line 746 "src/parser.y" { (yyval.blk) = (yyvsp[-1].blk); } -#line 3576 "src/parser.c" +#line 3604 "src/parser.c" break; - case 104: /* Term: '[' Exp ']' */ -#line 743 "src/parser.y" + case 106: /* Term: '[' Exp ']' */ +#line 749 "src/parser.y" { (yyval.blk) = gen_collect((yyvsp[-1].blk)); } -#line 3584 "src/parser.c" +#line 3612 "src/parser.c" break; - case 105: /* Term: '[' ']' */ -#line 746 "src/parser.y" + case 107: /* Term: '[' ']' */ +#line 752 "src/parser.y" { (yyval.blk) = gen_const(jv_array()); } -#line 3592 "src/parser.c" +#line 3620 "src/parser.c" break; - case 106: /* Term: '{' MkDict '}' */ -#line 749 "src/parser.y" + case 108: /* Term: '{' MkDict '}' */ +#line 755 "src/parser.y" { block o = gen_const_object((yyvsp[-1].blk)); if (o.first != NULL) @@ -3600,29 +3628,29 @@ YYLTYPE yylloc = yyloc_default; else (yyval.blk) = BLOCK(gen_subexp(gen_const(jv_object())), (yyvsp[-1].blk), gen_op_simple(POP)); } -#line 3604 "src/parser.c" +#line 3632 "src/parser.c" break; - case 107: /* Term: '$' '$' '$' '$' IDENT */ -#line 771 "src/parser.y" + case 109: /* Term: '$' '$' '$' '$' IDENT */ +#line 777 "src/parser.y" { (yyval.blk) = gen_location((yyloc), locations, gen_op_unbound(LOADVN, jv_string_value((yyvsp[0].literal)))); jv_free((yyvsp[0].literal)); } -#line 3613 "src/parser.c" +#line 3641 "src/parser.c" break; - case 108: /* Term: '$' IDENT */ -#line 775 "src/parser.y" + case 110: /* Term: '$' IDENT */ +#line 781 "src/parser.y" { (yyval.blk) = gen_location((yyloc), locations, gen_op_unbound(LOADV, jv_string_value((yyvsp[0].literal)))); jv_free((yyvsp[0].literal)); } -#line 3622 "src/parser.c" +#line 3650 "src/parser.c" break; - case 109: /* Term: '$' Keyword */ -#line 779 "src/parser.y" + case 111: /* Term: '$' Keyword */ +#line 785 "src/parser.y" { if (strcmp(jv_string_value((yyvsp[0].literal)), "__loc__") == 0) { (yyval.blk) = gen_const(JV_OBJECT(jv_string("file"), jv_copy(locations->fname), @@ -3632,11 +3660,11 @@ YYLTYPE yylloc = yyloc_default; } jv_free((yyvsp[0].literal)); } -#line 3636 "src/parser.c" +#line 3664 "src/parser.c" break; - case 110: /* Term: IDENT */ -#line 788 "src/parser.y" + case 112: /* Term: IDENT */ +#line 794 "src/parser.y" { const char *s = jv_string_value((yyvsp[0].literal)); if (strcmp(s, "false") == 0) @@ -3649,198 +3677,198 @@ YYLTYPE yylloc = yyloc_default; (yyval.blk) = gen_location((yyloc), locations, gen_call(s, gen_noop())); jv_free((yyvsp[0].literal)); } -#line 3653 "src/parser.c" +#line 3681 "src/parser.c" break; - case 111: /* Term: IDENT '(' Args ')' */ -#line 800 "src/parser.y" + case 113: /* Term: IDENT '(' Args ')' */ +#line 806 "src/parser.y" { (yyval.blk) = gen_call(jv_string_value((yyvsp[-3].literal)), (yyvsp[-1].blk)); (yyval.blk) = gen_location((yylsp[-3]), locations, (yyval.blk)); jv_free((yyvsp[-3].literal)); } -#line 3663 "src/parser.c" +#line 3691 "src/parser.c" break; - case 112: /* Term: '(' error ')' */ -#line 805 "src/parser.y" + case 114: /* Term: '(' error ')' */ +#line 811 "src/parser.y" { (yyval.blk) = gen_noop(); } -#line 3669 "src/parser.c" +#line 3697 "src/parser.c" break; - case 113: /* Term: '[' error ']' */ -#line 806 "src/parser.y" + case 115: /* Term: '[' error ']' */ +#line 812 "src/parser.y" { (yyval.blk) = gen_noop(); } -#line 3675 "src/parser.c" +#line 3703 "src/parser.c" break; - case 114: /* Term: Term '[' error ']' */ -#line 807 "src/parser.y" + case 116: /* Term: Term '[' error ']' */ +#line 813 "src/parser.y" { (yyval.blk) = (yyvsp[-3].blk); } -#line 3681 "src/parser.c" +#line 3709 "src/parser.c" break; - case 115: /* Term: '{' error '}' */ -#line 808 "src/parser.y" + case 117: /* Term: '{' error '}' */ +#line 814 "src/parser.y" { (yyval.blk) = gen_noop(); } -#line 3687 "src/parser.c" +#line 3715 "src/parser.c" break; - case 116: /* Args: Arg */ -#line 811 "src/parser.y" + case 118: /* Args: Arg */ +#line 817 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 3695 "src/parser.c" +#line 3723 "src/parser.c" break; - case 117: /* Args: Args ';' Arg */ -#line 814 "src/parser.y" + case 119: /* Args: Args ';' Arg */ +#line 820 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3703 "src/parser.c" +#line 3731 "src/parser.c" break; - case 118: /* Arg: Exp */ -#line 819 "src/parser.y" + case 120: /* Arg: Exp */ +#line 825 "src/parser.y" { (yyval.blk) = gen_lambda((yyvsp[0].blk)); } -#line 3711 "src/parser.c" +#line 3739 "src/parser.c" break; - case 119: /* RepPatterns: RepPatterns "?//" Pattern */ -#line 824 "src/parser.y" + case 121: /* RepPatterns: RepPatterns "?//" Pattern */ +#line 830 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-2].blk), gen_destructure_alt((yyvsp[0].blk))); } -#line 3719 "src/parser.c" +#line 3747 "src/parser.c" break; - case 120: /* RepPatterns: Pattern */ -#line 827 "src/parser.y" + case 122: /* RepPatterns: Pattern */ +#line 833 "src/parser.y" { (yyval.blk) = gen_destructure_alt((yyvsp[0].blk)); } -#line 3727 "src/parser.c" +#line 3755 "src/parser.c" break; - case 121: /* Patterns: RepPatterns "?//" Pattern */ -#line 832 "src/parser.y" + case 123: /* Patterns: RepPatterns "?//" Pattern */ +#line 838 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3735 "src/parser.c" +#line 3763 "src/parser.c" break; - case 122: /* Patterns: Pattern */ -#line 835 "src/parser.y" + case 124: /* Patterns: Pattern */ +#line 841 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 3743 "src/parser.c" +#line 3771 "src/parser.c" break; - case 123: /* Pattern: '$' IDENT */ -#line 840 "src/parser.y" + case 125: /* Pattern: '$' IDENT */ +#line 846 "src/parser.y" { (yyval.blk) = gen_op_unbound(STOREV, jv_string_value((yyvsp[0].literal))); jv_free((yyvsp[0].literal)); } -#line 3752 "src/parser.c" +#line 3780 "src/parser.c" break; - case 124: /* Pattern: '[' ArrayPats ']' */ -#line 844 "src/parser.y" + case 126: /* Pattern: '[' ArrayPats ']' */ +#line 850 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-1].blk), gen_op_simple(POP)); } -#line 3760 "src/parser.c" +#line 3788 "src/parser.c" break; - case 125: /* Pattern: '{' ObjPats '}' */ -#line 847 "src/parser.y" + case 127: /* Pattern: '{' ObjPats '}' */ +#line 853 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-1].blk), gen_op_simple(POP)); } -#line 3768 "src/parser.c" +#line 3796 "src/parser.c" break; - case 126: /* ArrayPats: Pattern */ -#line 852 "src/parser.y" + case 128: /* ArrayPats: Pattern */ +#line 858 "src/parser.y" { (yyval.blk) = gen_array_matcher(gen_noop(), (yyvsp[0].blk)); } -#line 3776 "src/parser.c" +#line 3804 "src/parser.c" break; - case 127: /* ArrayPats: ArrayPats ',' Pattern */ -#line 855 "src/parser.y" + case 129: /* ArrayPats: ArrayPats ',' Pattern */ +#line 861 "src/parser.y" { (yyval.blk) = gen_array_matcher((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3784 "src/parser.c" +#line 3812 "src/parser.c" break; - case 128: /* ObjPats: ObjPat */ -#line 860 "src/parser.y" + case 130: /* ObjPats: ObjPat */ +#line 866 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 3792 "src/parser.c" +#line 3820 "src/parser.c" break; - case 129: /* ObjPats: ObjPats ',' ObjPat */ -#line 863 "src/parser.y" + case 131: /* ObjPats: ObjPats ',' ObjPat */ +#line 869 "src/parser.y" { (yyval.blk) = BLOCK((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3800 "src/parser.c" +#line 3828 "src/parser.c" break; - case 130: /* ObjPat: '$' IDENT */ -#line 868 "src/parser.y" + case 132: /* ObjPat: '$' IDENT */ +#line 874 "src/parser.y" { (yyval.blk) = gen_object_matcher(gen_const((yyvsp[0].literal)), gen_op_unbound(STOREV, jv_string_value((yyvsp[0].literal)))); } -#line 3808 "src/parser.c" +#line 3836 "src/parser.c" break; - case 131: /* ObjPat: '$' IDENT ':' Pattern */ -#line 871 "src/parser.y" + case 133: /* ObjPat: '$' IDENT ':' Pattern */ +#line 877 "src/parser.y" { (yyval.blk) = gen_object_matcher(gen_const((yyvsp[-2].literal)), BLOCK(gen_op_simple(DUP), gen_op_unbound(STOREV, jv_string_value((yyvsp[-2].literal))), (yyvsp[0].blk))); } -#line 3816 "src/parser.c" +#line 3844 "src/parser.c" break; - case 132: /* ObjPat: IDENT ':' Pattern */ -#line 874 "src/parser.y" + case 134: /* ObjPat: IDENT ':' Pattern */ +#line 880 "src/parser.y" { (yyval.blk) = gen_object_matcher(gen_const((yyvsp[-2].literal)), (yyvsp[0].blk)); } -#line 3824 "src/parser.c" +#line 3852 "src/parser.c" break; - case 133: /* ObjPat: Keyword ':' Pattern */ -#line 877 "src/parser.y" + case 135: /* ObjPat: Keyword ':' Pattern */ +#line 883 "src/parser.y" { (yyval.blk) = gen_object_matcher(gen_const((yyvsp[-2].literal)), (yyvsp[0].blk)); } -#line 3832 "src/parser.c" +#line 3860 "src/parser.c" break; - case 134: /* ObjPat: String ':' Pattern */ -#line 880 "src/parser.y" + case 136: /* ObjPat: String ':' Pattern */ +#line 886 "src/parser.y" { (yyval.blk) = gen_object_matcher((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 3840 "src/parser.c" +#line 3868 "src/parser.c" break; - case 135: /* ObjPat: '(' Exp ')' ':' Pattern */ -#line 883 "src/parser.y" + case 137: /* ObjPat: '(' Exp ')' ':' Pattern */ +#line 889 "src/parser.y" { jv msg = check_object_key((yyvsp[-3].blk)); if (jv_is_valid(msg)) { @@ -3849,276 +3877,276 @@ YYLTYPE yylloc = yyloc_default; jv_free(msg); (yyval.blk) = gen_object_matcher((yyvsp[-3].blk), (yyvsp[0].blk)); } -#line 3853 "src/parser.c" +#line 3881 "src/parser.c" break; - case 136: /* ObjPat: error ':' Pattern */ -#line 891 "src/parser.y" + case 138: /* ObjPat: error ':' Pattern */ +#line 897 "src/parser.y" { FAIL((yyloc), "May need parentheses around object key expression"); (yyval.blk) = (yyvsp[0].blk); } -#line 3862 "src/parser.c" +#line 3890 "src/parser.c" break; - case 137: /* Keyword: "as" */ -#line 897 "src/parser.y" + case 139: /* Keyword: "as" */ +#line 903 "src/parser.y" { (yyval.literal) = jv_string("as"); } -#line 3870 "src/parser.c" +#line 3898 "src/parser.c" break; - case 138: /* Keyword: "def" */ -#line 900 "src/parser.y" + case 140: /* Keyword: "def" */ +#line 906 "src/parser.y" { (yyval.literal) = jv_string("def"); } -#line 3878 "src/parser.c" +#line 3906 "src/parser.c" break; - case 139: /* Keyword: "module" */ -#line 903 "src/parser.y" + case 141: /* Keyword: "module" */ +#line 909 "src/parser.y" { (yyval.literal) = jv_string("module"); } -#line 3886 "src/parser.c" +#line 3914 "src/parser.c" break; - case 140: /* Keyword: "import" */ -#line 906 "src/parser.y" + case 142: /* Keyword: "import" */ +#line 912 "src/parser.y" { (yyval.literal) = jv_string("import"); } -#line 3894 "src/parser.c" +#line 3922 "src/parser.c" break; - case 141: /* Keyword: "include" */ -#line 909 "src/parser.y" + case 143: /* Keyword: "include" */ +#line 915 "src/parser.y" { (yyval.literal) = jv_string("include"); } -#line 3902 "src/parser.c" +#line 3930 "src/parser.c" break; - case 142: /* Keyword: "if" */ -#line 912 "src/parser.y" + case 144: /* Keyword: "if" */ +#line 918 "src/parser.y" { (yyval.literal) = jv_string("if"); } -#line 3910 "src/parser.c" +#line 3938 "src/parser.c" break; - case 143: /* Keyword: "then" */ -#line 915 "src/parser.y" + case 145: /* Keyword: "then" */ +#line 921 "src/parser.y" { (yyval.literal) = jv_string("then"); } -#line 3918 "src/parser.c" +#line 3946 "src/parser.c" break; - case 144: /* Keyword: "else" */ -#line 918 "src/parser.y" + case 146: /* Keyword: "else" */ +#line 924 "src/parser.y" { (yyval.literal) = jv_string("else"); } -#line 3926 "src/parser.c" +#line 3954 "src/parser.c" break; - case 145: /* Keyword: "elif" */ -#line 921 "src/parser.y" + case 147: /* Keyword: "elif" */ +#line 927 "src/parser.y" { (yyval.literal) = jv_string("elif"); } -#line 3934 "src/parser.c" +#line 3962 "src/parser.c" break; - case 146: /* Keyword: "reduce" */ -#line 924 "src/parser.y" + case 148: /* Keyword: "reduce" */ +#line 930 "src/parser.y" { (yyval.literal) = jv_string("reduce"); } -#line 3942 "src/parser.c" +#line 3970 "src/parser.c" break; - case 147: /* Keyword: "foreach" */ -#line 927 "src/parser.y" + case 149: /* Keyword: "foreach" */ +#line 933 "src/parser.y" { (yyval.literal) = jv_string("foreach"); } -#line 3950 "src/parser.c" +#line 3978 "src/parser.c" break; - case 148: /* Keyword: "end" */ -#line 930 "src/parser.y" + case 150: /* Keyword: "end" */ +#line 936 "src/parser.y" { (yyval.literal) = jv_string("end"); } -#line 3958 "src/parser.c" +#line 3986 "src/parser.c" break; - case 149: /* Keyword: "and" */ -#line 933 "src/parser.y" + case 151: /* Keyword: "and" */ +#line 939 "src/parser.y" { (yyval.literal) = jv_string("and"); } -#line 3966 "src/parser.c" +#line 3994 "src/parser.c" break; - case 150: /* Keyword: "or" */ -#line 936 "src/parser.y" + case 152: /* Keyword: "or" */ +#line 942 "src/parser.y" { (yyval.literal) = jv_string("or"); } -#line 3974 "src/parser.c" +#line 4002 "src/parser.c" break; - case 151: /* Keyword: "try" */ -#line 939 "src/parser.y" + case 153: /* Keyword: "try" */ +#line 945 "src/parser.y" { (yyval.literal) = jv_string("try"); } -#line 3982 "src/parser.c" +#line 4010 "src/parser.c" break; - case 152: /* Keyword: "catch" */ -#line 942 "src/parser.y" + case 154: /* Keyword: "catch" */ +#line 948 "src/parser.y" { (yyval.literal) = jv_string("catch"); } -#line 3990 "src/parser.c" +#line 4018 "src/parser.c" break; - case 153: /* Keyword: "label" */ -#line 945 "src/parser.y" + case 155: /* Keyword: "label" */ +#line 951 "src/parser.y" { (yyval.literal) = jv_string("label"); } -#line 3998 "src/parser.c" +#line 4026 "src/parser.c" break; - case 154: /* Keyword: "break" */ -#line 948 "src/parser.y" + case 156: /* Keyword: "break" */ +#line 954 "src/parser.y" { (yyval.literal) = jv_string("break"); } -#line 4006 "src/parser.c" +#line 4034 "src/parser.c" break; - case 155: /* Keyword: "__loc__" */ -#line 951 "src/parser.y" + case 157: /* Keyword: "__loc__" */ +#line 957 "src/parser.y" { (yyval.literal) = jv_string("__loc__"); } -#line 4014 "src/parser.c" +#line 4042 "src/parser.c" break; - case 156: /* MkDict: %empty */ -#line 956 "src/parser.y" + case 158: /* MkDict: %empty */ +#line 962 "src/parser.y" { (yyval.blk)=gen_noop(); } -#line 4022 "src/parser.c" +#line 4050 "src/parser.c" break; - case 157: /* MkDict: MkDictPair */ -#line 959 "src/parser.y" + case 159: /* MkDict: MkDictPair */ +#line 965 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 4028 "src/parser.c" +#line 4056 "src/parser.c" break; - case 158: /* MkDict: MkDictPair ',' MkDict */ -#line 960 "src/parser.y" + case 160: /* MkDict: MkDictPair ',' MkDict */ +#line 966 "src/parser.y" { (yyval.blk)=block_join((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 4034 "src/parser.c" +#line 4062 "src/parser.c" break; - case 159: /* MkDict: error ',' MkDict */ -#line 961 "src/parser.y" + case 161: /* MkDict: error ',' MkDict */ +#line 967 "src/parser.y" { (yyval.blk) = (yyvsp[0].blk); } -#line 4040 "src/parser.c" +#line 4068 "src/parser.c" break; - case 160: /* MkDictPair: IDENT ':' ExpD */ -#line 964 "src/parser.y" + case 162: /* MkDictPair: IDENT ':' ExpD */ +#line 970 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const((yyvsp[-2].literal)), (yyvsp[0].blk)); } -#line 4048 "src/parser.c" +#line 4076 "src/parser.c" break; - case 161: /* MkDictPair: Keyword ':' ExpD */ -#line 967 "src/parser.y" + case 163: /* MkDictPair: Keyword ':' ExpD */ +#line 973 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const((yyvsp[-2].literal)), (yyvsp[0].blk)); } -#line 4056 "src/parser.c" +#line 4084 "src/parser.c" break; - case 162: /* MkDictPair: String ':' ExpD */ -#line 970 "src/parser.y" + case 164: /* MkDictPair: String ':' ExpD */ +#line 976 "src/parser.y" { (yyval.blk) = gen_dictpair((yyvsp[-2].blk), (yyvsp[0].blk)); } -#line 4064 "src/parser.c" +#line 4092 "src/parser.c" break; - case 163: /* MkDictPair: String */ -#line 973 "src/parser.y" + case 165: /* MkDictPair: String */ +#line 979 "src/parser.y" { (yyval.blk) = gen_dictpair((yyvsp[0].blk), BLOCK(gen_op_simple(POP), gen_op_simple(DUP2), gen_op_simple(DUP2), gen_op_simple(INDEX))); } -#line 4073 "src/parser.c" +#line 4101 "src/parser.c" break; - case 164: /* MkDictPair: '$' IDENT ':' ExpD */ -#line 977 "src/parser.y" + case 166: /* MkDictPair: '$' IDENT ':' ExpD */ +#line 983 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_location((yyloc), locations, gen_op_unbound(LOADV, jv_string_value((yyvsp[-2].literal)))), (yyvsp[0].blk)); } -#line 4082 "src/parser.c" +#line 4110 "src/parser.c" break; - case 165: /* MkDictPair: '$' IDENT */ -#line 981 "src/parser.y" + case 167: /* MkDictPair: '$' IDENT */ +#line 987 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const((yyvsp[0].literal)), gen_location((yyloc), locations, gen_op_unbound(LOADV, jv_string_value((yyvsp[0].literal))))); } -#line 4091 "src/parser.c" +#line 4119 "src/parser.c" break; - case 166: /* MkDictPair: '$' Keyword */ -#line 985 "src/parser.y" + case 168: /* MkDictPair: '$' Keyword */ +#line 991 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const((yyvsp[0].literal)), gen_location((yyloc), locations, gen_op_unbound(LOADV, jv_string_value((yyvsp[0].literal))))); } -#line 4100 "src/parser.c" +#line 4128 "src/parser.c" break; - case 167: /* MkDictPair: IDENT */ -#line 989 "src/parser.y" + case 169: /* MkDictPair: IDENT */ +#line 995 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const(jv_copy((yyvsp[0].literal))), gen_index(gen_noop(), gen_const((yyvsp[0].literal)))); } -#line 4109 "src/parser.c" +#line 4137 "src/parser.c" break; - case 168: /* MkDictPair: Keyword */ -#line 993 "src/parser.y" + case 170: /* MkDictPair: Keyword */ +#line 999 "src/parser.y" { (yyval.blk) = gen_dictpair(gen_const(jv_copy((yyvsp[0].literal))), gen_index(gen_noop(), gen_const((yyvsp[0].literal)))); } -#line 4118 "src/parser.c" +#line 4146 "src/parser.c" break; - case 169: /* MkDictPair: '(' Exp ')' ':' ExpD */ -#line 997 "src/parser.y" + case 171: /* MkDictPair: '(' Exp ')' ':' ExpD */ +#line 1003 "src/parser.y" { jv msg = check_object_key((yyvsp[-3].blk)); if (jv_is_valid(msg)) { @@ -4127,20 +4155,20 @@ YYLTYPE yylloc = yyloc_default; jv_free(msg); (yyval.blk) = gen_dictpair((yyvsp[-3].blk), (yyvsp[0].blk)); } -#line 4131 "src/parser.c" +#line 4159 "src/parser.c" break; - case 170: /* MkDictPair: error ':' ExpD */ -#line 1005 "src/parser.y" + case 172: /* MkDictPair: error ':' ExpD */ +#line 1011 "src/parser.y" { FAIL((yyloc), "May need parentheses around object key expression"); (yyval.blk) = (yyvsp[0].blk); } -#line 4140 "src/parser.c" +#line 4168 "src/parser.c" break; -#line 4144 "src/parser.c" +#line 4172 "src/parser.c" default: break; } @@ -4369,7 +4397,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1009 "src/parser.y" +#line 1015 "src/parser.y" int jq_parse(struct locfile* locations, block* answer) { diff --git a/src/parser.y b/src/parser.y index a5fc9da9dc..b2f3b6caf2 100644 --- a/src/parser.y +++ b/src/parser.y @@ -710,6 +710,12 @@ Term '[' ']' '?' { Term '[' ']' %prec NONOPT { $$ = block_join($1, gen_op_simple(EACH)); } | +Term '.' '[' ']' '?' { + $$ = block_join($1, gen_op_simple(EACH_OPT)); +} | +Term '.' '[' ']' %prec NONOPT { + $$ = block_join($1, gen_op_simple(EACH)); +} | Term '[' Exp ':' Exp ']' '?' { $$ = gen_slice_index($1, $3, $5, INDEX_OPT); } | diff --git a/tests/jq.test b/tests/jq.test index ca8e27059f..33eaf4513c 100644 --- a/tests/jq.test +++ b/tests/jq.test @@ -173,6 +173,11 @@ jq: error: Cannot use number (0) as object key at , line 1: [1,null,true,false,"abcdef",{},{"a":1,"b":2},[],[1,2,3,4,5],[1,2]] [null,"bc",[],[2,3],[2]] +# chaining/suffix-list, with and without dot +map(try .a[] catch ., try .a.[] catch ., .a[]?, .a.[]?) +[{"a": [1,2]}, {"a": 123}] +[1,2,1,2,1,2,1,2,"Cannot iterate over number (123)","Cannot iterate over number (123)"] + # # Negative array indices #