fix build
authorMichael Wallner <mike@php.net>
Tue, 4 Dec 2018 08:25:06 +0000 (09:25 +0100)
committerMichael Wallner <mike@php.net>
Tue, 4 Dec 2018 11:13:51 +0000 (12:13 +0100)
16 files changed:
TODO
src/call.c
src/context.c
src/cpp.c
src/cpp_tokiter.c
src/data.h
src/module.c
src/parser_scan.c
src/parser_scan.re
src/types/cpp_exp.c
src/types/decl.c
src/types/decl_extvar.c
src/types/decl_file.c
src/types/num_exp.c
src/types/number.c
src/validate.c

diff --git a/TODO b/TODO
index ccfc46b..b26f698 100644 (file)
--- a/TODO
+++ b/TODO
@@ -21,3 +21,5 @@
 
 * optimized inlines like htonl
 * real integral type of enums
+
+* #pragma lib "foo" instead of lib "foo";
index 9aa0bd8..a46fa4e 100644 (file)
@@ -476,6 +476,7 @@ void psi_call_frame_do_callback(struct psi_call_frame *frame, struct psi_call_fr
        rc = zend_fcall_info_call(&frame_arg->ival_ptr->zend.cb->fci,
                        &frame_arg->ival_ptr->zend.cb->fcc,     &return_value, NULL);
        assert(rc == SUCCESS);
+       (void) rc;
 
        /* marshal return value of the userland call */
        frame_arg->zval_ptr = &return_value;
index 9d508de..f480ebd 100644 (file)
@@ -306,11 +306,17 @@ void psi_context_build(struct psi_context *C, const char *paths)
                n = php_scandir(ptr, &entries, psi_select_dirent, alphasort);
 
                if (n < 0) {
+                       char cwd[PATH_MAX];
                        C->error(PSI_DATA(C), NULL, PSI_WARNING,
-                                       "Failed to scan PSI directory '%s':%s", strerror(errno));
+                                       "Failed to scan PSI directory '%s%s%s': %s",
+                                       *ptr == '/' ? "" : getcwd(cwd, PATH_MAX),
+                                       *ptr != '/' && *ptr != '.' ? "/" : "",
+                                       ptr, strerror(errno));
                } else {
                        for (i = 0; i < n; ++i) {
                                worker = psi_context_build_worker_init(C, ptr, entries[i]->d_name);
+                               PSI_DEBUG_PRINT(C, "PSI: init worker(%p) for %s/%s\n",
+                                               worker, ptr, entries[i]->d_name);
                                if (worker) {
                                        workers = psi_plist_add(workers, &worker);
                                }
@@ -335,6 +341,7 @@ void psi_context_build(struct psi_context *C, const char *paths)
 
                while (psi_plist_count(workers) && active < pool) {
                        if (psi_plist_pop(workers, &worker)) {
+                               PSI_DEBUG_PRINT(C, "PSI: starting worker %p\n", worker);
                                if (psi_context_build_worker_exec(worker)) {
                                        running = psi_plist_add(running, &worker);
                                        ++active;
@@ -346,13 +353,17 @@ void psi_context_build(struct psi_context *C, const char *paths)
 
                        while (psi_plist_get(running, i++, &worker)) {
                                if (psi_context_build_worker_done(worker)) {
+                                       PSI_DEBUG_PRINT(C, "PSI: collecting worker %p\n", worker);
                                        psi_context_add(C, &worker->parser);
 
                                        psi_plist_del(running, --i, NULL);
                                        psi_context_build_worker_free(&worker);
 
                                        if (psi_plist_pop(workers, &worker)) {
-                                               psi_plist_add(running, &worker);
+                                               PSI_DEBUG_PRINT(C, "PSI: starting worker %p\n", worker);
+                                               if (psi_context_build_worker_exec(worker)) {
+                                                       running = psi_plist_add(running, &worker);
+                                               }
                                        } else {
                                                --active;
                                        }
index 6b7bb53..eaf43f8 100644 (file)
--- a/src/cpp.c
+++ b/src/cpp.c
 # include "php_config.h"
 #endif
 
+#include "php_psi.h"
+
 #include <libgen.h>
 
 #include "cpp.h"
 #include "parser.h"
+#include "debug.h"
 
 #define PSI_CPP_SEARCH
 #define PSI_CPP_PREDEF
 #include "php_psi_predef.h"
 
-#include "php_psi.h"
-
 HashTable psi_cpp_defaults;
 
 PHP_MINIT_FUNCTION(psi_cpp);
index c09c670..a28fcf9 100644 (file)
@@ -32,6 +32,7 @@
 #include "cpp.h"
 #include "parser.h"
 
+void psi_cpp_tokiter_dump(struct psi_dump *dump, struct psi_cpp *cpp);
 void psi_cpp_tokiter_dump(struct psi_dump *dump, struct psi_cpp *cpp)
 {
        size_t i = cpp->index;
index 57ef1d6..9caeb59 100644 (file)
@@ -30,6 +30,8 @@
 #include "error.h"
 #include "plist.h"
 #include "validate.h"
+#include "dump.h"
+#include "debug.h"
 
 #include <stdarg.h>
 #include <dlfcn.h>
 #define PSI_DEBUG 0x1
 #define PSI_SILENT 0x2
 
-#ifndef RTLD_NEXT
-# define RTLD_NEXT ((void *) -1l)
-#endif
-#ifndef RTLD_DEFAULT
-# define RTLD_DEFAULT ((void *) 0)
-#endif
-
 #if PSI_THREADED_PARSER
 zend_string *psi_string_init_interned(const char *buf, size_t len, int p);
 zend_string *psi_new_interned_string(zend_string *str);
@@ -53,66 +48,6 @@ zend_string *psi_new_interned_string(zend_string *str);
 # define psi_new_interned_string zend_new_interned_string
 #endif
 
-static inline void *psi_dlsym(struct psi_plist *dllist, const char *name, const char *redir)
-{
-       void *dl, *sym = NULL;
-       const char *test = redir ?: name;
-
-again:
-       if (dllist) {
-               size_t i = 0;
-
-               while (!sym && psi_plist_get(dllist, i++, &dl)) {
-                       sym = dlsym(dl, test);
-               }
-       }
-       if (!sym) {
-               sym = dlsym(RTLD_DEFAULT, test);
-       }
-       if (!sym && test == redir) {
-               test = name;
-               goto again;
-       }
-
-       return sym;
-}
-
-#define PSI_DEBUG_PRINT(ctx, ...) do { \
-       if ((ctx) && (PSI_DATA(ctx)->flags & PSI_DEBUG)) { \
-               dprintf(PSI_DATA(ctx)->debug_fd, __VA_ARGS__); \
-       } \
-} while(0)
-#define PSI_DEBUG_PRINTV(ctx, msg, argv) do { \
-       if ((ctx) && (PSI_DATA(ctx)->flags & PSI_DEBUG)) { \
-               vdprintf(PSI_DATA(ctx)->debug_fd, msg, argv); \
-       } \
-} while(0)
-#define PSI_DEBUG_DUMP(ctx, dump_func, ...) do { \
-       if ((ctx) && (PSI_DATA(ctx)->flags & PSI_DEBUG)) { \
-               struct psi_dump dump_ = {{ .fd = PSI_DATA(ctx)->debug_fd}, \
-                               .fun = (psi_dump_cb) dprintf}; \
-               dump_func(&dump_, __VA_ARGS__); \
-       } \
-} while (0)
-
-union psi_dump_arg {
-       void *hn;
-       int fd;
-};
-typedef int (*psi_dump_cb)(union psi_dump_arg, const char *msg, ...);
-struct psi_dump {
-       union psi_dump_arg ctx;
-       psi_dump_cb fun;
-};
-#define PSI_DUMP(dump, ...) do { \
-       struct psi_dump _dump_tmp, *_dump_ptr = dump; \
-       if (!_dump_ptr) { \
-               _dump_ptr = &_dump_tmp; \
-               _dump_tmp.ctx.fd = STDOUT_FILENO; \
-               _dump_tmp.fun = (psi_dump_cb) dprintf; \
-       } \
-       _dump_ptr->fun(_dump_ptr->ctx, __VA_ARGS__); \
-} while(0)
 
 #define PSI_DATA(D) ((struct psi_data *) (D))
 
index 7332474..de8b50e 100644 (file)
@@ -121,6 +121,7 @@ PHP_INI_END();
 static zend_object_handlers psi_object_handlers;
 static zend_class_entry *psi_class_entry;
 
+zend_class_entry *psi_object_get_class_entry();
 zend_class_entry *psi_object_get_class_entry()
 {
        return psi_class_entry;
@@ -288,6 +289,7 @@ static PHP_FUNCTION(psi_validate_string)
        psi_parser_input_free(&I);
 }
 
+PHP_MINIT_FUNCTION(psi_debug);
 PHP_MINIT_FUNCTION(psi_cpp);
 PHP_MINIT_FUNCTION(psi_builtin);
 PHP_MINIT_FUNCTION(psi_context);
@@ -309,6 +311,9 @@ static PHP_MINIT_FUNCTION(psi)
        psi_object_handlers.free_obj = psi_object_free;
        psi_object_handlers.clone_obj = NULL;
 
+       if (SUCCESS != PHP_MINIT(psi_debug)(type, module_number)) {
+               return FAILURE;
+       }
        if (SUCCESS != PHP_MINIT(psi_builtin)(type, module_number)) {
                return FAILURE;
        }
@@ -325,11 +330,13 @@ static PHP_MINIT_FUNCTION(psi)
 PHP_MSHUTDOWN_FUNCTION(psi_cpp);
 PHP_MSHUTDOWN_FUNCTION(psi_builtin);
 PHP_MSHUTDOWN_FUNCTION(psi_context);
+PHP_MSHUTDOWN_FUNCTION(psi_debug);
 static PHP_MSHUTDOWN_FUNCTION(psi)
 {
        PHP_MSHUTDOWN(psi_context)(type, module_number);
        PHP_MSHUTDOWN(psi_cpp)(type, module_number);
        PHP_MSHUTDOWN(psi_builtin)(type, module_number);
+       PHP_MSHUTDOWN(psi_debug)(type, module_number);
 
        UNREGISTER_INI_ENTRIES();
 
index 99d07eb..aa4c9ca 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 1.1.1 on Mon Dec  3 17:01:05 2018 */
+/* Generated by re2c 1.1.1 on Tue Dec  4 08:57:22 2018 */
 #line 1 "src/parser_scan.re"
 /*******************************************************************************
  Copyright (c) 2016, Michael Wallner <mike@php.net>.
@@ -33,6 +33,7 @@
 
 #include "parser.h"
 #include "plist.h"
+#include "debug.h"
 
 #define YYMAXFILL 15
 
@@ -55,8 +56,10 @@ size_t psi_parser_maxfill(void) {
                token = psi_token_init(t, tok, cur - tok, tok - eol + 1, I->lines, I->file); \
        } \
        tokens = psi_plist_add(tokens, &token); \
+       psi_debug_lock(PSI_DATA(P)); \
        PSI_DEBUG_PRINT(P, "PSI: scanned < "); \
        PSI_DEBUG_DUMP(P, psi_token_dump, token); \
+       psi_debug_unlock(PSI_DATA(P)); \
 } while(0)
 
 #define CHECKEOF() if (cur >= lim - YYMAXFILL) goto done
@@ -85,7 +88,7 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input
                (void) ctxmrk;
 
                
-#line 89 "src/parser_scan.c"
+#line 92 "src/parser_scan.c"
                {
                        unsigned char yych;
                        unsigned int yyaccept = 0;
@@ -210,9 +213,9 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input
 yy2:
                        ++cur;
 yy3:
-#line 254 "src/parser_scan.re"
+#line 257 "src/parser_scan.re"
                        { CHECKEOF(); NEWTOKEN(-2); goto error; }
-#line 216 "src/parser_scan.c"
+#line 219 "src/parser_scan.c"
 yy4:
                        ++cur;
                        if (lim <= cur) CHECKEOF();;
@@ -224,14 +227,14 @@ yy4:
                        default:        goto yy6;
                        }
 yy6:
-#line 253 "src/parser_scan.re"
+#line 256 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_WHITESPACE); goto start; }
-#line 230 "src/parser_scan.c"
+#line 233 "src/parser_scan.c"
 yy7:
                        ++cur;
-#line 252 "src/parser_scan.re"
+#line 255 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; }
-#line 235 "src/parser_scan.c"
+#line 238 "src/parser_scan.c"
 yy9:
                        yych = *++cur;
                        switch (yych) {
@@ -239,14 +242,14 @@ yy9:
                        default:        goto yy10;
                        }
 yy10:
-#line 155 "src/parser_scan.re"
+#line 158 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NOT); goto start; }
-#line 245 "src/parser_scan.c"
+#line 248 "src/parser_scan.c"
 yy11:
                        ++cur;
-#line 128 "src/parser_scan.re"
+#line 131 "src/parser_scan.re"
                        { escaped = false; tok += 1; goto string; }
-#line 250 "src/parser_scan.c"
+#line 253 "src/parser_scan.c"
 yy13:
                        yych = *++cur;
                        switch (yych) {
@@ -254,9 +257,9 @@ yy13:
                        default:        goto yy14;
                        }
 yy14:
-#line 138 "src/parser_scan.re"
+#line 141 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_HASH); goto start; }
-#line 260 "src/parser_scan.c"
+#line 263 "src/parser_scan.c"
 yy15:
                        yych = *++cur;
                        switch (yych) {
@@ -329,9 +332,9 @@ yy15:
                        }
 yy16:
                        ++cur;
-#line 156 "src/parser_scan.re"
+#line 159 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_MODULO); goto start; }
-#line 335 "src/parser_scan.c"
+#line 338 "src/parser_scan.c"
 yy18:
                        yych = *++cur;
                        switch (yych) {
@@ -339,44 +342,44 @@ yy18:
                        default:        goto yy19;
                        }
 yy19:
-#line 157 "src/parser_scan.re"
+#line 160 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_AMPERSAND); goto start; }
-#line 345 "src/parser_scan.c"
+#line 348 "src/parser_scan.c"
 yy20:
                        ++cur;
-#line 127 "src/parser_scan.re"
+#line 130 "src/parser_scan.re"
                        { escaped = false; tok += 1; goto character; }
-#line 350 "src/parser_scan.c"
+#line 353 "src/parser_scan.c"
 yy22:
                        ++cur;
-#line 139 "src/parser_scan.re"
+#line 142 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LPAREN); goto start; }
-#line 355 "src/parser_scan.c"
+#line 358 "src/parser_scan.c"
 yy24:
                        ++cur;
-#line 140 "src/parser_scan.re"
+#line 143 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RPAREN); goto start; }
-#line 360 "src/parser_scan.c"
+#line 363 "src/parser_scan.c"
 yy26:
                        ++cur;
-#line 153 "src/parser_scan.re"
+#line 156 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ASTERISK); goto start; }
-#line 365 "src/parser_scan.c"
+#line 368 "src/parser_scan.c"
 yy28:
                        ++cur;
-#line 158 "src/parser_scan.re"
+#line 161 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PLUS); goto start; }
-#line 370 "src/parser_scan.c"
+#line 373 "src/parser_scan.c"
 yy30:
                        ++cur;
-#line 142 "src/parser_scan.re"
+#line 145 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_COMMA); goto start; }
-#line 375 "src/parser_scan.c"
+#line 378 "src/parser_scan.c"
 yy32:
                        ++cur;
-#line 159 "src/parser_scan.re"
+#line 162 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_MINUS); goto start; }
-#line 380 "src/parser_scan.c"
+#line 383 "src/parser_scan.c"
 yy34:
                        yyaccept = 0;
                        yych = *(mrk = ++cur);
@@ -395,9 +398,9 @@ yy34:
                        default:        goto yy35;
                        }
 yy35:
-#line 170 "src/parser_scan.re"
+#line 173 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PERIOD); goto start; }
-#line 401 "src/parser_scan.c"
+#line 404 "src/parser_scan.c"
 yy36:
                        yych = *++cur;
                        switch (yych) {
@@ -406,9 +409,9 @@ yy36:
                        default:        goto yy37;
                        }
 yy37:
-#line 160 "src/parser_scan.re"
+#line 163 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_SLASH); goto start; }
-#line 412 "src/parser_scan.c"
+#line 415 "src/parser_scan.c"
 yy38:
                        yyaccept = 1;
                        yych = *(mrk = ++cur);
@@ -421,9 +424,9 @@ yy38:
                        default:        goto yy125;
                        }
 yy39:
-#line 114 "src/parser_scan.re"
+#line 117 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT; goto start; }
-#line 427 "src/parser_scan.c"
+#line 430 "src/parser_scan.c"
 yy40:
                        yyaccept = 1;
                        mrk = ++cur;
@@ -451,14 +454,14 @@ yy40:
                        }
 yy42:
                        ++cur;
-#line 143 "src/parser_scan.re"
+#line 146 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_COLON); goto start; }
-#line 457 "src/parser_scan.c"
+#line 460 "src/parser_scan.c"
 yy44:
                        ++cur;
-#line 141 "src/parser_scan.re"
+#line 144 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_EOS); goto start; }
-#line 462 "src/parser_scan.c"
+#line 465 "src/parser_scan.c"
 yy46:
                        yyaccept = 2;
                        yych = *(mrk = ++cur);
@@ -534,9 +537,9 @@ yy46:
                        default:        goto yy47;
                        }
 yy47:
-#line 168 "src/parser_scan.re"
+#line 171 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LCHEVR); goto start; }
-#line 540 "src/parser_scan.c"
+#line 543 "src/parser_scan.c"
 yy48:
                        yych = *++cur;
                        switch (yych) {
@@ -544,9 +547,9 @@ yy48:
                        default:        goto yy49;
                        }
 yy49:
-#line 152 "src/parser_scan.re"
+#line 155 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_EQUALS); goto start; }
-#line 550 "src/parser_scan.c"
+#line 553 "src/parser_scan.c"
 yy50:
                        yych = *++cur;
                        switch (yych) {
@@ -555,14 +558,14 @@ yy50:
                        default:        goto yy51;
                        }
 yy51:
-#line 169 "src/parser_scan.re"
+#line 172 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RCHEVR); goto start; }
-#line 561 "src/parser_scan.c"
+#line 564 "src/parser_scan.c"
 yy52:
                        ++cur;
-#line 172 "src/parser_scan.re"
+#line 175 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_IIF); goto start; }
-#line 566 "src/parser_scan.c"
+#line 569 "src/parser_scan.c"
 yy54:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -574,9 +577,9 @@ yy54:
                        default:        goto yy62;
                        }
 yy55:
-#line 247 "src/parser_scan.re"
+#line 250 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NAME); goto start; }
-#line 580 "src/parser_scan.c"
+#line 583 "src/parser_scan.c"
 yy56:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -819,9 +822,9 @@ yy74:
                        }
 yy75:
                        ++cur;
-#line 146 "src/parser_scan.re"
+#line 149 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LBRACKET); goto start; }
-#line 825 "src/parser_scan.c"
+#line 828 "src/parser_scan.c"
 yy77:
                        yych = *++cur;
                        switch (yych) {
@@ -903,19 +906,19 @@ yy77:
                        default:        goto yy183;
                        }
 yy78:
-#line 161 "src/parser_scan.re"
+#line 164 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_BSLASH); goto start; }
-#line 909 "src/parser_scan.c"
+#line 912 "src/parser_scan.c"
 yy79:
                        ++cur;
-#line 147 "src/parser_scan.re"
+#line 150 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RBRACKET); goto start; }
-#line 914 "src/parser_scan.c"
+#line 917 "src/parser_scan.c"
 yy81:
                        ++cur;
-#line 163 "src/parser_scan.re"
+#line 166 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CARET); goto start; }
-#line 919 "src/parser_scan.c"
+#line 922 "src/parser_scan.c"
 yy83:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -1055,9 +1058,9 @@ yy95:
                        }
 yy96:
                        ++cur;
-#line 144 "src/parser_scan.re"
+#line 147 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LBRACE); goto start; }
-#line 1061 "src/parser_scan.c"
+#line 1064 "src/parser_scan.c"
 yy98:
                        yych = *++cur;
                        switch (yych) {
@@ -1065,29 +1068,29 @@ yy98:
                        default:        goto yy99;
                        }
 yy99:
-#line 162 "src/parser_scan.re"
+#line 165 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PIPE); goto start; }
-#line 1071 "src/parser_scan.c"
+#line 1074 "src/parser_scan.c"
 yy100:
                        ++cur;
-#line 145 "src/parser_scan.re"
+#line 148 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RBRACE); goto start; }
-#line 1076 "src/parser_scan.c"
+#line 1079 "src/parser_scan.c"
 yy102:
                        ++cur;
-#line 154 "src/parser_scan.re"
+#line 157 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TILDE); goto start; }
-#line 1081 "src/parser_scan.c"
+#line 1084 "src/parser_scan.c"
 yy104:
                        ++cur;
-#line 148 "src/parser_scan.re"
+#line 151 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CMP_NE); goto start; }
-#line 1086 "src/parser_scan.c"
+#line 1089 "src/parser_scan.c"
 yy106:
                        ++cur;
-#line 137 "src/parser_scan.re"
+#line 140 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CPP_PASTE); goto start; }
-#line 1091 "src/parser_scan.c"
+#line 1094 "src/parser_scan.c"
 yy108:
                        ++cur;
                        if (lim <= cur) CHECKEOF();;
@@ -1161,14 +1164,14 @@ yy108:
                        default:        goto yy108;
                        }
 yy110:
-#line 249 "src/parser_scan.re"
+#line 252 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_DOLLAR_NAME); goto start; }
-#line 1167 "src/parser_scan.c"
+#line 1170 "src/parser_scan.c"
 yy111:
                        ++cur;
-#line 150 "src/parser_scan.re"
+#line 153 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_AND); goto start; }
-#line 1172 "src/parser_scan.c"
+#line 1175 "src/parser_scan.c"
 yy113:
                        yych = *++cur;
                        switch (yych) {
@@ -1285,19 +1288,19 @@ yy115:
                        default:        goto yy117;
                        }
 yy117:
-#line 120 "src/parser_scan.re"
+#line 123 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT; goto start; }
-#line 1291 "src/parser_scan.c"
+#line 1294 "src/parser_scan.c"
 yy118:
                        ++cur;
-#line 134 "src/parser_scan.re"
+#line 137 "src/parser_scan.re"
                        { goto comment; }
-#line 1296 "src/parser_scan.c"
+#line 1299 "src/parser_scan.c"
 yy120:
                        ++cur;
-#line 135 "src/parser_scan.re"
+#line 138 "src/parser_scan.re"
                        { goto comment_sl; }
-#line 1301 "src/parser_scan.c"
+#line 1304 "src/parser_scan.c"
 yy122:
                        yyaccept = 4;
                        mrk = ++cur;
@@ -1373,9 +1376,9 @@ yy127:
                        }
 yy128:
                        cur -= 1;
-#line 116 "src/parser_scan.re"
+#line 119 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_L; cur += 1; goto start; }
-#line 1379 "src/parser_scan.c"
+#line 1382 "src/parser_scan.c"
 yy129:
                        yych = *++cur;
                        switch (yych) {
@@ -1385,9 +1388,9 @@ yy129:
                        }
 yy130:
                        cur -= 1;
-#line 115 "src/parser_scan.re"
+#line 118 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_U; cur += 1; goto start; }
-#line 1391 "src/parser_scan.c"
+#line 1394 "src/parser_scan.c"
 yy131:
                        yych = *++cur;
                        switch (yych) {
@@ -1491,29 +1494,29 @@ yy132:
                        }
 yy134:
                        ++cur;
-#line 164 "src/parser_scan.re"
+#line 167 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LSHIFT); goto start; }
-#line 1497 "src/parser_scan.c"
+#line 1500 "src/parser_scan.c"
 yy136:
                        ++cur;
-#line 166 "src/parser_scan.re"
+#line 169 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CMP_LE); goto start; }
-#line 1502 "src/parser_scan.c"
+#line 1505 "src/parser_scan.c"
 yy138:
                        ++cur;
-#line 149 "src/parser_scan.re"
+#line 152 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CMP_EQ); goto start; }
-#line 1507 "src/parser_scan.c"
+#line 1510 "src/parser_scan.c"
 yy140:
                        ++cur;
-#line 167 "src/parser_scan.re"
+#line 170 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CMP_GE); goto start; }
-#line 1512 "src/parser_scan.c"
+#line 1515 "src/parser_scan.c"
 yy142:
                        ++cur;
-#line 165 "src/parser_scan.re"
+#line 168 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RSHIFT); goto start; }
-#line 1517 "src/parser_scan.c"
+#line 1520 "src/parser_scan.c"
 yy144:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -1594,9 +1597,9 @@ yy145:
                        default:        goto yy61;
                        }
 yy146:
-#line 227 "src/parser_scan.re"
+#line 230 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_AS); goto start; }
-#line 1600 "src/parser_scan.c"
+#line 1603 "src/parser_scan.c"
 yy147:
                        ++cur;
                        if (lim <= cur) CHECKEOF();;
@@ -1845,9 +1848,9 @@ yy159:
                        default:        goto yy61;
                        }
 yy160:
-#line 197 "src/parser_scan.re"
+#line 200 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_IF); goto start; }
-#line 1851 "src/parser_scan.c"
+#line 1854 "src/parser_scan.c"
 yy161:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -1861,9 +1864,9 @@ yy161:
 yy162:
                        ++cur;
                        cur -= 1;
-#line 132 "src/parser_scan.re"
+#line 135 "src/parser_scan.re"
                        { char_width = sizeof(wchar_t)/8; }
-#line 1867 "src/parser_scan.c"
+#line 1870 "src/parser_scan.c"
 yy164:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -1980,9 +1983,9 @@ yy177:
 yy178:
                        ++cur;
                        cur -= 1;
-#line 131 "src/parser_scan.re"
+#line 134 "src/parser_scan.re"
                        { char_width = 4; }
-#line 1986 "src/parser_scan.c"
+#line 1989 "src/parser_scan.c"
 yy180:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -2081,9 +2084,9 @@ yy183:
                        default:        goto yy183;
                        }
 yy185:
-#line 248 "src/parser_scan.re"
+#line 251 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NSNAME); goto start; }
-#line 2087 "src/parser_scan.c"
+#line 2090 "src/parser_scan.c"
 yy186:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -2213,9 +2216,9 @@ yy200:
 yy201:
                        ++cur;
                        cur -= 1;
-#line 130 "src/parser_scan.re"
+#line 133 "src/parser_scan.re"
                        { char_width = 2; }
-#line 2219 "src/parser_scan.c"
+#line 2222 "src/parser_scan.c"
 yy203:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -2243,14 +2246,14 @@ yy205:
                        }
 yy206:
                        ++cur;
-#line 151 "src/parser_scan.re"
+#line 154 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_OR); goto start; }
-#line 2249 "src/parser_scan.c"
+#line 2252 "src/parser_scan.c"
 yy208:
                        ++cur;
-#line 171 "src/parser_scan.re"
+#line 174 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ELLIPSIS); goto start; }
-#line 2254 "src/parser_scan.c"
+#line 2257 "src/parser_scan.c"
 yy210:
                        yych = *++cur;
                        switch (yych) {
@@ -2265,15 +2268,15 @@ yy210:
 yy211:
                        ++cur;
                        cur -= 1;
-#line 121 "src/parser_scan.re"
+#line 124 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_F; cur += 1; goto start; }
-#line 2271 "src/parser_scan.c"
+#line 2274 "src/parser_scan.c"
 yy213:
                        ++cur;
                        cur -= 1;
-#line 122 "src/parser_scan.re"
+#line 125 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_L; cur += 1; goto start; }
-#line 2277 "src/parser_scan.c"
+#line 2280 "src/parser_scan.c"
 yy215:
                        yych = *++cur;
                        switch (yych) {
@@ -2300,9 +2303,9 @@ yy217:
                        ++cur;
 yy218:
                        cur -= 2;
-#line 117 "src/parser_scan.re"
+#line 120 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_UL; cur += 2; goto start; }
-#line 2306 "src/parser_scan.c"
+#line 2309 "src/parser_scan.c"
 yy219:
                        yych = *++cur;
                        switch (yych) {
@@ -2349,9 +2352,9 @@ yy220:
                        }
 yy222:
                        ++cur;
-#line 250 "src/parser_scan.re"
+#line 253 "src/parser_scan.re"
                        { tok += 1; cur -= 1; NEWTOKEN(PSI_T_CPP_HEADER); cur += 1; goto start; }
-#line 2355 "src/parser_scan.c"
+#line 2358 "src/parser_scan.c"
 yy224:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -2562,9 +2565,9 @@ yy241:
                        default:        goto yy61;
                        }
 yy242:
-#line 222 "src/parser_scan.re"
+#line 225 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LET); goto start; }
-#line 2568 "src/parser_scan.c"
+#line 2571 "src/parser_scan.c"
 yy243:
                        yyaccept = 10;
                        yych = *(mrk = ++cur);
@@ -2637,9 +2640,9 @@ yy243:
                        default:        goto yy61;
                        }
 yy244:
-#line 221 "src/parser_scan.re"
+#line 224 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LIB); goto start; }
-#line 2643 "src/parser_scan.c"
+#line 2646 "src/parser_scan.c"
 yy245:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -2769,9 +2772,9 @@ yy252:
                        default:        goto yy61;
                        }
 yy253:
-#line 223 "src/parser_scan.re"
+#line 226 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_SET); goto start; }
-#line 2775 "src/parser_scan.c"
+#line 2778 "src/parser_scan.c"
 yy254:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3004,9 +3007,9 @@ yy273:
                        default:        goto yy61;
                        }
 yy274:
-#line 191 "src/parser_scan.re"
+#line 194 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_INT); goto start; }
-#line 3010 "src/parser_scan.c"
+#line 3013 "src/parser_scan.c"
 yy275:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3072,9 +3075,9 @@ yy282:
 yy283:
                        ++cur;
                        cur -= 1;
-#line 129 "src/parser_scan.re"
+#line 132 "src/parser_scan.re"
                        { char_width = 1; }
-#line 3078 "src/parser_scan.c"
+#line 3081 "src/parser_scan.c"
 yy285:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3106,27 +3109,27 @@ yy288:
 yy289:
                        ++cur;
                        cur -= 2;
-#line 124 "src/parser_scan.re"
+#line 127 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DD; cur += 2; goto start; }
-#line 3112 "src/parser_scan.c"
+#line 3115 "src/parser_scan.c"
 yy291:
                        ++cur;
                        cur -= 2;
-#line 123 "src/parser_scan.re"
+#line 126 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DF; cur += 2; goto start; }
-#line 3118 "src/parser_scan.c"
+#line 3121 "src/parser_scan.c"
 yy293:
                        ++cur;
                        cur -= 2;
-#line 125 "src/parser_scan.re"
+#line 128 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DL; cur += 2; goto start; }
-#line 3124 "src/parser_scan.c"
+#line 3127 "src/parser_scan.c"
 yy295:
                        ++cur;
                        cur -= 3;
-#line 118 "src/parser_scan.re"
+#line 121 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_ULL; cur += 3; goto start; }
-#line 3130 "src/parser_scan.c"
+#line 3133 "src/parser_scan.c"
 yy297:
                        ++cur;
                        if ((lim - cur) < 3) CHECKEOF();;
@@ -3282,9 +3285,9 @@ yy305:
                        default:        goto yy61;
                        }
 yy306:
-#line 201 "src/parser_scan.re"
+#line 204 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ELIF); goto start; }
-#line 3288 "src/parser_scan.c"
+#line 3291 "src/parser_scan.c"
 yy307:
                        yyaccept = 14;
                        yych = *(mrk = ++cur);
@@ -3357,9 +3360,9 @@ yy307:
                        default:        goto yy61;
                        }
 yy308:
-#line 200 "src/parser_scan.re"
+#line 203 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ELSE); goto start; }
-#line 3363 "src/parser_scan.c"
+#line 3366 "src/parser_scan.c"
 yy309:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3464,9 +3467,9 @@ yy313:
                        default:        goto yy61;
                        }
 yy314:
-#line 228 "src/parser_scan.re"
+#line 231 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_FREE); goto start; }
-#line 3470 "src/parser_scan.c"
+#line 3473 "src/parser_scan.c"
 yy315:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3587,9 +3590,9 @@ yy321:
                        default:        goto yy61;
                        }
 yy322:
-#line 212 "src/parser_scan.re"
+#line 215 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_NULL); goto start; }
-#line 3593 "src/parser_scan.c"
+#line 3596 "src/parser_scan.c"
 yy323:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3741,9 +3744,9 @@ yy333:
                        default:        goto yy61;
                        }
 yy334:
-#line 229 "src/parser_scan.re"
+#line 232 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TEMP); goto start; }
-#line 3747 "src/parser_scan.c"
+#line 3750 "src/parser_scan.c"
 yy335:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3864,9 +3867,9 @@ yy341:
                        default:        goto yy61;
                        }
 yy342:
-#line 210 "src/parser_scan.re"
+#line 213 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TRUE); goto start; }
-#line 3870 "src/parser_scan.c"
+#line 3873 "src/parser_scan.c"
 yy343:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -3955,9 +3958,9 @@ yy345:
                        default:        goto yy61;
                        }
 yy346:
-#line 238 "src/parser_scan.re"
+#line 241 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ZVAL); goto start; }
-#line 3961 "src/parser_scan.c"
+#line 3964 "src/parser_scan.c"
 yy347:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4067,9 +4070,9 @@ yy352:
                        default:        goto yy61;
                        }
 yy353:
-#line 188 "src/parser_scan.re"
+#line 191 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_BOOL); goto start; }
-#line 4073 "src/parser_scan.c"
+#line 4076 "src/parser_scan.c"
 yy354:
                        yyaccept = 21;
                        yych = *(mrk = ++cur);
@@ -4142,9 +4145,9 @@ yy354:
                        default:        goto yy61;
                        }
 yy355:
-#line 189 "src/parser_scan.re"
+#line 192 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CHAR); goto start; }
-#line 4148 "src/parser_scan.c"
+#line 4151 "src/parser_scan.c"
 yy356:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4231,9 +4234,9 @@ yy358:
                        default:        goto yy61;
                        }
 yy359:
-#line 185 "src/parser_scan.re"
+#line 188 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ENUM); goto start; }
-#line 4237 "src/parser_scan.c"
+#line 4240 "src/parser_scan.c"
 yy360:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4321,9 +4324,9 @@ yy362:
                        default:        goto yy61;
                        }
 yy363:
-#line 181 "src/parser_scan.re"
+#line 184 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LINE); goto start; }
-#line 4327 "src/parser_scan.c"
+#line 4330 "src/parser_scan.c"
 yy364:
                        yyaccept = 24;
                        yych = *(mrk = ++cur);
@@ -4396,9 +4399,9 @@ yy364:
                        default:        goto yy61;
                        }
 yy365:
-#line 192 "src/parser_scan.re"
+#line 195 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_LONG); goto start; }
-#line 4402 "src/parser_scan.c"
+#line 4405 "src/parser_scan.c"
 yy366:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4527,9 +4530,9 @@ yy374:
                        default:        goto yy61;
                        }
 yy375:
-#line 187 "src/parser_scan.re"
+#line 190 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_VOID); goto start; }
-#line 4533 "src/parser_scan.c"
+#line 4536 "src/parser_scan.c"
 yy376:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4609,9 +4612,9 @@ yy377:
                        default:        goto yy61;
                        }
 yy378:
-#line 216 "src/parser_scan.re"
+#line 219 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ARRAY); goto start; }
-#line 4615 "src/parser_scan.c"
+#line 4618 "src/parser_scan.c"
 yy379:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4724,9 +4727,9 @@ yy384:
                        default:        goto yy61;
                        }
 yy385:
-#line 239 "src/parser_scan.re"
+#line 242 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_COUNT); goto start; }
-#line 4730 "src/parser_scan.c"
+#line 4733 "src/parser_scan.c"
 yy386:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -4807,9 +4810,9 @@ yy387:
                        default:        goto yy61;
                        }
 yy388:
-#line 202 "src/parser_scan.re"
+#line 205 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ENDIF); goto start; }
-#line 4813 "src/parser_scan.c"
+#line 4816 "src/parser_scan.c"
 yy389:
                        yyaccept = 29;
                        yych = *(mrk = ++cur);
@@ -4882,9 +4885,9 @@ yy389:
                        default:        goto yy61;
                        }
 yy390:
-#line 207 "src/parser_scan.re"
+#line 210 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ERROR); goto start; }
-#line 4888 "src/parser_scan.c"
+#line 4891 "src/parser_scan.c"
 yy391:
                        yyaccept = 30;
                        yych = *(mrk = ++cur);
@@ -4957,9 +4960,9 @@ yy391:
                        default:        goto yy61;
                        }
 yy392:
-#line 211 "src/parser_scan.re"
+#line 214 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_FALSE); goto start; }
-#line 4963 "src/parser_scan.c"
+#line 4966 "src/parser_scan.c"
 yy393:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5048,9 +5051,9 @@ yy395:
                        default:        goto yy61;
                        }
 yy396:
-#line 198 "src/parser_scan.re"
+#line 201 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_IFDEF); goto start; }
-#line 5054 "src/parser_scan.c"
+#line 5057 "src/parser_scan.c"
 yy397:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5147,9 +5150,9 @@ yy400:
                        default:        goto yy61;
                        }
 yy401:
-#line 213 "src/parser_scan.re"
+#line 216 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_MIXED); goto start; }
-#line 5153 "src/parser_scan.c"
+#line 5156 "src/parser_scan.c"
 yy402:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5350,9 +5353,9 @@ yy418:
                        default:        goto yy61;
                        }
 yy419:
-#line 205 "src/parser_scan.re"
+#line 208 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_UNDEF); goto start; }
-#line 5356 "src/parser_scan.c"
+#line 5359 "src/parser_scan.c"
 yy420:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5434,9 +5437,9 @@ yy421:
                        default:        goto yy61;
                        }
 yy422:
-#line 178 "src/parser_scan.re"
+#line 181 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CPP_ASM); goto start; }
-#line 5440 "src/parser_scan.c"
+#line 5443 "src/parser_scan.c"
 yy423:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5530,9 +5533,9 @@ yy426:
                        default:        goto yy61;
                        }
 yy427:
-#line 186 "src/parser_scan.re"
+#line 189 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CONST); goto start; }
-#line 5536 "src/parser_scan.c"
+#line 5539 "src/parser_scan.c"
 yy428:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5614,9 +5617,9 @@ yy429:
                        default:        goto yy61;
                        }
 yy430:
-#line 193 "src/parser_scan.re"
+#line 196 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_FLOAT); goto start; }
-#line 5620 "src/parser_scan.c"
+#line 5623 "src/parser_scan.c"
 yy431:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5703,9 +5706,9 @@ yy433:
                        default:        goto yy61;
                        }
 yy434:
-#line 190 "src/parser_scan.re"
+#line 193 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_SHORT); goto start; }
-#line 5709 "src/parser_scan.c"
+#line 5712 "src/parser_scan.c"
 yy435:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5806,9 +5809,9 @@ yy439:
                        default:        goto yy61;
                        }
 yy440:
-#line 184 "src/parser_scan.re"
+#line 187 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_UNION); goto start; }
-#line 5812 "src/parser_scan.c"
+#line 5815 "src/parser_scan.c"
 yy441:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5895,9 +5898,9 @@ yy443:
                        default:        goto yy61;
                        }
 yy444:
-#line 236 "src/parser_scan.re"
+#line 239 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_ARRVAL); goto start; }
-#line 5901 "src/parser_scan.c"
+#line 5904 "src/parser_scan.c"
 yy445:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -5994,9 +5997,9 @@ yy448:
                        default:        goto yy61;
                        }
 yy449:
-#line 240 "src/parser_scan.re"
+#line 243 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CALLOC); goto start; }
-#line 6000 "src/parser_scan.c"
+#line 6003 "src/parser_scan.c"
 yy450:
                        yyaccept = 41;
                        yych = *(mrk = ++cur);
@@ -6071,9 +6074,9 @@ yy450:
                        default:        goto yy61;
                        }
 yy451:
-#line 203 "src/parser_scan.re"
+#line 206 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_DEFINE); goto start; }
-#line 6077 "src/parser_scan.c"
+#line 6080 "src/parser_scan.c"
 yy452:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -6162,9 +6165,9 @@ yy454:
                        default:        goto yy61;
                        }
 yy455:
-#line 199 "src/parser_scan.re"
+#line 202 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_IFNDEF); goto start; }
-#line 6168 "src/parser_scan.c"
+#line 6171 "src/parser_scan.c"
 yy456:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -6245,9 +6248,9 @@ yy457:
                        default:        goto yy61;
                        }
 yy458:
-#line 233 "src/parser_scan.re"
+#line 236 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_INTVAL); goto start; }
-#line 6251 "src/parser_scan.c"
+#line 6254 "src/parser_scan.c"
 yy459:
                        yyaccept = 44;
                        yych = *(mrk = ++cur);
@@ -6320,9 +6323,9 @@ yy459:
                        default:        goto yy61;
                        }
 yy460:
-#line 217 "src/parser_scan.re"
+#line 220 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_OBJECT); goto start; }
-#line 6326 "src/parser_scan.c"
+#line 6329 "src/parser_scan.c"
 yy461:
                        yyaccept = 45;
                        yych = *(mrk = ++cur);
@@ -6395,9 +6398,9 @@ yy461:
                        default:        goto yy61;
                        }
 yy462:
-#line 237 "src/parser_scan.re"
+#line 240 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_OBJVAL); goto start; }
-#line 6401 "src/parser_scan.c"
+#line 6404 "src/parser_scan.c"
 yy463:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -6494,9 +6497,9 @@ yy466:
                        default:        goto yy61;
                        }
 yy467:
-#line 226 "src/parser_scan.re"
+#line 229 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_RETURN); goto start; }
-#line 6500 "src/parser_scan.c"
+#line 6503 "src/parser_scan.c"
 yy468:
                        yyaccept = 47;
                        yych = *(mrk = ++cur);
@@ -6569,9 +6572,9 @@ yy468:
                        default:        goto yy61;
                        }
 yy469:
-#line 219 "src/parser_scan.re"
+#line 222 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_STATIC); goto start; }
-#line 6575 "src/parser_scan.c"
+#line 6578 "src/parser_scan.c"
 yy470:
                        yyaccept = 48;
                        yych = *(mrk = ++cur);
@@ -6644,9 +6647,9 @@ yy470:
                        default:        goto yy61;
                        }
 yy471:
-#line 215 "src/parser_scan.re"
+#line 218 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_STRING); goto start; }
-#line 6650 "src/parser_scan.c"
+#line 6653 "src/parser_scan.c"
 yy472:
                        yyaccept = 49;
                        yych = *(mrk = ++cur);
@@ -6719,9 +6722,9 @@ yy472:
                        default:        goto yy61;
                        }
 yy473:
-#line 230 "src/parser_scan.re"
+#line 233 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_STRLEN); goto start; }
-#line 6725 "src/parser_scan.c"
+#line 6728 "src/parser_scan.c"
 yy474:
                        yyaccept = 50;
                        yych = *(mrk = ++cur);
@@ -6794,9 +6797,9 @@ yy474:
                        default:        goto yy61;
                        }
 yy475:
-#line 231 "src/parser_scan.re"
+#line 234 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_STRVAL); goto start; }
-#line 6800 "src/parser_scan.c"
+#line 6803 "src/parser_scan.c"
 yy476:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -6893,9 +6896,9 @@ yy479:
                        default:        goto yy61;
                        }
 yy480:
-#line 244 "src/parser_scan.re"
+#line 247 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_INT); goto start; }
-#line 6899 "src/parser_scan.c"
+#line 6902 "src/parser_scan.c"
 yy481:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7020,9 +7023,9 @@ yy488:
                        default:        goto yy61;
                        }
 yy489:
-#line 194 "src/parser_scan.re"
+#line 197 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_DOUBLE); goto start; }
-#line 7026 "src/parser_scan.c"
+#line 7029 "src/parser_scan.c"
 yy490:
                        yyaccept = 53;
                        yych = *(mrk = ++cur);
@@ -7095,9 +7098,9 @@ yy490:
                        default:        goto yy61;
                        }
 yy491:
-#line 175 "src/parser_scan.re"
+#line 178 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CPP_INLINE); goto start; }
-#line 7101 "src/parser_scan.c"
+#line 7104 "src/parser_scan.c"
 yy492:
                        yyaccept = 54;
                        yych = *(mrk = ++cur);
@@ -7170,9 +7173,9 @@ yy492:
                        default:        goto yy529;
                        }
 yy493:
-#line 173 "src/parser_scan.re"
+#line 176 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PRAGMA); goto start; }
-#line 7176 "src/parser_scan.c"
+#line 7179 "src/parser_scan.c"
 yy494:
                        yyaccept = 55;
                        yych = *(mrk = ++cur);
@@ -7245,9 +7248,9 @@ yy494:
                        default:        goto yy61;
                        }
 yy495:
-#line 196 "src/parser_scan.re"
+#line 199 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_SIGNED); goto start; }
-#line 7251 "src/parser_scan.c"
+#line 7254 "src/parser_scan.c"
 yy496:
                        yyaccept = 56;
                        yych = *(mrk = ++cur);
@@ -7320,9 +7323,9 @@ yy496:
                        default:        goto yy61;
                        }
 yy497:
-#line 180 "src/parser_scan.re"
+#line 183 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_SIZEOF); goto start; }
-#line 7326 "src/parser_scan.c"
+#line 7329 "src/parser_scan.c"
 yy498:
                        yyaccept = 57;
                        yych = *(mrk = ++cur);
@@ -7395,9 +7398,9 @@ yy498:
                        default:        goto yy61;
                        }
 yy499:
-#line 183 "src/parser_scan.re"
+#line 186 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_STRUCT); goto start; }
-#line 7401 "src/parser_scan.c"
+#line 7404 "src/parser_scan.c"
 yy500:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7491,9 +7494,9 @@ yy503:
                        default:        goto yy61;
                        }
 yy504:
-#line 235 "src/parser_scan.re"
+#line 238 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_BOOLVAL); goto start; }
-#line 7497 "src/parser_scan.c"
+#line 7500 "src/parser_scan.c"
 yy505:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7582,9 +7585,9 @@ yy507:
                        default:        goto yy61;
                        }
 yy508:
-#line 204 "src/parser_scan.re"
+#line 207 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_DEFINED); goto start; }
-#line 7588 "src/parser_scan.c"
+#line 7591 "src/parser_scan.c"
 yy509:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7674,9 +7677,9 @@ yy511:
                        default:        goto yy61;
                        }
 yy512:
-#line 208 "src/parser_scan.re"
+#line 211 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_INCLUDE); goto start; }
-#line 7680 "src/parser_scan.c"
+#line 7683 "src/parser_scan.c"
 yy513:
                        yyaccept = 61;
                        yych = *(mrk = ++cur);
@@ -7749,9 +7752,9 @@ yy513:
                        default:        goto yy61;
                        }
 yy514:
-#line 232 "src/parser_scan.re"
+#line 235 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PATHVAL); goto start; }
-#line 7755 "src/parser_scan.c"
+#line 7758 "src/parser_scan.c"
 yy515:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7848,9 +7851,9 @@ yy518:
                        default:        goto yy61;
                        }
 yy519:
-#line 246 "src/parser_scan.re"
+#line 249 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_BOOL); goto start; }
-#line 7854 "src/parser_scan.c"
+#line 7857 "src/parser_scan.c"
 yy520:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -7947,9 +7950,9 @@ yy523:
                        default:        goto yy61;
                        }
 yy524:
-#line 206 "src/parser_scan.re"
+#line 209 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_WARNING); goto start; }
-#line 7953 "src/parser_scan.c"
+#line 7956 "src/parser_scan.c"
 yy525:
                        yyaccept = 34;
                        yych = *(mrk = ++cur);
@@ -8188,9 +8191,9 @@ yy531:
                        default:        goto yy61;
                        }
 yy532:
-#line 182 "src/parser_scan.re"
+#line 185 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TYPEDEF); goto start; }
-#line 8194 "src/parser_scan.c"
+#line 8197 "src/parser_scan.c"
 yy533:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -8277,9 +8280,9 @@ yy535:
                        default:        goto yy61;
                        }
 yy536:
-#line 214 "src/parser_scan.re"
+#line 217 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CALLABLE); goto start; }
-#line 8283 "src/parser_scan.c"
+#line 8286 "src/parser_scan.c"
 yy537:
                        yyaccept = 66;
                        yych = *(mrk = ++cur);
@@ -8352,9 +8355,9 @@ yy537:
                        default:        goto yy61;
                        }
 yy538:
-#line 218 "src/parser_scan.re"
+#line 221 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CALLBACK); goto start; }
-#line 8358 "src/parser_scan.c"
+#line 8361 "src/parser_scan.c"
 yy539:
                        yyaccept = 67;
                        yych = *(mrk = ++cur);
@@ -8427,9 +8430,9 @@ yy539:
                        default:        goto yy61;
                        }
 yy540:
-#line 234 "src/parser_scan.re"
+#line 237 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_FLOATVAL); goto start; }
-#line 8433 "src/parser_scan.c"
+#line 8436 "src/parser_scan.c"
 yy541:
                        yyaccept = 68;
                        yych = *(mrk = ++cur);
@@ -8502,9 +8505,9 @@ yy541:
                        default:        goto yy61;
                        }
 yy542:
-#line 220 "src/parser_scan.re"
+#line 223 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_FUNCTION); goto start; }
-#line 8508 "src/parser_scan.c"
+#line 8511 "src/parser_scan.c"
 yy543:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -8601,9 +8604,9 @@ yy546:
                        default:        goto yy61;
                        }
 yy547:
-#line 242 "src/parser_scan.re"
+#line 245 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_ARRAY); goto start; }
-#line 8607 "src/parser_scan.c"
+#line 8610 "src/parser_scan.c"
 yy548:
                        yyaccept = 70;
                        yych = *(mrk = ++cur);
@@ -8676,9 +8679,9 @@ yy548:
                        default:        goto yy61;
                        }
 yy549:
-#line 245 "src/parser_scan.re"
+#line 248 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_FLOAT); goto start; }
-#line 8682 "src/parser_scan.c"
+#line 8685 "src/parser_scan.c"
 yy550:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -8863,9 +8866,9 @@ yy557:
                        default:        goto yy61;
                        }
 yy558:
-#line 195 "src/parser_scan.re"
+#line 198 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_UNSIGNED); goto start; }
-#line 8869 "src/parser_scan.c"
+#line 8872 "src/parser_scan.c"
 yy559:
                        yyaccept = 72;
                        yych = *(mrk = ++cur);
@@ -8938,9 +8941,9 @@ yy559:
                        default:        goto yy61;
                        }
 yy560:
-#line 179 "src/parser_scan.re"
+#line 182 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_VOLATILE); goto start; }
-#line 8944 "src/parser_scan.c"
+#line 8947 "src/parser_scan.c"
 yy561:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -9037,9 +9040,9 @@ yy564:
                        default:        goto yy61;
                        }
 yy565:
-#line 241 "src/parser_scan.re"
+#line 244 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_OBJECT); goto start; }
-#line 9043 "src/parser_scan.c"
+#line 9046 "src/parser_scan.c"
 yy566:
                        yyaccept = 74;
                        yych = *(mrk = ++cur);
@@ -9112,9 +9115,9 @@ yy566:
                        default:        goto yy61;
                        }
 yy567:
-#line 243 "src/parser_scan.re"
+#line 246 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_TO_STRING); goto start; }
-#line 9118 "src/parser_scan.c"
+#line 9121 "src/parser_scan.c"
 yy568:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -9299,9 +9302,9 @@ yy574:
                        default:        goto yy61;
                        }
 yy575:
-#line 224 "src/parser_scan.re"
+#line 227 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PRE_ASSERT); goto start; }
-#line 9305 "src/parser_scan.c"
+#line 9308 "src/parser_scan.c"
 yy576:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -9388,9 +9391,9 @@ yy578:
                        default:        goto yy61;
                        }
 yy579:
-#line 176 "src/parser_scan.re"
+#line 179 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CPP_RESTRICT); goto start; }
-#line 9394 "src/parser_scan.c"
+#line 9397 "src/parser_scan.c"
 yy580:
                        yyaccept = 3;
                        mrk = ++cur;
@@ -9546,9 +9549,9 @@ yy582:
                        default:        goto yy61;
                        }
 yy583:
-#line 225 "src/parser_scan.re"
+#line 228 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_POST_ASSERT); goto start; }
-#line 9552 "src/parser_scan.c"
+#line 9555 "src/parser_scan.c"
 yy584:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -9638,9 +9641,9 @@ yy586:
                        default:        goto yy529;
                        }
 yy587:
-#line 174 "src/parser_scan.re"
+#line 177 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_PRAGMA_ONCE); goto start; }
-#line 9644 "src/parser_scan.c"
+#line 9647 "src/parser_scan.c"
 yy588:
                        yyaccept = 79;
                        yych = *(mrk = ++cur);
@@ -9713,9 +9716,9 @@ yy588:
                        default:        goto yy61;
                        }
 yy589:
-#line 209 "src/parser_scan.re"
+#line 212 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_INCLUDE_NEXT); goto start; }
-#line 9719 "src/parser_scan.c"
+#line 9722 "src/parser_scan.c"
 yy590:
                        yyaccept = 3;
                        yych = *(mrk = ++cur);
@@ -9812,9 +9815,9 @@ yy593:
                        default:        goto yy61;
                        }
 yy594:
-#line 177 "src/parser_scan.re"
+#line 180 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_CPP_EXTENSION); goto start; }
-#line 9818 "src/parser_scan.c"
+#line 9821 "src/parser_scan.c"
 yy595:
                        ++cur;
                        if ((lim - cur) < 2) CHECKEOF();;
@@ -9834,16 +9837,16 @@ yy597:
                        }
 yy598:
                        ++cur;
-#line 251 "src/parser_scan.re"
+#line 254 "src/parser_scan.re"
                        { parens = 2; goto cpp_attribute; }
-#line 9840 "src/parser_scan.c"
+#line 9843 "src/parser_scan.c"
                }
-#line 257 "src/parser_scan.re"
+#line 260 "src/parser_scan.re"
 
 
        character: ;
                
-#line 9847 "src/parser_scan.c"
+#line 9850 "src/parser_scan.c"
                {
                        unsigned char yych;
                        if (lim <= cur) CHECKEOF();;
@@ -9857,17 +9860,17 @@ yy598:
                        }
 yy602:
                        ++cur;
-#line 275 "src/parser_scan.re"
+#line 278 "src/parser_scan.re"
                        { escaped = false; goto character; }
-#line 9863 "src/parser_scan.c"
+#line 9866 "src/parser_scan.c"
 yy604:
                        ++cur;
-#line 262 "src/parser_scan.re"
+#line 265 "src/parser_scan.re"
                        { NEWLINE(); goto character; }
-#line 9868 "src/parser_scan.c"
+#line 9871 "src/parser_scan.c"
 yy606:
                        ++cur;
-#line 264 "src/parser_scan.re"
+#line 267 "src/parser_scan.re"
                        {
                        if (escaped) {
                                escaped = false;
@@ -9879,19 +9882,19 @@ yy606:
                        token->flags = char_width;
                        goto start;
                }
-#line 9883 "src/parser_scan.c"
+#line 9886 "src/parser_scan.c"
 yy608:
                        ++cur;
-#line 263 "src/parser_scan.re"
+#line 266 "src/parser_scan.re"
                        { escaped = !escaped;  goto character; }
-#line 9888 "src/parser_scan.c"
+#line 9891 "src/parser_scan.c"
                }
-#line 277 "src/parser_scan.re"
+#line 280 "src/parser_scan.re"
 
 
        string: ;
                
-#line 9895 "src/parser_scan.c"
+#line 9898 "src/parser_scan.c"
                {
                        unsigned char yych;
                        if (lim <= cur) CHECKEOF();;
@@ -9905,17 +9908,17 @@ yy608:
                        }
 yy612:
                        ++cur;
-#line 295 "src/parser_scan.re"
+#line 298 "src/parser_scan.re"
                        { escaped = false; goto string; }
-#line 9911 "src/parser_scan.c"
+#line 9914 "src/parser_scan.c"
 yy614:
                        ++cur;
-#line 282 "src/parser_scan.re"
+#line 285 "src/parser_scan.re"
                        { NEWLINE(); goto string; }
-#line 9916 "src/parser_scan.c"
+#line 9919 "src/parser_scan.c"
 yy616:
                        ++cur;
-#line 284 "src/parser_scan.re"
+#line 287 "src/parser_scan.re"
                        {
                        if (escaped) {
                                escaped = false;
@@ -9927,19 +9930,19 @@ yy616:
                        token->flags = char_width;
                        goto start;
                }
-#line 9931 "src/parser_scan.c"
+#line 9934 "src/parser_scan.c"
 yy618:
                        ++cur;
-#line 283 "src/parser_scan.re"
+#line 286 "src/parser_scan.re"
                        { escaped = !escaped; goto string; }
-#line 9936 "src/parser_scan.c"
+#line 9939 "src/parser_scan.c"
                }
-#line 297 "src/parser_scan.re"
+#line 300 "src/parser_scan.re"
 
 
        comment: ;
                
-#line 9943 "src/parser_scan.c"
+#line 9946 "src/parser_scan.c"
                {
                        unsigned char yych;
                        if ((lim - cur) < 2) CHECKEOF();;
@@ -9953,14 +9956,14 @@ yy618:
 yy622:
                        ++cur;
 yy623:
-#line 304 "src/parser_scan.re"
+#line 307 "src/parser_scan.re"
                        { goto comment; }
-#line 9959 "src/parser_scan.c"
+#line 9962 "src/parser_scan.c"
 yy624:
                        ++cur;
-#line 302 "src/parser_scan.re"
+#line 305 "src/parser_scan.re"
                        { NEWLINE(); goto comment; }
-#line 9964 "src/parser_scan.c"
+#line 9967 "src/parser_scan.c"
 yy626:
                        yych = *++cur;
                        switch (yych) {
@@ -9969,16 +9972,16 @@ yy626:
                        }
 yy627:
                        ++cur;
-#line 303 "src/parser_scan.re"
+#line 306 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_COMMENT); goto start; }
-#line 9975 "src/parser_scan.c"
+#line 9978 "src/parser_scan.c"
                }
-#line 306 "src/parser_scan.re"
+#line 309 "src/parser_scan.re"
 
 
        comment_sl: ;
                
-#line 9982 "src/parser_scan.c"
+#line 9985 "src/parser_scan.c"
                {
                        unsigned char yych;
                        if (lim <= cur) CHECKEOF();;
@@ -9990,22 +9993,22 @@ yy627:
                        }
 yy631:
                        ++cur;
-#line 312 "src/parser_scan.re"
+#line 315 "src/parser_scan.re"
                        { goto comment_sl; }
-#line 9996 "src/parser_scan.c"
+#line 9999 "src/parser_scan.c"
 yy633:
                        ++cur;
-#line 311 "src/parser_scan.re"
+#line 314 "src/parser_scan.re"
                        { NEWTOKEN(PSI_T_COMMENT); tok = cur - 1; NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; }
-#line 10001 "src/parser_scan.c"
+#line 10004 "src/parser_scan.c"
                }
-#line 314 "src/parser_scan.re"
+#line 317 "src/parser_scan.re"
 
 
        cpp_attribute: ;
 
                
-#line 10009 "src/parser_scan.c"
+#line 10012 "src/parser_scan.c"
                {
                        unsigned char yych;
                        if (lim <= cur) CHECKEOF();;
@@ -10019,26 +10022,26 @@ yy633:
                        }
 yy637:
                        ++cur;
-#line 323 "src/parser_scan.re"
+#line 326 "src/parser_scan.re"
                        { goto cpp_attribute; }
-#line 10025 "src/parser_scan.c"
+#line 10028 "src/parser_scan.c"
 yy639:
                        ++cur;
-#line 322 "src/parser_scan.re"
+#line 325 "src/parser_scan.re"
                        { NEWLINE(); goto cpp_attribute; }
-#line 10030 "src/parser_scan.c"
+#line 10033 "src/parser_scan.c"
 yy641:
                        ++cur;
-#line 320 "src/parser_scan.re"
+#line 323 "src/parser_scan.re"
                        { ++parens; goto cpp_attribute; }
-#line 10035 "src/parser_scan.c"
+#line 10038 "src/parser_scan.c"
 yy643:
                        ++cur;
-#line 321 "src/parser_scan.re"
+#line 324 "src/parser_scan.re"
                        { if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } }
-#line 10040 "src/parser_scan.c"
+#line 10043 "src/parser_scan.c"
                }
-#line 325 "src/parser_scan.re"
+#line 328 "src/parser_scan.re"
 
 error: ;
 
index 043243f..f4ae1fd 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "parser.h"
 #include "plist.h"
+#include "debug.h"
 
 /*!max:re2c*/
 #ifndef YYMAXFILL
@@ -52,8 +53,10 @@ size_t psi_parser_maxfill(void) {
                token = psi_token_init(t, tok, cur - tok, tok - eol + 1, I->lines, I->file); \
        } \
        tokens = psi_plist_add(tokens, &token); \
+       psi_debug_lock(PSI_DATA(P)); \
        PSI_DEBUG_PRINT(P, "PSI: scanned < "); \
        PSI_DEBUG_DUMP(P, psi_token_dump, token); \
+       psi_debug_unlock(PSI_DATA(P)); \
 } while(0)
 
 #define CHECKEOF() if (cur >= lim - YYMAXFILL) goto done
index 2288990..4892ad2 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "data.h"
 #include "cpp.h"
+#include "debug.h"
 
 struct psi_cpp_exp *psi_cpp_exp_init(token_t type, void *data)
 {
index 94f4336..f948b01 100644 (file)
 #else
 # include "php_config.h"
 #endif
-#include "php_psi.h"
 
-#include <dlfcn.h>
 #include <fnmatch.h>
-
 #include <Zend/zend_smart_str.h>
 
+#include "php_psi.h"
 #include "data.h"
+#include "dl.h"
 
 #define PSI_FUNC_REDIRS
 #include "php_psi_predef.h"
@@ -65,7 +64,7 @@ void psi_decl_free(struct psi_decl **d_ptr)
                if (d->redir) {
                        zend_string_release(d->redir);
                }
-               free(d);
+               pefree(d, 1);
        }
 }
 
@@ -127,7 +126,7 @@ static inline bool psi_decl_validate_func(struct psi_data *data,
                                "Failed to locate symbol '%s(%s)': %s",
                                func->var->name->val,
                                decl->redir ? decl->redir->val : "",
-                               dlerror() ?: "not found");
+                               psi_dlerror() ?: "not found");
                return false;
        }
        return true;
index 85642e3..263a25a 100644 (file)
 # include "php_config.h"
 #endif
 
-#include "php_psi.h"
-
 #include <fnmatch.h>
 #include <Zend/zend_smart_str.h>
 
+#include "php_psi.h"
 #include "data.h"
+#include "dl.h"
 
 struct psi_decl_extvar *psi_decl_extvar_init(struct psi_decl_arg *arg)
 {
index f2f0fc9..3e0fff7 100644 (file)
@@ -29,8 +29,7 @@
 # include "php_config.h"
 #endif
 #include "data.h"
-
-#include <dlfcn.h>
+#include "dl.h"
 
 void psi_decl_file_dtor(struct psi_decl_file *file)
 {
@@ -48,24 +47,23 @@ void psi_decl_file_dtor(struct psi_decl_file *file)
 
 static inline bool validate_lib(struct psi_data *dst, const char *libname, void **dlopened)
 {
-       char lib[MAXPATHLEN];
-       size_t len;
+       char lib[PATH_MAX];
+       size_t len = PATH_MAX;
 
        if (!libname) {
                /* FIXME: assume stdlib */
                return true;
-       } else if (!strchr(libname, '/')) {
-               len = snprintf(lib, MAXPATHLEN, "lib%s.%s", libname, PHP_PSI_SHLIB_SUFFIX);
-               if (MAXPATHLEN == len) {
-                       dst->error(dst, NULL, PSI_WARNING, "Library name too long: '%s'",
-                                       libname);
-               }
-               lib[len] = 0;
-               libname = lib;
        }
-       if (!(*dlopened = dlopen(libname, RTLD_LAZY | RTLD_LOCAL))) {
-               dst->error(dst, NULL, PSI_WARNING, "Could not open library '%s': %s.",
-                               libname, dlerror());
+
+       if (PATH_MAX == psi_dlname(&lib, &len, libname)) {
+               dst->error(dst, NULL, PSI_WARNING, "Library name too long: '%s'",
+                               libname);
+               return false;
+       }
+
+       if (!(*dlopened = psi_dlopen(lib))) {
+               dst->error(dst, NULL, PSI_WARNING, "Could not open library '%s': %s",
+                               libname, psi_dlerror());
                return false;
        }
 
@@ -95,7 +93,7 @@ bool psi_decl_file_validate(struct psi_data *dst, struct psi_data *src)
 
 void psi_libs_free(void **dlopened) {
        if (*dlopened) {
-               dlclose(*dlopened);
+               psi_dlclose(*dlopened);
        }
 }
 
index 944b876..3462420 100644 (file)
@@ -35,6 +35,7 @@
 #include "context.h"
 #include "call.h"
 #include "calc.h"
+#include "debug.h"
 
 struct psi_num_exp *psi_num_exp_init_ternary(token_t op,
                struct psi_num_exp *cond, struct psi_num_exp *truthy,
index aeaf386..3428905 100644 (file)
@@ -36,6 +36,7 @@
 #include "calc.h"
 #include "call.h"
 #include "parser.h"
+#include "debug.h"
 
 #include "Zend/zend_constants.h"
 #include "Zend/zend_operators.h"
index 12f23e8..8aa47e3 100644 (file)
@@ -30,6 +30,7 @@
 #endif
 
 #include "data.h"
+#include "debug.h"
 
 typedef bool (*psi_validate_list_entry)(struct psi_validate_scope *scope,
                struct psi_data *dst, void *ptr);