X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.c;h=47b89cb615d3f3e40150eeb67afbba281a68330e;hp=dc3d45e34fca32ed31cf4b7c70b25274a4af1401;hb=2559f07a178b681dc240e20153ff5abdff54cb34;hpb=601e13c0743234c53a62e68fc89f122069123c15 diff --git a/src/parser.c b/src/parser.c index dc3d45e..47b89cb 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.2 on Mon Oct 16 11:27:20 2017 */ +/* Generated by re2c 1.1.1 on Fri Nov 2 07:35:40 2018 */ #line 1 "src/parser.re" /******************************************************************************* Copyright (c) 2016, Michael Wallner . @@ -28,8 +28,11 @@ #include "php_psi_stdinc.h" #include #include +#include #include +#include + #include "parser.h" #define YYMAXFILL 15 @@ -69,7 +72,7 @@ struct psi_parser_input *psi_parser_open_file(struct psi_parser *P, const char * return NULL; } - if (!(fb = malloc(sizeof(*fb) + strlen(filename) + 1 + sb.st_size + YYMAXFILL))) { + if (!(fb = malloc(sizeof(*fb) + sb.st_size + YYMAXFILL))) { if (report_errors) { P->error(PSI_DATA(P), NULL, PSI_WARNING, "Could not allocate %zu bytes for reading '%s': %s", @@ -99,10 +102,8 @@ struct psi_parser_input *psi_parser_open_file(struct psi_parser *P, const char * return NULL; } - memset(fb->buffer + sb.st_size, 0, YYMAXFILL); fb->length = sb.st_size; - fb->file = &fb->buffer[sb.st_size + YYMAXFILL]; - memcpy(fb->file, filename, strlen(filename) + 1); + fb->file = zend_string_init_interned(filename, strlen(filename), 1); return fb; } @@ -111,7 +112,7 @@ struct psi_parser_input *psi_parser_open_string(struct psi_parser *P, const char { struct psi_parser_input *sb; - if (!(sb = malloc(sizeof(*sb) + sizeof("") + length + YYMAXFILL))) { + if (!(sb = malloc(sizeof(*sb) + length + YYMAXFILL))) { P->error(PSI_DATA(P), NULL, PSI_WARNING, "Could not allocate %zu bytes: %s", length + YYMAXFILL, strerror(errno)); @@ -122,68 +123,11 @@ struct psi_parser_input *psi_parser_open_string(struct psi_parser *P, const char memset(sb->buffer + length, 0, YYMAXFILL); sb->length = length; - sb->file = &sb->buffer[length + YYMAXFILL]; - memcpy(sb->file, "", sizeof("")); + sb->file = zend_string_init_interned("", strlen(""), 1); return sb; } -#if 0 -static void psi_parser_register_constants(struct psi_parser *P) -{ - zend_string *key; - zval *val; - - ZEND_HASH_FOREACH_STR_KEY_VAL(&P->cpp.defs, key, val) - { - struct psi_impl_def_val *iv; - struct psi_const_type *ct; - struct psi_const *c; - const char *ctn; - token_t ctt; - impl_val tmp; - zend_string *str; - - ZVAL_DEREF(val); - switch (Z_TYPE_P(val)) { - case IS_TRUE: - case IS_FALSE: - ctt = PSI_T_BOOL; - ctn = "bool"; - tmp.zend.bval = Z_TYPE_P(val) == IS_TRUE; - break; - case IS_LONG: - ctt = PSI_T_INT; - ctn = "int"; - tmp.zend.lval = Z_LVAL_P(val); - break; - case IS_DOUBLE: - ctt = PSI_T_FLOAT; - ctn = "float"; - tmp.dval = Z_DVAL_P(val); - break; - default: - ctt = PSI_T_STRING; - ctn = "string"; - str = zval_get_string(val); - tmp.zend.str = zend_string_dup(str, 1); - zend_string_release(str); - break; - } - - iv = psi_impl_def_val_init(ctt, NULL); - iv->ival = tmp; - ct = psi_const_type_init(ctt, ctn); - c = psi_const_init(ct, key->val, iv); - if (!P->consts) { - P->consts = psi_plist_init((psi_plist_dtor) psi_const_free); - } - P->consts = psi_plist_add(P->consts, &c); - } - ZEND_HASH_FOREACH_END(); -} -#endif - struct psi_plist *psi_parser_preprocess(struct psi_parser *P, struct psi_plist **tokens) { if (psi_cpp_process(P->preproc, tokens)) { @@ -200,6 +144,79 @@ bool psi_parser_process(struct psi_parser *P, struct psi_plist *tokens, size_t * return true; } +void psi_parser_postprocess(struct psi_parser *P) +{ + unsigned flags; + zend_string *name; + struct psi_validate_scope scope = {0}; + + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + + flags = P->flags; + P->flags |= PSI_SILENT; + + /* register const macros */ + ZEND_HASH_FOREACH_STR_KEY_PTR(&P->preproc->defs, name, scope.macro) + { + if (scope.macro->sig) { + } else if (scope.macro->exp) { + if (psi_num_exp_validate(PSI_DATA(P), scope.macro->exp, &scope)) { + struct psi_impl_type *type; + struct psi_impl_def_val *def; + struct psi_const *cnst; + struct psi_num_exp *num; + smart_str ns_name = {0}; + zend_string *name_str, *type_str; + + smart_str_appendl_ex(&ns_name, ZEND_STRL("psi\\"), 1); + smart_str_append_ex(&ns_name, name, 1); + name_str = smart_str_extract(&ns_name); + type_str = zend_string_init_interned(ZEND_STRL(""), 1); + + num = psi_num_exp_copy(scope.macro->exp); + def = psi_impl_def_val_init(PSI_T_NUMBER, num); + type = psi_impl_type_init(PSI_T_NUMBER, type_str); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + zend_string_release(name_str); + zend_string_release(type_str); + } + } else { + if (psi_plist_count(scope.macro->tokens) == 1) { + struct psi_token *t; + + if (psi_plist_get(scope.macro->tokens, 0, &t)) { + if (t->type == PSI_T_QUOTED_STRING) { + struct psi_impl_type *type; + struct psi_impl_def_val *def; + struct psi_const *cnst; + smart_str ns_name = {0}; + zend_string *name_str, *type_str; + + smart_str_appendl_ex(&ns_name, ZEND_STRL("psi\\"), 1); + smart_str_append_ex(&ns_name, name, 1); + name_str = smart_str_extract(&ns_name); + type_str = zend_string_init_interned(ZEND_STRL("string"), 1); + + type = psi_impl_type_init(PSI_T_STRING, type_str); + def = psi_impl_def_val_init(PSI_T_QUOTED_STRING, t->text); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + zend_string_release(name_str); + zend_string_release(type_str); + } + } + } + } + } + ZEND_HASH_FOREACH_END(); + + P->flags = flags; + + psi_validate_scope_dtor(&scope); +} + bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) { struct psi_plist *scanned, *preproc; @@ -219,6 +236,8 @@ bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) return false; } + psi_parser_postprocess(P); + psi_plist_free(preproc); return true; } @@ -245,17 +264,17 @@ void psi_parser_free(struct psi_parser **P) ++I->lines #define NEWTOKEN(t) \ - token = psi_token_init(t, tok, cur - tok, tok - eol + 1, I->lines, I->file); \ + if (t == PSI_T_COMMENT || t == PSI_T_WHITESPACE) { \ + token = psi_token_init(t, "", 0, tok - eol + 1, I->lines, I->file); \ + } else { \ + token = psi_token_init(t, tok, cur - tok, tok - eol + 1, I->lines, I->file); \ + } \ tokens = psi_plist_add(tokens, &token); \ if (P->flags & PSI_DEBUG) { \ fprintf(stderr, "PSI< "); \ psi_token_dump(2, token); \ } -union int_suffix { - char s[SIZEOF_UINT32_T]; - uint32_t i; -}; struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input *I) { @@ -266,7 +285,7 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input bool escaped; token_t char_width; - PSI_DEBUG_PRINT(P, "PSI: scanning %s\n", I->file); + PSI_DEBUG_PRINT(P, "PSI: scanning %s\n", I->file->val); tok = mrk = eol = cur = I->buffer; lim = I->buffer + I->length; @@ -281,7 +300,7 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input (void) ctxmrk; -#line 285 "src/parser.c" +#line 304 "src/parser.c" { unsigned char yych; unsigned int yyaccept = 0; @@ -406,9 +425,9 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input yy2: ++cur; yy3: -#line 450 "src/parser.re" +#line 469 "src/parser.re" { NEWTOKEN(-2); goto error; } -#line 412 "src/parser.c" +#line 431 "src/parser.c" yy4: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -420,14 +439,14 @@ yy4: default: goto yy6; } yy6: -#line 449 "src/parser.re" +#line 468 "src/parser.re" { NEWTOKEN(PSI_T_WHITESPACE); goto start; } -#line 426 "src/parser.c" +#line 445 "src/parser.c" yy7: ++cur; -#line 448 "src/parser.re" +#line 467 "src/parser.re" { NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; } -#line 431 "src/parser.c" +#line 450 "src/parser.c" yy9: yych = *++cur; switch (yych) { @@ -435,14 +454,14 @@ yy9: default: goto yy10; } yy10: -#line 351 "src/parser.re" +#line 370 "src/parser.re" { NEWTOKEN(PSI_T_NOT); goto start; } -#line 441 "src/parser.c" +#line 460 "src/parser.c" yy11: ++cur; -#line 324 "src/parser.re" +#line 343 "src/parser.re" { escaped = false; tok += 1; goto string; } -#line 446 "src/parser.c" +#line 465 "src/parser.c" yy13: yych = *++cur; switch (yych) { @@ -450,9 +469,9 @@ yy13: default: goto yy14; } yy14: -#line 334 "src/parser.re" +#line 353 "src/parser.re" { NEWTOKEN(PSI_T_HASH); goto start; } -#line 456 "src/parser.c" +#line 475 "src/parser.c" yy15: yych = *++cur; switch (yych) { @@ -525,9 +544,9 @@ yy15: } yy16: ++cur; -#line 352 "src/parser.re" +#line 371 "src/parser.re" { NEWTOKEN(PSI_T_MODULO); goto start; } -#line 531 "src/parser.c" +#line 550 "src/parser.c" yy18: yych = *++cur; switch (yych) { @@ -535,29 +554,29 @@ yy18: default: goto yy19; } yy19: -#line 353 "src/parser.re" +#line 372 "src/parser.re" { NEWTOKEN(PSI_T_AMPERSAND); goto start; } -#line 541 "src/parser.c" +#line 560 "src/parser.c" yy20: ++cur; -#line 323 "src/parser.re" +#line 342 "src/parser.re" { escaped = false; tok += 1; goto character; } -#line 546 "src/parser.c" +#line 565 "src/parser.c" yy22: ++cur; -#line 335 "src/parser.re" +#line 354 "src/parser.re" { NEWTOKEN(PSI_T_LPAREN); goto start; } -#line 551 "src/parser.c" +#line 570 "src/parser.c" yy24: ++cur; -#line 336 "src/parser.re" +#line 355 "src/parser.re" { NEWTOKEN(PSI_T_RPAREN); goto start; } -#line 556 "src/parser.c" +#line 575 "src/parser.c" yy26: ++cur; -#line 349 "src/parser.re" +#line 368 "src/parser.re" { NEWTOKEN(PSI_T_ASTERISK); goto start; } -#line 561 "src/parser.c" +#line 580 "src/parser.c" yy28: yyaccept = 0; yych = *(mrk = ++cur); @@ -576,14 +595,14 @@ yy28: default: goto yy29; } yy29: -#line 354 "src/parser.re" +#line 373 "src/parser.re" { NEWTOKEN(PSI_T_PLUS); goto start; } -#line 582 "src/parser.c" +#line 601 "src/parser.c" yy30: ++cur; -#line 338 "src/parser.re" +#line 357 "src/parser.re" { NEWTOKEN(PSI_T_COMMA); goto start; } -#line 587 "src/parser.c" +#line 606 "src/parser.c" yy32: yyaccept = 1; yych = *(mrk = ++cur); @@ -602,9 +621,9 @@ yy32: default: goto yy33; } yy33: -#line 355 "src/parser.re" +#line 374 "src/parser.re" { NEWTOKEN(PSI_T_MINUS); goto start; } -#line 608 "src/parser.c" +#line 627 "src/parser.c" yy34: yyaccept = 2; yych = *(mrk = ++cur); @@ -623,9 +642,9 @@ yy34: default: goto yy35; } yy35: -#line 366 "src/parser.re" +#line 385 "src/parser.re" { NEWTOKEN(PSI_T_PERIOD); goto start; } -#line 629 "src/parser.c" +#line 648 "src/parser.c" yy36: yych = *++cur; switch (yych) { @@ -634,9 +653,9 @@ yy36: default: goto yy37; } yy37: -#line 356 "src/parser.re" +#line 375 "src/parser.re" { NEWTOKEN(PSI_T_SLASH); goto start; } -#line 640 "src/parser.c" +#line 659 "src/parser.c" yy38: yyaccept = 3; yych = *(mrk = ++cur); @@ -649,9 +668,9 @@ yy38: default: goto yy126; } yy39: -#line 310 "src/parser.re" +#line 329 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT; goto start; } -#line 655 "src/parser.c" +#line 674 "src/parser.c" yy40: yyaccept = 3; mrk = ++cur; @@ -679,14 +698,14 @@ yy40: } yy42: ++cur; -#line 339 "src/parser.re" +#line 358 "src/parser.re" { NEWTOKEN(PSI_T_COLON); goto start; } -#line 685 "src/parser.c" +#line 704 "src/parser.c" yy44: ++cur; -#line 337 "src/parser.re" +#line 356 "src/parser.re" { NEWTOKEN(PSI_T_EOS); goto start; } -#line 690 "src/parser.c" +#line 709 "src/parser.c" yy46: yyaccept = 4; yych = *(mrk = ++cur); @@ -762,9 +781,9 @@ yy46: default: goto yy47; } yy47: -#line 364 "src/parser.re" +#line 383 "src/parser.re" { NEWTOKEN(PSI_T_LCHEVR); goto start; } -#line 768 "src/parser.c" +#line 787 "src/parser.c" yy48: yych = *++cur; switch (yych) { @@ -772,9 +791,9 @@ yy48: default: goto yy49; } yy49: -#line 348 "src/parser.re" +#line 367 "src/parser.re" { NEWTOKEN(PSI_T_EQUALS); goto start; } -#line 778 "src/parser.c" +#line 797 "src/parser.c" yy50: yych = *++cur; switch (yych) { @@ -783,14 +802,14 @@ yy50: default: goto yy51; } yy51: -#line 365 "src/parser.re" +#line 384 "src/parser.re" { NEWTOKEN(PSI_T_RCHEVR); goto start; } -#line 789 "src/parser.c" +#line 808 "src/parser.c" yy52: ++cur; -#line 368 "src/parser.re" +#line 387 "src/parser.re" { NEWTOKEN(PSI_T_IIF); goto start; } -#line 794 "src/parser.c" +#line 813 "src/parser.c" yy54: yyaccept = 5; yych = *(mrk = ++cur); @@ -802,9 +821,9 @@ yy54: default: goto yy62; } yy55: -#line 443 "src/parser.re" +#line 462 "src/parser.re" { NEWTOKEN(PSI_T_NAME); goto start; } -#line 808 "src/parser.c" +#line 827 "src/parser.c" yy56: yyaccept = 5; yych = *(mrk = ++cur); @@ -1047,9 +1066,9 @@ yy74: } yy75: ++cur; -#line 342 "src/parser.re" +#line 361 "src/parser.re" { NEWTOKEN(PSI_T_LBRACKET); goto start; } -#line 1053 "src/parser.c" +#line 1072 "src/parser.c" yy77: yych = *++cur; switch (yych) { @@ -1131,19 +1150,19 @@ yy77: default: goto yy184; } yy78: -#line 357 "src/parser.re" +#line 376 "src/parser.re" { NEWTOKEN(PSI_T_BSLASH); goto start; } -#line 1137 "src/parser.c" +#line 1156 "src/parser.c" yy79: ++cur; -#line 343 "src/parser.re" +#line 362 "src/parser.re" { NEWTOKEN(PSI_T_RBRACKET); goto start; } -#line 1142 "src/parser.c" +#line 1161 "src/parser.c" yy81: ++cur; -#line 359 "src/parser.re" +#line 378 "src/parser.re" { NEWTOKEN(PSI_T_CARET); goto start; } -#line 1147 "src/parser.c" +#line 1166 "src/parser.c" yy83: yyaccept = 5; yych = *(mrk = ++cur); @@ -1283,9 +1302,9 @@ yy95: } yy96: ++cur; -#line 340 "src/parser.re" +#line 359 "src/parser.re" { NEWTOKEN(PSI_T_LBRACE); goto start; } -#line 1289 "src/parser.c" +#line 1308 "src/parser.c" yy98: yych = *++cur; switch (yych) { @@ -1293,29 +1312,29 @@ yy98: default: goto yy99; } yy99: -#line 358 "src/parser.re" +#line 377 "src/parser.re" { NEWTOKEN(PSI_T_PIPE); goto start; } -#line 1299 "src/parser.c" +#line 1318 "src/parser.c" yy100: ++cur; -#line 341 "src/parser.re" +#line 360 "src/parser.re" { NEWTOKEN(PSI_T_RBRACE); goto start; } -#line 1304 "src/parser.c" +#line 1323 "src/parser.c" yy102: ++cur; -#line 350 "src/parser.re" +#line 369 "src/parser.re" { NEWTOKEN(PSI_T_TILDE); goto start; } -#line 1309 "src/parser.c" +#line 1328 "src/parser.c" yy104: ++cur; -#line 344 "src/parser.re" +#line 363 "src/parser.re" { NEWTOKEN(PSI_T_CMP_NE); goto start; } -#line 1314 "src/parser.c" +#line 1333 "src/parser.c" yy106: ++cur; -#line 333 "src/parser.re" +#line 352 "src/parser.re" { NEWTOKEN(PSI_T_CPP_PASTE); goto start; } -#line 1319 "src/parser.c" +#line 1338 "src/parser.c" yy108: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -1389,14 +1408,14 @@ yy108: default: goto yy108; } yy110: -#line 445 "src/parser.re" +#line 464 "src/parser.re" { NEWTOKEN(PSI_T_DOLLAR_NAME); goto start; } -#line 1395 "src/parser.c" +#line 1414 "src/parser.c" yy111: ++cur; -#line 346 "src/parser.re" +#line 365 "src/parser.re" { NEWTOKEN(PSI_T_AND); goto start; } -#line 1400 "src/parser.c" +#line 1419 "src/parser.c" yy113: yych = *++cur; switch (yych) { @@ -1530,19 +1549,19 @@ yy116: default: goto yy118; } yy118: -#line 316 "src/parser.re" +#line 335 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT; goto start; } -#line 1536 "src/parser.c" +#line 1555 "src/parser.c" yy119: ++cur; -#line 330 "src/parser.re" +#line 349 "src/parser.re" { goto comment; } -#line 1541 "src/parser.c" +#line 1560 "src/parser.c" yy121: ++cur; -#line 331 "src/parser.re" +#line 350 "src/parser.re" { goto comment_sl; } -#line 1546 "src/parser.c" +#line 1565 "src/parser.c" yy123: yyaccept = 6; mrk = ++cur; @@ -1618,9 +1637,9 @@ yy128: } yy129: cur -= 1; -#line 312 "src/parser.re" +#line 331 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_L; cur += 1; goto start; } -#line 1624 "src/parser.c" +#line 1643 "src/parser.c" yy130: yych = *++cur; switch (yych) { @@ -1630,9 +1649,9 @@ yy130: } yy131: cur -= 1; -#line 311 "src/parser.re" +#line 330 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_U; cur += 1; goto start; } -#line 1636 "src/parser.c" +#line 1655 "src/parser.c" yy132: yych = *++cur; switch (yych) { @@ -1736,29 +1755,29 @@ yy133: } yy135: ++cur; -#line 360 "src/parser.re" +#line 379 "src/parser.re" { NEWTOKEN(PSI_T_LSHIFT); goto start; } -#line 1742 "src/parser.c" +#line 1761 "src/parser.c" yy137: ++cur; -#line 362 "src/parser.re" +#line 381 "src/parser.re" { NEWTOKEN(PSI_T_CMP_LE); goto start; } -#line 1747 "src/parser.c" +#line 1766 "src/parser.c" yy139: ++cur; -#line 345 "src/parser.re" +#line 364 "src/parser.re" { NEWTOKEN(PSI_T_CMP_EQ); goto start; } -#line 1752 "src/parser.c" +#line 1771 "src/parser.c" yy141: ++cur; -#line 363 "src/parser.re" +#line 382 "src/parser.re" { NEWTOKEN(PSI_T_CMP_GE); goto start; } -#line 1757 "src/parser.c" +#line 1776 "src/parser.c" yy143: ++cur; -#line 361 "src/parser.re" +#line 380 "src/parser.re" { NEWTOKEN(PSI_T_RSHIFT); goto start; } -#line 1762 "src/parser.c" +#line 1781 "src/parser.c" yy145: yyaccept = 5; yych = *(mrk = ++cur); @@ -1839,9 +1858,9 @@ yy146: default: goto yy61; } yy147: -#line 423 "src/parser.re" +#line 442 "src/parser.re" { NEWTOKEN(PSI_T_AS); goto start; } -#line 1845 "src/parser.c" +#line 1864 "src/parser.c" yy148: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -2090,9 +2109,9 @@ yy160: default: goto yy61; } yy161: -#line 393 "src/parser.re" +#line 412 "src/parser.re" { NEWTOKEN(PSI_T_IF); goto start; } -#line 2096 "src/parser.c" +#line 2115 "src/parser.c" yy162: yyaccept = 5; yych = *(mrk = ++cur); @@ -2106,9 +2125,9 @@ yy162: yy163: ++cur; cur -= 1; -#line 328 "src/parser.re" - { char_width = SIZEOF_WCHAR_T/8; } -#line 2112 "src/parser.c" +#line 347 "src/parser.re" + { char_width = sizeof(wchar_t)/8; } +#line 2131 "src/parser.c" yy165: yyaccept = 5; yych = *(mrk = ++cur); @@ -2225,9 +2244,9 @@ yy178: yy179: ++cur; cur -= 1; -#line 327 "src/parser.re" +#line 346 "src/parser.re" { char_width = 4; } -#line 2231 "src/parser.c" +#line 2250 "src/parser.c" yy181: yyaccept = 5; yych = *(mrk = ++cur); @@ -2326,9 +2345,9 @@ yy184: default: goto yy184; } yy186: -#line 444 "src/parser.re" +#line 463 "src/parser.re" { NEWTOKEN(PSI_T_NSNAME); goto start; } -#line 2332 "src/parser.c" +#line 2351 "src/parser.c" yy187: yyaccept = 5; yych = *(mrk = ++cur); @@ -2457,9 +2476,9 @@ yy201: yy202: ++cur; cur -= 1; -#line 326 "src/parser.re" +#line 345 "src/parser.re" { char_width = 2; } -#line 2463 "src/parser.c" +#line 2482 "src/parser.c" yy204: yyaccept = 5; yych = *(mrk = ++cur); @@ -2487,14 +2506,14 @@ yy206: } yy207: ++cur; -#line 347 "src/parser.re" +#line 366 "src/parser.re" { NEWTOKEN(PSI_T_OR); goto start; } -#line 2493 "src/parser.c" +#line 2512 "src/parser.c" yy209: ++cur; -#line 367 "src/parser.re" +#line 386 "src/parser.re" { NEWTOKEN(PSI_T_ELLIPSIS); goto start; } -#line 2498 "src/parser.c" +#line 2517 "src/parser.c" yy211: yych = *++cur; switch (yych) { @@ -2509,15 +2528,15 @@ yy211: yy212: ++cur; cur -= 1; -#line 317 "src/parser.re" +#line 336 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_F; cur += 1; goto start; } -#line 2515 "src/parser.c" +#line 2534 "src/parser.c" yy214: ++cur; cur -= 1; -#line 318 "src/parser.re" +#line 337 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_L; cur += 1; goto start; } -#line 2521 "src/parser.c" +#line 2540 "src/parser.c" yy216: yych = *++cur; switch (yych) { @@ -2529,9 +2548,9 @@ yy217: ++cur; yy218: cur -= 2; -#line 313 "src/parser.re" +#line 332 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_UL; cur += 2; goto start; } -#line 2535 "src/parser.c" +#line 2554 "src/parser.c" yy219: yych = *++cur; switch (yych) { @@ -2578,9 +2597,9 @@ yy220: } yy222: ++cur; -#line 446 "src/parser.re" +#line 465 "src/parser.re" { tok += 1; cur -= 1; NEWTOKEN(PSI_T_CPP_HEADER); cur += 1; goto start; } -#line 2584 "src/parser.c" +#line 2603 "src/parser.c" yy224: yyaccept = 5; yych = *(mrk = ++cur); @@ -2791,9 +2810,9 @@ yy241: default: goto yy61; } yy242: -#line 418 "src/parser.re" +#line 437 "src/parser.re" { NEWTOKEN(PSI_T_LET); goto start; } -#line 2797 "src/parser.c" +#line 2816 "src/parser.c" yy243: yyaccept = 12; yych = *(mrk = ++cur); @@ -2866,9 +2885,9 @@ yy243: default: goto yy61; } yy244: -#line 417 "src/parser.re" +#line 436 "src/parser.re" { NEWTOKEN(PSI_T_LIB); goto start; } -#line 2872 "src/parser.c" +#line 2891 "src/parser.c" yy245: yyaccept = 5; yych = *(mrk = ++cur); @@ -2998,9 +3017,9 @@ yy252: default: goto yy61; } yy253: -#line 419 "src/parser.re" +#line 438 "src/parser.re" { NEWTOKEN(PSI_T_SET); goto start; } -#line 3004 "src/parser.c" +#line 3023 "src/parser.c" yy254: yyaccept = 5; yych = *(mrk = ++cur); @@ -3226,9 +3245,9 @@ yy272: default: goto yy61; } yy273: -#line 387 "src/parser.re" +#line 406 "src/parser.re" { NEWTOKEN(PSI_T_INT); goto start; } -#line 3232 "src/parser.c" +#line 3251 "src/parser.c" yy274: yyaccept = 5; yych = *(mrk = ++cur); @@ -3294,9 +3313,9 @@ yy281: yy282: ++cur; cur -= 1; -#line 325 "src/parser.re" +#line 344 "src/parser.re" { char_width = 1; } -#line 3300 "src/parser.c" +#line 3319 "src/parser.c" yy284: yyaccept = 5; yych = *(mrk = ++cur); @@ -3328,27 +3347,27 @@ yy287: yy288: ++cur; cur -= 2; -#line 320 "src/parser.re" +#line 339 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DD; cur += 2; goto start; } -#line 3334 "src/parser.c" +#line 3353 "src/parser.c" yy290: ++cur; cur -= 2; -#line 319 "src/parser.re" +#line 338 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DF; cur += 2; goto start; } -#line 3340 "src/parser.c" +#line 3359 "src/parser.c" yy292: ++cur; cur -= 2; -#line 321 "src/parser.re" +#line 340 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DL; cur += 2; goto start; } -#line 3346 "src/parser.c" +#line 3365 "src/parser.c" yy294: ++cur; cur -= 3; -#line 314 "src/parser.re" +#line 333 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_ULL; cur += 3; goto start; } -#line 3352 "src/parser.c" +#line 3371 "src/parser.c" yy296: ++cur; if ((lim - cur) < 3) if (cur >= lim) goto done;; @@ -3504,9 +3523,9 @@ yy304: default: goto yy61; } yy305: -#line 397 "src/parser.re" +#line 416 "src/parser.re" { NEWTOKEN(PSI_T_ELIF); goto start; } -#line 3510 "src/parser.c" +#line 3529 "src/parser.c" yy306: yyaccept = 16; yych = *(mrk = ++cur); @@ -3579,9 +3598,9 @@ yy306: default: goto yy61; } yy307: -#line 396 "src/parser.re" +#line 415 "src/parser.re" { NEWTOKEN(PSI_T_ELSE); goto start; } -#line 3585 "src/parser.c" +#line 3604 "src/parser.c" yy308: yyaccept = 5; yych = *(mrk = ++cur); @@ -3686,9 +3705,9 @@ yy312: default: goto yy61; } yy313: -#line 424 "src/parser.re" +#line 443 "src/parser.re" { NEWTOKEN(PSI_T_FREE); goto start; } -#line 3692 "src/parser.c" +#line 3711 "src/parser.c" yy314: yyaccept = 5; yych = *(mrk = ++cur); @@ -3809,9 +3828,9 @@ yy320: default: goto yy61; } yy321: -#line 408 "src/parser.re" +#line 427 "src/parser.re" { NEWTOKEN(PSI_T_NULL); goto start; } -#line 3815 "src/parser.c" +#line 3834 "src/parser.c" yy322: yyaccept = 5; yych = *(mrk = ++cur); @@ -3963,9 +3982,9 @@ yy332: default: goto yy61; } yy333: -#line 425 "src/parser.re" +#line 444 "src/parser.re" { NEWTOKEN(PSI_T_TEMP); goto start; } -#line 3969 "src/parser.c" +#line 3988 "src/parser.c" yy334: yyaccept = 5; yych = *(mrk = ++cur); @@ -4086,9 +4105,9 @@ yy340: default: goto yy61; } yy341: -#line 406 "src/parser.re" +#line 425 "src/parser.re" { NEWTOKEN(PSI_T_TRUE); goto start; } -#line 4092 "src/parser.c" +#line 4111 "src/parser.c" yy342: yyaccept = 5; yych = *(mrk = ++cur); @@ -4177,9 +4196,9 @@ yy344: default: goto yy61; } yy345: -#line 434 "src/parser.re" +#line 453 "src/parser.re" { NEWTOKEN(PSI_T_ZVAL); goto start; } -#line 4183 "src/parser.c" +#line 4202 "src/parser.c" yy346: yyaccept = 5; yych = *(mrk = ++cur); @@ -4289,9 +4308,9 @@ yy351: default: goto yy61; } yy352: -#line 384 "src/parser.re" +#line 403 "src/parser.re" { NEWTOKEN(PSI_T_BOOL); goto start; } -#line 4295 "src/parser.c" +#line 4314 "src/parser.c" yy353: yyaccept = 23; yych = *(mrk = ++cur); @@ -4364,9 +4383,9 @@ yy353: default: goto yy61; } yy354: -#line 385 "src/parser.re" +#line 404 "src/parser.re" { NEWTOKEN(PSI_T_CHAR); goto start; } -#line 4370 "src/parser.c" +#line 4389 "src/parser.c" yy355: yyaccept = 5; yych = *(mrk = ++cur); @@ -4453,9 +4472,9 @@ yy357: default: goto yy61; } yy358: -#line 381 "src/parser.re" +#line 400 "src/parser.re" { NEWTOKEN(PSI_T_ENUM); goto start; } -#line 4459 "src/parser.c" +#line 4478 "src/parser.c" yy359: yyaccept = 5; yych = *(mrk = ++cur); @@ -4536,9 +4555,9 @@ yy360: default: goto yy61; } yy361: -#line 377 "src/parser.re" +#line 396 "src/parser.re" { NEWTOKEN(PSI_T_LINE); goto start; } -#line 4542 "src/parser.c" +#line 4561 "src/parser.c" yy362: yyaccept = 26; yych = *(mrk = ++cur); @@ -4611,9 +4630,9 @@ yy362: default: goto yy61; } yy363: -#line 388 "src/parser.re" +#line 407 "src/parser.re" { NEWTOKEN(PSI_T_LONG); goto start; } -#line 4617 "src/parser.c" +#line 4636 "src/parser.c" yy364: yyaccept = 5; yych = *(mrk = ++cur); @@ -4742,9 +4761,9 @@ yy372: default: goto yy61; } yy373: -#line 383 "src/parser.re" +#line 402 "src/parser.re" { NEWTOKEN(PSI_T_VOID); goto start; } -#line 4748 "src/parser.c" +#line 4767 "src/parser.c" yy374: yyaccept = 5; yych = *(mrk = ++cur); @@ -4824,9 +4843,9 @@ yy375: default: goto yy61; } yy376: -#line 412 "src/parser.re" +#line 431 "src/parser.re" { NEWTOKEN(PSI_T_ARRAY); goto start; } -#line 4830 "src/parser.c" +#line 4849 "src/parser.c" yy377: yyaccept = 5; yych = *(mrk = ++cur); @@ -4939,9 +4958,9 @@ yy382: default: goto yy61; } yy383: -#line 435 "src/parser.re" +#line 454 "src/parser.re" { NEWTOKEN(PSI_T_COUNT); goto start; } -#line 4945 "src/parser.c" +#line 4964 "src/parser.c" yy384: yyaccept = 5; yych = *(mrk = ++cur); @@ -5022,9 +5041,9 @@ yy385: default: goto yy61; } yy386: -#line 398 "src/parser.re" +#line 417 "src/parser.re" { NEWTOKEN(PSI_T_ENDIF); goto start; } -#line 5028 "src/parser.c" +#line 5047 "src/parser.c" yy387: yyaccept = 31; yych = *(mrk = ++cur); @@ -5097,9 +5116,9 @@ yy387: default: goto yy61; } yy388: -#line 403 "src/parser.re" +#line 422 "src/parser.re" { NEWTOKEN(PSI_T_ERROR); goto start; } -#line 5103 "src/parser.c" +#line 5122 "src/parser.c" yy389: yyaccept = 32; yych = *(mrk = ++cur); @@ -5172,9 +5191,9 @@ yy389: default: goto yy61; } yy390: -#line 407 "src/parser.re" +#line 426 "src/parser.re" { NEWTOKEN(PSI_T_FALSE); goto start; } -#line 5178 "src/parser.c" +#line 5197 "src/parser.c" yy391: yyaccept = 5; yych = *(mrk = ++cur); @@ -5263,9 +5282,9 @@ yy393: default: goto yy61; } yy394: -#line 394 "src/parser.re" +#line 413 "src/parser.re" { NEWTOKEN(PSI_T_IFDEF); goto start; } -#line 5269 "src/parser.c" +#line 5288 "src/parser.c" yy395: yyaccept = 5; yych = *(mrk = ++cur); @@ -5362,9 +5381,9 @@ yy398: default: goto yy61; } yy399: -#line 409 "src/parser.re" +#line 428 "src/parser.re" { NEWTOKEN(PSI_T_MIXED); goto start; } -#line 5368 "src/parser.c" +#line 5387 "src/parser.c" yy400: yyaccept = 5; yych = *(mrk = ++cur); @@ -5565,9 +5584,9 @@ yy416: default: goto yy61; } yy417: -#line 401 "src/parser.re" +#line 420 "src/parser.re" { NEWTOKEN(PSI_T_UNDEF); goto start; } -#line 5571 "src/parser.c" +#line 5590 "src/parser.c" yy418: yyaccept = 5; yych = *(mrk = ++cur); @@ -5683,9 +5702,9 @@ yy424: default: goto yy61; } yy425: -#line 382 "src/parser.re" +#line 401 "src/parser.re" { NEWTOKEN(PSI_T_CONST); goto start; } -#line 5689 "src/parser.c" +#line 5708 "src/parser.c" yy426: yyaccept = 5; yych = *(mrk = ++cur); @@ -5767,9 +5786,9 @@ yy427: default: goto yy61; } yy428: -#line 389 "src/parser.re" +#line 408 "src/parser.re" { NEWTOKEN(PSI_T_FLOAT); goto start; } -#line 5773 "src/parser.c" +#line 5792 "src/parser.c" yy429: yyaccept = 5; yych = *(mrk = ++cur); @@ -5849,9 +5868,9 @@ yy430: default: goto yy61; } yy431: -#line 386 "src/parser.re" +#line 405 "src/parser.re" { NEWTOKEN(PSI_T_SHORT); goto start; } -#line 5855 "src/parser.c" +#line 5874 "src/parser.c" yy432: yyaccept = 5; yych = *(mrk = ++cur); @@ -5952,9 +5971,9 @@ yy436: default: goto yy61; } yy437: -#line 380 "src/parser.re" +#line 399 "src/parser.re" { NEWTOKEN(PSI_T_UNION); goto start; } -#line 5958 "src/parser.c" +#line 5977 "src/parser.c" yy438: yyaccept = 5; yych = *(mrk = ++cur); @@ -6041,9 +6060,9 @@ yy440: default: goto yy61; } yy441: -#line 432 "src/parser.re" +#line 451 "src/parser.re" { NEWTOKEN(PSI_T_ARRVAL); goto start; } -#line 6047 "src/parser.c" +#line 6066 "src/parser.c" yy442: yyaccept = 5; yych = *(mrk = ++cur); @@ -6140,9 +6159,9 @@ yy445: default: goto yy61; } yy446: -#line 436 "src/parser.re" +#line 455 "src/parser.re" { NEWTOKEN(PSI_T_CALLOC); goto start; } -#line 6146 "src/parser.c" +#line 6165 "src/parser.c" yy447: yyaccept = 42; yych = *(mrk = ++cur); @@ -6217,9 +6236,9 @@ yy447: default: goto yy61; } yy448: -#line 399 "src/parser.re" +#line 418 "src/parser.re" { NEWTOKEN(PSI_T_DEFINE); goto start; } -#line 6223 "src/parser.c" +#line 6242 "src/parser.c" yy449: yyaccept = 5; yych = *(mrk = ++cur); @@ -6308,9 +6327,9 @@ yy451: default: goto yy61; } yy452: -#line 395 "src/parser.re" +#line 414 "src/parser.re" { NEWTOKEN(PSI_T_IFNDEF); goto start; } -#line 6314 "src/parser.c" +#line 6333 "src/parser.c" yy453: yyaccept = 5; yych = *(mrk = ++cur); @@ -6391,9 +6410,9 @@ yy454: default: goto yy61; } yy455: -#line 429 "src/parser.re" +#line 448 "src/parser.re" { NEWTOKEN(PSI_T_INTVAL); goto start; } -#line 6397 "src/parser.c" +#line 6416 "src/parser.c" yy456: yyaccept = 45; yych = *(mrk = ++cur); @@ -6466,9 +6485,9 @@ yy456: default: goto yy61; } yy457: -#line 413 "src/parser.re" +#line 432 "src/parser.re" { NEWTOKEN(PSI_T_OBJECT); goto start; } -#line 6472 "src/parser.c" +#line 6491 "src/parser.c" yy458: yyaccept = 46; yych = *(mrk = ++cur); @@ -6541,9 +6560,9 @@ yy458: default: goto yy61; } yy459: -#line 433 "src/parser.re" +#line 452 "src/parser.re" { NEWTOKEN(PSI_T_OBJVAL); goto start; } -#line 6547 "src/parser.c" +#line 6566 "src/parser.c" yy460: yyaccept = 5; yych = *(mrk = ++cur); @@ -6640,9 +6659,9 @@ yy463: default: goto yy61; } yy464: -#line 422 "src/parser.re" +#line 441 "src/parser.re" { NEWTOKEN(PSI_T_RETURN); goto start; } -#line 6646 "src/parser.c" +#line 6665 "src/parser.c" yy465: yyaccept = 48; yych = *(mrk = ++cur); @@ -6715,9 +6734,9 @@ yy465: default: goto yy61; } yy466: -#line 415 "src/parser.re" +#line 434 "src/parser.re" { NEWTOKEN(PSI_T_STATIC); goto start; } -#line 6721 "src/parser.c" +#line 6740 "src/parser.c" yy467: yyaccept = 49; yych = *(mrk = ++cur); @@ -6790,9 +6809,9 @@ yy467: default: goto yy61; } yy468: -#line 411 "src/parser.re" +#line 430 "src/parser.re" { NEWTOKEN(PSI_T_STRING); goto start; } -#line 6796 "src/parser.c" +#line 6815 "src/parser.c" yy469: yyaccept = 50; yych = *(mrk = ++cur); @@ -6865,9 +6884,9 @@ yy469: default: goto yy61; } yy470: -#line 426 "src/parser.re" +#line 445 "src/parser.re" { NEWTOKEN(PSI_T_STRLEN); goto start; } -#line 6871 "src/parser.c" +#line 6890 "src/parser.c" yy471: yyaccept = 51; yych = *(mrk = ++cur); @@ -6940,9 +6959,9 @@ yy471: default: goto yy61; } yy472: -#line 427 "src/parser.re" +#line 446 "src/parser.re" { NEWTOKEN(PSI_T_STRVAL); goto start; } -#line 6946 "src/parser.c" +#line 6965 "src/parser.c" yy473: yyaccept = 5; yych = *(mrk = ++cur); @@ -7039,9 +7058,9 @@ yy476: default: goto yy61; } yy477: -#line 440 "src/parser.re" +#line 459 "src/parser.re" { NEWTOKEN(PSI_T_TO_INT); goto start; } -#line 7045 "src/parser.c" +#line 7064 "src/parser.c" yy478: yyaccept = 5; yych = *(mrk = ++cur); @@ -7173,9 +7192,9 @@ yy486: default: goto yy61; } yy487: -#line 390 "src/parser.re" +#line 409 "src/parser.re" { NEWTOKEN(PSI_T_DOUBLE); goto start; } -#line 7179 "src/parser.c" +#line 7198 "src/parser.c" yy488: yyaccept = 54; yych = *(mrk = ++cur); @@ -7248,9 +7267,9 @@ yy488: default: goto yy527; } yy489: -#line 369 "src/parser.re" +#line 388 "src/parser.re" { NEWTOKEN(PSI_T_PRAGMA); goto start; } -#line 7254 "src/parser.c" +#line 7273 "src/parser.c" yy490: yyaccept = 55; yych = *(mrk = ++cur); @@ -7323,9 +7342,9 @@ yy490: default: goto yy61; } yy491: -#line 392 "src/parser.re" +#line 411 "src/parser.re" { NEWTOKEN(PSI_T_SIGNED); goto start; } -#line 7329 "src/parser.c" +#line 7348 "src/parser.c" yy492: yyaccept = 56; yych = *(mrk = ++cur); @@ -7398,9 +7417,9 @@ yy492: default: goto yy61; } yy493: -#line 376 "src/parser.re" +#line 395 "src/parser.re" { NEWTOKEN(PSI_T_SIZEOF); goto start; } -#line 7404 "src/parser.c" +#line 7423 "src/parser.c" yy494: yyaccept = 57; yych = *(mrk = ++cur); @@ -7473,9 +7492,9 @@ yy494: default: goto yy61; } yy495: -#line 379 "src/parser.re" +#line 398 "src/parser.re" { NEWTOKEN(PSI_T_STRUCT); goto start; } -#line 7479 "src/parser.c" +#line 7498 "src/parser.c" yy496: yyaccept = 5; yych = *(mrk = ++cur); @@ -7569,9 +7588,9 @@ yy499: default: goto yy61; } yy500: -#line 431 "src/parser.re" +#line 450 "src/parser.re" { NEWTOKEN(PSI_T_BOOLVAL); goto start; } -#line 7575 "src/parser.c" +#line 7594 "src/parser.c" yy501: yyaccept = 5; yych = *(mrk = ++cur); @@ -7660,9 +7679,9 @@ yy503: default: goto yy61; } yy504: -#line 400 "src/parser.re" +#line 419 "src/parser.re" { NEWTOKEN(PSI_T_DEFINED); goto start; } -#line 7666 "src/parser.c" +#line 7685 "src/parser.c" yy505: yyaccept = 5; yych = *(mrk = ++cur); @@ -7752,9 +7771,9 @@ yy507: default: goto yy61; } yy508: -#line 404 "src/parser.re" +#line 423 "src/parser.re" { NEWTOKEN(PSI_T_INCLUDE); goto start; } -#line 7758 "src/parser.c" +#line 7777 "src/parser.c" yy509: yyaccept = 61; yych = *(mrk = ++cur); @@ -7827,9 +7846,9 @@ yy509: default: goto yy61; } yy510: -#line 428 "src/parser.re" +#line 447 "src/parser.re" { NEWTOKEN(PSI_T_PATHVAL); goto start; } -#line 7833 "src/parser.c" +#line 7852 "src/parser.c" yy511: yyaccept = 5; yych = *(mrk = ++cur); @@ -7926,9 +7945,9 @@ yy514: default: goto yy61; } yy515: -#line 442 "src/parser.re" +#line 461 "src/parser.re" { NEWTOKEN(PSI_T_TO_BOOL); goto start; } -#line 7932 "src/parser.c" +#line 7951 "src/parser.c" yy516: yyaccept = 5; yych = *(mrk = ++cur); @@ -8025,9 +8044,9 @@ yy519: default: goto yy61; } yy520: -#line 402 "src/parser.re" +#line 421 "src/parser.re" { NEWTOKEN(PSI_T_WARNING); goto start; } -#line 8031 "src/parser.c" +#line 8050 "src/parser.c" yy521: yyaccept = 64; yych = *(mrk = ++cur); @@ -8100,9 +8119,9 @@ yy521: default: goto yy61; } yy522: -#line 374 "src/parser.re" +#line 393 "src/parser.re" { NEWTOKEN(PSI_T_CPP_ASM); goto start; } -#line 8106 "src/parser.c" +#line 8125 "src/parser.c" yy523: yyaccept = 5; yych = *(mrk = ++cur); @@ -8277,9 +8296,9 @@ yy529: default: goto yy61; } yy530: -#line 378 "src/parser.re" +#line 397 "src/parser.re" { NEWTOKEN(PSI_T_TYPEDEF); goto start; } -#line 8283 "src/parser.c" +#line 8302 "src/parser.c" yy531: yyaccept = 5; yych = *(mrk = ++cur); @@ -8366,9 +8385,9 @@ yy533: default: goto yy61; } yy534: -#line 410 "src/parser.re" +#line 429 "src/parser.re" { NEWTOKEN(PSI_T_CALLABLE); goto start; } -#line 8372 "src/parser.c" +#line 8391 "src/parser.c" yy535: yyaccept = 67; yych = *(mrk = ++cur); @@ -8441,9 +8460,9 @@ yy535: default: goto yy61; } yy536: -#line 414 "src/parser.re" +#line 433 "src/parser.re" { NEWTOKEN(PSI_T_CALLBACK); goto start; } -#line 8447 "src/parser.c" +#line 8466 "src/parser.c" yy537: yyaccept = 68; yych = *(mrk = ++cur); @@ -8516,9 +8535,9 @@ yy537: default: goto yy61; } yy538: -#line 430 "src/parser.re" +#line 449 "src/parser.re" { NEWTOKEN(PSI_T_FLOATVAL); goto start; } -#line 8522 "src/parser.c" +#line 8541 "src/parser.c" yy539: yyaccept = 69; yych = *(mrk = ++cur); @@ -8591,9 +8610,9 @@ yy539: default: goto yy61; } yy540: -#line 416 "src/parser.re" +#line 435 "src/parser.re" { NEWTOKEN(PSI_T_FUNCTION); goto start; } -#line 8597 "src/parser.c" +#line 8616 "src/parser.c" yy541: yyaccept = 5; yych = *(mrk = ++cur); @@ -8690,9 +8709,9 @@ yy544: default: goto yy61; } yy545: -#line 438 "src/parser.re" +#line 457 "src/parser.re" { NEWTOKEN(PSI_T_TO_ARRAY); goto start; } -#line 8696 "src/parser.c" +#line 8715 "src/parser.c" yy546: yyaccept = 71; yych = *(mrk = ++cur); @@ -8765,9 +8784,9 @@ yy546: default: goto yy61; } yy547: -#line 441 "src/parser.re" +#line 460 "src/parser.re" { NEWTOKEN(PSI_T_TO_FLOAT); goto start; } -#line 8771 "src/parser.c" +#line 8790 "src/parser.c" yy548: yyaccept = 5; yych = *(mrk = ++cur); @@ -8870,9 +8889,9 @@ yy552: default: goto yy61; } yy553: -#line 371 "src/parser.re" +#line 390 "src/parser.re" { NEWTOKEN(PSI_T_CPP_INLINE); goto start; } -#line 8876 "src/parser.c" +#line 8895 "src/parser.c" yy554: yyaccept = 5; yych = *(mrk = ++cur); @@ -9027,9 +9046,9 @@ yy557: default: goto yy61; } yy558: -#line 391 "src/parser.re" +#line 410 "src/parser.re" { NEWTOKEN(PSI_T_UNSIGNED); goto start; } -#line 9033 "src/parser.c" +#line 9052 "src/parser.c" yy559: yyaccept = 74; yych = *(mrk = ++cur); @@ -9102,9 +9121,9 @@ yy559: default: goto yy61; } yy560: -#line 375 "src/parser.re" +#line 394 "src/parser.re" { NEWTOKEN(PSI_T_VOLATILE); goto start; } -#line 9108 "src/parser.c" +#line 9127 "src/parser.c" yy561: yyaccept = 5; yych = *(mrk = ++cur); @@ -9201,9 +9220,9 @@ yy564: default: goto yy61; } yy565: -#line 437 "src/parser.re" +#line 456 "src/parser.re" { NEWTOKEN(PSI_T_TO_OBJECT); goto start; } -#line 9207 "src/parser.c" +#line 9226 "src/parser.c" yy566: yyaccept = 76; yych = *(mrk = ++cur); @@ -9276,9 +9295,9 @@ yy566: default: goto yy61; } yy567: -#line 439 "src/parser.re" +#line 458 "src/parser.re" { NEWTOKEN(PSI_T_TO_STRING); goto start; } -#line 9282 "src/parser.c" +#line 9301 "src/parser.c" yy568: yyaccept = 5; yych = *(mrk = ++cur); @@ -9463,9 +9482,9 @@ yy574: default: goto yy61; } yy575: -#line 420 "src/parser.re" +#line 439 "src/parser.re" { NEWTOKEN(PSI_T_PRE_ASSERT); goto start; } -#line 9469 "src/parser.c" +#line 9488 "src/parser.c" yy576: yyaccept = 5; yych = *(mrk = ++cur); @@ -9552,9 +9571,9 @@ yy578: default: goto yy61; } yy579: -#line 372 "src/parser.re" +#line 391 "src/parser.re" { NEWTOKEN(PSI_T_CPP_RESTRICT); goto start; } -#line 9558 "src/parser.c" +#line 9577 "src/parser.c" yy580: yyaccept = 5; mrk = ++cur; @@ -9710,9 +9729,9 @@ yy582: default: goto yy61; } yy583: -#line 421 "src/parser.re" +#line 440 "src/parser.re" { NEWTOKEN(PSI_T_POST_ASSERT); goto start; } -#line 9716 "src/parser.c" +#line 9735 "src/parser.c" yy584: yyaccept = 5; yych = *(mrk = ++cur); @@ -9802,9 +9821,9 @@ yy586: default: goto yy527; } yy587: -#line 370 "src/parser.re" +#line 389 "src/parser.re" { NEWTOKEN(PSI_T_PRAGMA_ONCE); goto start; } -#line 9808 "src/parser.c" +#line 9827 "src/parser.c" yy588: yyaccept = 81; yych = *(mrk = ++cur); @@ -9877,9 +9896,9 @@ yy588: default: goto yy61; } yy589: -#line 405 "src/parser.re" +#line 424 "src/parser.re" { NEWTOKEN(PSI_T_INCLUDE_NEXT); goto start; } -#line 9883 "src/parser.c" +#line 9902 "src/parser.c" yy590: yyaccept = 5; yych = *(mrk = ++cur); @@ -9976,9 +9995,9 @@ yy593: default: goto yy61; } yy594: -#line 373 "src/parser.re" +#line 392 "src/parser.re" { NEWTOKEN(PSI_T_CPP_EXTENSION); goto start; } -#line 9982 "src/parser.c" +#line 10001 "src/parser.c" yy595: ++cur; if ((lim - cur) < 2) if (cur >= lim) goto done;; @@ -9998,16 +10017,16 @@ yy597: } yy598: ++cur; -#line 447 "src/parser.re" +#line 466 "src/parser.re" { parens = 2; goto cpp_attribute; } -#line 10004 "src/parser.c" +#line 10023 "src/parser.c" } -#line 453 "src/parser.re" +#line 472 "src/parser.re" character: ; -#line 10011 "src/parser.c" +#line 10030 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10021,17 +10040,17 @@ yy598: } yy602: ++cur; -#line 471 "src/parser.re" +#line 490 "src/parser.re" { escaped = false; goto character; } -#line 10027 "src/parser.c" +#line 10046 "src/parser.c" yy604: ++cur; -#line 458 "src/parser.re" +#line 477 "src/parser.re" { NEWLINE(); goto character; } -#line 10032 "src/parser.c" +#line 10051 "src/parser.c" yy606: ++cur; -#line 460 "src/parser.re" +#line 479 "src/parser.re" { if (escaped) { escaped = false; @@ -10043,19 +10062,19 @@ yy606: token->flags = char_width; goto start; } -#line 10047 "src/parser.c" +#line 10066 "src/parser.c" yy608: ++cur; -#line 459 "src/parser.re" +#line 478 "src/parser.re" { escaped = !escaped; goto character; } -#line 10052 "src/parser.c" +#line 10071 "src/parser.c" } -#line 473 "src/parser.re" +#line 492 "src/parser.re" string: ; -#line 10059 "src/parser.c" +#line 10078 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10069,17 +10088,17 @@ yy608: } yy612: ++cur; -#line 491 "src/parser.re" +#line 510 "src/parser.re" { escaped = false; goto string; } -#line 10075 "src/parser.c" +#line 10094 "src/parser.c" yy614: ++cur; -#line 478 "src/parser.re" +#line 497 "src/parser.re" { NEWLINE(); goto string; } -#line 10080 "src/parser.c" +#line 10099 "src/parser.c" yy616: ++cur; -#line 480 "src/parser.re" +#line 499 "src/parser.re" { if (escaped) { escaped = false; @@ -10091,19 +10110,19 @@ yy616: token->flags = char_width; goto start; } -#line 10095 "src/parser.c" +#line 10114 "src/parser.c" yy618: ++cur; -#line 479 "src/parser.re" +#line 498 "src/parser.re" { escaped = !escaped; goto string; } -#line 10100 "src/parser.c" +#line 10119 "src/parser.c" } -#line 493 "src/parser.re" +#line 512 "src/parser.re" comment: ; -#line 10107 "src/parser.c" +#line 10126 "src/parser.c" { unsigned char yych; if ((lim - cur) < 2) if (cur >= lim) goto done;; @@ -10117,14 +10136,14 @@ yy618: yy622: ++cur; yy623: -#line 500 "src/parser.re" +#line 519 "src/parser.re" { goto comment; } -#line 10123 "src/parser.c" +#line 10142 "src/parser.c" yy624: ++cur; -#line 498 "src/parser.re" +#line 517 "src/parser.re" { NEWLINE(); goto comment; } -#line 10128 "src/parser.c" +#line 10147 "src/parser.c" yy626: yych = *++cur; switch (yych) { @@ -10133,16 +10152,16 @@ yy626: } yy627: ++cur; -#line 499 "src/parser.re" +#line 518 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); goto start; } -#line 10139 "src/parser.c" +#line 10158 "src/parser.c" } -#line 502 "src/parser.re" +#line 521 "src/parser.re" comment_sl: ; -#line 10146 "src/parser.c" +#line 10165 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10154,22 +10173,22 @@ yy627: } yy631: ++cur; -#line 508 "src/parser.re" +#line 527 "src/parser.re" { goto comment_sl; } -#line 10160 "src/parser.c" +#line 10179 "src/parser.c" yy633: ++cur; -#line 507 "src/parser.re" +#line 526 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); NEWLINE(); goto start; } -#line 10165 "src/parser.c" +#line 10184 "src/parser.c" } -#line 510 "src/parser.re" +#line 529 "src/parser.re" cpp_attribute: ; -#line 10173 "src/parser.c" +#line 10192 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10183,31 +10202,31 @@ yy633: } yy637: ++cur; -#line 519 "src/parser.re" +#line 538 "src/parser.re" { goto cpp_attribute; } -#line 10189 "src/parser.c" +#line 10208 "src/parser.c" yy639: ++cur; -#line 518 "src/parser.re" +#line 537 "src/parser.re" { NEWLINE(); goto cpp_attribute; } -#line 10194 "src/parser.c" +#line 10213 "src/parser.c" yy641: ++cur; -#line 516 "src/parser.re" +#line 535 "src/parser.re" { ++parens; goto cpp_attribute; } -#line 10199 "src/parser.c" +#line 10218 "src/parser.c" yy643: ++cur; -#line 517 "src/parser.re" +#line 536 "src/parser.re" { if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } } -#line 10204 "src/parser.c" +#line 10223 "src/parser.c" } -#line 521 "src/parser.re" +#line 540 "src/parser.re" error: ; P->error(PSI_DATA(P), token, PSI_WARNING, "PSI syntax error: unexpected input (%d) '%.*s' at col %tu", - token->type, token->size, token->text, tok - eol + 1); + token->type, token->text->len, token->text->val, tok - eol + 1); psi_plist_free(tokens); return NULL;