diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-15 21:41:29 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-15 21:41:29 +0300 |
| commit | bad9ab7479d66dfdb1c8e2d18c23fbcff9ec394b (patch) | |
| tree | d43dd3a26685c9adc8201dfe1a4035418175c1eb /gen/gen_lexer.c | |
| parent | 5ffc39352ef0195697953e9318b8a17c79e7ae84 (diff) | |
| download | ek-bad9ab7479d66dfdb1c8e2d18c23fbcff9ec394b.tar.gz ek-bad9ab7479d66dfdb1c8e2d18c23fbcff9ec394b.zip | |
updates to syntax
Diffstat (limited to 'gen/gen_lexer.c')
| -rw-r--r-- | gen/gen_lexer.c | 787 |
1 files changed, 456 insertions, 331 deletions
diff --git a/gen/gen_lexer.c b/gen/gen_lexer.c index 1484b6b..fbd1d94 100644 --- a/gen/gen_lexer.c +++ b/gen/gen_lexer.c @@ -339,8 +339,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 94 -#define YY_END_OF_BUFFER 95 +#define YY_NUM_RULES 97 +#define YY_END_OF_BUFFER 98 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -348,33 +348,33 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[224] = +static const flex_int16_t yy_accept[231] = { 0, - 0, 0, 0, 0, 95, 93, 92, 92, 20, 93, - 93, 27, 36, 35, 10, 11, 25, 23, 17, 24, - 16, 26, 89, 89, 19, 18, 42, 41, 43, 22, - 91, 14, 15, 28, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 12, 38, 13, 40, 6, 8, 5, 7, 92, 46, - 0, 88, 0, 21, 54, 37, 57, 0, 0, 0, - 0, 51, 89, 89, 52, 0, 2, 1, 53, 90, - 89, 0, 0, 9, 49, 44, 47, 48, 45, 50, - 91, 55, 29, 62, 91, 91, 91, 91, 79, 91, + 0, 0, 0, 0, 98, 96, 95, 95, 20, 96, + 96, 27, 37, 36, 10, 11, 25, 23, 17, 24, + 16, 26, 91, 91, 19, 18, 43, 42, 44, 35, + 22, 93, 14, 15, 28, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 12, 39, 13, 41, 6, 8, 5, 7, 95, + 47, 0, 90, 0, 21, 55, 38, 58, 0, 0, + 0, 0, 52, 91, 91, 53, 0, 2, 1, 54, + 92, 91, 0, 0, 9, 50, 45, 48, 49, 46, + 51, 0, 94, 93, 56, 29, 63, 93, 93, 93, - 91, 91, 91, 91, 91, 72, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 58, 39, - 6, 5, 4, 3, 30, 0, 0, 0, 0, 0, - 61, 1, 0, 90, 0, 90, 89, 89, 59, 60, - 56, 91, 91, 91, 91, 91, 91, 91, 91, 77, - 91, 91, 90, 80, 63, 91, 91, 91, 91, 91, - 91, 91, 34, 32, 0, 0, 0, 0, 0, 91, - 76, 91, 91, 91, 91, 74, 91, 84, 91, 73, - 91, 91, 91, 91, 91, 91, 91, 91, 32, 33, - 31, 0, 90, 86, 81, 91, 64, 91, 71, 91, + 93, 80, 93, 93, 93, 93, 93, 93, 73, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 59, 40, 6, 5, 4, 3, 30, 0, 0, + 0, 0, 0, 62, 1, 0, 92, 0, 92, 91, + 91, 60, 61, 57, 93, 93, 93, 93, 93, 93, + 93, 93, 78, 93, 93, 92, 81, 64, 93, 93, + 93, 93, 93, 93, 93, 34, 32, 0, 0, 0, + 0, 0, 93, 77, 93, 93, 93, 93, 93, 75, + 93, 85, 93, 74, 93, 93, 93, 93, 93, 93, + 93, 93, 32, 33, 31, 0, 92, 87, 82, 93, - 91, 91, 91, 91, 91, 91, 91, 65, 78, 91, - 85, 83, 68, 82, 70, 66, 75, 91, 69, 91, - 67, 87, 0 + 93, 65, 93, 72, 93, 93, 93, 93, 93, 93, + 93, 93, 66, 79, 93, 93, 86, 84, 69, 83, + 71, 67, 76, 93, 70, 93, 89, 68, 88, 0 } ; static const YY_CHAR yy_ec[256] = @@ -385,14 +385,14 @@ static const YY_CHAR yy_ec[256] = 1, 2, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, 20, 20, 20, 21, 22, 23, 24, - 25, 26, 1, 27, 28, 28, 28, 28, 29, 30, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, - 31, 31, 31, 31, 31, 31, 31, 33, 31, 31, - 34, 35, 36, 37, 31, 1, 38, 39, 40, 41, + 25, 26, 27, 28, 29, 29, 29, 29, 30, 31, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, + 32, 32, 32, 32, 32, 32, 32, 34, 32, 32, + 35, 36, 37, 38, 32, 1, 39, 40, 41, 42, - 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, - 51, 52, 31, 53, 54, 55, 56, 31, 57, 58, - 59, 60, 61, 62, 63, 64, 1, 1, 1, 1, + 43, 44, 45, 46, 47, 32, 48, 49, 50, 51, + 52, 53, 32, 54, 55, 56, 57, 32, 58, 59, + 60, 61, 62, 63, 64, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -409,130 +409,181 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[65] = +static const YY_CHAR yy_meta[66] = { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 1, 4, 5, 5, 5, - 5, 1, 1, 1, 1, 1, 1, 5, 5, 5, - 6, 6, 6, 1, 1, 1, 1, 5, 5, 5, - 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 1, 1, 1, 1 + 1, 2, 3, 2, 1, 1, 1, 1, 4, 1, + 1, 5, 1, 1, 1, 1, 5, 6, 6, 6, + 6, 1, 1, 1, 1, 1, 1, 1, 6, 6, + 6, 2, 2, 2, 1, 1, 1, 1, 6, 6, + 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 1 } ; -static const flex_int16_t yy_base[234] = +static const flex_int16_t yy_base[241] = { 0, - 0, 0, 62, 63, 367, 368, 65, 67, 341, 66, - 359, 339, 64, 328, 368, 368, 368, 63, 368, 72, - 346, 61, 84, 90, 339, 368, 52, 69, 73, 368, - 0, 368, 368, 82, 306, 306, 74, 45, 66, 307, - 306, 77, 300, 317, 298, 311, 75, 293, 301, 305, - 368, 60, 368, 368, 0, 368, 101, 337, 126, 368, - 126, 368, 345, 368, 368, 368, 368, 338, 115, 120, - 127, 368, 139, 146, 368, 330, 368, 0, 368, 185, - 161, 0, 131, 368, 320, 368, 368, 368, 368, 319, - 0, 368, 318, 0, 300, 287, 290, 296, 0, 284, + 0, 0, 63, 64, 317, 830, 66, 68, 287, 67, + 300, 269, 65, 257, 830, 830, 830, 64, 830, 73, + 275, 62, 81, 88, 265, 830, 53, 70, 85, 830, + 830, 110, 830, 830, 80, 120, 123, 126, 129, 133, + 139, 142, 145, 148, 151, 154, 157, 160, 164, 183, + 167, 830, 113, 830, 830, 0, 830, 122, 274, 114, + 830, 83, 830, 262, 830, 830, 830, 830, 250, 179, + 207, 224, 830, 230, 236, 830, 231, 830, 0, 830, + 277, 242, 0, 155, 830, 214, 830, 830, 830, 830, + 192, 199, 830, 206, 830, 190, 218, 227, 233, 265, - 298, 280, 280, 281, 278, 0, 280, 288, 275, 279, - 289, 272, 266, 272, 278, 271, 276, 275, 368, 368, - 0, 139, 368, 368, 368, 311, 165, 177, 310, 0, - 368, 0, 150, 169, 198, 368, 169, 157, 368, 368, - 368, 280, 275, 137, 178, 274, 273, 265, 271, 0, - 261, 260, 0, 0, 0, 254, 267, 252, 252, 264, - 254, 256, 368, 368, 213, 216, 294, 177, 223, 255, - 0, 246, 254, 246, 248, 0, 256, 0, 243, 0, - 242, 241, 241, 246, 240, 189, 226, 232, 368, 368, - 368, 227, 231, 0, 0, 217, 0, 197, 0, 187, + 269, 272, 275, 278, 281, 297, 300, 307, 320, 323, + 329, 332, 338, 341, 344, 347, 353, 356, 362, 365, + 375, 830, 830, 0, 176, 830, 830, 830, 205, 352, + 296, 197, 0, 830, 0, 364, 373, 405, 830, 179, + 161, 830, 830, 830, 393, 407, 425, 431, 434, 439, + 442, 445, 449, 452, 455, 458, 461, 464, 469, 481, + 487, 491, 494, 497, 506, 830, 830, 493, 310, 195, + 200, 501, 525, 528, 531, 536, 539, 548, 554, 557, + 561, 564, 567, 572, 575, 578, 582, 586, 589, 595, + 604, 607, 830, 830, 830, 594, 598, 620, 636, 639, - 171, 173, 167, 153, 162, 160, 151, 0, 0, 137, - 0, 0, 0, 0, 0, 0, 0, 120, 0, 110, - 0, 0, 368, 252, 258, 264, 266, 272, 278, 284, - 139, 288, 132 + 642, 649, 654, 657, 660, 663, 666, 669, 672, 675, + 679, 682, 685, 690, 696, 699, 702, 705, 712, 721, + 727, 730, 733, 736, 739, 742, 745, 748, 754, 830, + 785, 791, 797, 802, 808, 814, 820, 114, 823, 80 } ; -static const flex_int16_t yy_def[234] = +static const flex_int16_t yy_def[241] = { 0, - 223, 1, 224, 224, 223, 223, 223, 223, 223, 225, - 223, 223, 223, 226, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 227, 223, 223, 223, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 223, 223, 223, 223, 228, 223, 223, 223, 223, 223, - 225, 223, 225, 223, 223, 223, 223, 223, 229, 223, - 223, 223, 223, 223, 223, 223, 223, 230, 223, 223, - 223, 231, 223, 223, 223, 223, 223, 223, 223, 223, - 227, 223, 223, 227, 227, 227, 227, 227, 227, 227, + 230, 1, 231, 231, 230, 230, 230, 230, 230, 232, + 230, 230, 230, 233, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 234, 230, 230, 230, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 230, 230, 230, 230, 235, 230, 230, 230, 230, + 230, 232, 230, 232, 230, 230, 230, 230, 230, 236, + 230, 230, 230, 230, 230, 230, 230, 230, 237, 230, + 230, 230, 238, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 234, 230, 230, 234, 234, 234, 234, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 223, 223, - 228, 223, 223, 223, 223, 223, 223, 223, 232, 233, - 223, 230, 223, 223, 223, 223, 231, 223, 223, 223, - 223, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 223, 223, 223, 223, 232, 233, 223, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 223, 223, - 223, 223, 223, 227, 227, 227, 227, 227, 227, 227, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 230, 230, 235, 230, 230, 230, 230, 230, 230, + 230, 239, 240, 230, 237, 230, 230, 230, 230, 238, + 230, 230, 230, 230, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 230, 230, 230, 230, 239, + 240, 230, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 230, 230, 230, 230, 230, 234, 234, 234, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 0, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223 + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 0, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230 } ; -static const flex_int16_t yy_nxt[433] = +static const flex_int16_t yy_nxt[896] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, - 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, - 31, 31, 31, 32, 6, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 31, 42, 31, 31, 43, 44, - 31, 45, 46, 47, 48, 49, 50, 31, 31, 31, - 51, 52, 53, 54, 56, 56, 59, 59, 59, 59, - 62, 66, 77, 57, 57, 85, 86, 78, 58, 58, - 70, 71, 71, 71, 119, 79, 98, 72, 67, 73, - 74, 74, 74, 87, 88, 99, 75, 89, 90, 80, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, + 32, 32, 32, 32, 33, 6, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 32, 43, 32, 32, 44, + 45, 32, 46, 47, 48, 49, 50, 51, 32, 32, + 32, 52, 53, 54, 55, 57, 57, 60, 60, 60, + 60, 63, 67, 78, 58, 58, 86, 87, 79, 59, + 59, 71, 72, 72, 72, 171, 80, 63, 73, 68, + 74, 75, 75, 75, 88, 89, 81, 76, 82, 82, - 63, 81, 81, 81, 74, 80, 92, 74, 74, 74, - 74, 96, 122, 100, 101, 102, 82, 123, 93, 106, - 113, 120, 83, 103, 97, 107, 108, 59, 59, 114, - 62, 115, 127, 127, 127, 80, 168, 71, 71, 71, - 71, 82, 80, 137, 71, 71, 71, 71, 138, 138, - 122, 222, 130, 128, 80, 123, 74, 74, 74, 74, - 63, 80, 221, 74, 74, 74, 74, 134, 134, 134, - 134, 130, 129, 164, 138, 138, 80, 130, 81, 81, - 81, 74, 165, 165, 165, 163, 134, 134, 134, 134, - 172, 173, 220, 219, 166, 166, 130, 133, 136, 133, + 82, 75, 64, 81, 95, 75, 75, 75, 75, 90, + 91, 92, 92, 93, 83, 60, 60, 96, 64, 140, + 84, 92, 92, 93, 92, 92, 93, 92, 92, 93, + 92, 92, 93, 125, 92, 92, 93, 122, 126, 83, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 92, + 92, 93, 92, 92, 93, 92, 92, 93, 92, 92, + 93, 92, 92, 93, 99, 92, 92, 93, 92, 92, + 93, 101, 141, 141, 97, 123, 98, 100, 141, 141, + 102, 103, 104, 105, 92, 92, 93, 125, 109, 113, + 107, 106, 126, 108, 110, 111, 130, 130, 130, 115, - 169, 218, 134, 134, 134, 134, 217, 216, 169, 215, - 133, 136, 133, 135, 136, 134, 134, 134, 134, 174, - 169, 189, 214, 175, 190, 213, 135, 136, 169, 206, - 165, 165, 165, 166, 166, 192, 212, 192, 211, 207, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 55, 55, 55, 55, 55, 55, 61, 61, - 61, 61, 61, 61, 68, 68, 210, 68, 68, 68, - 91, 91, 121, 209, 121, 208, 121, 121, 126, 205, - 126, 126, 126, 126, 132, 204, 132, 132, 132, 132, - 167, 203, 167, 202, 201, 200, 199, 198, 197, 196, + 92, 92, 93, 195, 112, 166, 116, 92, 92, 93, + 114, 172, 121, 166, 144, 117, 143, 118, 131, 92, + 92, 93, 81, 119, 72, 72, 72, 72, 92, 92, + 93, 172, 172, 120, 92, 92, 93, 132, 142, 81, + 133, 72, 72, 72, 72, 81, 134, 75, 75, 75, + 75, 81, 172, 75, 75, 75, 75, 81, 128, 82, + 82, 82, 75, 133, 230, 133, 92, 92, 93, 145, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 92, + 92, 93, 92, 92, 93, 127, 85, 146, 133, 136, + 77, 136, 70, 66, 137, 137, 137, 137, 92, 92, - 195, 194, 191, 188, 187, 186, 185, 184, 183, 182, - 181, 180, 179, 178, 177, 176, 171, 170, 163, 163, - 162, 161, 160, 159, 158, 157, 156, 155, 153, 154, - 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, - 143, 142, 141, 140, 139, 131, 125, 223, 124, 118, - 117, 116, 112, 111, 110, 109, 105, 104, 95, 94, - 84, 76, 69, 65, 64, 60, 223, 5, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, + 93, 92, 92, 93, 166, 65, 138, 139, 92, 92, + 93, 61, 148, 169, 169, 147, 230, 150, 194, 138, + 139, 92, 92, 93, 92, 92, 93, 169, 169, 149, + 92, 92, 93, 92, 92, 93, 230, 151, 230, 92, + 92, 93, 92, 92, 93, 92, 92, 93, 92, 92, + 93, 230, 152, 153, 92, 92, 93, 92, 92, 93, + 167, 230, 154, 92, 92, 93, 92, 92, 93, 168, + 168, 168, 156, 230, 230, 155, 92, 92, 93, 230, + 158, 137, 137, 137, 137, 230, 230, 157, 156, 230, + 137, 137, 137, 137, 92, 92, 93, 230, 230, 159, + + 230, 230, 162, 139, 230, 230, 161, 160, 92, 92, + 93, 164, 230, 230, 163, 230, 139, 136, 230, 136, + 230, 165, 137, 137, 137, 137, 92, 92, 93, 230, + 230, 173, 92, 92, 93, 92, 92, 93, 230, 230, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 174, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 92, + 92, 93, 92, 92, 93, 92, 92, 93, 230, 177, + 92, 92, 93, 178, 230, 230, 180, 179, 230, 175, + 176, 181, 92, 92, 93, 230, 230, 183, 92, 92, + 93, 182, 92, 92, 93, 92, 92, 93, 92, 92, + + 93, 193, 230, 184, 230, 230, 185, 92, 92, 93, + 168, 168, 168, 196, 230, 196, 230, 230, 197, 197, + 197, 197, 230, 187, 230, 186, 92, 92, 93, 92, + 92, 93, 92, 92, 93, 230, 190, 92, 92, 93, + 92, 92, 93, 188, 230, 230, 189, 230, 191, 92, + 92, 93, 230, 230, 192, 92, 92, 93, 92, 92, + 93, 230, 92, 92, 93, 92, 92, 93, 92, 92, + 93, 230, 198, 92, 92, 93, 92, 92, 93, 92, + 92, 93, 200, 92, 92, 93, 199, 92, 92, 93, + 92, 92, 93, 230, 230, 201, 92, 92, 93, 230, + + 230, 202, 204, 230, 203, 92, 92, 93, 92, 92, + 93, 197, 197, 197, 197, 197, 197, 197, 197, 230, + 205, 92, 92, 93, 230, 230, 209, 230, 206, 210, + 230, 207, 230, 208, 230, 230, 211, 92, 92, 93, + 92, 92, 93, 92, 92, 93, 212, 230, 230, 214, + 92, 92, 93, 230, 213, 92, 92, 93, 92, 92, + 93, 92, 92, 93, 92, 92, 93, 92, 92, 93, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 230, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 215, + 216, 92, 92, 93, 230, 230, 217, 92, 92, 93, + + 92, 92, 93, 92, 92, 93, 92, 92, 93, 230, + 218, 230, 221, 92, 92, 93, 220, 230, 219, 230, + 223, 224, 92, 92, 93, 225, 230, 222, 92, 92, + 93, 92, 92, 93, 92, 92, 93, 92, 92, 93, + 92, 92, 93, 92, 92, 93, 92, 92, 93, 92, + 92, 93, 226, 230, 227, 92, 92, 93, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 228, + 230, 230, 230, 230, 229, 56, 56, 56, 56, 56, + 56, 62, 62, 62, 62, 62, 62, 69, 69, 69, + + 230, 69, 69, 94, 94, 230, 230, 94, 124, 124, + 230, 124, 230, 124, 129, 129, 230, 129, 129, 129, + 135, 135, 230, 135, 135, 135, 170, 230, 170, 5, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223 } ; -static const flex_int16_t yy_chk[433] = +static const flex_int16_t yy_chk[896] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -540,48 +591,99 @@ static const flex_int16_t yy_chk[433] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 4, 7, 7, 8, 8, - 10, 13, 22, 3, 4, 27, 27, 22, 3, 4, - 18, 18, 18, 18, 52, 22, 38, 18, 13, 20, - 20, 20, 20, 28, 28, 38, 20, 29, 29, 23, + 1, 1, 1, 1, 1, 3, 4, 7, 7, 8, + 8, 10, 13, 22, 3, 4, 27, 27, 22, 3, + 4, 18, 18, 18, 18, 240, 22, 62, 18, 13, + 20, 20, 20, 20, 28, 28, 23, 20, 23, 23, + + 23, 23, 10, 24, 35, 24, 24, 24, 24, 29, + 29, 32, 32, 32, 23, 60, 60, 35, 62, 238, + 23, 36, 36, 36, 37, 37, 37, 38, 38, 38, + 39, 39, 39, 58, 40, 40, 40, 53, 58, 23, + 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, + 44, 44, 45, 45, 45, 46, 46, 46, 47, 47, + 47, 48, 48, 48, 38, 49, 49, 49, 51, 51, + 51, 39, 84, 84, 36, 53, 37, 38, 141, 141, + 39, 40, 40, 40, 50, 50, 50, 125, 43, 45, + 41, 40, 125, 42, 43, 43, 70, 70, 70, 47, + + 92, 92, 92, 170, 44, 132, 48, 94, 94, 94, + 46, 140, 51, 129, 96, 48, 91, 48, 70, 97, + 97, 97, 71, 49, 71, 71, 71, 71, 98, 98, + 98, 140, 171, 50, 99, 99, 99, 70, 86, 72, + 71, 72, 72, 72, 72, 74, 77, 74, 74, 74, + 74, 75, 171, 75, 75, 75, 75, 82, 69, 82, + 82, 82, 82, 74, 64, 71, 100, 100, 100, 98, + 101, 101, 101, 102, 102, 102, 103, 103, 103, 104, + 104, 104, 105, 105, 105, 59, 25, 99, 74, 81, + 21, 81, 14, 12, 81, 81, 81, 81, 106, 106, + + 106, 107, 107, 107, 131, 11, 81, 81, 108, 108, + 108, 9, 101, 131, 131, 100, 5, 104, 169, 81, + 81, 109, 109, 109, 110, 110, 110, 169, 169, 103, + 111, 111, 111, 112, 112, 112, 0, 105, 0, 113, + 113, 113, 114, 114, 114, 115, 115, 115, 116, 116, + 116, 0, 106, 107, 117, 117, 117, 118, 118, 118, + 130, 0, 108, 119, 119, 119, 120, 120, 120, 130, + 130, 130, 111, 0, 0, 110, 121, 121, 121, 0, + 114, 136, 136, 136, 136, 0, 0, 112, 113, 0, + 137, 137, 137, 137, 145, 145, 145, 0, 0, 115, + + 0, 0, 118, 137, 0, 0, 117, 116, 146, 146, + 146, 120, 0, 0, 119, 0, 137, 138, 0, 138, + 0, 121, 138, 138, 138, 138, 147, 147, 147, 0, + 0, 145, 148, 148, 148, 149, 149, 149, 0, 0, + 150, 150, 150, 151, 151, 151, 152, 152, 152, 146, + 153, 153, 153, 154, 154, 154, 155, 155, 155, 156, + 156, 156, 157, 157, 157, 158, 158, 158, 0, 148, + 159, 159, 159, 148, 0, 0, 149, 148, 0, 147, + 147, 150, 160, 160, 160, 0, 0, 152, 161, 161, + 161, 151, 162, 162, 162, 163, 163, 163, 164, 164, - 10, 23, 23, 23, 23, 24, 34, 24, 24, 24, - 24, 37, 57, 39, 39, 39, 23, 57, 34, 42, - 47, 52, 23, 39, 37, 42, 42, 59, 59, 47, - 61, 47, 69, 69, 69, 70, 233, 70, 70, 70, - 70, 23, 71, 231, 71, 71, 71, 71, 83, 83, - 122, 220, 70, 69, 73, 122, 73, 73, 73, 73, - 61, 74, 218, 74, 74, 74, 74, 133, 133, 133, - 133, 73, 69, 127, 138, 138, 81, 70, 81, 81, - 81, 81, 127, 127, 127, 128, 134, 134, 134, 134, - 144, 144, 210, 207, 128, 128, 73, 80, 134, 80, + 164, 168, 0, 154, 0, 0, 155, 165, 165, 165, + 168, 168, 168, 172, 0, 172, 0, 0, 172, 172, + 172, 172, 0, 160, 0, 159, 173, 173, 173, 174, + 174, 174, 175, 175, 175, 0, 163, 176, 176, 176, + 177, 177, 177, 161, 0, 0, 162, 0, 164, 178, + 178, 178, 0, 0, 165, 179, 179, 179, 180, 180, + 180, 0, 181, 181, 181, 182, 182, 182, 183, 183, + 183, 0, 173, 184, 184, 184, 185, 185, 185, 186, + 186, 186, 176, 187, 187, 187, 175, 188, 188, 188, + 189, 189, 189, 0, 0, 177, 190, 190, 190, 0, - 137, 206, 80, 80, 80, 80, 205, 204, 168, 203, - 135, 134, 135, 80, 80, 135, 135, 135, 135, 145, - 137, 165, 202, 145, 166, 201, 80, 80, 168, 186, - 165, 165, 165, 166, 166, 169, 200, 169, 198, 186, - 169, 169, 169, 169, 192, 192, 192, 192, 193, 193, - 193, 193, 224, 224, 224, 224, 224, 224, 225, 225, - 225, 225, 225, 225, 226, 226, 196, 226, 226, 226, - 227, 227, 228, 188, 228, 187, 228, 228, 229, 185, - 229, 229, 229, 229, 230, 184, 230, 230, 230, 230, - 232, 183, 232, 182, 181, 179, 177, 175, 174, 173, + 0, 178, 181, 0, 179, 191, 191, 191, 192, 192, + 192, 196, 196, 196, 196, 197, 197, 197, 197, 0, + 183, 198, 198, 198, 0, 0, 188, 0, 185, 189, + 0, 186, 0, 187, 0, 0, 190, 199, 199, 199, + 200, 200, 200, 201, 201, 201, 190, 0, 0, 192, + 202, 202, 202, 0, 191, 203, 203, 203, 204, 204, + 204, 205, 205, 205, 206, 206, 206, 207, 207, 207, + 208, 208, 208, 209, 209, 209, 210, 210, 210, 0, + 211, 211, 211, 212, 212, 212, 213, 213, 213, 200, + 201, 214, 214, 214, 0, 0, 203, 215, 215, 215, - 172, 170, 167, 162, 161, 160, 159, 158, 157, 156, - 152, 151, 149, 148, 147, 146, 143, 142, 129, 126, - 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, - 108, 107, 105, 104, 103, 102, 101, 100, 98, 97, - 96, 95, 93, 90, 85, 76, 68, 63, 58, 50, - 49, 48, 46, 45, 44, 43, 41, 40, 36, 35, - 25, 21, 14, 12, 11, 9, 5, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, + 216, 216, 216, 217, 217, 217, 218, 218, 218, 0, + 205, 0, 208, 219, 219, 219, 207, 0, 206, 0, + 210, 211, 220, 220, 220, 212, 0, 209, 221, 221, + 221, 222, 222, 222, 223, 223, 223, 224, 224, 224, + 225, 225, 225, 226, 226, 226, 227, 227, 227, 228, + 228, 228, 215, 0, 216, 229, 229, 229, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, + 0, 0, 0, 0, 226, 231, 231, 231, 231, 231, + 231, 232, 232, 232, 232, 232, 232, 233, 233, 233, + + 0, 233, 233, 234, 234, 0, 0, 234, 235, 235, + 0, 235, 0, 235, 236, 236, 0, 236, 236, 236, + 237, 237, 0, 237, 237, 237, 239, 0, 239, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223 } ; /* The intent behind this definition is that it'll catch @@ -619,9 +721,9 @@ static void update_yylloc(struct parser *parser, YYLTYPE *lloc, const char *text } #define YY_USER_ACTION update_yylloc(parser, yylloc, yytext); -#line 623 "gen/gen_lexer.c" +#line 725 "gen/gen_lexer.c" -#line 625 "gen/gen_lexer.c" +#line 727 "gen/gen_lexer.c" #define INITIAL 0 #define SC_COMMENT 1 @@ -880,9 +982,9 @@ YY_DECL } { -#line 48 "src/lexer.l" +#line 49 "src/lexer.l" -#line 886 "gen/gen_lexer.c" +#line 988 "gen/gen_lexer.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -909,13 +1011,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) + if ( yy_current_state >= 231 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 368 ); + while ( yy_base[yy_current_state] != 830 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -941,23 +1043,23 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 49 "src/lexer.l" +#line 50 "src/lexer.l" {/* skip line comments */} YY_BREAK case 2: YY_RULE_SETUP -#line 51 "src/lexer.l" +#line 52 "src/lexer.l" {BEGIN(SC_COMMENT);} YY_BREAK case 3: YY_RULE_SETUP -#line 53 "src/lexer.l" +#line 54 "src/lexer.l" {++parser->comment_nesting;} YY_BREAK case 4: YY_RULE_SETUP -#line 54 "src/lexer.l" +#line 55 "src/lexer.l" { if (parser->comment_nesting) --parser->comment_nesting; @@ -967,135 +1069,135 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 61 "src/lexer.l" +#line 62 "src/lexer.l" {} YY_BREAK case 6: YY_RULE_SETUP -#line 62 "src/lexer.l" +#line 63 "src/lexer.l" {} YY_BREAK case 7: YY_RULE_SETUP -#line 63 "src/lexer.l" +#line 64 "src/lexer.l" {} YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 64 "src/lexer.l" +#line 65 "src/lexer.l" {} YY_BREAK case 9: YY_RULE_SETUP -#line 67 "src/lexer.l" +#line 68 "src/lexer.l" {return SCOPE;} YY_BREAK case 10: YY_RULE_SETUP -#line 68 "src/lexer.l" +#line 69 "src/lexer.l" {return LPAREN;} YY_BREAK case 11: YY_RULE_SETUP -#line 69 "src/lexer.l" +#line 70 "src/lexer.l" {return RPAREN;} YY_BREAK case 12: YY_RULE_SETUP -#line 70 "src/lexer.l" +#line 71 "src/lexer.l" {return LBRACE;} YY_BREAK case 13: YY_RULE_SETUP -#line 71 "src/lexer.l" +#line 72 "src/lexer.l" {return RBRACE;} YY_BREAK case 14: YY_RULE_SETUP -#line 72 "src/lexer.l" +#line 73 "src/lexer.l" {return LBRACKET;} YY_BREAK case 15: YY_RULE_SETUP -#line 73 "src/lexer.l" +#line 74 "src/lexer.l" {return RBRACKET;} YY_BREAK case 16: YY_RULE_SETUP -#line 74 "src/lexer.l" +#line 75 "src/lexer.l" {return DOT;} YY_BREAK case 17: YY_RULE_SETUP -#line 75 "src/lexer.l" +#line 76 "src/lexer.l" {return COMMA;} YY_BREAK case 18: YY_RULE_SETUP -#line 76 "src/lexer.l" +#line 77 "src/lexer.l" {return SEMICOLON;} YY_BREAK case 19: YY_RULE_SETUP -#line 77 "src/lexer.l" +#line 78 "src/lexer.l" {return COLON;} YY_BREAK case 20: YY_RULE_SETUP -#line 78 "src/lexer.l" +#line 79 "src/lexer.l" {return BANG;} YY_BREAK case 21: YY_RULE_SETUP -#line 79 "src/lexer.l" +#line 80 "src/lexer.l" {return PASTE;} YY_BREAK case 22: YY_RULE_SETUP -#line 80 "src/lexer.l" +#line 81 "src/lexer.l" {return AT;} YY_BREAK case 23: YY_RULE_SETUP -#line 82 "src/lexer.l" +#line 83 "src/lexer.l" {return PLUS;} YY_BREAK case 24: YY_RULE_SETUP -#line 83 "src/lexer.l" +#line 84 "src/lexer.l" {return MINUS;} YY_BREAK case 25: YY_RULE_SETUP -#line 84 "src/lexer.l" +#line 85 "src/lexer.l" {return STAR;} YY_BREAK case 26: YY_RULE_SETUP -#line 85 "src/lexer.l" +#line 86 "src/lexer.l" {return DIV;} YY_BREAK case 27: YY_RULE_SETUP -#line 86 "src/lexer.l" +#line 87 "src/lexer.l" {return REM;} YY_BREAK case 28: YY_RULE_SETUP -#line 87 "src/lexer.l" +#line 88 "src/lexer.l" {return XOR;} YY_BREAK case 29: YY_RULE_SETUP -#line 88 "src/lexer.l" +#line 89 "src/lexer.l" {return POW;} YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP -#line 90 "src/lexer.l" +#line 91 "src/lexer.l" { /* regular character constant, 'a' */ yylval->integer = yytext[1]; @@ -1104,7 +1206,7 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -#line 96 "src/lexer.l" +#line 97 "src/lexer.l" { /* hex character constant, '\xef' */ /* handling is slightly different from C, here it's more or less just @@ -1115,7 +1217,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 104 "src/lexer.l" +#line 105 "src/lexer.l" { /* octal character constant, '\033' */ yylval->integer = strtoll(yytext + 2, NULL, 8); @@ -1124,7 +1226,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 110 "src/lexer.l" +#line 111 "src/lexer.l" { /* binary character constant, '\b101' */ yylval->integer = strtoll(yytext + 3, NULL, 2); @@ -1133,7 +1235,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 116 "src/lexer.l" +#line 117 "src/lexer.l" { /* escaped character constant */ yylval->integer = match_escape(yytext[2]); @@ -1142,273 +1244,283 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 122 "src/lexer.l" -{return SQUOTE;} +#line 123 "src/lexer.l" +{return QUESTION;} YY_BREAK case 36: YY_RULE_SETUP #line 124 "src/lexer.l" -{return AND;} +{return SQUOTE;} YY_BREAK case 37: YY_RULE_SETUP -#line 125 "src/lexer.l" -{return LAND;} +#line 126 "src/lexer.l" +{return AND;} YY_BREAK case 38: YY_RULE_SETUP -#line 126 "src/lexer.l" -{return OR;} +#line 127 "src/lexer.l" +{return LAND;} YY_BREAK case 39: YY_RULE_SETUP -#line 127 "src/lexer.l" -{return LOR;} +#line 128 "src/lexer.l" +{return OR;} YY_BREAK case 40: YY_RULE_SETUP #line 129 "src/lexer.l" -{return TILDE;} +{return LOR;} YY_BREAK case 41: YY_RULE_SETUP -#line 130 "src/lexer.l" -{return TO;} +#line 131 "src/lexer.l" +{return TILDE;} YY_BREAK case 42: YY_RULE_SETUP -#line 131 "src/lexer.l" -{return LT;} +#line 132 "src/lexer.l" +{return TO;} YY_BREAK case 43: YY_RULE_SETUP -#line 132 "src/lexer.l" -{return GT;} +#line 133 "src/lexer.l" +{return LT;} YY_BREAK case 44: YY_RULE_SETUP -#line 133 "src/lexer.l" -{return LE;} +#line 134 "src/lexer.l" +{return GT;} YY_BREAK case 45: YY_RULE_SETUP -#line 134 "src/lexer.l" -{return GE;} +#line 135 "src/lexer.l" +{return LE;} YY_BREAK case 46: YY_RULE_SETUP -#line 135 "src/lexer.l" -{return NE;} +#line 136 "src/lexer.l" +{return GE;} YY_BREAK case 47: YY_RULE_SETUP -#line 136 "src/lexer.l" -{return EQ;} +#line 137 "src/lexer.l" +{return NE;} YY_BREAK case 48: YY_RULE_SETUP #line 138 "src/lexer.l" -{return FATARROW;} +{return EQ;} YY_BREAK case 49: YY_RULE_SETUP #line 140 "src/lexer.l" -{return LSHIFT;} +{return FATARROW;} YY_BREAK case 50: YY_RULE_SETUP -#line 141 "src/lexer.l" -{return RSHIFT;} +#line 142 "src/lexer.l" +{return LSHIFT;} YY_BREAK case 51: YY_RULE_SETUP #line 143 "src/lexer.l" -{return PLUSSELF;} +{return RSHIFT;} YY_BREAK case 52: YY_RULE_SETUP -#line 144 "src/lexer.l" -{return MINUSSELF;} +#line 145 "src/lexer.l" +{return PLUSSELF;} YY_BREAK case 53: YY_RULE_SETUP -#line 145 "src/lexer.l" -{return DIVSELF;} +#line 146 "src/lexer.l" +{return MINUSSELF;} YY_BREAK case 54: YY_RULE_SETUP -#line 146 "src/lexer.l" -{return REMSELF;} +#line 147 "src/lexer.l" +{return DIVSELF;} YY_BREAK case 55: YY_RULE_SETUP -#line 147 "src/lexer.l" -{return XORSELF;} +#line 148 "src/lexer.l" +{return REMSELF;} YY_BREAK case 56: YY_RULE_SETUP -#line 148 "src/lexer.l" -{return POWSELF;} +#line 149 "src/lexer.l" +{return XORSELF;} YY_BREAK case 57: YY_RULE_SETUP -#line 149 "src/lexer.l" -{return ORSELF;} +#line 150 "src/lexer.l" +{return POWSELF;} YY_BREAK case 58: YY_RULE_SETUP -#line 150 "src/lexer.l" +#line 151 "src/lexer.l" {return ORSELF;} YY_BREAK case 59: YY_RULE_SETUP -#line 151 "src/lexer.l" -{return LSHIFTSELF;} +#line 152 "src/lexer.l" +{return ORSELF;} YY_BREAK case 60: YY_RULE_SETUP -#line 152 "src/lexer.l" -{return RSHIFTSELF;} +#line 153 "src/lexer.l" +{return LSHIFTSELF;} YY_BREAK case 61: YY_RULE_SETUP -#line 153 "src/lexer.l" -{return ELLIPSIS;} +#line 154 "src/lexer.l" +{return RSHIFTSELF;} YY_BREAK case 62: YY_RULE_SETUP #line 155 "src/lexer.l" -{return AS;} +{return ELLIPSIS;} YY_BREAK case 63: YY_RULE_SETUP -#line 156 "src/lexer.l" -{return PUB;} +#line 157 "src/lexer.l" +{return AS;} YY_BREAK case 64: YY_RULE_SETUP -#line 157 "src/lexer.l" -{return DEFER;} +#line 158 "src/lexer.l" +{return PUB;} YY_BREAK case 65: YY_RULE_SETUP -#line 158 "src/lexer.l" -{return UNION;} +#line 159 "src/lexer.l" +{return DEFER;} YY_BREAK case 66: YY_RULE_SETUP -#line 159 "src/lexer.l" -{return STRUCT;} +#line 160 "src/lexer.l" +{return UNION;} YY_BREAK case 67: YY_RULE_SETUP -#line 160 "src/lexer.l" -{return TYPEDEF;} +#line 161 "src/lexer.l" +{return STRUCT;} YY_BREAK case 68: YY_RULE_SETUP -#line 161 "src/lexer.l" -{return IMPORT;} +#line 162 "src/lexer.l" +{return TYPEDEF;} YY_BREAK case 69: YY_RULE_SETUP -#line 162 "src/lexer.l" -{return TYPEOF;} +#line 163 "src/lexer.l" +{return IMPORT;} YY_BREAK case 70: YY_RULE_SETUP -#line 163 "src/lexer.l" -{return SIZEOF;} +#line 164 "src/lexer.l" +{return TYPEOF;} YY_BREAK case 71: YY_RULE_SETUP -#line 164 "src/lexer.l" -{return EMBED;} +#line 165 "src/lexer.l" +{return SIZEOF;} YY_BREAK case 72: YY_RULE_SETUP -#line 165 "src/lexer.l" -{return IF;} +#line 166 "src/lexer.l" +{return EMBED;} YY_BREAK case 73: YY_RULE_SETUP -#line 166 "src/lexer.l" -{return GOTO;} +#line 167 "src/lexer.l" +{return IF;} YY_BREAK case 74: YY_RULE_SETUP -#line 167 "src/lexer.l" -{return ELSE;} +#line 168 "src/lexer.l" +{return GOTO;} YY_BREAK case 75: YY_RULE_SETUP -#line 168 "src/lexer.l" -{return SWITCH;} +#line 169 "src/lexer.l" +{return ELSE;} YY_BREAK case 76: YY_RULE_SETUP -#line 169 "src/lexer.l" -{return CASE;} +#line 170 "src/lexer.l" +{return SWITCH;} YY_BREAK case 77: YY_RULE_SETUP -#line 170 "src/lexer.l" -{return FOR;} +#line 171 "src/lexer.l" +{return CASE;} YY_BREAK case 78: YY_RULE_SETUP -#line 171 "src/lexer.l" -{return WHILE;} +#line 172 "src/lexer.l" +{return FOR;} YY_BREAK case 79: YY_RULE_SETUP -#line 172 "src/lexer.l" -{return DO;} +#line 173 "src/lexer.l" +{return WHILE;} YY_BREAK case 80: YY_RULE_SETUP -#line 173 "src/lexer.l" -{return MUT;} +#line 174 "src/lexer.l" +{return DO;} YY_BREAK case 81: YY_RULE_SETUP -#line 174 "src/lexer.l" -{return CONST;} +#line 175 "src/lexer.l" +{return MUT;} YY_BREAK case 82: YY_RULE_SETUP -#line 175 "src/lexer.l" -{return RETURN;} +#line 176 "src/lexer.l" +{return CONST;} YY_BREAK case 83: YY_RULE_SETUP -#line 176 "src/lexer.l" -{return EXTERN;} +#line 177 "src/lexer.l" +{return RETURN;} YY_BREAK case 84: YY_RULE_SETUP -#line 177 "src/lexer.l" -{return ENUM;} +#line 178 "src/lexer.l" +{return EXTERN;} YY_BREAK case 85: YY_RULE_SETUP -#line 178 "src/lexer.l" -{return DEFINE;} +#line 179 "src/lexer.l" +{return ENUM;} YY_BREAK case 86: YY_RULE_SETUP -#line 179 "src/lexer.l" -{return BREAK;} +#line 180 "src/lexer.l" +{return DEFINE;} YY_BREAK case 87: YY_RULE_SETUP -#line 180 "src/lexer.l" -{return CONTINUE;} +#line 181 "src/lexer.l" +{return BREAK;} YY_BREAK case 88: -/* rule 88 can match eol */ YY_RULE_SETUP #line 182 "src/lexer.l" +{return CONTINUE;} + YY_BREAK +case 89: +YY_RULE_SETUP +#line 183 "src/lexer.l" +{return DEFAULT;} + YY_BREAK +case 90: +/* rule 90 can match eol */ +YY_RULE_SETUP +#line 185 "src/lexer.l" { /* seems risky, I know, but letting the parser choose when to allocate a * new string seems to help with syntax error cleanup */ @@ -1416,39 +1528,52 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 89: +case 91: YY_RULE_SETUP -#line 189 "src/lexer.l" +#line 192 "src/lexer.l" { yylval->integer = strtoll(yytext, 0, 0); return INT; } YY_BREAK -case 90: +case 92: YY_RULE_SETUP -#line 194 "src/lexer.l" +#line 197 "src/lexer.l" { yylval->dbl = strtod(yytext, 0); return FLOAT; } YY_BREAK -case 91: +case 93: YY_RULE_SETUP -#line 199 "src/lexer.l" +#line 202 "src/lexer.l" { yylval->str = yytext; return ID; } YY_BREAK -case 92: -/* rule 92 can match eol */ +case 94: +/* rule 94 can match eol */ +YY_RULE_SETUP +#line 207 "src/lexer.l" +{ + /* strip trailing '!' */ + char *s = yytext + strlen(yytext); + s[-1] = '\0'; + + yylval->str = yytext; + return APPLY; +} + YY_BREAK +case 95: +/* rule 95 can match eol */ YY_RULE_SETUP -#line 205 "src/lexer.l" +#line 217 "src/lexer.l" {/* skip whitespace */} YY_BREAK -case 93: +case 96: YY_RULE_SETUP -#line 207 "src/lexer.l" +#line 219 "src/lexer.l" { struct src_issue issue; issue.level = SRC_ERROR; @@ -1459,12 +1584,12 @@ YY_RULE_SETUP parser->failed = true; } YY_BREAK -case 94: +case 97: YY_RULE_SETUP -#line 216 "src/lexer.l" +#line 228 "src/lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1468 "gen/gen_lexer.c" +#line 1593 "gen/gen_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SC_COMMENT): yyterminate(); @@ -1764,7 +1889,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) + if ( yy_current_state >= 231 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1793,11 +1918,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) + if ( yy_current_state >= 231 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 223); + yy_is_jam = (yy_current_state == 230); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2596,6 +2721,6 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 216 "src/lexer.l" +#line 228 "src/lexer.l" |
