-/* Generated by re2c 1.1.1 on Wed Oct 24 11:47:33 2018 */
+/* Generated by re2c 1.1.1 on Fri Nov 2 10:19:25 2018 */
#line 1 "src/parser.re"
/*******************************************************************************
Copyright (c) 2016, Michael Wallner <mike@php.net>.
#include <errno.h>
#include <stdarg.h>
+#include <Zend/zend_smart_str.h>
+
#include "parser.h"
#define YYMAXFILL 15
struct psi_parser *psi_parser_init(struct psi_parser *P, psi_error_cb error, unsigned flags)
{
if (!P) {
- P = malloc(sizeof(*P));
+ P = pemalloc(sizeof(*P), 1);
}
memset(P, 0, sizeof(*P));
P->preproc = psi_cpp_init(P);
- psi_cpp_load_defaults(P->preproc);
-
return P;
}
return NULL;
}
- if (!(fb = malloc(sizeof(*fb) + strlen(filename) + 1 + sb.st_size + YYMAXFILL))) {
+ if (!(fb = pemalloc(sizeof(*fb) + sb.st_size + YYMAXFILL, 1))) {
if (report_errors) {
P->error(PSI_DATA(P), NULL, PSI_WARNING,
"Could not allocate %zu bytes for reading '%s': %s",
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;
}
{
struct psi_parser_input *sb;
- if (!(sb = malloc(sizeof(*sb) + sizeof("<stdin>") + length + YYMAXFILL))) {
+ if (!(sb = pemalloc(sizeof(*sb) + length + YYMAXFILL, 1))) {
P->error(PSI_DATA(P), NULL, PSI_WARNING,
"Could not allocate %zu bytes: %s",
length + YYMAXFILL, strerror(errno));
memset(sb->buffer + length, 0, YYMAXFILL);
sb->length = length;
- sb->file = &sb->buffer[length + YYMAXFILL];
- memcpy(sb->file, "<stdin>", sizeof("<stdin>"));
+ sb->file = zend_string_init_interned("<stdin>", strlen("<stdin>"), 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)) {
struct psi_impl_def_val *def;
struct psi_const *cnst;
struct psi_num_exp *num;
- char *name_str = malloc(name->len + sizeof("psi\\"));
+ 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("<eval number>"), 1);
- strcat(strcpy(name_str, "psi\\"), name->val);
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, "<eval number>");
+ 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);
- free(name_str);
+ zend_string_release(name_str);
+ zend_string_release(type_str);
}
} else {
if (psi_plist_count(scope.macro->tokens) == 1) {
struct psi_impl_type *type;
struct psi_impl_def_val *def;
struct psi_const *cnst;
- char *name_str = malloc(name->len + sizeof("psi\\"));
+ smart_str ns_name = {0};
+ zend_string *name_str, *type_str;
- strcat(strcpy(name_str, "psi\\"), name->val);
- type = psi_impl_type_init(PSI_T_STRING, "string");
+ 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);
- free(name_str);
+ zend_string_release(name_str);
+ zend_string_release(type_str);
}
}
}
++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[4];
- uint32_t i;
-};
+
+
struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input *I)
{
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;
(void) ctxmrk;
-#line 349 "src/parser.c"
+#line 304 "src/parser.c"
{
unsigned char yych;
unsigned int yyaccept = 0;
yy2:
++cur;
yy3:
-#line 514 "src/parser.re"
+#line 469 "src/parser.re"
{ NEWTOKEN(-2); goto error; }
-#line 476 "src/parser.c"
+#line 431 "src/parser.c"
yy4:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy6;
}
yy6:
-#line 513 "src/parser.re"
+#line 468 "src/parser.re"
{ NEWTOKEN(PSI_T_WHITESPACE); goto start; }
-#line 490 "src/parser.c"
+#line 445 "src/parser.c"
yy7:
++cur;
-#line 512 "src/parser.re"
+#line 467 "src/parser.re"
{ NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; }
-#line 495 "src/parser.c"
+#line 450 "src/parser.c"
yy9:
yych = *++cur;
switch (yych) {
default: goto yy10;
}
yy10:
-#line 415 "src/parser.re"
+#line 370 "src/parser.re"
{ NEWTOKEN(PSI_T_NOT); goto start; }
-#line 505 "src/parser.c"
+#line 460 "src/parser.c"
yy11:
++cur;
-#line 388 "src/parser.re"
+#line 343 "src/parser.re"
{ escaped = false; tok += 1; goto string; }
-#line 510 "src/parser.c"
+#line 465 "src/parser.c"
yy13:
yych = *++cur;
switch (yych) {
default: goto yy14;
}
yy14:
-#line 398 "src/parser.re"
+#line 353 "src/parser.re"
{ NEWTOKEN(PSI_T_HASH); goto start; }
-#line 520 "src/parser.c"
+#line 475 "src/parser.c"
yy15:
yych = *++cur;
switch (yych) {
}
yy16:
++cur;
-#line 416 "src/parser.re"
+#line 371 "src/parser.re"
{ NEWTOKEN(PSI_T_MODULO); goto start; }
-#line 595 "src/parser.c"
+#line 550 "src/parser.c"
yy18:
yych = *++cur;
switch (yych) {
default: goto yy19;
}
yy19:
-#line 417 "src/parser.re"
+#line 372 "src/parser.re"
{ NEWTOKEN(PSI_T_AMPERSAND); goto start; }
-#line 605 "src/parser.c"
+#line 560 "src/parser.c"
yy20:
++cur;
-#line 387 "src/parser.re"
+#line 342 "src/parser.re"
{ escaped = false; tok += 1; goto character; }
-#line 610 "src/parser.c"
+#line 565 "src/parser.c"
yy22:
++cur;
-#line 399 "src/parser.re"
+#line 354 "src/parser.re"
{ NEWTOKEN(PSI_T_LPAREN); goto start; }
-#line 615 "src/parser.c"
+#line 570 "src/parser.c"
yy24:
++cur;
-#line 400 "src/parser.re"
+#line 355 "src/parser.re"
{ NEWTOKEN(PSI_T_RPAREN); goto start; }
-#line 620 "src/parser.c"
+#line 575 "src/parser.c"
yy26:
++cur;
-#line 413 "src/parser.re"
+#line 368 "src/parser.re"
{ NEWTOKEN(PSI_T_ASTERISK); goto start; }
-#line 625 "src/parser.c"
+#line 580 "src/parser.c"
yy28:
yyaccept = 0;
yych = *(mrk = ++cur);
default: goto yy29;
}
yy29:
-#line 418 "src/parser.re"
+#line 373 "src/parser.re"
{ NEWTOKEN(PSI_T_PLUS); goto start; }
-#line 646 "src/parser.c"
+#line 601 "src/parser.c"
yy30:
++cur;
-#line 402 "src/parser.re"
+#line 357 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMA); goto start; }
-#line 651 "src/parser.c"
+#line 606 "src/parser.c"
yy32:
yyaccept = 1;
yych = *(mrk = ++cur);
default: goto yy33;
}
yy33:
-#line 419 "src/parser.re"
+#line 374 "src/parser.re"
{ NEWTOKEN(PSI_T_MINUS); goto start; }
-#line 672 "src/parser.c"
+#line 627 "src/parser.c"
yy34:
yyaccept = 2;
yych = *(mrk = ++cur);
default: goto yy35;
}
yy35:
-#line 430 "src/parser.re"
+#line 385 "src/parser.re"
{ NEWTOKEN(PSI_T_PERIOD); goto start; }
-#line 693 "src/parser.c"
+#line 648 "src/parser.c"
yy36:
yych = *++cur;
switch (yych) {
default: goto yy37;
}
yy37:
-#line 420 "src/parser.re"
+#line 375 "src/parser.re"
{ NEWTOKEN(PSI_T_SLASH); goto start; }
-#line 704 "src/parser.c"
+#line 659 "src/parser.c"
yy38:
yyaccept = 3;
yych = *(mrk = ++cur);
default: goto yy126;
}
yy39:
-#line 374 "src/parser.re"
+#line 329 "src/parser.re"
{ NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT; goto start; }
-#line 719 "src/parser.c"
+#line 674 "src/parser.c"
yy40:
yyaccept = 3;
mrk = ++cur;
}
yy42:
++cur;
-#line 403 "src/parser.re"
+#line 358 "src/parser.re"
{ NEWTOKEN(PSI_T_COLON); goto start; }
-#line 749 "src/parser.c"
+#line 704 "src/parser.c"
yy44:
++cur;
-#line 401 "src/parser.re"
+#line 356 "src/parser.re"
{ NEWTOKEN(PSI_T_EOS); goto start; }
-#line 754 "src/parser.c"
+#line 709 "src/parser.c"
yy46:
yyaccept = 4;
yych = *(mrk = ++cur);
default: goto yy47;
}
yy47:
-#line 428 "src/parser.re"
+#line 383 "src/parser.re"
{ NEWTOKEN(PSI_T_LCHEVR); goto start; }
-#line 832 "src/parser.c"
+#line 787 "src/parser.c"
yy48:
yych = *++cur;
switch (yych) {
default: goto yy49;
}
yy49:
-#line 412 "src/parser.re"
+#line 367 "src/parser.re"
{ NEWTOKEN(PSI_T_EQUALS); goto start; }
-#line 842 "src/parser.c"
+#line 797 "src/parser.c"
yy50:
yych = *++cur;
switch (yych) {
default: goto yy51;
}
yy51:
-#line 429 "src/parser.re"
+#line 384 "src/parser.re"
{ NEWTOKEN(PSI_T_RCHEVR); goto start; }
-#line 853 "src/parser.c"
+#line 808 "src/parser.c"
yy52:
++cur;
-#line 432 "src/parser.re"
+#line 387 "src/parser.re"
{ NEWTOKEN(PSI_T_IIF); goto start; }
-#line 858 "src/parser.c"
+#line 813 "src/parser.c"
yy54:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy62;
}
yy55:
-#line 507 "src/parser.re"
+#line 462 "src/parser.re"
{ NEWTOKEN(PSI_T_NAME); goto start; }
-#line 872 "src/parser.c"
+#line 827 "src/parser.c"
yy56:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy75:
++cur;
-#line 406 "src/parser.re"
+#line 361 "src/parser.re"
{ NEWTOKEN(PSI_T_LBRACKET); goto start; }
-#line 1117 "src/parser.c"
+#line 1072 "src/parser.c"
yy77:
yych = *++cur;
switch (yych) {
default: goto yy184;
}
yy78:
-#line 421 "src/parser.re"
+#line 376 "src/parser.re"
{ NEWTOKEN(PSI_T_BSLASH); goto start; }
-#line 1201 "src/parser.c"
+#line 1156 "src/parser.c"
yy79:
++cur;
-#line 407 "src/parser.re"
+#line 362 "src/parser.re"
{ NEWTOKEN(PSI_T_RBRACKET); goto start; }
-#line 1206 "src/parser.c"
+#line 1161 "src/parser.c"
yy81:
++cur;
-#line 423 "src/parser.re"
+#line 378 "src/parser.re"
{ NEWTOKEN(PSI_T_CARET); goto start; }
-#line 1211 "src/parser.c"
+#line 1166 "src/parser.c"
yy83:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy96:
++cur;
-#line 404 "src/parser.re"
+#line 359 "src/parser.re"
{ NEWTOKEN(PSI_T_LBRACE); goto start; }
-#line 1353 "src/parser.c"
+#line 1308 "src/parser.c"
yy98:
yych = *++cur;
switch (yych) {
default: goto yy99;
}
yy99:
-#line 422 "src/parser.re"
+#line 377 "src/parser.re"
{ NEWTOKEN(PSI_T_PIPE); goto start; }
-#line 1363 "src/parser.c"
+#line 1318 "src/parser.c"
yy100:
++cur;
-#line 405 "src/parser.re"
+#line 360 "src/parser.re"
{ NEWTOKEN(PSI_T_RBRACE); goto start; }
-#line 1368 "src/parser.c"
+#line 1323 "src/parser.c"
yy102:
++cur;
-#line 414 "src/parser.re"
+#line 369 "src/parser.re"
{ NEWTOKEN(PSI_T_TILDE); goto start; }
-#line 1373 "src/parser.c"
+#line 1328 "src/parser.c"
yy104:
++cur;
-#line 408 "src/parser.re"
+#line 363 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_NE); goto start; }
-#line 1378 "src/parser.c"
+#line 1333 "src/parser.c"
yy106:
++cur;
-#line 397 "src/parser.re"
+#line 352 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_PASTE); goto start; }
-#line 1383 "src/parser.c"
+#line 1338 "src/parser.c"
yy108:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy108;
}
yy110:
-#line 509 "src/parser.re"
+#line 464 "src/parser.re"
{ NEWTOKEN(PSI_T_DOLLAR_NAME); goto start; }
-#line 1459 "src/parser.c"
+#line 1414 "src/parser.c"
yy111:
++cur;
-#line 410 "src/parser.re"
+#line 365 "src/parser.re"
{ NEWTOKEN(PSI_T_AND); goto start; }
-#line 1464 "src/parser.c"
+#line 1419 "src/parser.c"
yy113:
yych = *++cur;
switch (yych) {
default: goto yy118;
}
yy118:
-#line 380 "src/parser.re"
+#line 335 "src/parser.re"
{ NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT; goto start; }
-#line 1600 "src/parser.c"
+#line 1555 "src/parser.c"
yy119:
++cur;
-#line 394 "src/parser.re"
+#line 349 "src/parser.re"
{ goto comment; }
-#line 1605 "src/parser.c"
+#line 1560 "src/parser.c"
yy121:
++cur;
-#line 395 "src/parser.re"
+#line 350 "src/parser.re"
{ goto comment_sl; }
-#line 1610 "src/parser.c"
+#line 1565 "src/parser.c"
yy123:
yyaccept = 6;
mrk = ++cur;
}
yy129:
cur -= 1;
-#line 376 "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 1688 "src/parser.c"
+#line 1643 "src/parser.c"
yy130:
yych = *++cur;
switch (yych) {
}
yy131:
cur -= 1;
-#line 375 "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 1700 "src/parser.c"
+#line 1655 "src/parser.c"
yy132:
yych = *++cur;
switch (yych) {
}
yy135:
++cur;
-#line 424 "src/parser.re"
+#line 379 "src/parser.re"
{ NEWTOKEN(PSI_T_LSHIFT); goto start; }
-#line 1806 "src/parser.c"
+#line 1761 "src/parser.c"
yy137:
++cur;
-#line 426 "src/parser.re"
+#line 381 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_LE); goto start; }
-#line 1811 "src/parser.c"
+#line 1766 "src/parser.c"
yy139:
++cur;
-#line 409 "src/parser.re"
+#line 364 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_EQ); goto start; }
-#line 1816 "src/parser.c"
+#line 1771 "src/parser.c"
yy141:
++cur;
-#line 427 "src/parser.re"
+#line 382 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_GE); goto start; }
-#line 1821 "src/parser.c"
+#line 1776 "src/parser.c"
yy143:
++cur;
-#line 425 "src/parser.re"
+#line 380 "src/parser.re"
{ NEWTOKEN(PSI_T_RSHIFT); goto start; }
-#line 1826 "src/parser.c"
+#line 1781 "src/parser.c"
yy145:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy147:
-#line 487 "src/parser.re"
+#line 442 "src/parser.re"
{ NEWTOKEN(PSI_T_AS); goto start; }
-#line 1909 "src/parser.c"
+#line 1864 "src/parser.c"
yy148:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy61;
}
yy161:
-#line 457 "src/parser.re"
+#line 412 "src/parser.re"
{ NEWTOKEN(PSI_T_IF); goto start; }
-#line 2160 "src/parser.c"
+#line 2115 "src/parser.c"
yy162:
yyaccept = 5;
yych = *(mrk = ++cur);
yy163:
++cur;
cur -= 1;
-#line 392 "src/parser.re"
+#line 347 "src/parser.re"
{ char_width = sizeof(wchar_t)/8; }
-#line 2176 "src/parser.c"
+#line 2131 "src/parser.c"
yy165:
yyaccept = 5;
yych = *(mrk = ++cur);
yy179:
++cur;
cur -= 1;
-#line 391 "src/parser.re"
+#line 346 "src/parser.re"
{ char_width = 4; }
-#line 2295 "src/parser.c"
+#line 2250 "src/parser.c"
yy181:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy184;
}
yy186:
-#line 508 "src/parser.re"
+#line 463 "src/parser.re"
{ NEWTOKEN(PSI_T_NSNAME); goto start; }
-#line 2396 "src/parser.c"
+#line 2351 "src/parser.c"
yy187:
yyaccept = 5;
yych = *(mrk = ++cur);
yy202:
++cur;
cur -= 1;
-#line 390 "src/parser.re"
+#line 345 "src/parser.re"
{ char_width = 2; }
-#line 2527 "src/parser.c"
+#line 2482 "src/parser.c"
yy204:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy207:
++cur;
-#line 411 "src/parser.re"
+#line 366 "src/parser.re"
{ NEWTOKEN(PSI_T_OR); goto start; }
-#line 2557 "src/parser.c"
+#line 2512 "src/parser.c"
yy209:
++cur;
-#line 431 "src/parser.re"
+#line 386 "src/parser.re"
{ NEWTOKEN(PSI_T_ELLIPSIS); goto start; }
-#line 2562 "src/parser.c"
+#line 2517 "src/parser.c"
yy211:
yych = *++cur;
switch (yych) {
yy212:
++cur;
cur -= 1;
-#line 381 "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 2579 "src/parser.c"
+#line 2534 "src/parser.c"
yy214:
++cur;
cur -= 1;
-#line 382 "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 2585 "src/parser.c"
+#line 2540 "src/parser.c"
yy216:
yych = *++cur;
switch (yych) {
++cur;
yy218:
cur -= 2;
-#line 377 "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 2599 "src/parser.c"
+#line 2554 "src/parser.c"
yy219:
yych = *++cur;
switch (yych) {
}
yy222:
++cur;
-#line 510 "src/parser.re"
+#line 465 "src/parser.re"
{ tok += 1; cur -= 1; NEWTOKEN(PSI_T_CPP_HEADER); cur += 1; goto start; }
-#line 2648 "src/parser.c"
+#line 2603 "src/parser.c"
yy224:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy242:
-#line 482 "src/parser.re"
+#line 437 "src/parser.re"
{ NEWTOKEN(PSI_T_LET); goto start; }
-#line 2861 "src/parser.c"
+#line 2816 "src/parser.c"
yy243:
yyaccept = 12;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy244:
-#line 481 "src/parser.re"
+#line 436 "src/parser.re"
{ NEWTOKEN(PSI_T_LIB); goto start; }
-#line 2936 "src/parser.c"
+#line 2891 "src/parser.c"
yy245:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy253:
-#line 483 "src/parser.re"
+#line 438 "src/parser.re"
{ NEWTOKEN(PSI_T_SET); goto start; }
-#line 3068 "src/parser.c"
+#line 3023 "src/parser.c"
yy254:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy273:
-#line 451 "src/parser.re"
+#line 406 "src/parser.re"
{ NEWTOKEN(PSI_T_INT); goto start; }
-#line 3296 "src/parser.c"
+#line 3251 "src/parser.c"
yy274:
yyaccept = 5;
yych = *(mrk = ++cur);
yy282:
++cur;
cur -= 1;
-#line 389 "src/parser.re"
+#line 344 "src/parser.re"
{ char_width = 1; }
-#line 3364 "src/parser.c"
+#line 3319 "src/parser.c"
yy284:
yyaccept = 5;
yych = *(mrk = ++cur);
yy288:
++cur;
cur -= 2;
-#line 384 "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 3398 "src/parser.c"
+#line 3353 "src/parser.c"
yy290:
++cur;
cur -= 2;
-#line 383 "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 3404 "src/parser.c"
+#line 3359 "src/parser.c"
yy292:
++cur;
cur -= 2;
-#line 385 "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 3410 "src/parser.c"
+#line 3365 "src/parser.c"
yy294:
++cur;
cur -= 3;
-#line 378 "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 3416 "src/parser.c"
+#line 3371 "src/parser.c"
yy296:
++cur;
if ((lim - cur) < 3) if (cur >= lim) goto done;;
default: goto yy61;
}
yy305:
-#line 461 "src/parser.re"
+#line 416 "src/parser.re"
{ NEWTOKEN(PSI_T_ELIF); goto start; }
-#line 3574 "src/parser.c"
+#line 3529 "src/parser.c"
yy306:
yyaccept = 16;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy307:
-#line 460 "src/parser.re"
+#line 415 "src/parser.re"
{ NEWTOKEN(PSI_T_ELSE); goto start; }
-#line 3649 "src/parser.c"
+#line 3604 "src/parser.c"
yy308:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy313:
-#line 488 "src/parser.re"
+#line 443 "src/parser.re"
{ NEWTOKEN(PSI_T_FREE); goto start; }
-#line 3756 "src/parser.c"
+#line 3711 "src/parser.c"
yy314:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy321:
-#line 472 "src/parser.re"
+#line 427 "src/parser.re"
{ NEWTOKEN(PSI_T_NULL); goto start; }
-#line 3879 "src/parser.c"
+#line 3834 "src/parser.c"
yy322:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy333:
-#line 489 "src/parser.re"
+#line 444 "src/parser.re"
{ NEWTOKEN(PSI_T_TEMP); goto start; }
-#line 4033 "src/parser.c"
+#line 3988 "src/parser.c"
yy334:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy341:
-#line 470 "src/parser.re"
+#line 425 "src/parser.re"
{ NEWTOKEN(PSI_T_TRUE); goto start; }
-#line 4156 "src/parser.c"
+#line 4111 "src/parser.c"
yy342:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy345:
-#line 498 "src/parser.re"
+#line 453 "src/parser.re"
{ NEWTOKEN(PSI_T_ZVAL); goto start; }
-#line 4247 "src/parser.c"
+#line 4202 "src/parser.c"
yy346:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy352:
-#line 448 "src/parser.re"
+#line 403 "src/parser.re"
{ NEWTOKEN(PSI_T_BOOL); goto start; }
-#line 4359 "src/parser.c"
+#line 4314 "src/parser.c"
yy353:
yyaccept = 23;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy354:
-#line 449 "src/parser.re"
+#line 404 "src/parser.re"
{ NEWTOKEN(PSI_T_CHAR); goto start; }
-#line 4434 "src/parser.c"
+#line 4389 "src/parser.c"
yy355:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy358:
-#line 445 "src/parser.re"
+#line 400 "src/parser.re"
{ NEWTOKEN(PSI_T_ENUM); goto start; }
-#line 4523 "src/parser.c"
+#line 4478 "src/parser.c"
yy359:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy361:
-#line 441 "src/parser.re"
+#line 396 "src/parser.re"
{ NEWTOKEN(PSI_T_LINE); goto start; }
-#line 4606 "src/parser.c"
+#line 4561 "src/parser.c"
yy362:
yyaccept = 26;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy363:
-#line 452 "src/parser.re"
+#line 407 "src/parser.re"
{ NEWTOKEN(PSI_T_LONG); goto start; }
-#line 4681 "src/parser.c"
+#line 4636 "src/parser.c"
yy364:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy373:
-#line 447 "src/parser.re"
+#line 402 "src/parser.re"
{ NEWTOKEN(PSI_T_VOID); goto start; }
-#line 4812 "src/parser.c"
+#line 4767 "src/parser.c"
yy374:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy376:
-#line 476 "src/parser.re"
+#line 431 "src/parser.re"
{ NEWTOKEN(PSI_T_ARRAY); goto start; }
-#line 4894 "src/parser.c"
+#line 4849 "src/parser.c"
yy377:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy383:
-#line 499 "src/parser.re"
+#line 454 "src/parser.re"
{ NEWTOKEN(PSI_T_COUNT); goto start; }
-#line 5009 "src/parser.c"
+#line 4964 "src/parser.c"
yy384:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy386:
-#line 462 "src/parser.re"
+#line 417 "src/parser.re"
{ NEWTOKEN(PSI_T_ENDIF); goto start; }
-#line 5092 "src/parser.c"
+#line 5047 "src/parser.c"
yy387:
yyaccept = 31;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy388:
-#line 467 "src/parser.re"
+#line 422 "src/parser.re"
{ NEWTOKEN(PSI_T_ERROR); goto start; }
-#line 5167 "src/parser.c"
+#line 5122 "src/parser.c"
yy389:
yyaccept = 32;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy390:
-#line 471 "src/parser.re"
+#line 426 "src/parser.re"
{ NEWTOKEN(PSI_T_FALSE); goto start; }
-#line 5242 "src/parser.c"
+#line 5197 "src/parser.c"
yy391:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy394:
-#line 458 "src/parser.re"
+#line 413 "src/parser.re"
{ NEWTOKEN(PSI_T_IFDEF); goto start; }
-#line 5333 "src/parser.c"
+#line 5288 "src/parser.c"
yy395:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy399:
-#line 473 "src/parser.re"
+#line 428 "src/parser.re"
{ NEWTOKEN(PSI_T_MIXED); goto start; }
-#line 5432 "src/parser.c"
+#line 5387 "src/parser.c"
yy400:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy417:
-#line 465 "src/parser.re"
+#line 420 "src/parser.re"
{ NEWTOKEN(PSI_T_UNDEF); goto start; }
-#line 5635 "src/parser.c"
+#line 5590 "src/parser.c"
yy418:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy425:
-#line 446 "src/parser.re"
+#line 401 "src/parser.re"
{ NEWTOKEN(PSI_T_CONST); goto start; }
-#line 5753 "src/parser.c"
+#line 5708 "src/parser.c"
yy426:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy428:
-#line 453 "src/parser.re"
+#line 408 "src/parser.re"
{ NEWTOKEN(PSI_T_FLOAT); goto start; }
-#line 5837 "src/parser.c"
+#line 5792 "src/parser.c"
yy429:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy431:
-#line 450 "src/parser.re"
+#line 405 "src/parser.re"
{ NEWTOKEN(PSI_T_SHORT); goto start; }
-#line 5919 "src/parser.c"
+#line 5874 "src/parser.c"
yy432:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy437:
-#line 444 "src/parser.re"
+#line 399 "src/parser.re"
{ NEWTOKEN(PSI_T_UNION); goto start; }
-#line 6022 "src/parser.c"
+#line 5977 "src/parser.c"
yy438:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy441:
-#line 496 "src/parser.re"
+#line 451 "src/parser.re"
{ NEWTOKEN(PSI_T_ARRVAL); goto start; }
-#line 6111 "src/parser.c"
+#line 6066 "src/parser.c"
yy442:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy446:
-#line 500 "src/parser.re"
+#line 455 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLOC); goto start; }
-#line 6210 "src/parser.c"
+#line 6165 "src/parser.c"
yy447:
yyaccept = 42;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy448:
-#line 463 "src/parser.re"
+#line 418 "src/parser.re"
{ NEWTOKEN(PSI_T_DEFINE); goto start; }
-#line 6287 "src/parser.c"
+#line 6242 "src/parser.c"
yy449:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy452:
-#line 459 "src/parser.re"
+#line 414 "src/parser.re"
{ NEWTOKEN(PSI_T_IFNDEF); goto start; }
-#line 6378 "src/parser.c"
+#line 6333 "src/parser.c"
yy453:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy455:
-#line 493 "src/parser.re"
+#line 448 "src/parser.re"
{ NEWTOKEN(PSI_T_INTVAL); goto start; }
-#line 6461 "src/parser.c"
+#line 6416 "src/parser.c"
yy456:
yyaccept = 45;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy457:
-#line 477 "src/parser.re"
+#line 432 "src/parser.re"
{ NEWTOKEN(PSI_T_OBJECT); goto start; }
-#line 6536 "src/parser.c"
+#line 6491 "src/parser.c"
yy458:
yyaccept = 46;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy459:
-#line 497 "src/parser.re"
+#line 452 "src/parser.re"
{ NEWTOKEN(PSI_T_OBJVAL); goto start; }
-#line 6611 "src/parser.c"
+#line 6566 "src/parser.c"
yy460:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy464:
-#line 486 "src/parser.re"
+#line 441 "src/parser.re"
{ NEWTOKEN(PSI_T_RETURN); goto start; }
-#line 6710 "src/parser.c"
+#line 6665 "src/parser.c"
yy465:
yyaccept = 48;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy466:
-#line 479 "src/parser.re"
+#line 434 "src/parser.re"
{ NEWTOKEN(PSI_T_STATIC); goto start; }
-#line 6785 "src/parser.c"
+#line 6740 "src/parser.c"
yy467:
yyaccept = 49;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy468:
-#line 475 "src/parser.re"
+#line 430 "src/parser.re"
{ NEWTOKEN(PSI_T_STRING); goto start; }
-#line 6860 "src/parser.c"
+#line 6815 "src/parser.c"
yy469:
yyaccept = 50;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy470:
-#line 490 "src/parser.re"
+#line 445 "src/parser.re"
{ NEWTOKEN(PSI_T_STRLEN); goto start; }
-#line 6935 "src/parser.c"
+#line 6890 "src/parser.c"
yy471:
yyaccept = 51;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy472:
-#line 491 "src/parser.re"
+#line 446 "src/parser.re"
{ NEWTOKEN(PSI_T_STRVAL); goto start; }
-#line 7010 "src/parser.c"
+#line 6965 "src/parser.c"
yy473:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy477:
-#line 504 "src/parser.re"
+#line 459 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_INT); goto start; }
-#line 7109 "src/parser.c"
+#line 7064 "src/parser.c"
yy478:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy487:
-#line 454 "src/parser.re"
+#line 409 "src/parser.re"
{ NEWTOKEN(PSI_T_DOUBLE); goto start; }
-#line 7243 "src/parser.c"
+#line 7198 "src/parser.c"
yy488:
yyaccept = 54;
yych = *(mrk = ++cur);
default: goto yy527;
}
yy489:
-#line 433 "src/parser.re"
+#line 388 "src/parser.re"
{ NEWTOKEN(PSI_T_PRAGMA); goto start; }
-#line 7318 "src/parser.c"
+#line 7273 "src/parser.c"
yy490:
yyaccept = 55;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy491:
-#line 456 "src/parser.re"
+#line 411 "src/parser.re"
{ NEWTOKEN(PSI_T_SIGNED); goto start; }
-#line 7393 "src/parser.c"
+#line 7348 "src/parser.c"
yy492:
yyaccept = 56;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy493:
-#line 440 "src/parser.re"
+#line 395 "src/parser.re"
{ NEWTOKEN(PSI_T_SIZEOF); goto start; }
-#line 7468 "src/parser.c"
+#line 7423 "src/parser.c"
yy494:
yyaccept = 57;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy495:
-#line 443 "src/parser.re"
+#line 398 "src/parser.re"
{ NEWTOKEN(PSI_T_STRUCT); goto start; }
-#line 7543 "src/parser.c"
+#line 7498 "src/parser.c"
yy496:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy500:
-#line 495 "src/parser.re"
+#line 450 "src/parser.re"
{ NEWTOKEN(PSI_T_BOOLVAL); goto start; }
-#line 7639 "src/parser.c"
+#line 7594 "src/parser.c"
yy501:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy504:
-#line 464 "src/parser.re"
+#line 419 "src/parser.re"
{ NEWTOKEN(PSI_T_DEFINED); goto start; }
-#line 7730 "src/parser.c"
+#line 7685 "src/parser.c"
yy505:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy508:
-#line 468 "src/parser.re"
+#line 423 "src/parser.re"
{ NEWTOKEN(PSI_T_INCLUDE); goto start; }
-#line 7822 "src/parser.c"
+#line 7777 "src/parser.c"
yy509:
yyaccept = 61;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy510:
-#line 492 "src/parser.re"
+#line 447 "src/parser.re"
{ NEWTOKEN(PSI_T_PATHVAL); goto start; }
-#line 7897 "src/parser.c"
+#line 7852 "src/parser.c"
yy511:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy515:
-#line 506 "src/parser.re"
+#line 461 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_BOOL); goto start; }
-#line 7996 "src/parser.c"
+#line 7951 "src/parser.c"
yy516:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy520:
-#line 466 "src/parser.re"
+#line 421 "src/parser.re"
{ NEWTOKEN(PSI_T_WARNING); goto start; }
-#line 8095 "src/parser.c"
+#line 8050 "src/parser.c"
yy521:
yyaccept = 64;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy522:
-#line 438 "src/parser.re"
+#line 393 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_ASM); goto start; }
-#line 8170 "src/parser.c"
+#line 8125 "src/parser.c"
yy523:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy530:
-#line 442 "src/parser.re"
+#line 397 "src/parser.re"
{ NEWTOKEN(PSI_T_TYPEDEF); goto start; }
-#line 8347 "src/parser.c"
+#line 8302 "src/parser.c"
yy531:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy534:
-#line 474 "src/parser.re"
+#line 429 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLABLE); goto start; }
-#line 8436 "src/parser.c"
+#line 8391 "src/parser.c"
yy535:
yyaccept = 67;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy536:
-#line 478 "src/parser.re"
+#line 433 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLBACK); goto start; }
-#line 8511 "src/parser.c"
+#line 8466 "src/parser.c"
yy537:
yyaccept = 68;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy538:
-#line 494 "src/parser.re"
+#line 449 "src/parser.re"
{ NEWTOKEN(PSI_T_FLOATVAL); goto start; }
-#line 8586 "src/parser.c"
+#line 8541 "src/parser.c"
yy539:
yyaccept = 69;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy540:
-#line 480 "src/parser.re"
+#line 435 "src/parser.re"
{ NEWTOKEN(PSI_T_FUNCTION); goto start; }
-#line 8661 "src/parser.c"
+#line 8616 "src/parser.c"
yy541:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy545:
-#line 502 "src/parser.re"
+#line 457 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_ARRAY); goto start; }
-#line 8760 "src/parser.c"
+#line 8715 "src/parser.c"
yy546:
yyaccept = 71;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy547:
-#line 505 "src/parser.re"
+#line 460 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_FLOAT); goto start; }
-#line 8835 "src/parser.c"
+#line 8790 "src/parser.c"
yy548:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy553:
-#line 435 "src/parser.re"
+#line 390 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_INLINE); goto start; }
-#line 8940 "src/parser.c"
+#line 8895 "src/parser.c"
yy554:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy558:
-#line 455 "src/parser.re"
+#line 410 "src/parser.re"
{ NEWTOKEN(PSI_T_UNSIGNED); goto start; }
-#line 9097 "src/parser.c"
+#line 9052 "src/parser.c"
yy559:
yyaccept = 74;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy560:
-#line 439 "src/parser.re"
+#line 394 "src/parser.re"
{ NEWTOKEN(PSI_T_VOLATILE); goto start; }
-#line 9172 "src/parser.c"
+#line 9127 "src/parser.c"
yy561:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy565:
-#line 501 "src/parser.re"
+#line 456 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_OBJECT); goto start; }
-#line 9271 "src/parser.c"
+#line 9226 "src/parser.c"
yy566:
yyaccept = 76;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy567:
-#line 503 "src/parser.re"
+#line 458 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_STRING); goto start; }
-#line 9346 "src/parser.c"
+#line 9301 "src/parser.c"
yy568:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy575:
-#line 484 "src/parser.re"
+#line 439 "src/parser.re"
{ NEWTOKEN(PSI_T_PRE_ASSERT); goto start; }
-#line 9533 "src/parser.c"
+#line 9488 "src/parser.c"
yy576:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy579:
-#line 436 "src/parser.re"
+#line 391 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_RESTRICT); goto start; }
-#line 9622 "src/parser.c"
+#line 9577 "src/parser.c"
yy580:
yyaccept = 5;
mrk = ++cur;
default: goto yy61;
}
yy583:
-#line 485 "src/parser.re"
+#line 440 "src/parser.re"
{ NEWTOKEN(PSI_T_POST_ASSERT); goto start; }
-#line 9780 "src/parser.c"
+#line 9735 "src/parser.c"
yy584:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy527;
}
yy587:
-#line 434 "src/parser.re"
+#line 389 "src/parser.re"
{ NEWTOKEN(PSI_T_PRAGMA_ONCE); goto start; }
-#line 9872 "src/parser.c"
+#line 9827 "src/parser.c"
yy588:
yyaccept = 81;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy589:
-#line 469 "src/parser.re"
+#line 424 "src/parser.re"
{ NEWTOKEN(PSI_T_INCLUDE_NEXT); goto start; }
-#line 9947 "src/parser.c"
+#line 9902 "src/parser.c"
yy590:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy594:
-#line 437 "src/parser.re"
+#line 392 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_EXTENSION); goto start; }
-#line 10046 "src/parser.c"
+#line 10001 "src/parser.c"
yy595:
++cur;
if ((lim - cur) < 2) if (cur >= lim) goto done;;
}
yy598:
++cur;
-#line 511 "src/parser.re"
+#line 466 "src/parser.re"
{ parens = 2; goto cpp_attribute; }
-#line 10068 "src/parser.c"
+#line 10023 "src/parser.c"
}
-#line 517 "src/parser.re"
+#line 472 "src/parser.re"
character: ;
-#line 10075 "src/parser.c"
+#line 10030 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy602:
++cur;
-#line 535 "src/parser.re"
+#line 490 "src/parser.re"
{ escaped = false; goto character; }
-#line 10091 "src/parser.c"
+#line 10046 "src/parser.c"
yy604:
++cur;
-#line 522 "src/parser.re"
+#line 477 "src/parser.re"
{ NEWLINE(); goto character; }
-#line 10096 "src/parser.c"
+#line 10051 "src/parser.c"
yy606:
++cur;
-#line 524 "src/parser.re"
+#line 479 "src/parser.re"
{
if (escaped) {
escaped = false;
token->flags = char_width;
goto start;
}
-#line 10111 "src/parser.c"
+#line 10066 "src/parser.c"
yy608:
++cur;
-#line 523 "src/parser.re"
+#line 478 "src/parser.re"
{ escaped = !escaped; goto character; }
-#line 10116 "src/parser.c"
+#line 10071 "src/parser.c"
}
-#line 537 "src/parser.re"
+#line 492 "src/parser.re"
string: ;
-#line 10123 "src/parser.c"
+#line 10078 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy612:
++cur;
-#line 555 "src/parser.re"
+#line 510 "src/parser.re"
{ escaped = false; goto string; }
-#line 10139 "src/parser.c"
+#line 10094 "src/parser.c"
yy614:
++cur;
-#line 542 "src/parser.re"
+#line 497 "src/parser.re"
{ NEWLINE(); goto string; }
-#line 10144 "src/parser.c"
+#line 10099 "src/parser.c"
yy616:
++cur;
-#line 544 "src/parser.re"
+#line 499 "src/parser.re"
{
if (escaped) {
escaped = false;
token->flags = char_width;
goto start;
}
-#line 10159 "src/parser.c"
+#line 10114 "src/parser.c"
yy618:
++cur;
-#line 543 "src/parser.re"
+#line 498 "src/parser.re"
{ escaped = !escaped; goto string; }
-#line 10164 "src/parser.c"
+#line 10119 "src/parser.c"
}
-#line 557 "src/parser.re"
+#line 512 "src/parser.re"
comment: ;
-#line 10171 "src/parser.c"
+#line 10126 "src/parser.c"
{
unsigned char yych;
if ((lim - cur) < 2) if (cur >= lim) goto done;;
yy622:
++cur;
yy623:
-#line 564 "src/parser.re"
+#line 519 "src/parser.re"
{ goto comment; }
-#line 10187 "src/parser.c"
+#line 10142 "src/parser.c"
yy624:
++cur;
-#line 562 "src/parser.re"
+#line 517 "src/parser.re"
{ NEWLINE(); goto comment; }
-#line 10192 "src/parser.c"
+#line 10147 "src/parser.c"
yy626:
yych = *++cur;
switch (yych) {
}
yy627:
++cur;
-#line 563 "src/parser.re"
+#line 518 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMENT); goto start; }
-#line 10203 "src/parser.c"
+#line 10158 "src/parser.c"
}
-#line 566 "src/parser.re"
+#line 521 "src/parser.re"
comment_sl: ;
-#line 10210 "src/parser.c"
+#line 10165 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy631:
++cur;
-#line 572 "src/parser.re"
+#line 527 "src/parser.re"
{ goto comment_sl; }
-#line 10224 "src/parser.c"
+#line 10179 "src/parser.c"
yy633:
++cur;
-#line 571 "src/parser.re"
+#line 526 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMENT); NEWLINE(); goto start; }
-#line 10229 "src/parser.c"
+#line 10184 "src/parser.c"
}
-#line 574 "src/parser.re"
+#line 529 "src/parser.re"
cpp_attribute: ;
-#line 10237 "src/parser.c"
+#line 10192 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy637:
++cur;
-#line 583 "src/parser.re"
+#line 538 "src/parser.re"
{ goto cpp_attribute; }
-#line 10253 "src/parser.c"
+#line 10208 "src/parser.c"
yy639:
++cur;
-#line 582 "src/parser.re"
+#line 537 "src/parser.re"
{ NEWLINE(); goto cpp_attribute; }
-#line 10258 "src/parser.c"
+#line 10213 "src/parser.c"
yy641:
++cur;
-#line 580 "src/parser.re"
+#line 535 "src/parser.re"
{ ++parens; goto cpp_attribute; }
-#line 10263 "src/parser.c"
+#line 10218 "src/parser.c"
yy643:
++cur;
-#line 581 "src/parser.re"
+#line 536 "src/parser.re"
{ if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } }
-#line 10268 "src/parser.c"
+#line 10223 "src/parser.c"
}
-#line 585 "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;