-/* Generated by re2c 1.0.2 on Fri Oct 13 16:16:58 2017 */
+/* 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 "php_psi_stdinc.h"
#include <sys/mman.h>
#include <assert.h>
+#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)) {
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("<eval number>"), 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;
return false;
}
+ psi_parser_postprocess(P);
+
psi_plist_free(preproc);
return true;
}
++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)
{
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;
ctxmrk = NULL;
tok = cur;
+ (void) ctxmrk;
+
-#line 283 "src/parser.c"
+#line 304 "src/parser.c"
{
unsigned char yych;
unsigned int yyaccept = 0;
yy2:
++cur;
yy3:
-#line 448 "src/parser.re"
+#line 469 "src/parser.re"
{ NEWTOKEN(-2); goto error; }
-#line 410 "src/parser.c"
+#line 431 "src/parser.c"
yy4:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy6;
}
yy6:
-#line 447 "src/parser.re"
+#line 468 "src/parser.re"
{ NEWTOKEN(PSI_T_WHITESPACE); goto start; }
-#line 424 "src/parser.c"
+#line 445 "src/parser.c"
yy7:
++cur;
-#line 446 "src/parser.re"
+#line 467 "src/parser.re"
{ NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; }
-#line 429 "src/parser.c"
+#line 450 "src/parser.c"
yy9:
yych = *++cur;
switch (yych) {
default: goto yy10;
}
yy10:
-#line 349 "src/parser.re"
+#line 370 "src/parser.re"
{ NEWTOKEN(PSI_T_NOT); goto start; }
-#line 439 "src/parser.c"
+#line 460 "src/parser.c"
yy11:
++cur;
-#line 322 "src/parser.re"
+#line 343 "src/parser.re"
{ escaped = false; tok += 1; goto string; }
-#line 444 "src/parser.c"
+#line 465 "src/parser.c"
yy13:
yych = *++cur;
switch (yych) {
default: goto yy14;
}
yy14:
-#line 332 "src/parser.re"
+#line 353 "src/parser.re"
{ NEWTOKEN(PSI_T_HASH); goto start; }
-#line 454 "src/parser.c"
+#line 475 "src/parser.c"
yy15:
yych = *++cur;
switch (yych) {
}
yy16:
++cur;
-#line 350 "src/parser.re"
+#line 371 "src/parser.re"
{ NEWTOKEN(PSI_T_MODULO); goto start; }
-#line 529 "src/parser.c"
+#line 550 "src/parser.c"
yy18:
yych = *++cur;
switch (yych) {
default: goto yy19;
}
yy19:
-#line 351 "src/parser.re"
+#line 372 "src/parser.re"
{ NEWTOKEN(PSI_T_AMPERSAND); goto start; }
-#line 539 "src/parser.c"
+#line 560 "src/parser.c"
yy20:
++cur;
-#line 321 "src/parser.re"
+#line 342 "src/parser.re"
{ escaped = false; tok += 1; goto character; }
-#line 544 "src/parser.c"
+#line 565 "src/parser.c"
yy22:
++cur;
-#line 333 "src/parser.re"
+#line 354 "src/parser.re"
{ NEWTOKEN(PSI_T_LPAREN); goto start; }
-#line 549 "src/parser.c"
+#line 570 "src/parser.c"
yy24:
++cur;
-#line 334 "src/parser.re"
+#line 355 "src/parser.re"
{ NEWTOKEN(PSI_T_RPAREN); goto start; }
-#line 554 "src/parser.c"
+#line 575 "src/parser.c"
yy26:
++cur;
-#line 347 "src/parser.re"
+#line 368 "src/parser.re"
{ NEWTOKEN(PSI_T_ASTERISK); goto start; }
-#line 559 "src/parser.c"
+#line 580 "src/parser.c"
yy28:
yyaccept = 0;
yych = *(mrk = ++cur);
default: goto yy29;
}
yy29:
-#line 352 "src/parser.re"
+#line 373 "src/parser.re"
{ NEWTOKEN(PSI_T_PLUS); goto start; }
-#line 580 "src/parser.c"
+#line 601 "src/parser.c"
yy30:
++cur;
-#line 336 "src/parser.re"
+#line 357 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMA); goto start; }
-#line 585 "src/parser.c"
+#line 606 "src/parser.c"
yy32:
yyaccept = 1;
yych = *(mrk = ++cur);
default: goto yy33;
}
yy33:
-#line 353 "src/parser.re"
+#line 374 "src/parser.re"
{ NEWTOKEN(PSI_T_MINUS); goto start; }
-#line 606 "src/parser.c"
+#line 627 "src/parser.c"
yy34:
yyaccept = 2;
yych = *(mrk = ++cur);
default: goto yy35;
}
yy35:
-#line 364 "src/parser.re"
+#line 385 "src/parser.re"
{ NEWTOKEN(PSI_T_PERIOD); goto start; }
-#line 627 "src/parser.c"
+#line 648 "src/parser.c"
yy36:
yych = *++cur;
switch (yych) {
default: goto yy37;
}
yy37:
-#line 354 "src/parser.re"
+#line 375 "src/parser.re"
{ NEWTOKEN(PSI_T_SLASH); goto start; }
-#line 638 "src/parser.c"
+#line 659 "src/parser.c"
yy38:
yyaccept = 3;
yych = *(mrk = ++cur);
default: goto yy126;
}
yy39:
-#line 308 "src/parser.re"
+#line 329 "src/parser.re"
{ NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT; goto start; }
-#line 653 "src/parser.c"
+#line 674 "src/parser.c"
yy40:
yyaccept = 3;
mrk = ++cur;
}
yy42:
++cur;
-#line 337 "src/parser.re"
+#line 358 "src/parser.re"
{ NEWTOKEN(PSI_T_COLON); goto start; }
-#line 683 "src/parser.c"
+#line 704 "src/parser.c"
yy44:
++cur;
-#line 335 "src/parser.re"
+#line 356 "src/parser.re"
{ NEWTOKEN(PSI_T_EOS); goto start; }
-#line 688 "src/parser.c"
+#line 709 "src/parser.c"
yy46:
yyaccept = 4;
yych = *(mrk = ++cur);
default: goto yy47;
}
yy47:
-#line 362 "src/parser.re"
+#line 383 "src/parser.re"
{ NEWTOKEN(PSI_T_LCHEVR); goto start; }
-#line 766 "src/parser.c"
+#line 787 "src/parser.c"
yy48:
yych = *++cur;
switch (yych) {
default: goto yy49;
}
yy49:
-#line 346 "src/parser.re"
+#line 367 "src/parser.re"
{ NEWTOKEN(PSI_T_EQUALS); goto start; }
-#line 776 "src/parser.c"
+#line 797 "src/parser.c"
yy50:
yych = *++cur;
switch (yych) {
default: goto yy51;
}
yy51:
-#line 363 "src/parser.re"
+#line 384 "src/parser.re"
{ NEWTOKEN(PSI_T_RCHEVR); goto start; }
-#line 787 "src/parser.c"
+#line 808 "src/parser.c"
yy52:
++cur;
-#line 366 "src/parser.re"
+#line 387 "src/parser.re"
{ NEWTOKEN(PSI_T_IIF); goto start; }
-#line 792 "src/parser.c"
+#line 813 "src/parser.c"
yy54:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy62;
}
yy55:
-#line 441 "src/parser.re"
+#line 462 "src/parser.re"
{ NEWTOKEN(PSI_T_NAME); goto start; }
-#line 806 "src/parser.c"
+#line 827 "src/parser.c"
yy56:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy75:
++cur;
-#line 340 "src/parser.re"
+#line 361 "src/parser.re"
{ NEWTOKEN(PSI_T_LBRACKET); goto start; }
-#line 1051 "src/parser.c"
+#line 1072 "src/parser.c"
yy77:
yych = *++cur;
switch (yych) {
default: goto yy184;
}
yy78:
-#line 355 "src/parser.re"
+#line 376 "src/parser.re"
{ NEWTOKEN(PSI_T_BSLASH); goto start; }
-#line 1135 "src/parser.c"
+#line 1156 "src/parser.c"
yy79:
++cur;
-#line 341 "src/parser.re"
+#line 362 "src/parser.re"
{ NEWTOKEN(PSI_T_RBRACKET); goto start; }
-#line 1140 "src/parser.c"
+#line 1161 "src/parser.c"
yy81:
++cur;
-#line 357 "src/parser.re"
+#line 378 "src/parser.re"
{ NEWTOKEN(PSI_T_CARET); goto start; }
-#line 1145 "src/parser.c"
+#line 1166 "src/parser.c"
yy83:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy96:
++cur;
-#line 338 "src/parser.re"
+#line 359 "src/parser.re"
{ NEWTOKEN(PSI_T_LBRACE); goto start; }
-#line 1287 "src/parser.c"
+#line 1308 "src/parser.c"
yy98:
yych = *++cur;
switch (yych) {
default: goto yy99;
}
yy99:
-#line 356 "src/parser.re"
+#line 377 "src/parser.re"
{ NEWTOKEN(PSI_T_PIPE); goto start; }
-#line 1297 "src/parser.c"
+#line 1318 "src/parser.c"
yy100:
++cur;
-#line 339 "src/parser.re"
+#line 360 "src/parser.re"
{ NEWTOKEN(PSI_T_RBRACE); goto start; }
-#line 1302 "src/parser.c"
+#line 1323 "src/parser.c"
yy102:
++cur;
-#line 348 "src/parser.re"
+#line 369 "src/parser.re"
{ NEWTOKEN(PSI_T_TILDE); goto start; }
-#line 1307 "src/parser.c"
+#line 1328 "src/parser.c"
yy104:
++cur;
-#line 342 "src/parser.re"
+#line 363 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_NE); goto start; }
-#line 1312 "src/parser.c"
+#line 1333 "src/parser.c"
yy106:
++cur;
-#line 331 "src/parser.re"
+#line 352 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_PASTE); goto start; }
-#line 1317 "src/parser.c"
+#line 1338 "src/parser.c"
yy108:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy108;
}
yy110:
-#line 443 "src/parser.re"
+#line 464 "src/parser.re"
{ NEWTOKEN(PSI_T_DOLLAR_NAME); goto start; }
-#line 1393 "src/parser.c"
+#line 1414 "src/parser.c"
yy111:
++cur;
-#line 344 "src/parser.re"
+#line 365 "src/parser.re"
{ NEWTOKEN(PSI_T_AND); goto start; }
-#line 1398 "src/parser.c"
+#line 1419 "src/parser.c"
yy113:
yych = *++cur;
switch (yych) {
default: goto yy118;
}
yy118:
-#line 314 "src/parser.re"
+#line 335 "src/parser.re"
{ NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT; goto start; }
-#line 1534 "src/parser.c"
+#line 1555 "src/parser.c"
yy119:
++cur;
-#line 328 "src/parser.re"
+#line 349 "src/parser.re"
{ goto comment; }
-#line 1539 "src/parser.c"
+#line 1560 "src/parser.c"
yy121:
++cur;
-#line 329 "src/parser.re"
+#line 350 "src/parser.re"
{ goto comment_sl; }
-#line 1544 "src/parser.c"
+#line 1565 "src/parser.c"
yy123:
yyaccept = 6;
mrk = ++cur;
}
yy129:
cur -= 1;
-#line 310 "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 1622 "src/parser.c"
+#line 1643 "src/parser.c"
yy130:
yych = *++cur;
switch (yych) {
}
yy131:
cur -= 1;
-#line 309 "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 1634 "src/parser.c"
+#line 1655 "src/parser.c"
yy132:
yych = *++cur;
switch (yych) {
}
yy135:
++cur;
-#line 358 "src/parser.re"
+#line 379 "src/parser.re"
{ NEWTOKEN(PSI_T_LSHIFT); goto start; }
-#line 1740 "src/parser.c"
+#line 1761 "src/parser.c"
yy137:
++cur;
-#line 360 "src/parser.re"
+#line 381 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_LE); goto start; }
-#line 1745 "src/parser.c"
+#line 1766 "src/parser.c"
yy139:
++cur;
-#line 343 "src/parser.re"
+#line 364 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_EQ); goto start; }
-#line 1750 "src/parser.c"
+#line 1771 "src/parser.c"
yy141:
++cur;
-#line 361 "src/parser.re"
+#line 382 "src/parser.re"
{ NEWTOKEN(PSI_T_CMP_GE); goto start; }
-#line 1755 "src/parser.c"
+#line 1776 "src/parser.c"
yy143:
++cur;
-#line 359 "src/parser.re"
+#line 380 "src/parser.re"
{ NEWTOKEN(PSI_T_RSHIFT); goto start; }
-#line 1760 "src/parser.c"
+#line 1781 "src/parser.c"
yy145:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy147:
-#line 421 "src/parser.re"
+#line 442 "src/parser.re"
{ NEWTOKEN(PSI_T_AS); goto start; }
-#line 1843 "src/parser.c"
+#line 1864 "src/parser.c"
yy148:
++cur;
if (lim <= cur) if (cur >= lim) goto done;;
default: goto yy61;
}
yy161:
-#line 391 "src/parser.re"
+#line 412 "src/parser.re"
{ NEWTOKEN(PSI_T_IF); goto start; }
-#line 2094 "src/parser.c"
+#line 2115 "src/parser.c"
yy162:
yyaccept = 5;
yych = *(mrk = ++cur);
yy163:
++cur;
cur -= 1;
-#line 326 "src/parser.re"
- { char_width = SIZEOF_WCHAR_T/8; }
-#line 2110 "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);
yy179:
++cur;
cur -= 1;
-#line 325 "src/parser.re"
+#line 346 "src/parser.re"
{ char_width = 4; }
-#line 2229 "src/parser.c"
+#line 2250 "src/parser.c"
yy181:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy184;
}
yy186:
-#line 442 "src/parser.re"
+#line 463 "src/parser.re"
{ NEWTOKEN(PSI_T_NSNAME); goto start; }
-#line 2330 "src/parser.c"
+#line 2351 "src/parser.c"
yy187:
yyaccept = 5;
yych = *(mrk = ++cur);
yy202:
++cur;
cur -= 1;
-#line 324 "src/parser.re"
+#line 345 "src/parser.re"
{ char_width = 2; }
-#line 2461 "src/parser.c"
+#line 2482 "src/parser.c"
yy204:
yyaccept = 5;
yych = *(mrk = ++cur);
}
yy207:
++cur;
-#line 345 "src/parser.re"
+#line 366 "src/parser.re"
{ NEWTOKEN(PSI_T_OR); goto start; }
-#line 2491 "src/parser.c"
+#line 2512 "src/parser.c"
yy209:
++cur;
-#line 365 "src/parser.re"
+#line 386 "src/parser.re"
{ NEWTOKEN(PSI_T_ELLIPSIS); goto start; }
-#line 2496 "src/parser.c"
+#line 2517 "src/parser.c"
yy211:
yych = *++cur;
switch (yych) {
yy212:
++cur;
cur -= 1;
-#line 315 "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 2513 "src/parser.c"
+#line 2534 "src/parser.c"
yy214:
++cur;
cur -= 1;
-#line 316 "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 2519 "src/parser.c"
+#line 2540 "src/parser.c"
yy216:
yych = *++cur;
switch (yych) {
++cur;
yy218:
cur -= 2;
-#line 311 "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 2533 "src/parser.c"
+#line 2554 "src/parser.c"
yy219:
yych = *++cur;
switch (yych) {
}
yy222:
++cur;
-#line 444 "src/parser.re"
+#line 465 "src/parser.re"
{ tok += 1; cur -= 1; NEWTOKEN(PSI_T_CPP_HEADER); cur += 1; goto start; }
-#line 2582 "src/parser.c"
+#line 2603 "src/parser.c"
yy224:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy242:
-#line 416 "src/parser.re"
+#line 437 "src/parser.re"
{ NEWTOKEN(PSI_T_LET); goto start; }
-#line 2795 "src/parser.c"
+#line 2816 "src/parser.c"
yy243:
yyaccept = 12;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy244:
-#line 415 "src/parser.re"
+#line 436 "src/parser.re"
{ NEWTOKEN(PSI_T_LIB); goto start; }
-#line 2870 "src/parser.c"
+#line 2891 "src/parser.c"
yy245:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy253:
-#line 417 "src/parser.re"
+#line 438 "src/parser.re"
{ NEWTOKEN(PSI_T_SET); goto start; }
-#line 3002 "src/parser.c"
+#line 3023 "src/parser.c"
yy254:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy273:
-#line 385 "src/parser.re"
+#line 406 "src/parser.re"
{ NEWTOKEN(PSI_T_INT); goto start; }
-#line 3230 "src/parser.c"
+#line 3251 "src/parser.c"
yy274:
yyaccept = 5;
yych = *(mrk = ++cur);
yy282:
++cur;
cur -= 1;
-#line 323 "src/parser.re"
+#line 344 "src/parser.re"
{ char_width = 1; }
-#line 3298 "src/parser.c"
+#line 3319 "src/parser.c"
yy284:
yyaccept = 5;
yych = *(mrk = ++cur);
yy288:
++cur;
cur -= 2;
-#line 318 "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 3332 "src/parser.c"
+#line 3353 "src/parser.c"
yy290:
++cur;
cur -= 2;
-#line 317 "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 3338 "src/parser.c"
+#line 3359 "src/parser.c"
yy292:
++cur;
cur -= 2;
-#line 319 "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 3344 "src/parser.c"
+#line 3365 "src/parser.c"
yy294:
++cur;
cur -= 3;
-#line 312 "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 3350 "src/parser.c"
+#line 3371 "src/parser.c"
yy296:
++cur;
if ((lim - cur) < 3) if (cur >= lim) goto done;;
default: goto yy61;
}
yy305:
-#line 395 "src/parser.re"
+#line 416 "src/parser.re"
{ NEWTOKEN(PSI_T_ELIF); goto start; }
-#line 3508 "src/parser.c"
+#line 3529 "src/parser.c"
yy306:
yyaccept = 16;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy307:
-#line 394 "src/parser.re"
+#line 415 "src/parser.re"
{ NEWTOKEN(PSI_T_ELSE); goto start; }
-#line 3583 "src/parser.c"
+#line 3604 "src/parser.c"
yy308:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy313:
-#line 422 "src/parser.re"
+#line 443 "src/parser.re"
{ NEWTOKEN(PSI_T_FREE); goto start; }
-#line 3690 "src/parser.c"
+#line 3711 "src/parser.c"
yy314:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy321:
-#line 406 "src/parser.re"
+#line 427 "src/parser.re"
{ NEWTOKEN(PSI_T_NULL); goto start; }
-#line 3813 "src/parser.c"
+#line 3834 "src/parser.c"
yy322:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy333:
-#line 423 "src/parser.re"
+#line 444 "src/parser.re"
{ NEWTOKEN(PSI_T_TEMP); goto start; }
-#line 3967 "src/parser.c"
+#line 3988 "src/parser.c"
yy334:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy341:
-#line 404 "src/parser.re"
+#line 425 "src/parser.re"
{ NEWTOKEN(PSI_T_TRUE); goto start; }
-#line 4090 "src/parser.c"
+#line 4111 "src/parser.c"
yy342:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy345:
-#line 432 "src/parser.re"
+#line 453 "src/parser.re"
{ NEWTOKEN(PSI_T_ZVAL); goto start; }
-#line 4181 "src/parser.c"
+#line 4202 "src/parser.c"
yy346:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy352:
-#line 382 "src/parser.re"
+#line 403 "src/parser.re"
{ NEWTOKEN(PSI_T_BOOL); goto start; }
-#line 4293 "src/parser.c"
+#line 4314 "src/parser.c"
yy353:
yyaccept = 23;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy354:
-#line 383 "src/parser.re"
+#line 404 "src/parser.re"
{ NEWTOKEN(PSI_T_CHAR); goto start; }
-#line 4368 "src/parser.c"
+#line 4389 "src/parser.c"
yy355:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy358:
-#line 379 "src/parser.re"
+#line 400 "src/parser.re"
{ NEWTOKEN(PSI_T_ENUM); goto start; }
-#line 4457 "src/parser.c"
+#line 4478 "src/parser.c"
yy359:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy361:
-#line 375 "src/parser.re"
+#line 396 "src/parser.re"
{ NEWTOKEN(PSI_T_LINE); goto start; }
-#line 4540 "src/parser.c"
+#line 4561 "src/parser.c"
yy362:
yyaccept = 26;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy363:
-#line 386 "src/parser.re"
+#line 407 "src/parser.re"
{ NEWTOKEN(PSI_T_LONG); goto start; }
-#line 4615 "src/parser.c"
+#line 4636 "src/parser.c"
yy364:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy373:
-#line 381 "src/parser.re"
+#line 402 "src/parser.re"
{ NEWTOKEN(PSI_T_VOID); goto start; }
-#line 4746 "src/parser.c"
+#line 4767 "src/parser.c"
yy374:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy376:
-#line 410 "src/parser.re"
+#line 431 "src/parser.re"
{ NEWTOKEN(PSI_T_ARRAY); goto start; }
-#line 4828 "src/parser.c"
+#line 4849 "src/parser.c"
yy377:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy383:
-#line 433 "src/parser.re"
+#line 454 "src/parser.re"
{ NEWTOKEN(PSI_T_COUNT); goto start; }
-#line 4943 "src/parser.c"
+#line 4964 "src/parser.c"
yy384:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy386:
-#line 396 "src/parser.re"
+#line 417 "src/parser.re"
{ NEWTOKEN(PSI_T_ENDIF); goto start; }
-#line 5026 "src/parser.c"
+#line 5047 "src/parser.c"
yy387:
yyaccept = 31;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy388:
-#line 401 "src/parser.re"
+#line 422 "src/parser.re"
{ NEWTOKEN(PSI_T_ERROR); goto start; }
-#line 5101 "src/parser.c"
+#line 5122 "src/parser.c"
yy389:
yyaccept = 32;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy390:
-#line 405 "src/parser.re"
+#line 426 "src/parser.re"
{ NEWTOKEN(PSI_T_FALSE); goto start; }
-#line 5176 "src/parser.c"
+#line 5197 "src/parser.c"
yy391:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy394:
-#line 392 "src/parser.re"
+#line 413 "src/parser.re"
{ NEWTOKEN(PSI_T_IFDEF); goto start; }
-#line 5267 "src/parser.c"
+#line 5288 "src/parser.c"
yy395:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy399:
-#line 407 "src/parser.re"
+#line 428 "src/parser.re"
{ NEWTOKEN(PSI_T_MIXED); goto start; }
-#line 5366 "src/parser.c"
+#line 5387 "src/parser.c"
yy400:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy417:
-#line 399 "src/parser.re"
+#line 420 "src/parser.re"
{ NEWTOKEN(PSI_T_UNDEF); goto start; }
-#line 5569 "src/parser.c"
+#line 5590 "src/parser.c"
yy418:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy425:
-#line 380 "src/parser.re"
+#line 401 "src/parser.re"
{ NEWTOKEN(PSI_T_CONST); goto start; }
-#line 5687 "src/parser.c"
+#line 5708 "src/parser.c"
yy426:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy428:
-#line 387 "src/parser.re"
+#line 408 "src/parser.re"
{ NEWTOKEN(PSI_T_FLOAT); goto start; }
-#line 5771 "src/parser.c"
+#line 5792 "src/parser.c"
yy429:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy431:
-#line 384 "src/parser.re"
+#line 405 "src/parser.re"
{ NEWTOKEN(PSI_T_SHORT); goto start; }
-#line 5853 "src/parser.c"
+#line 5874 "src/parser.c"
yy432:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy437:
-#line 378 "src/parser.re"
+#line 399 "src/parser.re"
{ NEWTOKEN(PSI_T_UNION); goto start; }
-#line 5956 "src/parser.c"
+#line 5977 "src/parser.c"
yy438:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy441:
-#line 430 "src/parser.re"
+#line 451 "src/parser.re"
{ NEWTOKEN(PSI_T_ARRVAL); goto start; }
-#line 6045 "src/parser.c"
+#line 6066 "src/parser.c"
yy442:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy446:
-#line 434 "src/parser.re"
+#line 455 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLOC); goto start; }
-#line 6144 "src/parser.c"
+#line 6165 "src/parser.c"
yy447:
yyaccept = 42;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy448:
-#line 397 "src/parser.re"
+#line 418 "src/parser.re"
{ NEWTOKEN(PSI_T_DEFINE); goto start; }
-#line 6221 "src/parser.c"
+#line 6242 "src/parser.c"
yy449:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy452:
-#line 393 "src/parser.re"
+#line 414 "src/parser.re"
{ NEWTOKEN(PSI_T_IFNDEF); goto start; }
-#line 6312 "src/parser.c"
+#line 6333 "src/parser.c"
yy453:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy455:
-#line 427 "src/parser.re"
+#line 448 "src/parser.re"
{ NEWTOKEN(PSI_T_INTVAL); goto start; }
-#line 6395 "src/parser.c"
+#line 6416 "src/parser.c"
yy456:
yyaccept = 45;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy457:
-#line 411 "src/parser.re"
+#line 432 "src/parser.re"
{ NEWTOKEN(PSI_T_OBJECT); goto start; }
-#line 6470 "src/parser.c"
+#line 6491 "src/parser.c"
yy458:
yyaccept = 46;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy459:
-#line 431 "src/parser.re"
+#line 452 "src/parser.re"
{ NEWTOKEN(PSI_T_OBJVAL); goto start; }
-#line 6545 "src/parser.c"
+#line 6566 "src/parser.c"
yy460:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy464:
-#line 420 "src/parser.re"
+#line 441 "src/parser.re"
{ NEWTOKEN(PSI_T_RETURN); goto start; }
-#line 6644 "src/parser.c"
+#line 6665 "src/parser.c"
yy465:
yyaccept = 48;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy466:
-#line 413 "src/parser.re"
+#line 434 "src/parser.re"
{ NEWTOKEN(PSI_T_STATIC); goto start; }
-#line 6719 "src/parser.c"
+#line 6740 "src/parser.c"
yy467:
yyaccept = 49;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy468:
-#line 409 "src/parser.re"
+#line 430 "src/parser.re"
{ NEWTOKEN(PSI_T_STRING); goto start; }
-#line 6794 "src/parser.c"
+#line 6815 "src/parser.c"
yy469:
yyaccept = 50;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy470:
-#line 424 "src/parser.re"
+#line 445 "src/parser.re"
{ NEWTOKEN(PSI_T_STRLEN); goto start; }
-#line 6869 "src/parser.c"
+#line 6890 "src/parser.c"
yy471:
yyaccept = 51;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy472:
-#line 425 "src/parser.re"
+#line 446 "src/parser.re"
{ NEWTOKEN(PSI_T_STRVAL); goto start; }
-#line 6944 "src/parser.c"
+#line 6965 "src/parser.c"
yy473:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy477:
-#line 438 "src/parser.re"
+#line 459 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_INT); goto start; }
-#line 7043 "src/parser.c"
+#line 7064 "src/parser.c"
yy478:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy487:
-#line 388 "src/parser.re"
+#line 409 "src/parser.re"
{ NEWTOKEN(PSI_T_DOUBLE); goto start; }
-#line 7177 "src/parser.c"
+#line 7198 "src/parser.c"
yy488:
yyaccept = 54;
yych = *(mrk = ++cur);
default: goto yy527;
}
yy489:
-#line 367 "src/parser.re"
+#line 388 "src/parser.re"
{ NEWTOKEN(PSI_T_PRAGMA); goto start; }
-#line 7252 "src/parser.c"
+#line 7273 "src/parser.c"
yy490:
yyaccept = 55;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy491:
-#line 390 "src/parser.re"
+#line 411 "src/parser.re"
{ NEWTOKEN(PSI_T_SIGNED); goto start; }
-#line 7327 "src/parser.c"
+#line 7348 "src/parser.c"
yy492:
yyaccept = 56;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy493:
-#line 374 "src/parser.re"
+#line 395 "src/parser.re"
{ NEWTOKEN(PSI_T_SIZEOF); goto start; }
-#line 7402 "src/parser.c"
+#line 7423 "src/parser.c"
yy494:
yyaccept = 57;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy495:
-#line 377 "src/parser.re"
+#line 398 "src/parser.re"
{ NEWTOKEN(PSI_T_STRUCT); goto start; }
-#line 7477 "src/parser.c"
+#line 7498 "src/parser.c"
yy496:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy500:
-#line 429 "src/parser.re"
+#line 450 "src/parser.re"
{ NEWTOKEN(PSI_T_BOOLVAL); goto start; }
-#line 7573 "src/parser.c"
+#line 7594 "src/parser.c"
yy501:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy504:
-#line 398 "src/parser.re"
+#line 419 "src/parser.re"
{ NEWTOKEN(PSI_T_DEFINED); goto start; }
-#line 7664 "src/parser.c"
+#line 7685 "src/parser.c"
yy505:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy508:
-#line 402 "src/parser.re"
+#line 423 "src/parser.re"
{ NEWTOKEN(PSI_T_INCLUDE); goto start; }
-#line 7756 "src/parser.c"
+#line 7777 "src/parser.c"
yy509:
yyaccept = 61;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy510:
-#line 426 "src/parser.re"
+#line 447 "src/parser.re"
{ NEWTOKEN(PSI_T_PATHVAL); goto start; }
-#line 7831 "src/parser.c"
+#line 7852 "src/parser.c"
yy511:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy515:
-#line 440 "src/parser.re"
+#line 461 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_BOOL); goto start; }
-#line 7930 "src/parser.c"
+#line 7951 "src/parser.c"
yy516:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy520:
-#line 400 "src/parser.re"
+#line 421 "src/parser.re"
{ NEWTOKEN(PSI_T_WARNING); goto start; }
-#line 8029 "src/parser.c"
+#line 8050 "src/parser.c"
yy521:
yyaccept = 64;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy522:
-#line 372 "src/parser.re"
+#line 393 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_ASM); goto start; }
-#line 8104 "src/parser.c"
+#line 8125 "src/parser.c"
yy523:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy530:
-#line 376 "src/parser.re"
+#line 397 "src/parser.re"
{ NEWTOKEN(PSI_T_TYPEDEF); goto start; }
-#line 8281 "src/parser.c"
+#line 8302 "src/parser.c"
yy531:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy534:
-#line 408 "src/parser.re"
+#line 429 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLABLE); goto start; }
-#line 8370 "src/parser.c"
+#line 8391 "src/parser.c"
yy535:
yyaccept = 67;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy536:
-#line 412 "src/parser.re"
+#line 433 "src/parser.re"
{ NEWTOKEN(PSI_T_CALLBACK); goto start; }
-#line 8445 "src/parser.c"
+#line 8466 "src/parser.c"
yy537:
yyaccept = 68;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy538:
-#line 428 "src/parser.re"
+#line 449 "src/parser.re"
{ NEWTOKEN(PSI_T_FLOATVAL); goto start; }
-#line 8520 "src/parser.c"
+#line 8541 "src/parser.c"
yy539:
yyaccept = 69;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy540:
-#line 414 "src/parser.re"
+#line 435 "src/parser.re"
{ NEWTOKEN(PSI_T_FUNCTION); goto start; }
-#line 8595 "src/parser.c"
+#line 8616 "src/parser.c"
yy541:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy545:
-#line 436 "src/parser.re"
+#line 457 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_ARRAY); goto start; }
-#line 8694 "src/parser.c"
+#line 8715 "src/parser.c"
yy546:
yyaccept = 71;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy547:
-#line 439 "src/parser.re"
+#line 460 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_FLOAT); goto start; }
-#line 8769 "src/parser.c"
+#line 8790 "src/parser.c"
yy548:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy553:
-#line 369 "src/parser.re"
+#line 390 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_INLINE); goto start; }
-#line 8874 "src/parser.c"
+#line 8895 "src/parser.c"
yy554:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy558:
-#line 389 "src/parser.re"
+#line 410 "src/parser.re"
{ NEWTOKEN(PSI_T_UNSIGNED); goto start; }
-#line 9031 "src/parser.c"
+#line 9052 "src/parser.c"
yy559:
yyaccept = 74;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy560:
-#line 373 "src/parser.re"
+#line 394 "src/parser.re"
{ NEWTOKEN(PSI_T_VOLATILE); goto start; }
-#line 9106 "src/parser.c"
+#line 9127 "src/parser.c"
yy561:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy565:
-#line 435 "src/parser.re"
+#line 456 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_OBJECT); goto start; }
-#line 9205 "src/parser.c"
+#line 9226 "src/parser.c"
yy566:
yyaccept = 76;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy567:
-#line 437 "src/parser.re"
+#line 458 "src/parser.re"
{ NEWTOKEN(PSI_T_TO_STRING); goto start; }
-#line 9280 "src/parser.c"
+#line 9301 "src/parser.c"
yy568:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy575:
-#line 418 "src/parser.re"
+#line 439 "src/parser.re"
{ NEWTOKEN(PSI_T_PRE_ASSERT); goto start; }
-#line 9467 "src/parser.c"
+#line 9488 "src/parser.c"
yy576:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy579:
-#line 370 "src/parser.re"
+#line 391 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_RESTRICT); goto start; }
-#line 9556 "src/parser.c"
+#line 9577 "src/parser.c"
yy580:
yyaccept = 5;
mrk = ++cur;
default: goto yy61;
}
yy583:
-#line 419 "src/parser.re"
+#line 440 "src/parser.re"
{ NEWTOKEN(PSI_T_POST_ASSERT); goto start; }
-#line 9714 "src/parser.c"
+#line 9735 "src/parser.c"
yy584:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy527;
}
yy587:
-#line 368 "src/parser.re"
+#line 389 "src/parser.re"
{ NEWTOKEN(PSI_T_PRAGMA_ONCE); goto start; }
-#line 9806 "src/parser.c"
+#line 9827 "src/parser.c"
yy588:
yyaccept = 81;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy589:
-#line 403 "src/parser.re"
+#line 424 "src/parser.re"
{ NEWTOKEN(PSI_T_INCLUDE_NEXT); goto start; }
-#line 9881 "src/parser.c"
+#line 9902 "src/parser.c"
yy590:
yyaccept = 5;
yych = *(mrk = ++cur);
default: goto yy61;
}
yy594:
-#line 371 "src/parser.re"
+#line 392 "src/parser.re"
{ NEWTOKEN(PSI_T_CPP_EXTENSION); goto start; }
-#line 9980 "src/parser.c"
+#line 10001 "src/parser.c"
yy595:
++cur;
if ((lim - cur) < 2) if (cur >= lim) goto done;;
}
yy598:
++cur;
-#line 445 "src/parser.re"
+#line 466 "src/parser.re"
{ parens = 2; goto cpp_attribute; }
-#line 10002 "src/parser.c"
+#line 10023 "src/parser.c"
}
-#line 451 "src/parser.re"
+#line 472 "src/parser.re"
character: ;
-#line 10009 "src/parser.c"
+#line 10030 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy602:
++cur;
-#line 469 "src/parser.re"
+#line 490 "src/parser.re"
{ escaped = false; goto character; }
-#line 10025 "src/parser.c"
+#line 10046 "src/parser.c"
yy604:
++cur;
-#line 456 "src/parser.re"
+#line 477 "src/parser.re"
{ NEWLINE(); goto character; }
-#line 10030 "src/parser.c"
+#line 10051 "src/parser.c"
yy606:
++cur;
-#line 458 "src/parser.re"
+#line 479 "src/parser.re"
{
if (escaped) {
escaped = false;
token->flags = char_width;
goto start;
}
-#line 10045 "src/parser.c"
+#line 10066 "src/parser.c"
yy608:
++cur;
-#line 457 "src/parser.re"
+#line 478 "src/parser.re"
{ escaped = !escaped; goto character; }
-#line 10050 "src/parser.c"
+#line 10071 "src/parser.c"
}
-#line 471 "src/parser.re"
+#line 492 "src/parser.re"
string: ;
-#line 10057 "src/parser.c"
+#line 10078 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy612:
++cur;
-#line 489 "src/parser.re"
+#line 510 "src/parser.re"
{ escaped = false; goto string; }
-#line 10073 "src/parser.c"
+#line 10094 "src/parser.c"
yy614:
++cur;
-#line 476 "src/parser.re"
+#line 497 "src/parser.re"
{ NEWLINE(); goto string; }
-#line 10078 "src/parser.c"
+#line 10099 "src/parser.c"
yy616:
++cur;
-#line 478 "src/parser.re"
+#line 499 "src/parser.re"
{
if (escaped) {
escaped = false;
token->flags = char_width;
goto start;
}
-#line 10093 "src/parser.c"
+#line 10114 "src/parser.c"
yy618:
++cur;
-#line 477 "src/parser.re"
+#line 498 "src/parser.re"
{ escaped = !escaped; goto string; }
-#line 10098 "src/parser.c"
+#line 10119 "src/parser.c"
}
-#line 491 "src/parser.re"
+#line 512 "src/parser.re"
comment: ;
-#line 10105 "src/parser.c"
+#line 10126 "src/parser.c"
{
unsigned char yych;
if ((lim - cur) < 2) if (cur >= lim) goto done;;
yy622:
++cur;
yy623:
-#line 498 "src/parser.re"
+#line 519 "src/parser.re"
{ goto comment; }
-#line 10121 "src/parser.c"
+#line 10142 "src/parser.c"
yy624:
++cur;
-#line 496 "src/parser.re"
+#line 517 "src/parser.re"
{ NEWLINE(); goto comment; }
-#line 10126 "src/parser.c"
+#line 10147 "src/parser.c"
yy626:
yych = *++cur;
switch (yych) {
}
yy627:
++cur;
-#line 497 "src/parser.re"
+#line 518 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMENT); goto start; }
-#line 10137 "src/parser.c"
+#line 10158 "src/parser.c"
}
-#line 500 "src/parser.re"
+#line 521 "src/parser.re"
comment_sl: ;
-#line 10144 "src/parser.c"
+#line 10165 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy631:
++cur;
-#line 506 "src/parser.re"
+#line 527 "src/parser.re"
{ goto comment_sl; }
-#line 10158 "src/parser.c"
+#line 10179 "src/parser.c"
yy633:
++cur;
-#line 505 "src/parser.re"
+#line 526 "src/parser.re"
{ NEWTOKEN(PSI_T_COMMENT); NEWLINE(); goto start; }
-#line 10163 "src/parser.c"
+#line 10184 "src/parser.c"
}
-#line 508 "src/parser.re"
+#line 529 "src/parser.re"
cpp_attribute: ;
-#line 10171 "src/parser.c"
+#line 10192 "src/parser.c"
{
unsigned char yych;
if (lim <= cur) if (cur >= lim) goto done;;
}
yy637:
++cur;
-#line 517 "src/parser.re"
+#line 538 "src/parser.re"
{ goto cpp_attribute; }
-#line 10187 "src/parser.c"
+#line 10208 "src/parser.c"
yy639:
++cur;
-#line 516 "src/parser.re"
+#line 537 "src/parser.re"
{ NEWLINE(); goto cpp_attribute; }
-#line 10192 "src/parser.c"
+#line 10213 "src/parser.c"
yy641:
++cur;
-#line 514 "src/parser.re"
+#line 535 "src/parser.re"
{ ++parens; goto cpp_attribute; }
-#line 10197 "src/parser.c"
+#line 10218 "src/parser.c"
yy643:
++cur;
-#line 515 "src/parser.re"
+#line 536 "src/parser.re"
{ if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } }
-#line 10202 "src/parser.c"
+#line 10223 "src/parser.c"
}
-#line 519 "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;