From c9384515a81cb64d345b299908b2852f51bb8e6e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 16 Apr 2018 09:16:34 +0200 Subject: [PATCH] Merge branch 'slimconfigure' --- Makefile.frag | 7 +- config.m4 | 4 +- m4/psi/psi.m4 | 4 +- php_psi_posix.h.in | 10 + psi.d/arpa_inet.psi | 6 +- psi.d/stat.psi | 2 +- psi.d/uname.psi | 2 +- scripts/_include.php | 4 + scripts/gen_calc_bin.php | 32 - scripts/gen_calc_bool.php | 29 - scripts/gen_calc_unary.php | 93 + src/calc.h | 7 +- src/calc/basic.h | 670 ++++ src/calc/bin.h | 134 +- src/calc/bool.h | 82 +- src/calc/cast.h | 164 + src/calc/cmp.h | 1076 ++++++- src/calc/unary.h | 212 ++ src/context.c | 184 +- src/context.h | 1 - src/cpp.c | 26 +- src/data.c | 282 -- src/data.h | 50 +- src/error.h | 1 + src/marshal.c | 8 +- src/module.c | 12 +- src/parser.c | 709 +++-- src/parser.re | 67 +- src/parser_proc.c | 6002 ++++++++++++++++++++++-------------- src/parser_proc.h | 24 +- src/parser_proc_grammar.y | 351 ++- src/plist.c | 2 +- src/token.h | 56 +- src/types.h | 1 - src/types/assert_stmt.c | 6 +- src/types/assert_stmt.h | 2 +- src/types/const.c | 11 +- src/types/const.h | 10 +- src/types/const_type.c | 53 - src/types/const_type.h | 40 - src/types/cpp_macro_decl.c | 8 +- src/types/decl.c | 44 +- src/types/decl.h | 9 +- src/types/decl_arg.c | 12 +- src/types/decl_arg.h | 6 +- src/types/decl_enum_item.c | 7 +- src/types/decl_extvar.c | 13 +- src/types/decl_extvar.h | 2 +- src/types/decl_struct.c | 14 +- src/types/decl_struct.h | 4 +- src/types/decl_type.c | 33 +- src/types/decl_type.h | 5 +- src/types/decl_union.c | 10 +- src/types/decl_union.h | 4 +- src/types/decl_var.c | 17 +- src/types/decl_var.h | 4 +- src/types/free_exp.c | 10 +- src/types/free_exp.h | 2 +- src/types/free_stmt.c | 6 +- src/types/free_stmt.h | 2 +- src/types/impl.c | 17 +- src/types/impl.h | 3 +- src/types/impl_arg.c | 11 +- src/types/impl_def_val.c | 146 +- src/types/impl_def_val.h | 9 +- src/types/impl_func.c | 5 +- src/types/impl_func.h | 3 +- src/types/impl_type.c | 5 + src/types/impl_type.h | 1 + src/types/impl_var.c | 17 +- src/types/impl_var.h | 6 +- src/types/let_callback.c | 21 +- src/types/let_callback.h | 2 +- src/types/let_exp.c | 26 +- src/types/let_exp.h | 2 +- src/types/let_func.c | 39 +- src/types/let_func.h | 2 +- src/types/let_stmt.c | 31 +- src/types/let_stmt.h | 2 +- src/types/num_exp.c | 190 +- src/types/num_exp.h | 43 +- src/types/number.c | 188 +- src/types/number.h | 11 +- src/types/return_exp.c | 19 +- src/types/return_exp.h | 2 +- src/types/return_stmt.c | 15 +- src/types/return_stmt.h | 2 +- src/types/set_exp.c | 8 +- src/types/set_exp.h | 3 +- src/types/set_func.c | 42 +- src/types/set_func.h | 3 +- src/types/set_stmt.c | 25 +- src/types/set_stmt.h | 2 +- src/validate.c | 227 ++ src/validate.h | 91 + tests/calc/calc.psi | 26 +- tests/ndbm/gdbm.psi | 2 + tests/ndbm/ndbm.psi | 14 +- tests/ndbm/ndbm001.phpt | 3 +- tests/pipe/pipe.psi | 5 +- tests/sqlite/sqlite.psi | 30 +- tests/uname/uname001.phpt | 2 +- tests/yaml/yaml.psi | 1866 +---------- 103 files changed, 8009 insertions(+), 5806 deletions(-) create mode 100644 scripts/gen_calc_unary.php create mode 100644 src/calc/unary.h delete mode 100644 src/types/const_type.c delete mode 100644 src/types/const_type.h create mode 100644 src/validate.c create mode 100644 src/validate.h create mode 100644 tests/ndbm/gdbm.psi diff --git a/Makefile.frag b/Makefile.frag index 5ca422e..91499f6 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -27,10 +27,11 @@ $(PHP_PSI_SRCDIR)/src/parser.c: $(PHP_PSI_SRCDIR)/src/parser.re $(PHP_PSI_SRCDIR)/src/calc/%.h: $(PHP_PSI_SRCDIR)/scripts/gen_calc_%.php $(PHP_EXECUTABLE) $< >$@ -$(PHP_PSI_SRCDIR)/src/calc.h: | $(PHP_PSI_SRCDIR)/src/calc/basic.h $(PHP_PSI_SRCDIR)/src/calc/bin.h $(PHP_PSI_SRCDIR)/src/calc/bool.h $(PHP_PSI_SRCDIR)/src/calc/cast.h $(PHP_PSI_SRCDIR)/src/calc/cmp.h $(PHP_PSI_SRCDIR)/src/calc/oper.h +$(PHP_PSI_SRCDIR)/src/calc.h: | $(PHP_PSI_SRCDIR)/src/calc/basic.h $(PHP_PSI_SRCDIR)/src/calc/bin.h $(PHP_PSI_SRCDIR)/src/calc/bool.h $(PHP_PSI_SRCDIR)/src/calc/unary.h $(PHP_PSI_SRCDIR)/src/calc/cast.h $(PHP_PSI_SRCDIR)/src/calc/cmp.h $(PHP_PSI_SRCDIR)/src/calc/oper.h .PHONY: psi-generated psi-generated: $(PHP_PSI_GENERATED) + PHP_PSI_DEPEND = $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(PHP_PSI_SOURCES:.c=.dep)) @@ -88,6 +89,10 @@ psi-clean-depend: psi-clean: psi-clean-depend +.PHONY: psi-watch +psi-watch: + -while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do $(MAKE); done + install-headers: psi-build-headers clean: psi-clean-headers psi-clean-aux ifneq ($(PSI_DEPS),) diff --git a/config.m4 b/config.m4 index f25cc06..01a82a2 100644 --- a/config.m4 +++ b/config.m4 @@ -164,7 +164,7 @@ if test "$PHP_PSI" != no; then PHP_PSI_HEADERS=" \ src/calc/basic.h src/calc/bin.h src/calc/bool.h src/calc/cast.h \ - src/calc/cmp.h src/calc/oper.h \ + src/calc/unary.h src/calc/cmp.h src/calc/oper.h \ `(cd $PHP_PSI_SRCDIR/src && ls *.h types/*.h)` \ " # parser* should come first @@ -177,7 +177,7 @@ if test "$PHP_PSI" != no; then PHP_PSI_GENERATED=" \ src/parser_proc.c src/parser.c \ src/calc/basic.h src/calc/bin.h src/calc/bool.h src/calc/cast.h \ - src/calc/cmp.h src/calc/oper.h \ + src/calc/unary.h src/calc/cmp.h src/calc/oper.h \ " PHP_NEW_EXTENSION(psi, $PHP_PSI_SOURCES, $ext_shared) diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index 470a7a6..ba86907 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -106,7 +106,9 @@ AC_DEFUN(PSI_CONFIG_DONE, [ if $PSI_FAST_CONFIG; then for conf_env in $PSI_CONFIG_TMP/*/conf.env; do - source $conf_env + if test "$conf_env" != "$PSI_CONFIG_TMP/*/conf.env"; then + source $conf_env + fi done fi diff --git a/php_psi_posix.h.in b/php_psi_posix.h.in index 882e30c..6131448 100644 --- a/php_psi_posix.h.in +++ b/php_psi_posix.h.in @@ -110,6 +110,16 @@ static struct psi_func_redir { const char *name; psi_func_ptr func; } psi_func_redirs[] = { + {"fstat", (psi_func_ptr) fstat}, + {"fstatat", (psi_func_ptr) fstatat}, + {"lstat", (psi_func_ptr) lstat}, + {"mknod", (psi_func_ptr) mknod}, + {"mknodat", (psi_func_ptr) mknodat}, + {"stat", (psi_func_ptr) stat}, + {"getaddrinfo_a", (psi_func_ptr) getaddrinfo_a}, + {"gai_suspend", (psi_func_ptr) gai_suspend}, + {"gai_error", (psi_func_ptr) gai_error}, + {"gai_cancel", (psi_func_ptr) gai_cancel}, @PSI_REDIRS@ {0} }; diff --git a/psi.d/arpa_inet.psi b/psi.d/arpa_inet.psi index f9aae9e..6fdf0fb 100644 --- a/psi.d/arpa_inet.psi +++ b/psi.d/arpa_inet.psi @@ -34,7 +34,7 @@ function psi\inet_ntoa(array $in) : string { function psi\inet_ntop(int $af, string $src) : string { let af = intval($af); let src = strval($src); - let size = psi\SIZEOF_STRUCT_SOCKADDR_STORAGE; + let size = sizeof(struct sockaddr_storage); let dst = calloc(1, size); return inet_ntop(af, src, dst, size) as to_string(inet_ntop); } @@ -42,7 +42,7 @@ function psi\inet_ntop(int $af, string $src) : string { function psi\inet_pton(int $af, string $src, string &$dst) : int { let af = intval($af); let src = strval($src); - let dst = calloc(1, psi\SIZEOF_STRUCT_SOCKADDR_STORAGE); + let dst = calloc(1, sizeof(struct sockaddr_storage)); return inet_pton(af, src, dst) as to_int(inet_pton); - set $dst = to_string(dst, psi\SIZEOF_STRUCT_SOCKADDR_STORAGE); + set $dst = to_string(dst, sizeof(struct sockaddr_storage)); } \ No newline at end of file diff --git a/psi.d/stat.psi b/psi.d/stat.psi index 3d0e623..68f6781 100644 --- a/psi.d/stat.psi +++ b/psi.d/stat.psi @@ -2,7 +2,7 @@ // extern int stat(char *path, struct stat *buf); function psi\stat(string $path, array &$buf = NULL) : int { let path = strval($path); - let buf = calloc(1, psi\SIZEOF_STRUCT_STAT); + let buf = calloc(1, sizeof(struct stat)); return stat(path, buf) as to_int(stat); set $buf = to_array(*buf, to_int(st_dev), diff --git a/psi.d/uname.psi b/psi.d/uname.psi index e5144da..404399c 100644 --- a/psi.d/uname.psi +++ b/psi.d/uname.psi @@ -1,7 +1,7 @@ #include function psi\uname(array &$u = NULL) : int { - let name = calloc(1, psi\SIZEOF_STRUCT_UTSNAME); + let name = calloc(1, sizeof(struct utsname)); return uname(name) as to_int(uname); set $u = to_array(*name, to_string(sysname), diff --git a/scripts/_include.php b/scripts/_include.php index acd539b..67a73ca 100644 --- a/scripts/_include.php +++ b/scripts/_include.php @@ -12,6 +12,8 @@ $types = [ "UINT32" => "u32", "INT64" => "i64", "UINT64" => "u64", + "INT128" => "i128", + "UINT128" => "u128", "FLOAT" => "fval", "DOUBLE" => "dval", "LONG_DOUBLE" => "ldval", @@ -29,6 +31,8 @@ function t_is_int($t) { function t_is_special($t) { switch ($t) { + case "INT128_T": + case "UINT128_T": case "LONG_DOUBLE": return true; default: diff --git a/scripts/gen_calc_bin.php b/scripts/gen_calc_bin.php index c7dbf01..5ee92a8 100644 --- a/scripts/gen_calc_bin.php +++ b/scripts/gen_calc_bin.php @@ -64,35 +64,3 @@ static inline token_t psi_calc_bin_(token_t t1, impl_val *v1, token return PSI_T_UINT64; } - -static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) -{ - impl_val i1; - - (void) t2; - (void) v2; - - switch (t1) { - $v1) : ?> - - -#if HAVE_ - - - case PSI_T_: - i1.u64 = v1->; - break; - - -#endif - - - - default: - assert(0); - break; - } - - res->u64 = ~i1.u64; - return PSI_T_UINT64; -} \ No newline at end of file diff --git a/scripts/gen_calc_bool.php b/scripts/gen_calc_bool.php index 1aaad08..1b5b339 100644 --- a/scripts/gen_calc_bool.php +++ b/scripts/gen_calc_bool.php @@ -2,35 +2,6 @@ include __DIR__."/_include.php"; ?> - -static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) -{ - (void) t2; - (void) v2; - - switch (t1) { - $v1) : ?> - - -#if HAVE_ - - - case PSI_T_: - res->u8 = !v1->; - break; - - -#endif - - - - default: - assert(0); - break; - } - return PSI_T_UINT8; -} - static inline token_t psi_calc_bool_or(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) { switch (t1) { diff --git a/scripts/gen_calc_unary.php b/scripts/gen_calc_unary.php new file mode 100644 index 0000000..ef20720 --- /dev/null +++ b/scripts/gen_calc_unary.php @@ -0,0 +1,93 @@ + + +static inline token_t psi_calc_minus(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + (void) t2; + (void) v2; + + switch (t1) { + $v1) : ?> + + +#if HAVE_ + + + case PSI_T_: + res-> = -v1->; + break; + + +#endif + + + + default: + assert(0); + break; + } + return t1; +} + + +static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + (void) t2; + (void) v2; + + switch (t1) { + $v1) : ?> + + +#if HAVE_ + + + case PSI_T_: + res->u8 = !v1->; + break; + + +#endif + + + + default: + assert(0); + break; + } + return PSI_T_UINT8; +} + + +static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + impl_val i1; + + (void) t2; + (void) v2; + + switch (t1) { + $v1) : ?> + + +#if HAVE_ + + + case PSI_T_: + i1.u64 = v1->; + break; + + +#endif + + + + default: + assert(0); + break; + } + + res->u64 = ~i1.u64; + return PSI_T_UINT64; +} \ No newline at end of file diff --git a/src/calc.h b/src/calc.h index 49114ef..21ece7b 100644 --- a/src/calc.h +++ b/src/calc.h @@ -29,15 +29,16 @@ #include "token.h" #include "types/impl_val.h" -#define PRIfval "f" -#define PRIdval "lf" -#define PRIldval "Lf" +#define PRIfval ".13gF" +#define PRIdval ".53lg" +#define PRIldval ".64LgL" typedef token_t (*psi_calc)(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); #include "calc/basic.h" #include "calc/bin.h" #include "calc/bool.h" +#include "calc/unary.h" #include "calc/cast.h" #include "calc/cmp.h" #include "calc/oper.h" diff --git a/src/calc/basic.h b/src/calc/basic.h index ac021e0..ec42112 100644 --- a/src/calc/basic.h +++ b/src/calc/basic.h @@ -58,6 +58,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i8 + v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i8 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i8 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i8 + v2->fval; return PSI_T_FLOAT; @@ -101,6 +107,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u8 + v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u8 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u8 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u8 + v2->fval; return PSI_T_FLOAT; @@ -144,6 +156,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i16 + v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i16 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i16 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i16 + v2->fval; return PSI_T_FLOAT; @@ -187,6 +205,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u16 + v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u16 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u16 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u16 + v2->fval; return PSI_T_FLOAT; @@ -230,6 +254,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i32 + v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i32 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i32 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i32 + v2->fval; return PSI_T_FLOAT; @@ -273,6 +303,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u32 + v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u32 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u32 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u32 + v2->fval; return PSI_T_FLOAT; @@ -316,6 +352,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i64 + v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i64 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i64 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i64 + v2->fval; return PSI_T_FLOAT; @@ -359,6 +401,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u64 + v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u64 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u64 + v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u64 + v2->fval; return PSI_T_FLOAT; @@ -371,6 +419,104 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va return PSI_T_LONG_DOUBLE; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->i128 = v1->i128 + v2->i8; + return PSI_T_INT128; + case PSI_T_UINT8: + res->i128 = v1->i128 + v2->u8; + return PSI_T_INT128; + case PSI_T_INT16: + res->i128 = v1->i128 + v2->i16; + return PSI_T_INT128; + case PSI_T_UINT16: + res->i128 = v1->i128 + v2->u16; + return PSI_T_INT128; + case PSI_T_INT32: + res->i128 = v1->i128 + v2->i32; + return PSI_T_INT128; + case PSI_T_UINT32: + res->i128 = v1->i128 + v2->u32; + return PSI_T_INT128; + case PSI_T_INT64: + res->i128 = v1->i128 + v2->i64; + return PSI_T_INT128; + case PSI_T_UINT64: + res->i128 = v1->i128 + v2->u64; + return PSI_T_INT128; + case PSI_T_INT128: + res->i128 = v1->i128 + v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i128 + v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->i128 + v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->i128 + v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->i128 + v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u128 = v1->u128 + v2->i8; + return PSI_T_UINT128; + case PSI_T_UINT8: + res->u128 = v1->u128 + v2->u8; + return PSI_T_UINT128; + case PSI_T_INT16: + res->u128 = v1->u128 + v2->i16; + return PSI_T_UINT128; + case PSI_T_UINT16: + res->u128 = v1->u128 + v2->u16; + return PSI_T_UINT128; + case PSI_T_INT32: + res->u128 = v1->u128 + v2->i32; + return PSI_T_UINT128; + case PSI_T_UINT32: + res->u128 = v1->u128 + v2->u32; + return PSI_T_UINT128; + case PSI_T_INT64: + res->u128 = v1->u128 + v2->i64; + return PSI_T_UINT128; + case PSI_T_UINT64: + res->u128 = v1->u128 + v2->u64; + return PSI_T_UINT128; + case PSI_T_INT128: + res->u128 = v1->u128 + v2->i128; + return PSI_T_UINT128; + case PSI_T_UINT128: + res->u128 = v1->u128 + v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->u128 + v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->u128 + v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->u128 + v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + default: assert(0); break; @@ -402,6 +548,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->fval = v1->fval + v2->u64; return PSI_T_FLOAT; + case PSI_T_INT128: + res->fval = v1->fval + v2->i128; + return PSI_T_FLOAT; + case PSI_T_UINT128: + res->fval = v1->fval + v2->u128; + return PSI_T_FLOAT; case PSI_T_FLOAT: res->fval = v1->fval + v2->fval; return PSI_T_FLOAT; @@ -445,6 +597,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->dval = v1->dval + v2->u64; return PSI_T_DOUBLE; + case PSI_T_INT128: + res->dval = v1->dval + v2->i128; + return PSI_T_DOUBLE; + case PSI_T_UINT128: + res->dval = v1->dval + v2->u128; + return PSI_T_DOUBLE; case PSI_T_FLOAT: res->dval = v1->dval + v2->fval; return PSI_T_DOUBLE; @@ -489,6 +647,12 @@ static inline token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->ldval = v1->ldval + v2->u64; return PSI_T_LONG_DOUBLE; + case PSI_T_INT128: + res->ldval = v1->ldval + v2->i128; + return PSI_T_LONG_DOUBLE; + case PSI_T_UINT128: + res->ldval = v1->ldval + v2->u128; + return PSI_T_LONG_DOUBLE; case PSI_T_FLOAT: res->ldval = v1->ldval + v2->fval; return PSI_T_LONG_DOUBLE; @@ -545,6 +709,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i8 - v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i8 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i8 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i8 - v2->fval; return PSI_T_FLOAT; @@ -588,6 +758,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u8 - v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u8 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u8 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u8 - v2->fval; return PSI_T_FLOAT; @@ -631,6 +807,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i16 - v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i16 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i16 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i16 - v2->fval; return PSI_T_FLOAT; @@ -674,6 +856,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u16 - v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u16 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u16 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u16 - v2->fval; return PSI_T_FLOAT; @@ -717,6 +905,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i32 - v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i32 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i32 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i32 - v2->fval; return PSI_T_FLOAT; @@ -760,6 +954,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u32 - v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u32 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u32 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u32 - v2->fval; return PSI_T_FLOAT; @@ -803,6 +1003,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i64 - v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i64 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i64 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i64 - v2->fval; return PSI_T_FLOAT; @@ -846,6 +1052,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u64 - v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u64 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u64 - v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u64 - v2->fval; return PSI_T_FLOAT; @@ -858,6 +1070,104 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va return PSI_T_LONG_DOUBLE; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->i128 = v1->i128 - v2->i8; + return PSI_T_INT128; + case PSI_T_UINT8: + res->i128 = v1->i128 - v2->u8; + return PSI_T_INT128; + case PSI_T_INT16: + res->i128 = v1->i128 - v2->i16; + return PSI_T_INT128; + case PSI_T_UINT16: + res->i128 = v1->i128 - v2->u16; + return PSI_T_INT128; + case PSI_T_INT32: + res->i128 = v1->i128 - v2->i32; + return PSI_T_INT128; + case PSI_T_UINT32: + res->i128 = v1->i128 - v2->u32; + return PSI_T_INT128; + case PSI_T_INT64: + res->i128 = v1->i128 - v2->i64; + return PSI_T_INT128; + case PSI_T_UINT64: + res->i128 = v1->i128 - v2->u64; + return PSI_T_INT128; + case PSI_T_INT128: + res->i128 = v1->i128 - v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i128 - v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->i128 - v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->i128 - v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->i128 - v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u128 = v1->u128 - v2->i8; + return PSI_T_UINT128; + case PSI_T_UINT8: + res->u128 = v1->u128 - v2->u8; + return PSI_T_UINT128; + case PSI_T_INT16: + res->u128 = v1->u128 - v2->i16; + return PSI_T_UINT128; + case PSI_T_UINT16: + res->u128 = v1->u128 - v2->u16; + return PSI_T_UINT128; + case PSI_T_INT32: + res->u128 = v1->u128 - v2->i32; + return PSI_T_UINT128; + case PSI_T_UINT32: + res->u128 = v1->u128 - v2->u32; + return PSI_T_UINT128; + case PSI_T_INT64: + res->u128 = v1->u128 - v2->i64; + return PSI_T_UINT128; + case PSI_T_UINT64: + res->u128 = v1->u128 - v2->u64; + return PSI_T_UINT128; + case PSI_T_INT128: + res->u128 = v1->u128 - v2->i128; + return PSI_T_UINT128; + case PSI_T_UINT128: + res->u128 = v1->u128 - v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->u128 - v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->u128 - v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->u128 - v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + default: assert(0); break; @@ -889,6 +1199,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->fval = v1->fval - v2->u64; return PSI_T_FLOAT; + case PSI_T_INT128: + res->fval = v1->fval - v2->i128; + return PSI_T_FLOAT; + case PSI_T_UINT128: + res->fval = v1->fval - v2->u128; + return PSI_T_FLOAT; case PSI_T_FLOAT: res->fval = v1->fval - v2->fval; return PSI_T_FLOAT; @@ -932,6 +1248,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->dval = v1->dval - v2->u64; return PSI_T_DOUBLE; + case PSI_T_INT128: + res->dval = v1->dval - v2->i128; + return PSI_T_DOUBLE; + case PSI_T_UINT128: + res->dval = v1->dval - v2->u128; + return PSI_T_DOUBLE; case PSI_T_FLOAT: res->dval = v1->dval - v2->fval; return PSI_T_DOUBLE; @@ -976,6 +1298,12 @@ static inline token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->ldval = v1->ldval - v2->u64; return PSI_T_LONG_DOUBLE; + case PSI_T_INT128: + res->ldval = v1->ldval - v2->i128; + return PSI_T_LONG_DOUBLE; + case PSI_T_UINT128: + res->ldval = v1->ldval - v2->u128; + return PSI_T_LONG_DOUBLE; case PSI_T_FLOAT: res->ldval = v1->ldval - v2->fval; return PSI_T_LONG_DOUBLE; @@ -1032,6 +1360,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i8 * v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i8 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i8 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i8 * v2->fval; return PSI_T_FLOAT; @@ -1075,6 +1409,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u8 * v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u8 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u8 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u8 * v2->fval; return PSI_T_FLOAT; @@ -1118,6 +1458,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i16 * v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i16 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i16 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i16 * v2->fval; return PSI_T_FLOAT; @@ -1161,6 +1507,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u16 * v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u16 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u16 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u16 * v2->fval; return PSI_T_FLOAT; @@ -1204,6 +1556,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i32 * v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i32 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i32 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i32 * v2->fval; return PSI_T_FLOAT; @@ -1247,6 +1605,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u32 * v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u32 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u32 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u32 * v2->fval; return PSI_T_FLOAT; @@ -1290,6 +1654,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i64 * v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i64 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i64 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i64 * v2->fval; return PSI_T_FLOAT; @@ -1333,6 +1703,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u64 * v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u64 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u64 * v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u64 * v2->fval; return PSI_T_FLOAT; @@ -1345,6 +1721,104 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va return PSI_T_LONG_DOUBLE; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->i128 = v1->i128 * v2->i8; + return PSI_T_INT128; + case PSI_T_UINT8: + res->i128 = v1->i128 * v2->u8; + return PSI_T_INT128; + case PSI_T_INT16: + res->i128 = v1->i128 * v2->i16; + return PSI_T_INT128; + case PSI_T_UINT16: + res->i128 = v1->i128 * v2->u16; + return PSI_T_INT128; + case PSI_T_INT32: + res->i128 = v1->i128 * v2->i32; + return PSI_T_INT128; + case PSI_T_UINT32: + res->i128 = v1->i128 * v2->u32; + return PSI_T_INT128; + case PSI_T_INT64: + res->i128 = v1->i128 * v2->i64; + return PSI_T_INT128; + case PSI_T_UINT64: + res->i128 = v1->i128 * v2->u64; + return PSI_T_INT128; + case PSI_T_INT128: + res->i128 = v1->i128 * v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i128 * v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->i128 * v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->i128 * v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->i128 * v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u128 = v1->u128 * v2->i8; + return PSI_T_UINT128; + case PSI_T_UINT8: + res->u128 = v1->u128 * v2->u8; + return PSI_T_UINT128; + case PSI_T_INT16: + res->u128 = v1->u128 * v2->i16; + return PSI_T_UINT128; + case PSI_T_UINT16: + res->u128 = v1->u128 * v2->u16; + return PSI_T_UINT128; + case PSI_T_INT32: + res->u128 = v1->u128 * v2->i32; + return PSI_T_UINT128; + case PSI_T_UINT32: + res->u128 = v1->u128 * v2->u32; + return PSI_T_UINT128; + case PSI_T_INT64: + res->u128 = v1->u128 * v2->i64; + return PSI_T_UINT128; + case PSI_T_UINT64: + res->u128 = v1->u128 * v2->u64; + return PSI_T_UINT128; + case PSI_T_INT128: + res->u128 = v1->u128 * v2->i128; + return PSI_T_UINT128; + case PSI_T_UINT128: + res->u128 = v1->u128 * v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->u128 * v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->u128 * v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->u128 * v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + default: assert(0); break; @@ -1376,6 +1850,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->fval = v1->fval * v2->u64; return PSI_T_FLOAT; + case PSI_T_INT128: + res->fval = v1->fval * v2->i128; + return PSI_T_FLOAT; + case PSI_T_UINT128: + res->fval = v1->fval * v2->u128; + return PSI_T_FLOAT; case PSI_T_FLOAT: res->fval = v1->fval * v2->fval; return PSI_T_FLOAT; @@ -1419,6 +1899,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->dval = v1->dval * v2->u64; return PSI_T_DOUBLE; + case PSI_T_INT128: + res->dval = v1->dval * v2->i128; + return PSI_T_DOUBLE; + case PSI_T_UINT128: + res->dval = v1->dval * v2->u128; + return PSI_T_DOUBLE; case PSI_T_FLOAT: res->dval = v1->dval * v2->fval; return PSI_T_DOUBLE; @@ -1463,6 +1949,12 @@ static inline token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->ldval = v1->ldval * v2->u64; return PSI_T_LONG_DOUBLE; + case PSI_T_INT128: + res->ldval = v1->ldval * v2->i128; + return PSI_T_LONG_DOUBLE; + case PSI_T_UINT128: + res->ldval = v1->ldval * v2->u128; + return PSI_T_LONG_DOUBLE; case PSI_T_FLOAT: res->ldval = v1->ldval * v2->fval; return PSI_T_LONG_DOUBLE; @@ -1519,6 +2011,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i8 / v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i8 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i8 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i8 / v2->fval; return PSI_T_FLOAT; @@ -1562,6 +2060,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u8 / v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u8 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u8 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u8 / v2->fval; return PSI_T_FLOAT; @@ -1605,6 +2109,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i16 / v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i16 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i16 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i16 / v2->fval; return PSI_T_FLOAT; @@ -1648,6 +2158,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u16 / v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u16 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u16 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u16 / v2->fval; return PSI_T_FLOAT; @@ -1691,6 +2207,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i32 / v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i32 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i32 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i32 / v2->fval; return PSI_T_FLOAT; @@ -1734,6 +2256,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u32 / v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u32 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u32 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u32 / v2->fval; return PSI_T_FLOAT; @@ -1777,6 +2305,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->i64 = v1->i64 / v2->u64; return PSI_T_INT64; + case PSI_T_INT128: + res->i128 = v1->i64 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i64 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->i64 / v2->fval; return PSI_T_FLOAT; @@ -1820,6 +2354,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->u64 = v1->u64 / v2->u64; return PSI_T_UINT64; + case PSI_T_INT128: + res->i128 = v1->u64 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->u64 / v2->u128; + return PSI_T_UINT128; case PSI_T_FLOAT: res->fval = v1->u64 / v2->fval; return PSI_T_FLOAT; @@ -1832,6 +2372,104 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va return PSI_T_LONG_DOUBLE; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->i128 = v1->i128 / v2->i8; + return PSI_T_INT128; + case PSI_T_UINT8: + res->i128 = v1->i128 / v2->u8; + return PSI_T_INT128; + case PSI_T_INT16: + res->i128 = v1->i128 / v2->i16; + return PSI_T_INT128; + case PSI_T_UINT16: + res->i128 = v1->i128 / v2->u16; + return PSI_T_INT128; + case PSI_T_INT32: + res->i128 = v1->i128 / v2->i32; + return PSI_T_INT128; + case PSI_T_UINT32: + res->i128 = v1->i128 / v2->u32; + return PSI_T_INT128; + case PSI_T_INT64: + res->i128 = v1->i128 / v2->i64; + return PSI_T_INT128; + case PSI_T_UINT64: + res->i128 = v1->i128 / v2->u64; + return PSI_T_INT128; + case PSI_T_INT128: + res->i128 = v1->i128 / v2->i128; + return PSI_T_INT128; + case PSI_T_UINT128: + res->u128 = v1->i128 / v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->i128 / v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->i128 / v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->i128 / v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u128 = v1->u128 / v2->i8; + return PSI_T_UINT128; + case PSI_T_UINT8: + res->u128 = v1->u128 / v2->u8; + return PSI_T_UINT128; + case PSI_T_INT16: + res->u128 = v1->u128 / v2->i16; + return PSI_T_UINT128; + case PSI_T_UINT16: + res->u128 = v1->u128 / v2->u16; + return PSI_T_UINT128; + case PSI_T_INT32: + res->u128 = v1->u128 / v2->i32; + return PSI_T_UINT128; + case PSI_T_UINT32: + res->u128 = v1->u128 / v2->u32; + return PSI_T_UINT128; + case PSI_T_INT64: + res->u128 = v1->u128 / v2->i64; + return PSI_T_UINT128; + case PSI_T_UINT64: + res->u128 = v1->u128 / v2->u64; + return PSI_T_UINT128; + case PSI_T_INT128: + res->u128 = v1->u128 / v2->i128; + return PSI_T_UINT128; + case PSI_T_UINT128: + res->u128 = v1->u128 / v2->u128; + return PSI_T_UINT128; + case PSI_T_FLOAT: + res->fval = v1->u128 / v2->fval; + return PSI_T_FLOAT; + case PSI_T_DOUBLE: + res->dval = v1->u128 / v2->dval; + return PSI_T_DOUBLE; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = v1->u128 / v2->ldval; + return PSI_T_LONG_DOUBLE; +# endif + default: assert(0); break; @@ -1863,6 +2501,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->fval = v1->fval / v2->u64; return PSI_T_FLOAT; + case PSI_T_INT128: + res->fval = v1->fval / v2->i128; + return PSI_T_FLOAT; + case PSI_T_UINT128: + res->fval = v1->fval / v2->u128; + return PSI_T_FLOAT; case PSI_T_FLOAT: res->fval = v1->fval / v2->fval; return PSI_T_FLOAT; @@ -1906,6 +2550,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->dval = v1->dval / v2->u64; return PSI_T_DOUBLE; + case PSI_T_INT128: + res->dval = v1->dval / v2->i128; + return PSI_T_DOUBLE; + case PSI_T_UINT128: + res->dval = v1->dval / v2->u128; + return PSI_T_DOUBLE; case PSI_T_FLOAT: res->dval = v1->dval / v2->fval; return PSI_T_DOUBLE; @@ -1950,6 +2600,12 @@ static inline token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: res->ldval = v1->ldval / v2->u64; return PSI_T_LONG_DOUBLE; + case PSI_T_INT128: + res->ldval = v1->ldval / v2->i128; + return PSI_T_LONG_DOUBLE; + case PSI_T_UINT128: + res->ldval = v1->ldval / v2->u128; + return PSI_T_LONG_DOUBLE; case PSI_T_FLOAT: res->ldval = v1->ldval / v2->fval; return PSI_T_LONG_DOUBLE; @@ -2015,6 +2671,14 @@ static inline token_t psi_calc_mod(token_t t1, impl_val *v1, token_t t2, impl_va i1.i64 = v1->u64; break; + case PSI_T_INT128: + i1.i64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.i64 = v1->u128; + break; + case PSI_T_FLOAT: i1.i64 = v1->fval; break; @@ -2060,6 +2724,12 @@ static inline token_t psi_calc_mod(token_t t1, impl_val *v1, token_t t2, impl_va case PSI_T_UINT64: i2.i64 = v2->u64; break; + case PSI_T_INT128: + i2.i64 = v2->i128; + break; + case PSI_T_UINT128: + i2.i64 = v2->u128; + break; case PSI_T_FLOAT: i2.i64 = v2->fval; break; diff --git a/src/calc/bin.h b/src/calc/bin.h index 3e9e4a0..772bd98 100644 --- a/src/calc/bin.h +++ b/src/calc/bin.h @@ -65,6 +65,14 @@ static inline token_t psi_calc_bin_lshift(token_t t1, impl_val *v1, token_t t2, i1.u64 = v1->u64; break; + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + case PSI_T_FLOAT: i1.u64 = v1->fval; break; @@ -110,6 +118,12 @@ static inline token_t psi_calc_bin_lshift(token_t t1, impl_val *v1, token_t t2, case PSI_T_UINT64: i2.u64 = v2->u64; break; + case PSI_T_INT128: + i2.u64 = v2->i128; + break; + case PSI_T_UINT128: + i2.u64 = v2->u128; + break; case PSI_T_FLOAT: i2.u64 = v2->fval; break; @@ -168,6 +182,14 @@ static inline token_t psi_calc_bin_rshift(token_t t1, impl_val *v1, token_t t2, i1.u64 = v1->u64; break; + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + case PSI_T_FLOAT: i1.u64 = v1->fval; break; @@ -213,6 +235,12 @@ static inline token_t psi_calc_bin_rshift(token_t t1, impl_val *v1, token_t t2, case PSI_T_UINT64: i2.u64 = v2->u64; break; + case PSI_T_INT128: + i2.u64 = v2->i128; + break; + case PSI_T_UINT128: + i2.u64 = v2->u128; + break; case PSI_T_FLOAT: i2.u64 = v2->fval; break; @@ -271,6 +299,14 @@ static inline token_t psi_calc_bin_and(token_t t1, impl_val *v1, token_t t2, imp i1.u64 = v1->u64; break; + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + case PSI_T_FLOAT: i1.u64 = v1->fval; break; @@ -316,6 +352,12 @@ static inline token_t psi_calc_bin_and(token_t t1, impl_val *v1, token_t t2, imp case PSI_T_UINT64: i2.u64 = v2->u64; break; + case PSI_T_INT128: + i2.u64 = v2->i128; + break; + case PSI_T_UINT128: + i2.u64 = v2->u128; + break; case PSI_T_FLOAT: i2.u64 = v2->fval; break; @@ -374,6 +416,14 @@ static inline token_t psi_calc_bin_xor(token_t t1, impl_val *v1, token_t t2, imp i1.u64 = v1->u64; break; + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + case PSI_T_FLOAT: i1.u64 = v1->fval; break; @@ -419,6 +469,12 @@ static inline token_t psi_calc_bin_xor(token_t t1, impl_val *v1, token_t t2, imp case PSI_T_UINT64: i2.u64 = v2->u64; break; + case PSI_T_INT128: + i2.u64 = v2->i128; + break; + case PSI_T_UINT128: + i2.u64 = v2->u128; + break; case PSI_T_FLOAT: i2.u64 = v2->fval; break; @@ -477,6 +533,14 @@ static inline token_t psi_calc_bin_or(token_t t1, impl_val *v1, token_t t2, impl i1.u64 = v1->u64; break; + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + case PSI_T_FLOAT: i1.u64 = v1->fval; break; @@ -522,6 +586,12 @@ static inline token_t psi_calc_bin_or(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: i2.u64 = v2->u64; break; + case PSI_T_INT128: + i2.u64 = v2->i128; + break; + case PSI_T_UINT128: + i2.u64 = v2->u128; + break; case PSI_T_FLOAT: i2.u64 = v2->fval; break; @@ -542,67 +612,3 @@ static inline token_t psi_calc_bin_or(token_t t1, impl_val *v1, token_t t2, impl res->u64 = i1.u64 | i2.u64; return PSI_T_UINT64; } - -static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) -{ - impl_val i1; - - (void) t2; - (void) v2; - - switch (t1) { - case PSI_T_INT8: - i1.u64 = v1->i8; - break; - - case PSI_T_UINT8: - i1.u64 = v1->u8; - break; - - case PSI_T_INT16: - i1.u64 = v1->i16; - break; - - case PSI_T_UINT16: - i1.u64 = v1->u16; - break; - - case PSI_T_INT32: - i1.u64 = v1->i32; - break; - - case PSI_T_UINT32: - i1.u64 = v1->u32; - break; - - case PSI_T_INT64: - i1.u64 = v1->i64; - break; - - case PSI_T_UINT64: - i1.u64 = v1->u64; - break; - - case PSI_T_FLOAT: - i1.u64 = v1->fval; - break; - - case PSI_T_DOUBLE: - i1.u64 = v1->dval; - break; - -#if HAVE_LONG_DOUBLE - case PSI_T_LONG_DOUBLE: - i1.u64 = v1->ldval; - break; - -#endif - - default: - assert(0); - break; - } - - res->u64 = ~i1.u64; - return PSI_T_UINT64; -} \ No newline at end of file diff --git a/src/calc/bool.h b/src/calc/bool.h index 99f5f0a..5fe0ce7 100644 --- a/src/calc/bool.h +++ b/src/calc/bool.h @@ -27,56 +27,6 @@ #include #include "token.h" - -static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) -{ - (void) t2; - (void) v2; - - switch (t1) { - case PSI_T_INT8: - res->u8 = !v1->i8; - break; - case PSI_T_UINT8: - res->u8 = !v1->u8; - break; - case PSI_T_INT16: - res->u8 = !v1->i16; - break; - case PSI_T_UINT16: - res->u8 = !v1->u16; - break; - case PSI_T_INT32: - res->u8 = !v1->i32; - break; - case PSI_T_UINT32: - res->u8 = !v1->u32; - break; - case PSI_T_INT64: - res->u8 = !v1->i64; - break; - case PSI_T_UINT64: - res->u8 = !v1->u64; - break; - case PSI_T_FLOAT: - res->u8 = !v1->fval; - break; - case PSI_T_DOUBLE: - res->u8 = !v1->dval; - break; -#if HAVE_LONG_DOUBLE - case PSI_T_LONG_DOUBLE: - res->u8 = !v1->ldval; - break; -#endif - - default: - assert(0); - break; - } - return PSI_T_UINT8; -} - static inline token_t psi_calc_bool_or(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) { switch (t1) { @@ -112,6 +62,14 @@ static inline token_t psi_calc_bool_or(token_t t1, impl_val *v1, token_t t2, imp if (v1->u64) goto return_true; break; + case PSI_T_INT128: + if (v1->i128) + goto return_true; + break; + case PSI_T_UINT128: + if (v1->u128) + goto return_true; + break; case PSI_T_FLOAT: if (v1->fval) goto return_true; @@ -165,6 +123,14 @@ static inline token_t psi_calc_bool_or(token_t t1, impl_val *v1, token_t t2, imp if (v2->u64) goto return_true; break; + case PSI_T_INT128: + if (v2->i128) + goto return_true; + break; + case PSI_T_UINT128: + if (v2->u128) + goto return_true; + break; case PSI_T_FLOAT: if (v2->fval) goto return_true; @@ -228,6 +194,14 @@ static inline token_t psi_calc_bool_and(token_t t1, impl_val *v1, token_t t2, im if (!v1->u64) goto return_false; break; + case PSI_T_INT128: + if (!v1->i128) + goto return_false; + break; + case PSI_T_UINT128: + if (!v1->u128) + goto return_false; + break; case PSI_T_FLOAT: if (!v1->fval) goto return_false; @@ -281,6 +255,14 @@ static inline token_t psi_calc_bool_and(token_t t1, impl_val *v1, token_t t2, im if (!v2->u64) goto return_false; break; + case PSI_T_INT128: + if (!v2->i128) + goto return_false; + break; + case PSI_T_UINT128: + if (!v2->u128) + goto return_false; + break; case PSI_T_FLOAT: if (!v2->fval) goto return_false; diff --git a/src/calc/cast.h b/src/calc/cast.h index c6f14aa..eb93b3b 100644 --- a/src/calc/cast.h +++ b/src/calc/cast.h @@ -57,6 +57,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->i8 = in_val->u64; break; + case PSI_T_INT128: + out_val->i8 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->i8 = in_val->u128; + break; case PSI_T_FLOAT: out_val->i8 = in_val->fval; break; @@ -100,6 +106,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->u8 = in_val->u64; break; + case PSI_T_INT128: + out_val->u8 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->u8 = in_val->u128; + break; case PSI_T_FLOAT: out_val->u8 = in_val->fval; break; @@ -143,6 +155,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->i16 = in_val->u64; break; + case PSI_T_INT128: + out_val->i16 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->i16 = in_val->u128; + break; case PSI_T_FLOAT: out_val->i16 = in_val->fval; break; @@ -186,6 +204,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->u16 = in_val->u64; break; + case PSI_T_INT128: + out_val->u16 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->u16 = in_val->u128; + break; case PSI_T_FLOAT: out_val->u16 = in_val->fval; break; @@ -229,6 +253,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->i32 = in_val->u64; break; + case PSI_T_INT128: + out_val->i32 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->i32 = in_val->u128; + break; case PSI_T_FLOAT: out_val->i32 = in_val->fval; break; @@ -272,6 +302,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->u32 = in_val->u64; break; + case PSI_T_INT128: + out_val->u32 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->u32 = in_val->u128; + break; case PSI_T_FLOAT: out_val->u32 = in_val->fval; break; @@ -315,6 +351,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->i64 = in_val->u64; break; + case PSI_T_INT128: + out_val->i64 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->i64 = in_val->u128; + break; case PSI_T_FLOAT: out_val->i64 = in_val->fval; break; @@ -358,6 +400,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->u64 = in_val->u64; break; + case PSI_T_INT128: + out_val->u64 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->u64 = in_val->u128; + break; case PSI_T_FLOAT: out_val->u64 = in_val->fval; break; @@ -370,6 +418,104 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (in_type) { + case PSI_T_INT8: + out_val->i128 = in_val->i8; + break; + case PSI_T_UINT8: + out_val->i128 = in_val->u8; + break; + case PSI_T_INT16: + out_val->i128 = in_val->i16; + break; + case PSI_T_UINT16: + out_val->i128 = in_val->u16; + break; + case PSI_T_INT32: + out_val->i128 = in_val->i32; + break; + case PSI_T_UINT32: + out_val->i128 = in_val->u32; + break; + case PSI_T_INT64: + out_val->i128 = in_val->i64; + break; + case PSI_T_UINT64: + out_val->i128 = in_val->u64; + break; + case PSI_T_INT128: + out_val->i128 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->i128 = in_val->u128; + break; + case PSI_T_FLOAT: + out_val->i128 = in_val->fval; + break; + case PSI_T_DOUBLE: + out_val->i128 = in_val->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + out_val->i128 = in_val->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (in_type) { + case PSI_T_INT8: + out_val->u128 = in_val->i8; + break; + case PSI_T_UINT8: + out_val->u128 = in_val->u8; + break; + case PSI_T_INT16: + out_val->u128 = in_val->i16; + break; + case PSI_T_UINT16: + out_val->u128 = in_val->u16; + break; + case PSI_T_INT32: + out_val->u128 = in_val->i32; + break; + case PSI_T_UINT32: + out_val->u128 = in_val->u32; + break; + case PSI_T_INT64: + out_val->u128 = in_val->i64; + break; + case PSI_T_UINT64: + out_val->u128 = in_val->u64; + break; + case PSI_T_INT128: + out_val->u128 = in_val->i128; + break; + case PSI_T_UINT128: + out_val->u128 = in_val->u128; + break; + case PSI_T_FLOAT: + out_val->u128 = in_val->fval; + break; + case PSI_T_DOUBLE: + out_val->u128 = in_val->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + out_val->u128 = in_val->ldval; + break; +# endif + default: assert(0); break; @@ -401,6 +547,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->fval = in_val->u64; break; + case PSI_T_INT128: + out_val->fval = in_val->i128; + break; + case PSI_T_UINT128: + out_val->fval = in_val->u128; + break; case PSI_T_FLOAT: out_val->fval = in_val->fval; break; @@ -444,6 +596,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->dval = in_val->u64; break; + case PSI_T_INT128: + out_val->dval = in_val->i128; + break; + case PSI_T_UINT128: + out_val->dval = in_val->u128; + break; case PSI_T_FLOAT: out_val->dval = in_val->fval; break; @@ -488,6 +646,12 @@ static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_ case PSI_T_UINT64: out_val->ldval = in_val->u64; break; + case PSI_T_INT128: + out_val->ldval = in_val->i128; + break; + case PSI_T_UINT128: + out_val->ldval = in_val->u128; + break; case PSI_T_FLOAT: out_val->ldval = in_val->fval; break; diff --git a/src/calc/cmp.h b/src/calc/cmp.h index 8fac2f3..30bc0c9 100644 --- a/src/calc/cmp.h +++ b/src/calc/cmp.h @@ -57,6 +57,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 == v2->fval; break; @@ -100,6 +106,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 == v2->fval; break; @@ -143,6 +155,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 == v2->fval; break; @@ -186,6 +204,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 == v2->fval; break; @@ -229,6 +253,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 == v2->fval; break; @@ -272,6 +302,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 == v2->fval; break; @@ -315,6 +351,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 == v2->fval; break; @@ -358,6 +400,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 == v2->fval; break; @@ -370,6 +418,104 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->i128 == v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->i128 == v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->i128 == v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->i128 == v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->i128 == v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->i128 == v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->i128 == v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->i128 == v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 == v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->i128 == v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->i128 == v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->i128 == v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->u128 == v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->u128 == v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->u128 == v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->u128 == v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->u128 == v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->u128 == v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->u128 == v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->u128 == v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 == v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->u128 == v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->u128 == v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->u128 == v2->ldval; + break; +# endif + default: assert(0); break; @@ -401,6 +547,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->fval == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->fval == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->fval == v2->fval; break; @@ -444,6 +596,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->dval == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->dval == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->dval == v2->fval; break; @@ -488,6 +646,12 @@ static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->ldval == v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->ldval == v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval == v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->ldval == v2->fval; break; @@ -543,6 +707,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 != v2->fval; break; @@ -586,6 +756,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 != v2->fval; break; @@ -629,6 +805,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 != v2->fval; break; @@ -672,6 +854,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 != v2->fval; break; @@ -715,6 +903,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 != v2->fval; break; @@ -758,6 +952,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 != v2->fval; break; @@ -801,6 +1001,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 != v2->fval; break; @@ -844,6 +1050,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 != v2->fval; break; @@ -856,6 +1068,104 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->i128 != v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->i128 != v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->i128 != v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->i128 != v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->i128 != v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->i128 != v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->i128 != v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->i128 != v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 != v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->i128 != v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->i128 != v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->i128 != v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->u128 != v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->u128 != v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->u128 != v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->u128 != v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->u128 != v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->u128 != v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->u128 != v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->u128 != v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 != v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->u128 != v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->u128 != v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->u128 != v2->ldval; + break; +# endif + default: assert(0); break; @@ -887,6 +1197,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->fval != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->fval != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->fval != v2->fval; break; @@ -930,6 +1246,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->dval != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->dval != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->dval != v2->fval; break; @@ -974,6 +1296,12 @@ static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->ldval != v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->ldval != v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval != v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->ldval != v2->fval; break; @@ -1029,6 +1357,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 < v2->fval; break; @@ -1072,6 +1406,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 < v2->fval; break; @@ -1115,6 +1455,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 < v2->fval; break; @@ -1158,6 +1504,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 < v2->fval; break; @@ -1201,6 +1553,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 < v2->fval; break; @@ -1244,6 +1602,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 < v2->fval; break; @@ -1287,6 +1651,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 < v2->fval; break; @@ -1330,6 +1700,12 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 < v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 < v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 < v2->fval; break; @@ -1347,41 +1723,47 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl break; } break; - case PSI_T_FLOAT: + case PSI_T_INT128: switch (t2) { case PSI_T_INT8: - res->u8 = v1->fval < v2->i8; + res->u8 = v1->i128 < v2->i8; break; case PSI_T_UINT8: - res->u8 = v1->fval < v2->u8; + res->u8 = v1->i128 < v2->u8; break; case PSI_T_INT16: - res->u8 = v1->fval < v2->i16; + res->u8 = v1->i128 < v2->i16; break; case PSI_T_UINT16: - res->u8 = v1->fval < v2->u16; + res->u8 = v1->i128 < v2->u16; break; case PSI_T_INT32: - res->u8 = v1->fval < v2->i32; + res->u8 = v1->i128 < v2->i32; break; case PSI_T_UINT32: - res->u8 = v1->fval < v2->u32; + res->u8 = v1->i128 < v2->u32; break; case PSI_T_INT64: - res->u8 = v1->fval < v2->i64; + res->u8 = v1->i128 < v2->i64; break; case PSI_T_UINT64: - res->u8 = v1->fval < v2->u64; + res->u8 = v1->i128 < v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 < v2->u128; break; case PSI_T_FLOAT: - res->u8 = v1->fval < v2->fval; + res->u8 = v1->i128 < v2->fval; break; case PSI_T_DOUBLE: - res->u8 = v1->fval < v2->dval; + res->u8 = v1->i128 < v2->dval; break; # if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: - res->u8 = v1->fval < v2->ldval; + res->u8 = v1->i128 < v2->ldval; break; # endif @@ -1390,41 +1772,47 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl break; } break; - case PSI_T_DOUBLE: + case PSI_T_UINT128: switch (t2) { case PSI_T_INT8: - res->u8 = v1->dval < v2->i8; + res->u8 = v1->u128 < v2->i8; break; case PSI_T_UINT8: - res->u8 = v1->dval < v2->u8; + res->u8 = v1->u128 < v2->u8; break; case PSI_T_INT16: - res->u8 = v1->dval < v2->i16; + res->u8 = v1->u128 < v2->i16; break; case PSI_T_UINT16: - res->u8 = v1->dval < v2->u16; + res->u8 = v1->u128 < v2->u16; break; case PSI_T_INT32: - res->u8 = v1->dval < v2->i32; + res->u8 = v1->u128 < v2->i32; break; case PSI_T_UINT32: - res->u8 = v1->dval < v2->u32; + res->u8 = v1->u128 < v2->u32; break; case PSI_T_INT64: - res->u8 = v1->dval < v2->i64; + res->u8 = v1->u128 < v2->i64; break; case PSI_T_UINT64: - res->u8 = v1->dval < v2->u64; + res->u8 = v1->u128 < v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 < v2->u128; break; case PSI_T_FLOAT: - res->u8 = v1->dval < v2->fval; + res->u8 = v1->u128 < v2->fval; break; case PSI_T_DOUBLE: - res->u8 = v1->dval < v2->dval; + res->u8 = v1->u128 < v2->dval; break; # if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: - res->u8 = v1->dval < v2->ldval; + res->u8 = v1->u128 < v2->ldval; break; # endif @@ -1433,42 +1821,47 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl break; } break; -#if HAVE_LONG_DOUBLE - case PSI_T_LONG_DOUBLE: + case PSI_T_FLOAT: switch (t2) { case PSI_T_INT8: - res->u8 = v1->ldval < v2->i8; + res->u8 = v1->fval < v2->i8; break; case PSI_T_UINT8: - res->u8 = v1->ldval < v2->u8; + res->u8 = v1->fval < v2->u8; break; case PSI_T_INT16: - res->u8 = v1->ldval < v2->i16; + res->u8 = v1->fval < v2->i16; break; case PSI_T_UINT16: - res->u8 = v1->ldval < v2->u16; + res->u8 = v1->fval < v2->u16; break; case PSI_T_INT32: - res->u8 = v1->ldval < v2->i32; + res->u8 = v1->fval < v2->i32; break; case PSI_T_UINT32: - res->u8 = v1->ldval < v2->u32; + res->u8 = v1->fval < v2->u32; break; case PSI_T_INT64: - res->u8 = v1->ldval < v2->i64; + res->u8 = v1->fval < v2->i64; break; case PSI_T_UINT64: - res->u8 = v1->ldval < v2->u64; + res->u8 = v1->fval < v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->fval < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval < v2->u128; break; case PSI_T_FLOAT: - res->u8 = v1->ldval < v2->fval; + res->u8 = v1->fval < v2->fval; break; case PSI_T_DOUBLE: - res->u8 = v1->ldval < v2->dval; + res->u8 = v1->fval < v2->dval; break; # if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: - res->u8 = v1->ldval < v2->ldval; + res->u8 = v1->fval < v2->ldval; break; # endif @@ -1477,15 +1870,114 @@ static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl break; } break; -#endif - - default: - assert(0); - break; - } - return PSI_T_UINT8; -} - + case PSI_T_DOUBLE: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->dval < v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->dval < v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->dval < v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->dval < v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->dval < v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->dval < v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->dval < v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->dval < v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->dval < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval < v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->dval < v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->dval < v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->dval < v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; +#if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->ldval < v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->ldval < v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->ldval < v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->ldval < v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->ldval < v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->ldval < v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->ldval < v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->ldval < v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->ldval < v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval < v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->ldval < v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->ldval < v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->ldval < v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; +#endif + + default: + assert(0); + break; + } + return PSI_T_UINT8; +} + static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) { switch (t1) { @@ -1515,6 +2007,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 > v2->fval; break; @@ -1558,6 +2056,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 > v2->fval; break; @@ -1601,6 +2105,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 > v2->fval; break; @@ -1644,6 +2154,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 > v2->fval; break; @@ -1687,6 +2203,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 > v2->fval; break; @@ -1730,6 +2252,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 > v2->fval; break; @@ -1773,6 +2301,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 > v2->fval; break; @@ -1816,6 +2350,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 > v2->fval; break; @@ -1828,6 +2368,104 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->i128 > v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->i128 > v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->i128 > v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->i128 > v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->i128 > v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->i128 > v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->i128 > v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->i128 > v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 > v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->i128 > v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->i128 > v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->i128 > v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->u128 > v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->u128 > v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->u128 > v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->u128 > v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->u128 > v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->u128 > v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->u128 > v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->u128 > v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 > v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->u128 > v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->u128 > v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->u128 > v2->ldval; + break; +# endif + default: assert(0); break; @@ -1859,6 +2497,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->fval > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->fval > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->fval > v2->fval; break; @@ -1902,6 +2546,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->dval > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->dval > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->dval > v2->fval; break; @@ -1946,6 +2596,12 @@ static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->ldval > v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->ldval > v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval > v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->ldval > v2->fval; break; @@ -2001,6 +2657,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 <= v2->fval; break; @@ -2044,6 +2706,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 <= v2->fval; break; @@ -2087,6 +2755,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 <= v2->fval; break; @@ -2130,6 +2804,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 <= v2->fval; break; @@ -2173,6 +2853,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 <= v2->fval; break; @@ -2216,6 +2902,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 <= v2->fval; break; @@ -2259,6 +2951,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 <= v2->fval; break; @@ -2302,6 +3000,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 <= v2->fval; break; @@ -2314,6 +3018,104 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->i128 <= v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->i128 <= v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->i128 <= v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->i128 <= v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->i128 <= v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->i128 <= v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->i128 <= v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->i128 <= v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 <= v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->i128 <= v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->i128 <= v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->i128 <= v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->u128 <= v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->u128 <= v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->u128 <= v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->u128 <= v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->u128 <= v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->u128 <= v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->u128 <= v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->u128 <= v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 <= v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->u128 <= v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->u128 <= v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->u128 <= v2->ldval; + break; +# endif + default: assert(0); break; @@ -2345,6 +3147,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->fval <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->fval <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->fval <= v2->fval; break; @@ -2388,6 +3196,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->dval <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->dval <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->dval <= v2->fval; break; @@ -2432,6 +3246,12 @@ static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->ldval <= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->ldval <= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval <= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->ldval <= v2->fval; break; @@ -2487,6 +3307,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i8 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i8 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i8 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i8 >= v2->fval; break; @@ -2530,6 +3356,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u8 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u8 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u8 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u8 >= v2->fval; break; @@ -2573,6 +3405,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i16 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i16 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i16 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i16 >= v2->fval; break; @@ -2616,6 +3454,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u16 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u16 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u16 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u16 >= v2->fval; break; @@ -2659,6 +3503,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i32 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i32 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i32 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i32 >= v2->fval; break; @@ -2702,6 +3552,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u32 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u32 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u32 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u32 >= v2->fval; break; @@ -2745,6 +3601,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->i64 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->i64 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i64 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->i64 >= v2->fval; break; @@ -2788,6 +3650,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->u64 >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->u64 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u64 >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->u64 >= v2->fval; break; @@ -2800,6 +3668,104 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl break; # endif + default: + assert(0); + break; + } + break; + case PSI_T_INT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->i128 >= v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->i128 >= v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->i128 >= v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->i128 >= v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->i128 >= v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->i128 >= v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->i128 >= v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->i128 >= v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->i128 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->i128 >= v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->i128 >= v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->i128 >= v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->i128 >= v2->ldval; + break; +# endif + + default: + assert(0); + break; + } + break; + case PSI_T_UINT128: + switch (t2) { + case PSI_T_INT8: + res->u8 = v1->u128 >= v2->i8; + break; + case PSI_T_UINT8: + res->u8 = v1->u128 >= v2->u8; + break; + case PSI_T_INT16: + res->u8 = v1->u128 >= v2->i16; + break; + case PSI_T_UINT16: + res->u8 = v1->u128 >= v2->u16; + break; + case PSI_T_INT32: + res->u8 = v1->u128 >= v2->i32; + break; + case PSI_T_UINT32: + res->u8 = v1->u128 >= v2->u32; + break; + case PSI_T_INT64: + res->u8 = v1->u128 >= v2->i64; + break; + case PSI_T_UINT64: + res->u8 = v1->u128 >= v2->u64; + break; + case PSI_T_INT128: + res->u8 = v1->u128 >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->u128 >= v2->u128; + break; + case PSI_T_FLOAT: + res->u8 = v1->u128 >= v2->fval; + break; + case PSI_T_DOUBLE: + res->u8 = v1->u128 >= v2->dval; + break; +# if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = v1->u128 >= v2->ldval; + break; +# endif + default: assert(0); break; @@ -2831,6 +3797,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->fval >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->fval >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->fval >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->fval >= v2->fval; break; @@ -2874,6 +3846,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->dval >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->dval >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->dval >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->dval >= v2->fval; break; @@ -2918,6 +3896,12 @@ static inline token_t psi_calc_cmp_ge(token_t t1, impl_val *v1, token_t t2, impl case PSI_T_UINT64: res->u8 = v1->ldval >= v2->u64; break; + case PSI_T_INT128: + res->u8 = v1->ldval >= v2->i128; + break; + case PSI_T_UINT128: + res->u8 = v1->ldval >= v2->u128; + break; case PSI_T_FLOAT: res->u8 = v1->ldval >= v2->fval; break; diff --git a/src/calc/unary.h b/src/calc/unary.h new file mode 100644 index 0000000..72a82e1 --- /dev/null +++ b/src/calc/unary.h @@ -0,0 +1,212 @@ +/******************************************************************************* + Copyright (c) 2016, Michael Wallner . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*******************************************************************************/ + +#include "php_psi_stdinc.h" +#include + +#include "token.h" +static inline token_t psi_calc_minus(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + (void) t2; + (void) v2; + + switch (t1) { + case PSI_T_INT8: + res->i8 = -v1->i8; + break; + case PSI_T_UINT8: + res->u8 = -v1->u8; + break; + case PSI_T_INT16: + res->i16 = -v1->i16; + break; + case PSI_T_UINT16: + res->u16 = -v1->u16; + break; + case PSI_T_INT32: + res->i32 = -v1->i32; + break; + case PSI_T_UINT32: + res->u32 = -v1->u32; + break; + case PSI_T_INT64: + res->i64 = -v1->i64; + break; + case PSI_T_UINT64: + res->u64 = -v1->u64; + break; + case PSI_T_INT128: + res->i128 = -v1->i128; + break; + case PSI_T_UINT128: + res->u128 = -v1->u128; + break; + case PSI_T_FLOAT: + res->fval = -v1->fval; + break; + case PSI_T_DOUBLE: + res->dval = -v1->dval; + break; +#if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->ldval = -v1->ldval; + break; +#endif + + default: + assert(0); + break; + } + return t1; +} + + +static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + (void) t2; + (void) v2; + + switch (t1) { + case PSI_T_INT8: + res->u8 = !v1->i8; + break; + case PSI_T_UINT8: + res->u8 = !v1->u8; + break; + case PSI_T_INT16: + res->u8 = !v1->i16; + break; + case PSI_T_UINT16: + res->u8 = !v1->u16; + break; + case PSI_T_INT32: + res->u8 = !v1->i32; + break; + case PSI_T_UINT32: + res->u8 = !v1->u32; + break; + case PSI_T_INT64: + res->u8 = !v1->i64; + break; + case PSI_T_UINT64: + res->u8 = !v1->u64; + break; + case PSI_T_INT128: + res->u8 = !v1->i128; + break; + case PSI_T_UINT128: + res->u8 = !v1->u128; + break; + case PSI_T_FLOAT: + res->u8 = !v1->fval; + break; + case PSI_T_DOUBLE: + res->u8 = !v1->dval; + break; +#if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + res->u8 = !v1->ldval; + break; +#endif + + default: + assert(0); + break; + } + return PSI_T_UINT8; +} + + +static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res) +{ + impl_val i1; + + (void) t2; + (void) v2; + + switch (t1) { + case PSI_T_INT8: + i1.u64 = v1->i8; + break; + + case PSI_T_UINT8: + i1.u64 = v1->u8; + break; + + case PSI_T_INT16: + i1.u64 = v1->i16; + break; + + case PSI_T_UINT16: + i1.u64 = v1->u16; + break; + + case PSI_T_INT32: + i1.u64 = v1->i32; + break; + + case PSI_T_UINT32: + i1.u64 = v1->u32; + break; + + case PSI_T_INT64: + i1.u64 = v1->i64; + break; + + case PSI_T_UINT64: + i1.u64 = v1->u64; + break; + + case PSI_T_INT128: + i1.u64 = v1->i128; + break; + + case PSI_T_UINT128: + i1.u64 = v1->u128; + break; + + case PSI_T_FLOAT: + i1.u64 = v1->fval; + break; + + case PSI_T_DOUBLE: + i1.u64 = v1->dval; + break; + +#if HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + i1.u64 = v1->ldval; + break; + +#endif + + default: + assert(0); + break; + } + + res->u64 = ~i1.u64; + return PSI_T_UINT64; +} \ No newline at end of file diff --git a/src/context.c b/src/context.c index 5749a73..d1f808c 100644 --- a/src/context.c +++ b/src/context.c @@ -56,20 +56,10 @@ #include "token.h" #include "parser.h" -#define PSI_PREDEF_TYPES -#define PSI_PREDEF_CONSTS -#define PSI_PREDEF_COMPOSITES -#define PSI_PREDEF_DECLS #include "php_psi_posix.h" struct psi_context *psi_context_init(struct psi_context *C, struct psi_context_ops *ops, psi_error_cb error, unsigned flags) { - struct psi_data T; - struct psi_predef_type *predef_type; - struct psi_predef_const *predef_const; - struct psi_predef_composite *predef_composite; - struct psi_predef_decl *predef_decl; - if (!C) { C = malloc(sizeof(*C)); } @@ -85,139 +75,6 @@ struct psi_context *psi_context_init(struct psi_context *C, struct psi_context_o assert(ops->call != NULL); assert(ops->compile != NULL); - /* build up predefs in a temporary psi_data for validation */ - memset(&T, 0, sizeof(T)); - psi_data_ctor_with_dtors(&T, error, flags); - -#if PHP_DEBUG - if (psi_check_env("PSI_SKIP")) - goto skip_predefs; -#endif - - for (predef_type = &psi_predef_types[0]; predef_type->type_tag; ++predef_type) { - struct psi_decl_type *type = psi_decl_type_init(predef_type->type_tag, predef_type->type_name); - struct psi_decl_var *var = psi_decl_var_init(predef_type->alias, 0, 0); /* FIXME: indirection */ - struct psi_decl_arg *def = psi_decl_arg_init(type, var); - - T.types = psi_plist_add(T.types, &def); - } - for (predef_const = &psi_predef_consts[0]; predef_const->type_tag; ++predef_const) { - struct psi_const_type *type = psi_const_type_init(predef_const->type_tag, predef_const->type_name); - struct psi_impl_def_val *val; - struct psi_const *constant; - - switch (type->type) { - case PSI_T_INT: - val = psi_impl_def_val_init(PSI_T_INT, NULL); - val->ival.zend.lval = predef_const->value.zend.lval; - break; - case PSI_T_STRING: - val = psi_impl_def_val_init(PSI_T_STRING, NULL); - val->ival.zend.str = zend_string_init(predef_const->value.ptr, strlen(predef_const->value.ptr), 1); - break; - default: - assert(0); - break; - } - - constant = psi_const_init(type, predef_const->var_name, val); - T.consts = psi_plist_add(T.consts, &constant); - } - for (predef_composite = &psi_predef_composites[0]; predef_composite->type_tag; ++predef_composite) { - struct psi_predef_composite *member; - struct psi_decl_struct *dstruct; - struct psi_decl_union *dunion; - struct psi_plist *dargs = psi_plist_init((psi_plist_dtor) psi_decl_arg_free); - - switch (predef_composite->type_tag) { - case PSI_T_STRUCT: - dstruct = psi_decl_struct_init(predef_composite->var_name, dargs); - dstruct->size = predef_composite->size; - dstruct->align = predef_composite->offset; - break; - case PSI_T_UNION: - dunion = psi_decl_union_init(predef_composite->var_name, dargs); - dunion->size = predef_composite->size; - dunion->align = predef_composite->offset; - break; - default: - assert(0); - } - for (member = &predef_composite[1]; member->type_tag; ++member) { - struct psi_decl_type *type; - struct psi_decl_var *dvar; - struct psi_decl_arg *darg; - - type = psi_decl_type_init(member->type_tag, member->type_name); - dvar = psi_decl_var_init(member->var_name, member->pointer_level, member->array_size); - darg = psi_decl_arg_init(type, dvar); - darg->layout = psi_layout_init(member->offset, member->size, NULL); - - switch (predef_composite->type_tag) { - case PSI_T_STRUCT: - dstruct->args = psi_plist_add(dstruct->args, &darg); - break; - case PSI_T_UNION: - dunion->args = psi_plist_add(dunion->args, &darg); - break; - default: - assert(0); - } - } - switch (predef_composite->type_tag) { - case PSI_T_STRUCT: - T.structs = psi_plist_add(T.structs, &dstruct); - break; - case PSI_T_UNION: - T.unions = psi_plist_add(T.unions, &dunion); - break; - default: - assert(0); - } - - predef_composite = member; - } - for (predef_decl = &psi_predef_decls[0]; predef_decl->type_tag; ++predef_decl) { - struct psi_predef_decl *farg; - struct psi_decl_type *dtype, *ftype = psi_decl_type_init(predef_decl->type_tag, predef_decl->type_name); - struct psi_decl_var *fname = psi_decl_var_init(predef_decl->var_name, predef_decl->pointer_level, predef_decl->array_size); - struct psi_decl_arg *tdef, *func = psi_decl_arg_init(ftype, fname); - struct psi_plist *args = psi_plist_init((psi_plist_dtor) psi_decl_arg_free); - struct psi_decl *decl = psi_decl_init(func, args); - - for (farg = &predef_decl[1]; farg->type_tag; ++farg) { - struct psi_decl_type *arg_type = psi_decl_type_init(farg->type_tag, farg->type_name); - struct psi_decl_var *arg_var = psi_decl_var_init(farg->var_name, farg->pointer_level, farg->array_size); - struct psi_decl_arg *darg = psi_decl_arg_init(arg_type, arg_var); - decl->args = psi_plist_add(decl->args, &darg); - } - - switch (predef_decl->kind) { - case DECL_KIND_VARARG: - decl->varargs = 1; - /* no break */ - case DECL_KIND_STD: - T.decls = psi_plist_add(T.decls, &decl); - break; - case DECL_KIND_FUNCTOR: - dtype = psi_decl_type_init(PSI_T_FUNCTION, fname->name); - dtype->real.func = decl; - tdef = psi_decl_arg_init(dtype, psi_decl_var_copy(fname)); - T.types = psi_plist_add(T.types, &tdef); - break; - default: - assert(0); - } - - predef_decl = farg; - } - -#if PHP_DEBUG - skip_predefs: -#endif - - psi_context_add_data(C, &T); - return C; } @@ -229,6 +86,23 @@ static int psi_select_dirent(const struct dirent *entry) return 0 == fnmatch("*.psi", entry->d_name, FNM_CASEFOLD); } +static bool psi_context_add(struct psi_context *C, struct psi_parser *P) +{ + bool valid; + struct psi_data *D; + struct psi_validate_scope scope = {0}; + + C->data = realloc(C->data, (C->count + 1) * sizeof(*C->data)); + D = psi_data_exchange(&C->data[C->count++], PSI_DATA(P)); + + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + valid = psi_validate(&scope, PSI_DATA(C), D); + psi_validate_scope_dtor(&scope); + + return valid; +} + void psi_context_build(struct psi_context *C, const char *paths) { int i, n; @@ -266,7 +140,7 @@ void psi_context_build(struct psi_context *C, const char *paths) continue; } psi_parser_parse(&P, I); - psi_context_add_data(C, PSI_DATA(&P)); + psi_context_add(C, &P); psi_parser_dtor(&P); free(I); } @@ -317,6 +191,7 @@ zend_function_entry *psi_context_compile(struct psi_context *C) ZVAL_LONG(&zc.value, c->val->ival.zend.lval); break; case PSI_T_FLOAT: + case PSI_T_DOUBLE: ZVAL_DOUBLE(&zc.value, c->val->ival.dval); break; case PSI_T_STRING: @@ -355,7 +230,7 @@ zend_function_entry *psi_context_compile(struct psi_context *C) } zc.name = zend_string_dup(name, 1); - ZVAL_LONG(&zc.value, psi_long_num_exp(item->num, NULL, NULL)); + ZVAL_LONG(&zc.value, psi_num_exp_get_long(item->num, NULL, NULL)); zend_register_constant(&zc); zend_string_release(name); } @@ -447,29 +322,10 @@ void psi_context_free(struct psi_context **C) } } -bool psi_context_add_data(struct psi_context *C, struct psi_data *P) -{ - struct psi_data *D; - - C->data = realloc(C->data, (C->count + 1) * sizeof(*C->data)); - D = psi_data_exchange(&C->data[C->count++], P); - - return psi_data_validate(PSI_DATA(C), D); -} - void psi_context_dump(struct psi_context *C, int fd) { - dprintf(fd, "// psi.engine=%s\n", (char *) C->ops->query(C, PSI_CONTEXT_QUERY_SELF, NULL)); psi_data_dump(fd, PSI_DATA(C)); - -// size_t i; -// dprintf(fd, "/* parsed\n"); -// for (i = 0; i < C->count; ++i) { -// psi_data_dump(fd, &C->data[i]); -// } -// dprintf(fd, "*/\n"); - } diff --git a/src/context.h b/src/context.h index 2cbe6d2..73d13cd 100644 --- a/src/context.h +++ b/src/context.h @@ -73,7 +73,6 @@ struct psi_context_call_data { struct psi_context *psi_context_init(struct psi_context *C, struct psi_context_ops *ops, psi_error_cb error, unsigned flags); void psi_context_build(struct psi_context *C, const char *path); -bool psi_context_add_data(struct psi_context *C, struct psi_data *P); zend_function_entry *psi_context_compile(struct psi_context *C); ZEND_RESULT_CODE psi_context_call(struct psi_context *C, zend_execute_data *execute_data, zval *return_value, struct psi_impl *impl); void psi_context_dump(struct psi_context *C, int fd); diff --git a/src/cpp.c b/src/cpp.c index b181e27..5ab6492 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -67,6 +67,7 @@ bool psi_cpp_load_defaults(struct psi_cpp *cpp) return false; } +#if PSI_CPP_DEBUG static int dump_def(zval *p) { struct psi_cpp_macro_decl *decl = Z_PTR_P(p); @@ -78,17 +79,18 @@ static int dump_def(zval *p) } return ZEND_HASH_APPLY_KEEP; } +#endif void psi_cpp_free(struct psi_cpp **cpp_ptr) { if (*cpp_ptr) { struct psi_cpp *cpp = *cpp_ptr; +#if PSI_CPP_DEBUG + fprintf(stderr, "PSI: CPP decls:\n"); + zend_hash_apply(&cpp->defs, dump_def); +#endif *cpp_ptr = NULL; - if (cpp->parser->flags & PSI_DEBUG) { - fprintf(stderr, "PSI: CPP decls:\n"); - zend_hash_apply(&cpp->defs, dump_def); - } zend_hash_destroy(&cpp->defs); zend_hash_destroy(&cpp->once); free(cpp); @@ -373,6 +375,15 @@ void psi_cpp_define(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl) cpp->parser->error(PSI_DATA(cpp->parser), old->token, PSI_WARNING, "'%s' previously defined", old->token->text); } +#if PSI_CPP_DEBUG + if (decl->exp) { + fprintf(stderr, "MACRO: num_exp: ", decl->token->text); + } else if (decl->tokens) { + fprintf(stderr, "MACRO: decl : ", decl->token->text); + } + psi_cpp_macro_decl_dump(2, decl); + fprintf(stderr, "\n"); +#endif zend_hash_str_update_ptr(&cpp->defs, decl->token->text, decl->token->size, decl); } @@ -383,10 +394,13 @@ bool psi_cpp_undef(struct psi_cpp *cpp, struct psi_token *tok) bool psi_cpp_if(struct psi_cpp *cpp, struct psi_cpp_exp *exp) { - if (!psi_num_exp_validate(PSI_DATA(cpp->parser), exp->data.num, NULL, NULL, NULL, NULL, NULL)) { + struct psi_validate_scope scope = {0}; + + scope.defs = &cpp->defs; + if (!psi_num_exp_validate(PSI_DATA(cpp->parser), exp->data.num, &scope)) { return false; } - if (!psi_long_num_exp(exp->data.num, NULL, &cpp->defs)) { + if (!psi_num_exp_get_long(exp->data.num, NULL, &cpp->defs)) { return false; } return true; diff --git a/src/data.c b/src/data.c index 3fa456b..7e52be5 100644 --- a/src/data.c +++ b/src/data.c @@ -251,285 +251,3 @@ void psi_data_dump(int fd, struct psi_data *D) dprintf(fd, "\n"); } } - -bool psi_data_validate(struct psi_data *dst, struct psi_data *src) -{ - void *dlopened = NULL; - size_t check_count = ~0; - struct psi_plist *check_types = src->types; - struct psi_plist *check_structs = src->structs; - struct psi_plist *check_unions = src->unions; - struct psi_plist *check_enums = src->enums; - struct psi_plist *check_vars = src->vars; - struct psi_plist *check_decls = src->decls; - unsigned flags = dst->flags; - unsigned errors = src->errors; - struct psi_validate_stack type_stack; - - /* fail early if library is not found */ - if (!psi_decl_file_validate(dst, src, &dlopened)) { - return false; - } - - psi_validate_stack_ctor(&type_stack); - - if (dst->vars) { - - } - - dst->flags |= PSI_SILENT; - - while (check_count) { - struct psi_plist *recheck_types; - struct psi_plist *recheck_structs; - struct psi_plist *recheck_unions; - struct psi_plist *recheck_enums; - struct psi_plist *recheck_vars; - struct psi_plist *recheck_decls; - size_t count_types = psi_plist_count(check_types); - size_t count_structs = psi_plist_count(check_structs); - size_t count_unions = psi_plist_count(check_unions); - size_t count_enums = psi_plist_count(check_enums); - size_t count_vars = psi_plist_count(check_vars); - size_t count_decls = psi_plist_count(check_decls); - size_t count_all = count_types + count_structs + count_unions - + count_enums + count_vars + count_decls; - - if (check_count == count_all) { - /* nothing changed; bail out */ - if (count_all && (dst->flags & PSI_SILENT) && !(flags & PSI_SILENT)) { - /* one last error-spitting round, if not explicitly suppressed */ - dst->flags ^= PSI_SILENT; - check_count = ~0; - - PSI_DEBUG_PRINT(dst, "PSI: validation bail out with %zu" - " type checks remaining, errors follow\n", count_all); - continue; - } - check_count = 0; - } else { - recheck_types = count_types ? psi_plist_init(NULL) : NULL; - recheck_structs = count_structs ? psi_plist_init(NULL) : NULL; - recheck_unions = count_unions ? psi_plist_init(NULL) : NULL; - recheck_enums = count_enums ? psi_plist_init(NULL) : NULL; - recheck_vars = count_vars ? psi_plist_init(NULL) : NULL; - recheck_decls = count_decls ? psi_plist_init(NULL) : NULL; - - check_count = count_all; - src->errors = errors + check_count; - - PSI_DEBUG_PRINT(dst, "PSI: validate data(%p) %zu type checks remaining\n", - src, check_count); - - if (count_types) { - size_t i = 0; - struct psi_decl_arg *def; - - while (psi_plist_get(check_types, i++, &def)) { - *dst->last_error = 0; - dst->types = psi_plist_add(dst->types, &def); - PSI_DEBUG_PRINT(dst, "PSI: validate typedef %s ", def->var->name); - if (psi_decl_arg_validate_typedef(PSI_DATA(dst), def, &type_stack)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_types = psi_plist_add(recheck_types, &def); - psi_plist_pop(dst->types, NULL); - } - } - } - if (count_structs) { - size_t i = 0; - struct psi_decl_struct *str; - - while (psi_plist_get(check_structs, i++, &str)) { - *dst->last_error = 0; - dst->structs = psi_plist_add(dst->structs, &str); - PSI_DEBUG_PRINT(dst, "PSI: validate struct %s ", str->name); - if (psi_decl_struct_validate(PSI_DATA(dst), str, &type_stack)) { - PSI_DEBUG_PRINT(dst, "%s ::(%zu, %zu)\n", "✔", str->align, str->size); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_structs = psi_plist_add(recheck_structs, &str); - psi_plist_pop(dst->structs, NULL); - } - } - } - if (count_unions) { - size_t i = 0; - struct psi_decl_union *unn; - - while (psi_plist_get(check_unions, i++, &unn)) { - *dst->last_error = 0; - dst->unions = psi_plist_add(dst->unions, &unn); - PSI_DEBUG_PRINT(dst, "PSI: validate union %s ", unn->name); - if (psi_decl_union_validate(PSI_DATA(dst), unn, &type_stack)) { - PSI_DEBUG_PRINT(dst, "%s ::(%zu, %zu)\n", "✔", unn->align, unn->size); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_unions = psi_plist_add(recheck_unions, &unn); - psi_plist_pop(dst->unions, NULL); - } - } - } - if (count_enums) { - size_t i = 0; - struct psi_decl_enum *enm; - - while (psi_plist_get(check_enums, i++, &enm)) { - *dst->last_error = 0; - PSI_DEBUG_PRINT(dst, "PSI: validate enum %s ", enm->name); - if (psi_decl_enum_validate(PSI_DATA(dst), enm)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - dst->enums = psi_plist_add(dst->enums, &enm); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_enums = psi_plist_add(recheck_enums, &enm); - } - } - } - if (count_vars) { - size_t i = 0; - struct psi_decl_extvar *evar; - - while (psi_plist_get(check_vars, i++, &evar)) { - *dst->last_error = 0; - PSI_DEBUG_PRINT(dst, "PSI: validate extvar %s ", evar->arg->var->name); - if (psi_decl_extvar_validate(PSI_DATA(dst), evar, dlopened, &type_stack)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - dst->vars = psi_plist_add(dst->vars, &evar); - dst->decls = psi_plist_add(dst->decls, &evar->getter); - dst->decls = psi_plist_add(dst->decls, &evar->setter); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_vars = psi_plist_add(recheck_vars, &evar); - } - } - } - if (count_decls) { - size_t i = 0; - struct psi_decl *decl; - - while (psi_plist_get(check_decls, i++, &decl)) { - *dst->last_error = 0; - PSI_DEBUG_PRINT(dst, "PSI: validate decl %s ", decl->func->var->name); - if (psi_decl_validate(PSI_DATA(dst), decl, dlopened, &type_stack)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - dst->decls = psi_plist_add(dst->decls, &decl); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - recheck_decls = psi_plist_add(recheck_decls, &decl); - } - } - } - } - - if (check_types && check_types != src->types) { - psi_plist_free(check_types); - } - check_types = recheck_types; - if (check_structs && check_structs != src->structs) { - psi_plist_free(check_structs); - } - check_structs = recheck_structs; - if (check_unions && check_unions != src->unions) { - psi_plist_free(check_unions); - } - check_unions = recheck_unions; - if (check_enums && check_enums != src->enums) { - psi_plist_free(check_enums); - } - check_enums = recheck_enums; - if (check_vars && check_vars != src->vars) { - psi_plist_free(check_vars); - } - check_vars = recheck_vars; - if (check_decls && check_decls != src->decls) { - psi_plist_free(check_decls); - } - check_decls = recheck_decls; - } - - /* reset original flags */ - dst->flags = flags; - - if (dst->structs) { - size_t i = 0; - struct psi_decl_struct *str; - - while (psi_plist_get(dst->structs, i++, &str)) { - size_t nlen = strlen(str->name); - size_t slen = sizeof("psi\\SIZEOF_STRUCT_"); - size_t alen = sizeof("psi\\ALIGNOF_STRUCT_"); - char *nptr = str->name, *sname, *aname; - struct psi_const *cnst; - struct psi_const_type *ctyp; - struct psi_impl_def_val *cval; - - sname = malloc(slen + nlen + 1); - strcpy(sname, "psi\\SIZEOF_STRUCT_"); - aname = malloc(alen + nlen + 1); - strcpy(aname, "psi\\ALIGNOF_STRUCT_"); - - nptr = str->name; - while (*nptr) { - size_t off = nptr - str->name; - sname[slen - 1 + off] = aname[alen - 1 + off] = toupper(*nptr++); - } - sname[slen - 1 + nlen] = aname[alen - 1 + nlen] = 0; - - ctyp = psi_const_type_init(PSI_T_INT, "int"); - cval = psi_impl_def_val_init(PSI_T_INT, NULL); - cval->ival.zend.lval = str->size; - cnst = psi_const_init(ctyp, sname, cval); - src->consts = psi_plist_add(src->consts, &cnst); - free(sname); - - ctyp = psi_const_type_init(PSI_T_INT, "int"); - cval = psi_impl_def_val_init(PSI_T_INT, NULL); - cval->ival.zend.lval = str->align; - cnst = psi_const_init(ctyp, aname, cval); - src->consts = psi_plist_add(src->consts, &cnst); - free(aname); - } - } - - if (src->consts) { - size_t i = 0; - struct psi_const *cnst; - - while (psi_plist_get(src->consts, i++, &cnst)) { - *dst->last_error = 0; - PSI_DEBUG_PRINT(dst, "PSI: validate const %s ", cnst->name); - if (psi_const_validate(PSI_DATA(dst), cnst)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - dst->consts = psi_plist_add(dst->consts, &cnst); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - ++src->errors; - } - } - } - - if (src->impls) { - size_t i = 0; - struct psi_impl *impl; - - while (psi_plist_get(src->impls, i++, &impl)) { - *dst->last_error = 0; - PSI_DEBUG_PRINT(dst, "PSI: validate impl %s ", impl->func->name); - if (psi_impl_validate(PSI_DATA(dst), impl)) { - PSI_DEBUG_PRINT(dst, "%s\n", "✔"); - dst->impls = psi_plist_add(dst->impls, &impl); - } else { - PSI_DEBUG_PRINT(dst, "%s (%s)\n", "✘", dst->last_error); - ++src->errors; - } - } - } - - psi_validate_stack_dtor(&type_stack); - - return true; -} - diff --git a/src/data.h b/src/data.h index 5adf14c..88b8926 100644 --- a/src/data.h +++ b/src/data.h @@ -29,6 +29,7 @@ #include "types.h" #include "error.h" #include "plist.h" +#include "validate.h" #define PSI_DEBUG 0x1 #define PSI_SILENT 0x2 @@ -67,56 +68,7 @@ struct psi_data { struct psi_data *psi_data_ctor(struct psi_data *data, psi_error_cb error, unsigned flags); struct psi_data *psi_data_ctor_with_dtors(struct psi_data *data, psi_error_cb error, unsigned flags); struct psi_data *psi_data_exchange(struct psi_data *dest, struct psi_data *src); -bool psi_data_validate(struct psi_data *dst, struct psi_data *src); void psi_data_dtor(struct psi_data *data); void psi_data_dump(int fd, struct psi_data *data); -struct psi_validate_stack { - HashTable types; - HashTable structs; - HashTable unions; -}; - -static inline void psi_validate_stack_ctor(struct psi_validate_stack *stack) -{ - zend_hash_init(&stack->types, 0, NULL, NULL, 0); - zend_hash_init(&stack->structs, 0, NULL, NULL, 0); - zend_hash_init(&stack->unions, 0, NULL, NULL, 0); -} - -static inline void psi_validate_stack_dtor(struct psi_validate_stack *stack) -{ - zend_hash_destroy(&stack->types); - zend_hash_destroy(&stack->structs); - zend_hash_destroy(&stack->unions); -} - -#define psi_validate_stack_has_type(s, t) \ - ((s) ? zend_hash_str_exists(&(s)->types, (t), strlen(t)) : false) -#define psi_validate_stack_has_struct(s, t) \ - ((s) ? zend_hash_str_exists(&(s)->structs, (t), strlen(t)) : false) -#define psi_validate_stack_has_union(s, t) \ - ((s) ? zend_hash_str_exists(&(s)->unions, (t), strlen(t)) : false) - -#define psi_validate_stack_add_type(s, t, p) \ - do { if (s) zend_hash_str_add_ptr(&(s)->types, (t), strlen(t), (p)); } while(0) -#define psi_validate_stack_add_struct(s, t, p) \ - do { if (s) zend_hash_str_add_ptr(&(s)->structs, (t), strlen(t), (p)); } while(0) -#define psi_validate_stack_add_union(s, t, p) \ - do { if (s) zend_hash_str_add_ptr(&(s)->unions, (t), strlen(t), (p)); } while(0) - -#define psi_validate_stack_get_type(s, t) \ - ((s) ? zend_hash_str_find_ptr(&(s)->types, (t), strlen(t)) : NULL) -#define psi_validate_stack_get_struct(s, t) \ - ((s) ? zend_hash_str_find_ptr(&(s)->structs, (t), strlen(t)) : NULL) -#define psi_validate_stack_get_union(s, t) \ - ((s) ? zend_hash_str_find_ptr(&(s)->unions, (t), strlen(t)) : NULL) - -#define psi_validate_stack_del_type(s, t) \ - do { if (s) zend_hash_str_del(&(s)->types, (t), strlen(t)); } while(0) -#define psi_validate_stack_del_struct(s, t) \ - do { if (s) zend_hash_str_del(&(s)->structs, (t), strlen(t)); } while(0) -#define psi_validate_stack_del_union(s, t) \ - do { if (s) zend_hash_str_del(&(s)->unions, (t), strlen(t)); } while(0) - #endif diff --git a/src/error.h b/src/error.h index 3f64f1f..c155d39 100644 --- a/src/error.h +++ b/src/error.h @@ -30,6 +30,7 @@ #define PSI_ERROR 16 #define PSI_WARNING 32 +#define PSI_NOTICE 1024 struct psi_data; struct psi_token; diff --git a/src/marshal.c b/src/marshal.c index 55feb3c..6473eca 100644 --- a/src/marshal.c +++ b/src/marshal.c @@ -423,8 +423,8 @@ stop: */ impl_val *psi_let_intval(impl_val *tmp, struct psi_decl_arg *spec, token_t impl_type, impl_val *ival, zval *zvalue, void **to_free) { - zend_long intval; - token_t real_type = spec ? psi_decl_type_get_real(spec->type)->type : PSI_T_LONG; + int64_t intval; + token_t real_type = spec ? psi_decl_type_get_real(spec->type)->type : PSI_T_INT64; if (ival && impl_type == PSI_T_INT) { @@ -551,7 +551,7 @@ void psi_set_to_stringl(zval *return_value, struct psi_set_exp *set, impl_val *r struct psi_set_exp *sub_exp; psi_plist_get(set->inner, 0, &sub_exp); - RETVAL_STRINGL(str, psi_long_num_exp(sub_exp->data.num, frame, NULL)); + RETVAL_STRINGL(str, psi_num_exp_get_long(sub_exp->data.num, frame, NULL)); } else { RETVAL_EMPTY_STRING(); } @@ -686,7 +686,7 @@ void psi_set_to_array_counted(zval *return_value, struct psi_set_exp *set, impl_ } psi_plist_get(set->inner, 0, &sub_exp); - count = psi_long_num_exp(sub_exp->data.num, frame, NULL); + count = psi_num_exp_get_long(sub_exp->data.num, frame, NULL); psi_plist_get(set->inner, 1, &sub_exp); for (ptr = (char *) ret_val; 0 < count--; ptr += size) { diff --git a/src/module.c b/src/module.c index 20a1836..1323a9f 100644 --- a/src/module.c +++ b/src/module.c @@ -133,6 +133,7 @@ static PHP_FUNCTION(psi_validate) struct psi_parser_input *I; struct psi_parser P; struct psi_data D = {0}; + struct psi_validate_scope S = {0}; zend_long flags = 0; #if PHP_DEBUG @@ -155,7 +156,10 @@ static PHP_FUNCTION(psi_validate) psi_parser_parse(&P, I); psi_data_ctor(&D, P.error, P.flags); - RETVAL_BOOL(psi_data_validate(&D, PSI_DATA(&P)) && !P.errors); + psi_validate_scope_ctor(&S); + S.defs = &P.preproc->defs; + RETVAL_BOOL(psi_validate(&S, &D, PSI_DATA(&P)) && !P.errors); + psi_validate_scope_dtor(&S); psi_data_dtor(&D); psi_parser_dtor(&P); free(I); @@ -170,6 +174,7 @@ static PHP_FUNCTION(psi_validate_string) struct psi_parser_input *I; struct psi_parser P; struct psi_data D = {0}; + struct psi_validate_scope S = {0}; zend_long flags = 0; #if PHP_DEBUG @@ -192,7 +197,10 @@ static PHP_FUNCTION(psi_validate_string) psi_parser_parse(&P, I); psi_data_ctor(&D, P.error, P.flags); - RETVAL_BOOL(psi_data_validate(&D, PSI_DATA(&P)) && !P.errors); + psi_validate_scope_ctor(&S); + S.defs = &P.preproc->defs; + RETVAL_BOOL(psi_validate(&S, &D, PSI_DATA(&P)) && !P.errors); + psi_validate_scope_dtor(&S); psi_data_dtor(&D); psi_parser_dtor(&P); free(I); diff --git a/src/parser.c b/src/parser.c index 1eb70c1..d9d7b58 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.2 on Tue Oct 17 17:51:25 2017 */ +/* Generated by re2c 1.0.2 on Tue Oct 24 14:53:03 2017 */ #line 1 "src/parser.re" /******************************************************************************* Copyright (c) 2016, Michael Wallner . @@ -200,6 +200,67 @@ bool psi_parser_process(struct psi_parser *P, struct psi_plist *tokens, size_t * return true; } +void psi_parser_postprocess(struct psi_parser *P) +{ + unsigned flags; + zend_string *name; + struct psi_validate_scope scope = {0}; + + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + + flags = P->flags; + P->flags |= PSI_SILENT; + + /* register const macros */ + ZEND_HASH_FOREACH_STR_KEY_PTR(&P->preproc->defs, name, scope.macro) + { + if (scope.macro->sig) { + } else if (scope.macro->exp) { + if (psi_num_exp_validate(PSI_DATA(P), scope.macro->exp, &scope)) { + struct psi_impl_type *type; + struct psi_impl_def_val *def; + struct psi_const *cnst; + struct psi_num_exp *num; + char *name_str = malloc(name->len + sizeof("psi\\")); + + strcat(strcpy(name_str, "psi\\"), name->val); + num = psi_num_exp_copy(scope.macro->exp); + def = psi_impl_def_val_init(PSI_T_NUMBER, num); + type = psi_impl_type_init(PSI_T_NUMBER, ""); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + free(name_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; + char *name_str = malloc(name->len + sizeof("psi\\")); + + strcat(strcpy(name_str, "psi\\"), name->val); + type = psi_impl_type_init(PSI_T_STRING, "string"); + def = psi_impl_def_val_init(PSI_T_QUOTED_STRING, t->text); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + free(name_str); + } + } + } + } + } + ZEND_HASH_FOREACH_END(); + + P->flags = flags; + + psi_validate_scope_dtor(&scope); +} + bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) { struct psi_plist *scanned, *preproc; @@ -219,6 +280,8 @@ bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) return false; } + psi_parser_postprocess(P); + psi_plist_free(preproc); return true; } @@ -253,7 +316,7 @@ void psi_parser_free(struct psi_parser **P) } union int_suffix { - char s[SIZEOF_UINT32_T]; + char s[4]; uint32_t i; }; @@ -281,7 +344,7 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input (void) ctxmrk; -#line 285 "src/parser.c" +#line 348 "src/parser.c" { unsigned char yych; unsigned int yyaccept = 0; @@ -406,9 +469,9 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input yy2: ++cur; yy3: -#line 450 "src/parser.re" +#line 513 "src/parser.re" { NEWTOKEN(-2); goto error; } -#line 412 "src/parser.c" +#line 475 "src/parser.c" yy4: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -420,14 +483,14 @@ yy4: default: goto yy6; } yy6: -#line 449 "src/parser.re" +#line 512 "src/parser.re" { NEWTOKEN(PSI_T_WHITESPACE); goto start; } -#line 426 "src/parser.c" +#line 489 "src/parser.c" yy7: ++cur; -#line 448 "src/parser.re" +#line 511 "src/parser.re" { NEWTOKEN(PSI_T_EOL); NEWLINE(); goto start; } -#line 431 "src/parser.c" +#line 494 "src/parser.c" yy9: yych = *++cur; switch (yych) { @@ -435,14 +498,14 @@ yy9: default: goto yy10; } yy10: -#line 351 "src/parser.re" +#line 414 "src/parser.re" { NEWTOKEN(PSI_T_NOT); goto start; } -#line 441 "src/parser.c" +#line 504 "src/parser.c" yy11: ++cur; -#line 324 "src/parser.re" +#line 387 "src/parser.re" { escaped = false; tok += 1; goto string; } -#line 446 "src/parser.c" +#line 509 "src/parser.c" yy13: yych = *++cur; switch (yych) { @@ -450,9 +513,9 @@ yy13: default: goto yy14; } yy14: -#line 334 "src/parser.re" +#line 397 "src/parser.re" { NEWTOKEN(PSI_T_HASH); goto start; } -#line 456 "src/parser.c" +#line 519 "src/parser.c" yy15: yych = *++cur; switch (yych) { @@ -525,9 +588,9 @@ yy15: } yy16: ++cur; -#line 352 "src/parser.re" +#line 415 "src/parser.re" { NEWTOKEN(PSI_T_MODULO); goto start; } -#line 531 "src/parser.c" +#line 594 "src/parser.c" yy18: yych = *++cur; switch (yych) { @@ -535,29 +598,29 @@ yy18: default: goto yy19; } yy19: -#line 353 "src/parser.re" +#line 416 "src/parser.re" { NEWTOKEN(PSI_T_AMPERSAND); goto start; } -#line 541 "src/parser.c" +#line 604 "src/parser.c" yy20: ++cur; -#line 323 "src/parser.re" +#line 386 "src/parser.re" { escaped = false; tok += 1; goto character; } -#line 546 "src/parser.c" +#line 609 "src/parser.c" yy22: ++cur; -#line 335 "src/parser.re" +#line 398 "src/parser.re" { NEWTOKEN(PSI_T_LPAREN); goto start; } -#line 551 "src/parser.c" +#line 614 "src/parser.c" yy24: ++cur; -#line 336 "src/parser.re" +#line 399 "src/parser.re" { NEWTOKEN(PSI_T_RPAREN); goto start; } -#line 556 "src/parser.c" +#line 619 "src/parser.c" yy26: ++cur; -#line 349 "src/parser.re" +#line 412 "src/parser.re" { NEWTOKEN(PSI_T_ASTERISK); goto start; } -#line 561 "src/parser.c" +#line 624 "src/parser.c" yy28: yyaccept = 0; yych = *(mrk = ++cur); @@ -576,14 +639,14 @@ yy28: default: goto yy29; } yy29: -#line 354 "src/parser.re" +#line 417 "src/parser.re" { NEWTOKEN(PSI_T_PLUS); goto start; } -#line 582 "src/parser.c" +#line 645 "src/parser.c" yy30: ++cur; -#line 338 "src/parser.re" +#line 401 "src/parser.re" { NEWTOKEN(PSI_T_COMMA); goto start; } -#line 587 "src/parser.c" +#line 650 "src/parser.c" yy32: yyaccept = 1; yych = *(mrk = ++cur); @@ -602,9 +665,9 @@ yy32: default: goto yy33; } yy33: -#line 355 "src/parser.re" +#line 418 "src/parser.re" { NEWTOKEN(PSI_T_MINUS); goto start; } -#line 608 "src/parser.c" +#line 671 "src/parser.c" yy34: yyaccept = 2; yych = *(mrk = ++cur); @@ -623,9 +686,9 @@ yy34: default: goto yy35; } yy35: -#line 366 "src/parser.re" +#line 429 "src/parser.re" { NEWTOKEN(PSI_T_PERIOD); goto start; } -#line 629 "src/parser.c" +#line 692 "src/parser.c" yy36: yych = *++cur; switch (yych) { @@ -634,9 +697,9 @@ yy36: default: goto yy37; } yy37: -#line 356 "src/parser.re" +#line 419 "src/parser.re" { NEWTOKEN(PSI_T_SLASH); goto start; } -#line 640 "src/parser.c" +#line 703 "src/parser.c" yy38: yyaccept = 3; yych = *(mrk = ++cur); @@ -649,9 +712,9 @@ yy38: default: goto yy126; } yy39: -#line 310 "src/parser.re" +#line 373 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT; goto start; } -#line 655 "src/parser.c" +#line 718 "src/parser.c" yy40: yyaccept = 3; mrk = ++cur; @@ -679,14 +742,14 @@ yy40: } yy42: ++cur; -#line 339 "src/parser.re" +#line 402 "src/parser.re" { NEWTOKEN(PSI_T_COLON); goto start; } -#line 685 "src/parser.c" +#line 748 "src/parser.c" yy44: ++cur; -#line 337 "src/parser.re" +#line 400 "src/parser.re" { NEWTOKEN(PSI_T_EOS); goto start; } -#line 690 "src/parser.c" +#line 753 "src/parser.c" yy46: yyaccept = 4; yych = *(mrk = ++cur); @@ -762,9 +825,9 @@ yy46: default: goto yy47; } yy47: -#line 364 "src/parser.re" +#line 427 "src/parser.re" { NEWTOKEN(PSI_T_LCHEVR); goto start; } -#line 768 "src/parser.c" +#line 831 "src/parser.c" yy48: yych = *++cur; switch (yych) { @@ -772,9 +835,9 @@ yy48: default: goto yy49; } yy49: -#line 348 "src/parser.re" +#line 411 "src/parser.re" { NEWTOKEN(PSI_T_EQUALS); goto start; } -#line 778 "src/parser.c" +#line 841 "src/parser.c" yy50: yych = *++cur; switch (yych) { @@ -783,14 +846,14 @@ yy50: default: goto yy51; } yy51: -#line 365 "src/parser.re" +#line 428 "src/parser.re" { NEWTOKEN(PSI_T_RCHEVR); goto start; } -#line 789 "src/parser.c" +#line 852 "src/parser.c" yy52: ++cur; -#line 368 "src/parser.re" +#line 431 "src/parser.re" { NEWTOKEN(PSI_T_IIF); goto start; } -#line 794 "src/parser.c" +#line 857 "src/parser.c" yy54: yyaccept = 5; yych = *(mrk = ++cur); @@ -802,9 +865,9 @@ yy54: default: goto yy62; } yy55: -#line 443 "src/parser.re" +#line 506 "src/parser.re" { NEWTOKEN(PSI_T_NAME); goto start; } -#line 808 "src/parser.c" +#line 871 "src/parser.c" yy56: yyaccept = 5; yych = *(mrk = ++cur); @@ -1047,9 +1110,9 @@ yy74: } yy75: ++cur; -#line 342 "src/parser.re" +#line 405 "src/parser.re" { NEWTOKEN(PSI_T_LBRACKET); goto start; } -#line 1053 "src/parser.c" +#line 1116 "src/parser.c" yy77: yych = *++cur; switch (yych) { @@ -1131,19 +1194,19 @@ yy77: default: goto yy184; } yy78: -#line 357 "src/parser.re" +#line 420 "src/parser.re" { NEWTOKEN(PSI_T_BSLASH); goto start; } -#line 1137 "src/parser.c" +#line 1200 "src/parser.c" yy79: ++cur; -#line 343 "src/parser.re" +#line 406 "src/parser.re" { NEWTOKEN(PSI_T_RBRACKET); goto start; } -#line 1142 "src/parser.c" +#line 1205 "src/parser.c" yy81: ++cur; -#line 359 "src/parser.re" +#line 422 "src/parser.re" { NEWTOKEN(PSI_T_CARET); goto start; } -#line 1147 "src/parser.c" +#line 1210 "src/parser.c" yy83: yyaccept = 5; yych = *(mrk = ++cur); @@ -1283,9 +1346,9 @@ yy95: } yy96: ++cur; -#line 340 "src/parser.re" +#line 403 "src/parser.re" { NEWTOKEN(PSI_T_LBRACE); goto start; } -#line 1289 "src/parser.c" +#line 1352 "src/parser.c" yy98: yych = *++cur; switch (yych) { @@ -1293,29 +1356,29 @@ yy98: default: goto yy99; } yy99: -#line 358 "src/parser.re" +#line 421 "src/parser.re" { NEWTOKEN(PSI_T_PIPE); goto start; } -#line 1299 "src/parser.c" +#line 1362 "src/parser.c" yy100: ++cur; -#line 341 "src/parser.re" +#line 404 "src/parser.re" { NEWTOKEN(PSI_T_RBRACE); goto start; } -#line 1304 "src/parser.c" +#line 1367 "src/parser.c" yy102: ++cur; -#line 350 "src/parser.re" +#line 413 "src/parser.re" { NEWTOKEN(PSI_T_TILDE); goto start; } -#line 1309 "src/parser.c" +#line 1372 "src/parser.c" yy104: ++cur; -#line 344 "src/parser.re" +#line 407 "src/parser.re" { NEWTOKEN(PSI_T_CMP_NE); goto start; } -#line 1314 "src/parser.c" +#line 1377 "src/parser.c" yy106: ++cur; -#line 333 "src/parser.re" +#line 396 "src/parser.re" { NEWTOKEN(PSI_T_CPP_PASTE); goto start; } -#line 1319 "src/parser.c" +#line 1382 "src/parser.c" yy108: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -1389,14 +1452,14 @@ yy108: default: goto yy108; } yy110: -#line 445 "src/parser.re" +#line 508 "src/parser.re" { NEWTOKEN(PSI_T_DOLLAR_NAME); goto start; } -#line 1395 "src/parser.c" +#line 1458 "src/parser.c" yy111: ++cur; -#line 346 "src/parser.re" +#line 409 "src/parser.re" { NEWTOKEN(PSI_T_AND); goto start; } -#line 1400 "src/parser.c" +#line 1463 "src/parser.c" yy113: yych = *++cur; switch (yych) { @@ -1530,19 +1593,19 @@ yy116: default: goto yy118; } yy118: -#line 316 "src/parser.re" +#line 379 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT; goto start; } -#line 1536 "src/parser.c" +#line 1599 "src/parser.c" yy119: ++cur; -#line 330 "src/parser.re" +#line 393 "src/parser.re" { goto comment; } -#line 1541 "src/parser.c" +#line 1604 "src/parser.c" yy121: ++cur; -#line 331 "src/parser.re" +#line 394 "src/parser.re" { goto comment_sl; } -#line 1546 "src/parser.c" +#line 1609 "src/parser.c" yy123: yyaccept = 6; mrk = ++cur; @@ -1618,9 +1681,9 @@ yy128: } yy129: cur -= 1; -#line 312 "src/parser.re" +#line 375 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_L; cur += 1; goto start; } -#line 1624 "src/parser.c" +#line 1687 "src/parser.c" yy130: yych = *++cur; switch (yych) { @@ -1630,9 +1693,9 @@ yy130: } yy131: cur -= 1; -#line 311 "src/parser.re" +#line 374 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_U; cur += 1; goto start; } -#line 1636 "src/parser.c" +#line 1699 "src/parser.c" yy132: yych = *++cur; switch (yych) { @@ -1736,29 +1799,29 @@ yy133: } yy135: ++cur; -#line 360 "src/parser.re" +#line 423 "src/parser.re" { NEWTOKEN(PSI_T_LSHIFT); goto start; } -#line 1742 "src/parser.c" +#line 1805 "src/parser.c" yy137: ++cur; -#line 362 "src/parser.re" +#line 425 "src/parser.re" { NEWTOKEN(PSI_T_CMP_LE); goto start; } -#line 1747 "src/parser.c" +#line 1810 "src/parser.c" yy139: ++cur; -#line 345 "src/parser.re" +#line 408 "src/parser.re" { NEWTOKEN(PSI_T_CMP_EQ); goto start; } -#line 1752 "src/parser.c" +#line 1815 "src/parser.c" yy141: ++cur; -#line 363 "src/parser.re" +#line 426 "src/parser.re" { NEWTOKEN(PSI_T_CMP_GE); goto start; } -#line 1757 "src/parser.c" +#line 1820 "src/parser.c" yy143: ++cur; -#line 361 "src/parser.re" +#line 424 "src/parser.re" { NEWTOKEN(PSI_T_RSHIFT); goto start; } -#line 1762 "src/parser.c" +#line 1825 "src/parser.c" yy145: yyaccept = 5; yych = *(mrk = ++cur); @@ -1839,9 +1902,9 @@ yy146: default: goto yy61; } yy147: -#line 423 "src/parser.re" +#line 486 "src/parser.re" { NEWTOKEN(PSI_T_AS); goto start; } -#line 1845 "src/parser.c" +#line 1908 "src/parser.c" yy148: ++cur; if (lim <= cur) if (cur >= lim) goto done;; @@ -2090,9 +2153,9 @@ yy160: default: goto yy61; } yy161: -#line 393 "src/parser.re" +#line 456 "src/parser.re" { NEWTOKEN(PSI_T_IF); goto start; } -#line 2096 "src/parser.c" +#line 2159 "src/parser.c" yy162: yyaccept = 5; yych = *(mrk = ++cur); @@ -2106,9 +2169,9 @@ yy162: yy163: ++cur; cur -= 1; -#line 328 "src/parser.re" - { char_width = SIZEOF_WCHAR_T/8; } -#line 2112 "src/parser.c" +#line 391 "src/parser.re" + { char_width = sizeof(wchar_t)/8; } +#line 2175 "src/parser.c" yy165: yyaccept = 5; yych = *(mrk = ++cur); @@ -2225,9 +2288,9 @@ yy178: yy179: ++cur; cur -= 1; -#line 327 "src/parser.re" +#line 390 "src/parser.re" { char_width = 4; } -#line 2231 "src/parser.c" +#line 2294 "src/parser.c" yy181: yyaccept = 5; yych = *(mrk = ++cur); @@ -2326,9 +2389,9 @@ yy184: default: goto yy184; } yy186: -#line 444 "src/parser.re" +#line 507 "src/parser.re" { NEWTOKEN(PSI_T_NSNAME); goto start; } -#line 2332 "src/parser.c" +#line 2395 "src/parser.c" yy187: yyaccept = 5; yych = *(mrk = ++cur); @@ -2457,9 +2520,9 @@ yy201: yy202: ++cur; cur -= 1; -#line 326 "src/parser.re" +#line 389 "src/parser.re" { char_width = 2; } -#line 2463 "src/parser.c" +#line 2526 "src/parser.c" yy204: yyaccept = 5; yych = *(mrk = ++cur); @@ -2487,14 +2550,14 @@ yy206: } yy207: ++cur; -#line 347 "src/parser.re" +#line 410 "src/parser.re" { NEWTOKEN(PSI_T_OR); goto start; } -#line 2493 "src/parser.c" +#line 2556 "src/parser.c" yy209: ++cur; -#line 367 "src/parser.re" +#line 430 "src/parser.re" { NEWTOKEN(PSI_T_ELLIPSIS); goto start; } -#line 2498 "src/parser.c" +#line 2561 "src/parser.c" yy211: yych = *++cur; switch (yych) { @@ -2509,15 +2572,15 @@ yy211: yy212: ++cur; cur -= 1; -#line 317 "src/parser.re" +#line 380 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_F; cur += 1; goto start; } -#line 2515 "src/parser.c" +#line 2578 "src/parser.c" yy214: ++cur; cur -= 1; -#line 318 "src/parser.re" +#line 381 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_L; cur += 1; goto start; } -#line 2521 "src/parser.c" +#line 2584 "src/parser.c" yy216: yych = *++cur; switch (yych) { @@ -2529,9 +2592,9 @@ yy217: ++cur; yy218: cur -= 2; -#line 313 "src/parser.re" +#line 376 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_UL; cur += 2; goto start; } -#line 2535 "src/parser.c" +#line 2598 "src/parser.c" yy219: yych = *++cur; switch (yych) { @@ -2578,9 +2641,9 @@ yy220: } yy222: ++cur; -#line 446 "src/parser.re" +#line 509 "src/parser.re" { tok += 1; cur -= 1; NEWTOKEN(PSI_T_CPP_HEADER); cur += 1; goto start; } -#line 2584 "src/parser.c" +#line 2647 "src/parser.c" yy224: yyaccept = 5; yych = *(mrk = ++cur); @@ -2791,9 +2854,9 @@ yy241: default: goto yy61; } yy242: -#line 418 "src/parser.re" +#line 481 "src/parser.re" { NEWTOKEN(PSI_T_LET); goto start; } -#line 2797 "src/parser.c" +#line 2860 "src/parser.c" yy243: yyaccept = 12; yych = *(mrk = ++cur); @@ -2866,9 +2929,9 @@ yy243: default: goto yy61; } yy244: -#line 417 "src/parser.re" +#line 480 "src/parser.re" { NEWTOKEN(PSI_T_LIB); goto start; } -#line 2872 "src/parser.c" +#line 2935 "src/parser.c" yy245: yyaccept = 5; yych = *(mrk = ++cur); @@ -2998,9 +3061,9 @@ yy252: default: goto yy61; } yy253: -#line 419 "src/parser.re" +#line 482 "src/parser.re" { NEWTOKEN(PSI_T_SET); goto start; } -#line 3004 "src/parser.c" +#line 3067 "src/parser.c" yy254: yyaccept = 5; yych = *(mrk = ++cur); @@ -3226,9 +3289,9 @@ yy272: default: goto yy61; } yy273: -#line 387 "src/parser.re" +#line 450 "src/parser.re" { NEWTOKEN(PSI_T_INT); goto start; } -#line 3232 "src/parser.c" +#line 3295 "src/parser.c" yy274: yyaccept = 5; yych = *(mrk = ++cur); @@ -3294,9 +3357,9 @@ yy281: yy282: ++cur; cur -= 1; -#line 325 "src/parser.re" +#line 388 "src/parser.re" { char_width = 1; } -#line 3300 "src/parser.c" +#line 3363 "src/parser.c" yy284: yyaccept = 5; yych = *(mrk = ++cur); @@ -3328,27 +3391,27 @@ yy287: yy288: ++cur; cur -= 2; -#line 320 "src/parser.re" +#line 383 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DD; cur += 2; goto start; } -#line 3334 "src/parser.c" +#line 3397 "src/parser.c" yy290: ++cur; cur -= 2; -#line 319 "src/parser.re" +#line 382 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DF; cur += 2; goto start; } -#line 3340 "src/parser.c" +#line 3403 "src/parser.c" yy292: ++cur; cur -= 2; -#line 321 "src/parser.re" +#line 384 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_FLT | PSI_NUMBER_DL; cur += 2; goto start; } -#line 3346 "src/parser.c" +#line 3409 "src/parser.c" yy294: ++cur; cur -= 3; -#line 314 "src/parser.re" +#line 377 "src/parser.re" { NEWTOKEN(PSI_T_NUMBER); token->flags = PSI_NUMBER_INT | PSI_NUMBER_ULL; cur += 3; goto start; } -#line 3352 "src/parser.c" +#line 3415 "src/parser.c" yy296: ++cur; if ((lim - cur) < 3) if (cur >= lim) goto done;; @@ -3504,9 +3567,9 @@ yy304: default: goto yy61; } yy305: -#line 397 "src/parser.re" +#line 460 "src/parser.re" { NEWTOKEN(PSI_T_ELIF); goto start; } -#line 3510 "src/parser.c" +#line 3573 "src/parser.c" yy306: yyaccept = 16; yych = *(mrk = ++cur); @@ -3579,9 +3642,9 @@ yy306: default: goto yy61; } yy307: -#line 396 "src/parser.re" +#line 459 "src/parser.re" { NEWTOKEN(PSI_T_ELSE); goto start; } -#line 3585 "src/parser.c" +#line 3648 "src/parser.c" yy308: yyaccept = 5; yych = *(mrk = ++cur); @@ -3686,9 +3749,9 @@ yy312: default: goto yy61; } yy313: -#line 424 "src/parser.re" +#line 487 "src/parser.re" { NEWTOKEN(PSI_T_FREE); goto start; } -#line 3692 "src/parser.c" +#line 3755 "src/parser.c" yy314: yyaccept = 5; yych = *(mrk = ++cur); @@ -3809,9 +3872,9 @@ yy320: default: goto yy61; } yy321: -#line 408 "src/parser.re" +#line 471 "src/parser.re" { NEWTOKEN(PSI_T_NULL); goto start; } -#line 3815 "src/parser.c" +#line 3878 "src/parser.c" yy322: yyaccept = 5; yych = *(mrk = ++cur); @@ -3963,9 +4026,9 @@ yy332: default: goto yy61; } yy333: -#line 425 "src/parser.re" +#line 488 "src/parser.re" { NEWTOKEN(PSI_T_TEMP); goto start; } -#line 3969 "src/parser.c" +#line 4032 "src/parser.c" yy334: yyaccept = 5; yych = *(mrk = ++cur); @@ -4086,9 +4149,9 @@ yy340: default: goto yy61; } yy341: -#line 406 "src/parser.re" +#line 469 "src/parser.re" { NEWTOKEN(PSI_T_TRUE); goto start; } -#line 4092 "src/parser.c" +#line 4155 "src/parser.c" yy342: yyaccept = 5; yych = *(mrk = ++cur); @@ -4177,9 +4240,9 @@ yy344: default: goto yy61; } yy345: -#line 434 "src/parser.re" +#line 497 "src/parser.re" { NEWTOKEN(PSI_T_ZVAL); goto start; } -#line 4183 "src/parser.c" +#line 4246 "src/parser.c" yy346: yyaccept = 5; yych = *(mrk = ++cur); @@ -4289,9 +4352,9 @@ yy351: default: goto yy61; } yy352: -#line 384 "src/parser.re" +#line 447 "src/parser.re" { NEWTOKEN(PSI_T_BOOL); goto start; } -#line 4295 "src/parser.c" +#line 4358 "src/parser.c" yy353: yyaccept = 23; yych = *(mrk = ++cur); @@ -4364,9 +4427,9 @@ yy353: default: goto yy61; } yy354: -#line 385 "src/parser.re" +#line 448 "src/parser.re" { NEWTOKEN(PSI_T_CHAR); goto start; } -#line 4370 "src/parser.c" +#line 4433 "src/parser.c" yy355: yyaccept = 5; yych = *(mrk = ++cur); @@ -4453,9 +4516,9 @@ yy357: default: goto yy61; } yy358: -#line 381 "src/parser.re" +#line 444 "src/parser.re" { NEWTOKEN(PSI_T_ENUM); goto start; } -#line 4459 "src/parser.c" +#line 4522 "src/parser.c" yy359: yyaccept = 5; yych = *(mrk = ++cur); @@ -4536,9 +4599,9 @@ yy360: default: goto yy61; } yy361: -#line 377 "src/parser.re" +#line 440 "src/parser.re" { NEWTOKEN(PSI_T_LINE); goto start; } -#line 4542 "src/parser.c" +#line 4605 "src/parser.c" yy362: yyaccept = 26; yych = *(mrk = ++cur); @@ -4611,9 +4674,9 @@ yy362: default: goto yy61; } yy363: -#line 388 "src/parser.re" +#line 451 "src/parser.re" { NEWTOKEN(PSI_T_LONG); goto start; } -#line 4617 "src/parser.c" +#line 4680 "src/parser.c" yy364: yyaccept = 5; yych = *(mrk = ++cur); @@ -4742,9 +4805,9 @@ yy372: default: goto yy61; } yy373: -#line 383 "src/parser.re" +#line 446 "src/parser.re" { NEWTOKEN(PSI_T_VOID); goto start; } -#line 4748 "src/parser.c" +#line 4811 "src/parser.c" yy374: yyaccept = 5; yych = *(mrk = ++cur); @@ -4824,9 +4887,9 @@ yy375: default: goto yy61; } yy376: -#line 412 "src/parser.re" +#line 475 "src/parser.re" { NEWTOKEN(PSI_T_ARRAY); goto start; } -#line 4830 "src/parser.c" +#line 4893 "src/parser.c" yy377: yyaccept = 5; yych = *(mrk = ++cur); @@ -4939,9 +5002,9 @@ yy382: default: goto yy61; } yy383: -#line 435 "src/parser.re" +#line 498 "src/parser.re" { NEWTOKEN(PSI_T_COUNT); goto start; } -#line 4945 "src/parser.c" +#line 5008 "src/parser.c" yy384: yyaccept = 5; yych = *(mrk = ++cur); @@ -5022,9 +5085,9 @@ yy385: default: goto yy61; } yy386: -#line 398 "src/parser.re" +#line 461 "src/parser.re" { NEWTOKEN(PSI_T_ENDIF); goto start; } -#line 5028 "src/parser.c" +#line 5091 "src/parser.c" yy387: yyaccept = 31; yych = *(mrk = ++cur); @@ -5097,9 +5160,9 @@ yy387: default: goto yy61; } yy388: -#line 403 "src/parser.re" +#line 466 "src/parser.re" { NEWTOKEN(PSI_T_ERROR); goto start; } -#line 5103 "src/parser.c" +#line 5166 "src/parser.c" yy389: yyaccept = 32; yych = *(mrk = ++cur); @@ -5172,9 +5235,9 @@ yy389: default: goto yy61; } yy390: -#line 407 "src/parser.re" +#line 470 "src/parser.re" { NEWTOKEN(PSI_T_FALSE); goto start; } -#line 5178 "src/parser.c" +#line 5241 "src/parser.c" yy391: yyaccept = 5; yych = *(mrk = ++cur); @@ -5263,9 +5326,9 @@ yy393: default: goto yy61; } yy394: -#line 394 "src/parser.re" +#line 457 "src/parser.re" { NEWTOKEN(PSI_T_IFDEF); goto start; } -#line 5269 "src/parser.c" +#line 5332 "src/parser.c" yy395: yyaccept = 5; yych = *(mrk = ++cur); @@ -5362,9 +5425,9 @@ yy398: default: goto yy61; } yy399: -#line 409 "src/parser.re" +#line 472 "src/parser.re" { NEWTOKEN(PSI_T_MIXED); goto start; } -#line 5368 "src/parser.c" +#line 5431 "src/parser.c" yy400: yyaccept = 5; yych = *(mrk = ++cur); @@ -5565,9 +5628,9 @@ yy416: default: goto yy61; } yy417: -#line 401 "src/parser.re" +#line 464 "src/parser.re" { NEWTOKEN(PSI_T_UNDEF); goto start; } -#line 5571 "src/parser.c" +#line 5634 "src/parser.c" yy418: yyaccept = 5; yych = *(mrk = ++cur); @@ -5683,9 +5746,9 @@ yy424: default: goto yy61; } yy425: -#line 382 "src/parser.re" +#line 445 "src/parser.re" { NEWTOKEN(PSI_T_CONST); goto start; } -#line 5689 "src/parser.c" +#line 5752 "src/parser.c" yy426: yyaccept = 5; yych = *(mrk = ++cur); @@ -5767,9 +5830,9 @@ yy427: default: goto yy61; } yy428: -#line 389 "src/parser.re" +#line 452 "src/parser.re" { NEWTOKEN(PSI_T_FLOAT); goto start; } -#line 5773 "src/parser.c" +#line 5836 "src/parser.c" yy429: yyaccept = 5; yych = *(mrk = ++cur); @@ -5849,9 +5912,9 @@ yy430: default: goto yy61; } yy431: -#line 386 "src/parser.re" +#line 449 "src/parser.re" { NEWTOKEN(PSI_T_SHORT); goto start; } -#line 5855 "src/parser.c" +#line 5918 "src/parser.c" yy432: yyaccept = 5; yych = *(mrk = ++cur); @@ -5952,9 +6015,9 @@ yy436: default: goto yy61; } yy437: -#line 380 "src/parser.re" +#line 443 "src/parser.re" { NEWTOKEN(PSI_T_UNION); goto start; } -#line 5958 "src/parser.c" +#line 6021 "src/parser.c" yy438: yyaccept = 5; yych = *(mrk = ++cur); @@ -6041,9 +6104,9 @@ yy440: default: goto yy61; } yy441: -#line 432 "src/parser.re" +#line 495 "src/parser.re" { NEWTOKEN(PSI_T_ARRVAL); goto start; } -#line 6047 "src/parser.c" +#line 6110 "src/parser.c" yy442: yyaccept = 5; yych = *(mrk = ++cur); @@ -6140,9 +6203,9 @@ yy445: default: goto yy61; } yy446: -#line 436 "src/parser.re" +#line 499 "src/parser.re" { NEWTOKEN(PSI_T_CALLOC); goto start; } -#line 6146 "src/parser.c" +#line 6209 "src/parser.c" yy447: yyaccept = 42; yych = *(mrk = ++cur); @@ -6217,9 +6280,9 @@ yy447: default: goto yy61; } yy448: -#line 399 "src/parser.re" +#line 462 "src/parser.re" { NEWTOKEN(PSI_T_DEFINE); goto start; } -#line 6223 "src/parser.c" +#line 6286 "src/parser.c" yy449: yyaccept = 5; yych = *(mrk = ++cur); @@ -6308,9 +6371,9 @@ yy451: default: goto yy61; } yy452: -#line 395 "src/parser.re" +#line 458 "src/parser.re" { NEWTOKEN(PSI_T_IFNDEF); goto start; } -#line 6314 "src/parser.c" +#line 6377 "src/parser.c" yy453: yyaccept = 5; yych = *(mrk = ++cur); @@ -6391,9 +6454,9 @@ yy454: default: goto yy61; } yy455: -#line 429 "src/parser.re" +#line 492 "src/parser.re" { NEWTOKEN(PSI_T_INTVAL); goto start; } -#line 6397 "src/parser.c" +#line 6460 "src/parser.c" yy456: yyaccept = 45; yych = *(mrk = ++cur); @@ -6466,9 +6529,9 @@ yy456: default: goto yy61; } yy457: -#line 413 "src/parser.re" +#line 476 "src/parser.re" { NEWTOKEN(PSI_T_OBJECT); goto start; } -#line 6472 "src/parser.c" +#line 6535 "src/parser.c" yy458: yyaccept = 46; yych = *(mrk = ++cur); @@ -6541,9 +6604,9 @@ yy458: default: goto yy61; } yy459: -#line 433 "src/parser.re" +#line 496 "src/parser.re" { NEWTOKEN(PSI_T_OBJVAL); goto start; } -#line 6547 "src/parser.c" +#line 6610 "src/parser.c" yy460: yyaccept = 5; yych = *(mrk = ++cur); @@ -6640,9 +6703,9 @@ yy463: default: goto yy61; } yy464: -#line 422 "src/parser.re" +#line 485 "src/parser.re" { NEWTOKEN(PSI_T_RETURN); goto start; } -#line 6646 "src/parser.c" +#line 6709 "src/parser.c" yy465: yyaccept = 48; yych = *(mrk = ++cur); @@ -6715,9 +6778,9 @@ yy465: default: goto yy61; } yy466: -#line 415 "src/parser.re" +#line 478 "src/parser.re" { NEWTOKEN(PSI_T_STATIC); goto start; } -#line 6721 "src/parser.c" +#line 6784 "src/parser.c" yy467: yyaccept = 49; yych = *(mrk = ++cur); @@ -6790,9 +6853,9 @@ yy467: default: goto yy61; } yy468: -#line 411 "src/parser.re" +#line 474 "src/parser.re" { NEWTOKEN(PSI_T_STRING); goto start; } -#line 6796 "src/parser.c" +#line 6859 "src/parser.c" yy469: yyaccept = 50; yych = *(mrk = ++cur); @@ -6865,9 +6928,9 @@ yy469: default: goto yy61; } yy470: -#line 426 "src/parser.re" +#line 489 "src/parser.re" { NEWTOKEN(PSI_T_STRLEN); goto start; } -#line 6871 "src/parser.c" +#line 6934 "src/parser.c" yy471: yyaccept = 51; yych = *(mrk = ++cur); @@ -6940,9 +7003,9 @@ yy471: default: goto yy61; } yy472: -#line 427 "src/parser.re" +#line 490 "src/parser.re" { NEWTOKEN(PSI_T_STRVAL); goto start; } -#line 6946 "src/parser.c" +#line 7009 "src/parser.c" yy473: yyaccept = 5; yych = *(mrk = ++cur); @@ -7039,9 +7102,9 @@ yy476: default: goto yy61; } yy477: -#line 440 "src/parser.re" +#line 503 "src/parser.re" { NEWTOKEN(PSI_T_TO_INT); goto start; } -#line 7045 "src/parser.c" +#line 7108 "src/parser.c" yy478: yyaccept = 5; yych = *(mrk = ++cur); @@ -7173,9 +7236,9 @@ yy486: default: goto yy61; } yy487: -#line 390 "src/parser.re" +#line 453 "src/parser.re" { NEWTOKEN(PSI_T_DOUBLE); goto start; } -#line 7179 "src/parser.c" +#line 7242 "src/parser.c" yy488: yyaccept = 54; yych = *(mrk = ++cur); @@ -7248,9 +7311,9 @@ yy488: default: goto yy527; } yy489: -#line 369 "src/parser.re" +#line 432 "src/parser.re" { NEWTOKEN(PSI_T_PRAGMA); goto start; } -#line 7254 "src/parser.c" +#line 7317 "src/parser.c" yy490: yyaccept = 55; yych = *(mrk = ++cur); @@ -7323,9 +7386,9 @@ yy490: default: goto yy61; } yy491: -#line 392 "src/parser.re" +#line 455 "src/parser.re" { NEWTOKEN(PSI_T_SIGNED); goto start; } -#line 7329 "src/parser.c" +#line 7392 "src/parser.c" yy492: yyaccept = 56; yych = *(mrk = ++cur); @@ -7398,9 +7461,9 @@ yy492: default: goto yy61; } yy493: -#line 376 "src/parser.re" +#line 439 "src/parser.re" { NEWTOKEN(PSI_T_SIZEOF); goto start; } -#line 7404 "src/parser.c" +#line 7467 "src/parser.c" yy494: yyaccept = 57; yych = *(mrk = ++cur); @@ -7473,9 +7536,9 @@ yy494: default: goto yy61; } yy495: -#line 379 "src/parser.re" +#line 442 "src/parser.re" { NEWTOKEN(PSI_T_STRUCT); goto start; } -#line 7479 "src/parser.c" +#line 7542 "src/parser.c" yy496: yyaccept = 5; yych = *(mrk = ++cur); @@ -7569,9 +7632,9 @@ yy499: default: goto yy61; } yy500: -#line 431 "src/parser.re" +#line 494 "src/parser.re" { NEWTOKEN(PSI_T_BOOLVAL); goto start; } -#line 7575 "src/parser.c" +#line 7638 "src/parser.c" yy501: yyaccept = 5; yych = *(mrk = ++cur); @@ -7660,9 +7723,9 @@ yy503: default: goto yy61; } yy504: -#line 400 "src/parser.re" +#line 463 "src/parser.re" { NEWTOKEN(PSI_T_DEFINED); goto start; } -#line 7666 "src/parser.c" +#line 7729 "src/parser.c" yy505: yyaccept = 5; yych = *(mrk = ++cur); @@ -7752,9 +7815,9 @@ yy507: default: goto yy61; } yy508: -#line 404 "src/parser.re" +#line 467 "src/parser.re" { NEWTOKEN(PSI_T_INCLUDE); goto start; } -#line 7758 "src/parser.c" +#line 7821 "src/parser.c" yy509: yyaccept = 61; yych = *(mrk = ++cur); @@ -7827,9 +7890,9 @@ yy509: default: goto yy61; } yy510: -#line 428 "src/parser.re" +#line 491 "src/parser.re" { NEWTOKEN(PSI_T_PATHVAL); goto start; } -#line 7833 "src/parser.c" +#line 7896 "src/parser.c" yy511: yyaccept = 5; yych = *(mrk = ++cur); @@ -7926,9 +7989,9 @@ yy514: default: goto yy61; } yy515: -#line 442 "src/parser.re" +#line 505 "src/parser.re" { NEWTOKEN(PSI_T_TO_BOOL); goto start; } -#line 7932 "src/parser.c" +#line 7995 "src/parser.c" yy516: yyaccept = 5; yych = *(mrk = ++cur); @@ -8025,9 +8088,9 @@ yy519: default: goto yy61; } yy520: -#line 402 "src/parser.re" +#line 465 "src/parser.re" { NEWTOKEN(PSI_T_WARNING); goto start; } -#line 8031 "src/parser.c" +#line 8094 "src/parser.c" yy521: yyaccept = 64; yych = *(mrk = ++cur); @@ -8100,9 +8163,9 @@ yy521: default: goto yy61; } yy522: -#line 374 "src/parser.re" +#line 437 "src/parser.re" { NEWTOKEN(PSI_T_CPP_ASM); goto start; } -#line 8106 "src/parser.c" +#line 8169 "src/parser.c" yy523: yyaccept = 5; yych = *(mrk = ++cur); @@ -8277,9 +8340,9 @@ yy529: default: goto yy61; } yy530: -#line 378 "src/parser.re" +#line 441 "src/parser.re" { NEWTOKEN(PSI_T_TYPEDEF); goto start; } -#line 8283 "src/parser.c" +#line 8346 "src/parser.c" yy531: yyaccept = 5; yych = *(mrk = ++cur); @@ -8366,9 +8429,9 @@ yy533: default: goto yy61; } yy534: -#line 410 "src/parser.re" +#line 473 "src/parser.re" { NEWTOKEN(PSI_T_CALLABLE); goto start; } -#line 8372 "src/parser.c" +#line 8435 "src/parser.c" yy535: yyaccept = 67; yych = *(mrk = ++cur); @@ -8441,9 +8504,9 @@ yy535: default: goto yy61; } yy536: -#line 414 "src/parser.re" +#line 477 "src/parser.re" { NEWTOKEN(PSI_T_CALLBACK); goto start; } -#line 8447 "src/parser.c" +#line 8510 "src/parser.c" yy537: yyaccept = 68; yych = *(mrk = ++cur); @@ -8516,9 +8579,9 @@ yy537: default: goto yy61; } yy538: -#line 430 "src/parser.re" +#line 493 "src/parser.re" { NEWTOKEN(PSI_T_FLOATVAL); goto start; } -#line 8522 "src/parser.c" +#line 8585 "src/parser.c" yy539: yyaccept = 69; yych = *(mrk = ++cur); @@ -8591,9 +8654,9 @@ yy539: default: goto yy61; } yy540: -#line 416 "src/parser.re" +#line 479 "src/parser.re" { NEWTOKEN(PSI_T_FUNCTION); goto start; } -#line 8597 "src/parser.c" +#line 8660 "src/parser.c" yy541: yyaccept = 5; yych = *(mrk = ++cur); @@ -8690,9 +8753,9 @@ yy544: default: goto yy61; } yy545: -#line 438 "src/parser.re" +#line 501 "src/parser.re" { NEWTOKEN(PSI_T_TO_ARRAY); goto start; } -#line 8696 "src/parser.c" +#line 8759 "src/parser.c" yy546: yyaccept = 71; yych = *(mrk = ++cur); @@ -8765,9 +8828,9 @@ yy546: default: goto yy61; } yy547: -#line 441 "src/parser.re" +#line 504 "src/parser.re" { NEWTOKEN(PSI_T_TO_FLOAT); goto start; } -#line 8771 "src/parser.c" +#line 8834 "src/parser.c" yy548: yyaccept = 5; yych = *(mrk = ++cur); @@ -8870,9 +8933,9 @@ yy552: default: goto yy61; } yy553: -#line 371 "src/parser.re" +#line 434 "src/parser.re" { NEWTOKEN(PSI_T_CPP_INLINE); goto start; } -#line 8876 "src/parser.c" +#line 8939 "src/parser.c" yy554: yyaccept = 5; yych = *(mrk = ++cur); @@ -9027,9 +9090,9 @@ yy557: default: goto yy61; } yy558: -#line 391 "src/parser.re" +#line 454 "src/parser.re" { NEWTOKEN(PSI_T_UNSIGNED); goto start; } -#line 9033 "src/parser.c" +#line 9096 "src/parser.c" yy559: yyaccept = 74; yych = *(mrk = ++cur); @@ -9102,9 +9165,9 @@ yy559: default: goto yy61; } yy560: -#line 375 "src/parser.re" +#line 438 "src/parser.re" { NEWTOKEN(PSI_T_VOLATILE); goto start; } -#line 9108 "src/parser.c" +#line 9171 "src/parser.c" yy561: yyaccept = 5; yych = *(mrk = ++cur); @@ -9201,9 +9264,9 @@ yy564: default: goto yy61; } yy565: -#line 437 "src/parser.re" +#line 500 "src/parser.re" { NEWTOKEN(PSI_T_TO_OBJECT); goto start; } -#line 9207 "src/parser.c" +#line 9270 "src/parser.c" yy566: yyaccept = 76; yych = *(mrk = ++cur); @@ -9276,9 +9339,9 @@ yy566: default: goto yy61; } yy567: -#line 439 "src/parser.re" +#line 502 "src/parser.re" { NEWTOKEN(PSI_T_TO_STRING); goto start; } -#line 9282 "src/parser.c" +#line 9345 "src/parser.c" yy568: yyaccept = 5; yych = *(mrk = ++cur); @@ -9463,9 +9526,9 @@ yy574: default: goto yy61; } yy575: -#line 420 "src/parser.re" +#line 483 "src/parser.re" { NEWTOKEN(PSI_T_PRE_ASSERT); goto start; } -#line 9469 "src/parser.c" +#line 9532 "src/parser.c" yy576: yyaccept = 5; yych = *(mrk = ++cur); @@ -9552,9 +9615,9 @@ yy578: default: goto yy61; } yy579: -#line 372 "src/parser.re" +#line 435 "src/parser.re" { NEWTOKEN(PSI_T_CPP_RESTRICT); goto start; } -#line 9558 "src/parser.c" +#line 9621 "src/parser.c" yy580: yyaccept = 5; mrk = ++cur; @@ -9710,9 +9773,9 @@ yy582: default: goto yy61; } yy583: -#line 421 "src/parser.re" +#line 484 "src/parser.re" { NEWTOKEN(PSI_T_POST_ASSERT); goto start; } -#line 9716 "src/parser.c" +#line 9779 "src/parser.c" yy584: yyaccept = 5; yych = *(mrk = ++cur); @@ -9802,9 +9865,9 @@ yy586: default: goto yy527; } yy587: -#line 370 "src/parser.re" +#line 433 "src/parser.re" { NEWTOKEN(PSI_T_PRAGMA_ONCE); goto start; } -#line 9808 "src/parser.c" +#line 9871 "src/parser.c" yy588: yyaccept = 81; yych = *(mrk = ++cur); @@ -9877,9 +9940,9 @@ yy588: default: goto yy61; } yy589: -#line 405 "src/parser.re" +#line 468 "src/parser.re" { NEWTOKEN(PSI_T_INCLUDE_NEXT); goto start; } -#line 9883 "src/parser.c" +#line 9946 "src/parser.c" yy590: yyaccept = 5; yych = *(mrk = ++cur); @@ -9976,9 +10039,9 @@ yy593: default: goto yy61; } yy594: -#line 373 "src/parser.re" +#line 436 "src/parser.re" { NEWTOKEN(PSI_T_CPP_EXTENSION); goto start; } -#line 9982 "src/parser.c" +#line 10045 "src/parser.c" yy595: ++cur; if ((lim - cur) < 2) if (cur >= lim) goto done;; @@ -9998,16 +10061,16 @@ yy597: } yy598: ++cur; -#line 447 "src/parser.re" +#line 510 "src/parser.re" { parens = 2; goto cpp_attribute; } -#line 10004 "src/parser.c" +#line 10067 "src/parser.c" } -#line 453 "src/parser.re" +#line 516 "src/parser.re" character: ; -#line 10011 "src/parser.c" +#line 10074 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10021,17 +10084,17 @@ yy598: } yy602: ++cur; -#line 471 "src/parser.re" +#line 534 "src/parser.re" { escaped = false; goto character; } -#line 10027 "src/parser.c" +#line 10090 "src/parser.c" yy604: ++cur; -#line 458 "src/parser.re" +#line 521 "src/parser.re" { NEWLINE(); goto character; } -#line 10032 "src/parser.c" +#line 10095 "src/parser.c" yy606: ++cur; -#line 460 "src/parser.re" +#line 523 "src/parser.re" { if (escaped) { escaped = false; @@ -10043,19 +10106,19 @@ yy606: token->flags = char_width; goto start; } -#line 10047 "src/parser.c" +#line 10110 "src/parser.c" yy608: ++cur; -#line 459 "src/parser.re" +#line 522 "src/parser.re" { escaped = !escaped; goto character; } -#line 10052 "src/parser.c" +#line 10115 "src/parser.c" } -#line 473 "src/parser.re" +#line 536 "src/parser.re" string: ; -#line 10059 "src/parser.c" +#line 10122 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10069,17 +10132,17 @@ yy608: } yy612: ++cur; -#line 491 "src/parser.re" +#line 554 "src/parser.re" { escaped = false; goto string; } -#line 10075 "src/parser.c" +#line 10138 "src/parser.c" yy614: ++cur; -#line 478 "src/parser.re" +#line 541 "src/parser.re" { NEWLINE(); goto string; } -#line 10080 "src/parser.c" +#line 10143 "src/parser.c" yy616: ++cur; -#line 480 "src/parser.re" +#line 543 "src/parser.re" { if (escaped) { escaped = false; @@ -10091,19 +10154,19 @@ yy616: token->flags = char_width; goto start; } -#line 10095 "src/parser.c" +#line 10158 "src/parser.c" yy618: ++cur; -#line 479 "src/parser.re" +#line 542 "src/parser.re" { escaped = !escaped; goto string; } -#line 10100 "src/parser.c" +#line 10163 "src/parser.c" } -#line 493 "src/parser.re" +#line 556 "src/parser.re" comment: ; -#line 10107 "src/parser.c" +#line 10170 "src/parser.c" { unsigned char yych; if ((lim - cur) < 2) if (cur >= lim) goto done;; @@ -10117,14 +10180,14 @@ yy618: yy622: ++cur; yy623: -#line 500 "src/parser.re" +#line 563 "src/parser.re" { goto comment; } -#line 10123 "src/parser.c" +#line 10186 "src/parser.c" yy624: ++cur; -#line 498 "src/parser.re" +#line 561 "src/parser.re" { NEWLINE(); goto comment; } -#line 10128 "src/parser.c" +#line 10191 "src/parser.c" yy626: yych = *++cur; switch (yych) { @@ -10133,16 +10196,16 @@ yy626: } yy627: ++cur; -#line 499 "src/parser.re" +#line 562 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); goto start; } -#line 10139 "src/parser.c" +#line 10202 "src/parser.c" } -#line 502 "src/parser.re" +#line 565 "src/parser.re" comment_sl: ; -#line 10146 "src/parser.c" +#line 10209 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10154,22 +10217,22 @@ yy627: } yy631: ++cur; -#line 508 "src/parser.re" +#line 571 "src/parser.re" { goto comment_sl; } -#line 10160 "src/parser.c" +#line 10223 "src/parser.c" yy633: ++cur; -#line 507 "src/parser.re" +#line 570 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); NEWLINE(); goto start; } -#line 10165 "src/parser.c" +#line 10228 "src/parser.c" } -#line 510 "src/parser.re" +#line 573 "src/parser.re" cpp_attribute: ; -#line 10173 "src/parser.c" +#line 10236 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10183,26 +10246,26 @@ yy633: } yy637: ++cur; -#line 519 "src/parser.re" +#line 582 "src/parser.re" { goto cpp_attribute; } -#line 10189 "src/parser.c" +#line 10252 "src/parser.c" yy639: ++cur; -#line 518 "src/parser.re" +#line 581 "src/parser.re" { NEWLINE(); goto cpp_attribute; } -#line 10194 "src/parser.c" +#line 10257 "src/parser.c" yy641: ++cur; -#line 516 "src/parser.re" +#line 579 "src/parser.re" { ++parens; goto cpp_attribute; } -#line 10199 "src/parser.c" +#line 10262 "src/parser.c" yy643: ++cur; -#line 517 "src/parser.re" +#line 580 "src/parser.re" { if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } } -#line 10204 "src/parser.c" +#line 10267 "src/parser.c" } -#line 521 "src/parser.re" +#line 584 "src/parser.re" error: ; diff --git a/src/parser.re b/src/parser.re index 3fdd866..b0d390d 100644 --- a/src/parser.re +++ b/src/parser.re @@ -197,6 +197,67 @@ bool psi_parser_process(struct psi_parser *P, struct psi_plist *tokens, size_t * return true; } +void psi_parser_postprocess(struct psi_parser *P) +{ + unsigned flags; + zend_string *name; + struct psi_validate_scope scope = {0}; + + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + + flags = P->flags; + P->flags |= PSI_SILENT; + + /* register const macros */ + ZEND_HASH_FOREACH_STR_KEY_PTR(&P->preproc->defs, name, scope.macro) + { + if (scope.macro->sig) { + } else if (scope.macro->exp) { + if (psi_num_exp_validate(PSI_DATA(P), scope.macro->exp, &scope)) { + struct psi_impl_type *type; + struct psi_impl_def_val *def; + struct psi_const *cnst; + struct psi_num_exp *num; + char *name_str = malloc(name->len + sizeof("psi\\")); + + strcat(strcpy(name_str, "psi\\"), name->val); + num = psi_num_exp_copy(scope.macro->exp); + def = psi_impl_def_val_init(PSI_T_NUMBER, num); + type = psi_impl_type_init(PSI_T_NUMBER, ""); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + free(name_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; + char *name_str = malloc(name->len + sizeof("psi\\")); + + strcat(strcpy(name_str, "psi\\"), name->val); + type = psi_impl_type_init(PSI_T_STRING, "string"); + def = psi_impl_def_val_init(PSI_T_QUOTED_STRING, t->text); + cnst = psi_const_init(type, name_str, def); + P->consts = psi_plist_add(P->consts, &cnst); + free(name_str); + } + } + } + } + } + ZEND_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; @@ -216,6 +277,8 @@ bool psi_parser_parse(struct psi_parser *P, struct psi_parser_input *I) return false; } + psi_parser_postprocess(P); + psi_plist_free(preproc); return true; } @@ -250,7 +313,7 @@ void psi_parser_free(struct psi_parser **P) } union int_suffix { - char s[SIZEOF_UINT32_T]; + char s[4]; uint32_t i; }; @@ -325,7 +388,7 @@ struct psi_plist *psi_parser_scan(struct psi_parser *P, struct psi_parser_input "u8" / "\"" { char_width = 1; } "u" / ['"] { char_width = 2; } "U" / ['"] { char_width = 4; } - "L" / ['"] { char_width = SIZEOF_WCHAR_T/8; } + "L" / ['"] { char_width = sizeof(wchar_t)/8; } "/*" { goto comment; } "//" { goto comment_sl; } diff --git a/src/parser_proc.c b/src/parser_proc.c index fc38842..6b144a1 100644 --- a/src/parser_proc.c +++ b/src/parser_proc.c @@ -160,7 +160,7 @@ static inline void psi_parser_proc_add_typedef(struct psi_parser *P, struct psi_ if (!P->types) { P->types = psi_plist_init((psi_plist_dtor) psi_decl_arg_free); } - psi_parser_proc_deanon_typedef(def); + //psi_parser_proc_deanon_typedef(def); P->types = psi_plist_add(P->types, &def); } static inline void psi_parser_proc_add_const(struct psi_parser *P, struct psi_const *cnst) { @@ -307,18 +307,18 @@ static inline void psi_parser_proc_add_impl(struct psi_parser *P, struct psi_imp #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 168 +#define YYFINAL 160 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3737 +#define YYLAST 7599 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 140 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 136 +#define YYNNTS 141 /* YYNRULES -- Number of rules. */ -#define YYNRULES 629 +#define YYNRULES 626 /* YYNRULES -- Number of states. */ -#define YYNSTATES 895 +#define YYNSTATES 925 /* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */ #define YYMAXRHS 13 /* YYMAXLEFT -- Maximum number of symbols to the left of a handle @@ -381,23 +381,11 @@ static const unsigned char yytranslate[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 432, 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, - 433, 433, 433, 433, 434, 434, 434, 434, 434, 434, - 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, - 434, 434, 434, 435, 435, 435, 435, 435, 435, 435, + 0, 433, 433, 433, 433, 433, 433, 433, 433, 433, + 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, + 434, 434, 434, 434, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 436, 436, 436, 436, 436, 436, 436, 436, 436, + 435, 435, 435, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, @@ -408,42 +396,54 @@ static const unsigned short int yyrline[] = 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 440, 441, 444, - 445, 448, 449, 450, 451, 457, 465, 468, 471, 474, - 475, 478, 481, 484, 487, 493, 499, 502, 508, 531, - 535, 539, 544, 548, 552, 556, 563, 564, 568, 569, - 573, 574, 575, 579, 580, 584, 585, 589, 590, 591, - 595, 596, 600, 601, 602, 603, 604, 605, 606, 610, - 615, 623, 626, 629, 630, 636, 641, 649, 652, 656, - 660, 667, 671, 675, 679, 684, 694, 704, 709, 714, - 718, 724, 733, 736, 740, 744, 750, 757, 763, 764, - 765, 766, 770, 773, 805, 812, 813, 814, 815, 819, - 822, 831, 837, 840, 846, 849, 855, 856, 864, 875, - 884, 896, 897, 901, 911, 920, 932, 935, 938, 942, - 946, 950, 955, 960, 968, 969, 970, 976, 979, 982, - 988, 989, 993, 996, 999, 1005, 1008, 1011, 1019, 1031, - 1034, 1037, 1040, 1047, 1050, 1060, 1063, 1066, 1069, 1070, - 1071, 1075, 1078, 1081, 1092, 1095, 1101, 1102, 1106, 1107, - 1111, 1141, 1144, 1150, 1153, 1159, 1162, 1165, 1171, 1175, - 1176, 1180, 1181, 1185, 1186, 1193, 1194, 1198, 1205, 1216, - 1223, 1234, 1241, 1252, 1263, 1277, 1278, 1290, 1293, 1296, - 1302, 1305, 1312, 1315, 1321, 1330, 1342, 1350, 1353, 1363, - 1376, 1381, 1389, 1399, 1409, 1412, 1416, 1422, 1436, 1453, - 1456, 1462, 1469, 1479, 1486, 1489, 1495, 1500, 1508, 1512, - 1516, 1520, 1524, 1528, 1535, 1539, 1543, 1547, 1551, 1555, - 1561, 1565, 1572, 1575, 1587, 1591, 1595, 1601, 1614, 1627, - 1640, 1643, 1650, 1651, 1655, 1658, 1661, 1664, 1670, 1674, - 1681, 1684, 1687, 1690, 1701, 1704, 1710, 1711, 1717, 1720, - 1726, 1727, 1737, 1740, 1747, 1752, 1757, 1767, 1770, 1776, - 1779, 1785, 1792, 1799, 1800, 1801, 1802, 1803, 1804, 1805, - 1806, 1807, 1811, 1814, 1820, 1823, 1826, 1829, 1832, 1838, - 1842, 1850, 1851, 1855, 1862, 1865, 1868, 1871, 1875, 1878, - 1884, 1888, 1896, 1903, 1908, 1916, 1924, 1925, 1926, 1927, - 1928, 1929, 1930, 1931, 1932, 1933, 1937, 1940, 1946, 1949, - 1955, 1956, 1960, 1963, 1969, 1972, 1978, 1985, 1989, 1996, - 1999, 2002, 2008, 2015, 2018, 2021, 2028, 2033, 2041, 2042, - 2043, 2044, 2045, 2046, 2047, 2048, 2052, 2055, 2061, 2064, - 2070, 2077, 2078, 2082, 2089, 2092, 2098, 2106, 2109, 2115 + 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, + 436, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 441, 442, 445, + 446, 449, 450, 451, 452, 458, 466, 469, 472, 475, + 481, 484, 487, 490, 493, 499, 505, 508, 514, 537, + 541, 545, 550, 554, 558, 562, 569, 570, 574, 575, + 579, 580, 581, 585, 586, 590, 591, 595, 596, 597, + 601, 602, 606, 611, 616, 621, 630, 633, 636, 637, + 643, 648, 656, 659, 663, 667, 674, 678, 682, 686, + 691, 702, 713, 718, 723, 727, 733, 743, 746, 750, + 754, 760, 767, 771, 775, 782, 783, 784, 788, 802, + 808, 811, 817, 820, 826, 827, 835, 846, 855, 867, + 868, 872, 882, 891, 903, 904, 907, 913, 914, 918, + 922, 926, 931, 936, 944, 945, 946, 949, 955, 958, + 961, 967, 968, 972, 975, 978, 984, 987, 990, 998, + 1010, 1013, 1016, 1019, 1026, 1029, 1039, 1042, 1045, 1048, + 1049, 1050, 1054, 1057, 1060, 1071, 1078, 1088, 1091, 1097, + 1100, 1107, 1137, 1140, 1146, 1149, 1155, 1158, 1161, 1164, + 1170, 1174, 1175, 1179, 1180, 1184, 1185, 1192, 1193, 1197, + 1204, 1215, 1222, 1230, 1258, 1265, 1276, 1322, 1363, 1378, + 1381, 1384, 1390, 1393, 1399, 1414, 1417, 1446, 1454, 1482, + 1487, 1495, 1505, 1515, 1518, 1522, 1528, 1542, 1559, 1562, + 1568, 1575, 1585, 1592, 1595, 1601, 1606, 1614, 1618, 1622, + 1626, 1630, 1634, 1641, 1645, 1649, 1653, 1657, 1661, 1667, + 1671, 1678, 1681, 1693, 1697, 1701, 1708, 1721, 1734, 1747, + 1750, 1757, 1758, 1762, 1765, 1768, 1771, 1777, 1781, 1788, + 1791, 1794, 1809, 1810, 1811, 1812, 1816, 1819, 1825, 1826, + 1832, 1835, 1841, 1842, 1846, 1847, 1857, 1860, 1867, 1872, + 1877, 1887, 1890, 1896, 1899, 1905, 1912, 1919, 1926, 1927, + 1931, 1932, 1933, 1934, 1938, 1939, 1940, 1941, 1942, 1946, + 1949, 1955, 1958, 1961, 1964, 1967, 1973, 1977, 1985, 1986, + 1990, 1997, 2000, 2003, 2006, 2010, 2013, 2019, 2023, 2031, + 2038, 2043, 2051, 2059, 2060, 2061, 2062, 2063, 2064, 2065, + 2066, 2067, 2068, 2072, 2075, 2081, 2084, 2090, 2091, 2095, + 2098, 2104, 2107, 2113, 2120, 2124, 2131, 2134, 2137, 2143, + 2150, 2153, 2156, 2163, 2168, 2176, 2177, 2178, 2179, 2180, + 2181, 2182, 2183, 2187, 2190, 2196, 2199, 2205, 2212, 2213, + 2217, 2224, 2227, 2233, 2241, 2244, 2250 }; #endif @@ -477,30 +477,33 @@ static const char *const yytname[] = "any_noeol_token", "any_nobrace_token", "file", "blocks", "block", "lib", "cpp", "cpp_exp", "cpp_ignored_token", "cpp_message_token", "cpp_include_token", "cpp_header_token", "cpp_no_arg_token", - "cpp_name_arg_token", "cpp_exp_arg_token", "cpp_special_name_token", - "cpp_macro_decl", "cpp_macro_sig", "cpp_macro_sig_args", - "cpp_macro_decl_tokens", "cpp_macro_decl_token_list", "cpp_macro_exp", - "cpp_macro_call_args", "cpp_macro_call_arg_list", "constant", - "constant_type", "constant_type_token", "impl_def_val", + "cpp_name_arg_token", "cpp_exp_arg_token", "cpp_macro_decl", + "cpp_macro_sig", "cpp_macro_sig_args", "cpp_macro_decl_tokens", + "cpp_macro_decl_token_list", "cpp_macro_exp", "cpp_macro_call_args", + "cpp_macro_call_arg_list", "constant", "impl_def_val", "impl_def_val_token", "decl_typedef", "typedef", "typedef_anon", - "typedef_decl", "typedef_anon_decl", "qualified_decl_type", "decl_type", - "decl_type_complex", "decl_type_simple", "decl_real_type", "int_signed", - "int_width", "decl_int_type", "int_signed_types", "signed_short_types", + "typedef_decl", "typedef_anon_decl", "qualified_decl_type", + "decl_type_qualifier_token", "decl_type", "decl_type_complex", + "decl_type_simple", "decl_real_type", "int_signed", "int_width", + "decl_int_type", "int_signed_types", "signed_short_types", "signed_long_types", "int_width_types", "decl_stmt", "decl_asm", - "ignored_quoted_strings", "decl_extvar_stmt", "decl_extvar_list", - "decl_vars", "ignored_decl", "ignored_decl_body", - "ignored_decl_body_stmts", "ignored_decl_body_stmt", "decl", "decl_body", - "decl_func_body", "decl_functor_body", "decl_functor", "decl_func", - "decl_args", "decl_arg_list", "decl_anon_arg", "decl_arg", "decl_var", - "decl_union", "decl_struct", "decl_struct_args", "struct_args_block", - "struct_args", "struct_arg_var_list", "decl_vars_with_layout", - "decl_enum", "decl_enum_items", "decl_enum_item", "num_exp", "number", - "sizeof", "sizeof_body", "sizeof_body_notypes", "enum_name", - "union_name", "struct_name", "optional_name", "optional_comma", - "decl_layout", "align_and_size", "array_size", "indirection", "pointers", - "asterisks", "asterisk", "impl", "impl_func", "impl_args", "impl_arg", - "impl_var", "impl_type", "impl_type_token", "impl_stmts", "impl_stmt", - "let_stmt", "let_exp", "let_exp_byref", "let_exp_assign", "let_calloc", + "quoted_strings", "decl_extvar_stmt", "decl_extvar_list", "decl_vars", + "ignored_decl", "ignored_decl_body", "ignored_decl_body_stmts", + "ignored_decl_body_stmt", "decl", "decl_body", "decl_func_body", + "decl_functor_body", "decl_anon_functor_body", "decl_functor", + "decl_anon_functor", "decl_func", "decl_args", "decl_arg_list", + "decl_anon_arg", "decl_arg", "decl_var", "decl_union", "decl_struct", + "decl_struct_args", "struct_args_block", "struct_args", + "struct_arg_var_list", "decl_vars_with_layout", "decl_enum", + "decl_enum_items", "decl_enum_item", "num_exp", "number", "sizeof", + "sizeof_body", "sizeof_body_notypes", "enum_name", "union_name", + "struct_name", "optional_name", "optional_comma", "decl_layout", + "align_and_size", "array_size", "array_qualifier_token", "indirection", + "pointers", "asterisks", "asterisk", "pointer_qualifier_token", "impl", + "impl_func", "impl_args", "impl_arg", "impl_var", "impl_type", + "impl_type_restricted", "impl_type_token", "impl_type_restricted_token", + "impl_type_extended_token", "impl_stmts", "impl_stmt", "let_stmt", + "let_exp", "let_exp_byref", "let_exp_assign", "let_calloc", "let_callback", "let_func", "let_func_token", "let_func_exps", "let_exps", "callback_rval", "callback_arg_list", "callback_args", "return_stmt", "return_exp", "call_decl_vars", "set_stmt", "set_exp", @@ -510,103 +513,106 @@ static const char *const yytname[] = }; #endif -#define YYPACT_NINF -703 -#define YYTABLE_NINF -628 +#define YYPACT_NINF -714 +#define YYTABLE_NINF -625 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const short int yypact[] = { - 1445, -703, -703, -703, -703, -703, 70, -703, -703, 2591, - 1754, 344, -703, -703, 753, 540, 3446, 3446, 3446, 65, - 82, 277, 74, -703, 1721, 1980, 123, 1445, -703, -703, - -703, -703, -703, 2817, -703, -703, -703, -703, 115, 180, - -703, -703, -703, -703, 39, -703, -703, 73, 125, 138, - -703, -703, -703, -703, 136, -703, 144, -703, -703, -703, - -703, -703, 841, -703, 154, 97, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, 2930, -10, -703, -703, - -703, -703, 3446, 3446, 3446, 635, -703, 101, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, 687, -703, -703, -703, -703, 160, 967, 967, 26, - -703, 687, 2478, 2591, 3446, 3446, 2093, 192, -703, -703, - -703, 187, 3446, 193, 193, 59, 59, 196, -703, -703, - 206, 215, -703, 154, 216, -703, -703, 203, 1980, 210, - 212, -703, 224, -703, 2206, 1473, 39, 210, -703, -703, - 213, -703, 217, 3446, -703, 246, -703, 116, -703, -703, - -703, 211, -703, 222, 225, 2398, 2398, 3446, 313, 3446, - -703, -703, 154, -703, -703, -703, -703, -703, -703, 2817, - 244, -703, -703, -703, -703, -703, -703, 137, 967, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, 967, -703, -703, -703, -703, -703, -703, -703, -703, - 135, 2478, -703, -703, -703, -703, 3043, 2478, 245, 3600, - -703, 247, 119, -703, 141, -703, -703, -703, -703, 241, - 243, 243, 49, 49, 3156, 240, -703, 210, 1219, -703, - 313, 257, 259, 260, -703, 1333, -703, 154, 213, -703, - -703, -703, 287, -703, -703, 269, -703, 11, 1503, 2817, - 162, 262, -703, -703, 173, 261, 263, -703, 2817, 2139, - 2817, 3446, 2817, -703, -703, 17, -703, -703, -703, -703, - -703, 2365, -703, 271, 3446, 268, -703, 3446, -703, 273, - -703, -703, -703, -703, 2624, 294, -703, 2921, 3446, -703, - -703, 2478, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - 2478, 2478, -703, 285, 1533, 2817, 2817, -703, -703, -703, - -703, 154, -703, 1687, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, -703, 1093, -703, 174, 297, -703, -703, -703, - -703, -703, -703, 1574, -703, 279, 2365, -703, 3576, -703, - -703, 3446, -703, -703, -703, 58, 2930, 154, 217, 213, - 256, 2432, 213, 258, 2365, 3446, 286, 289, 295, 3624, - 292, 302, -703, 307, 316, 301, 312, 122, -703, 314, - 326, -703, -703, -703, 2799, -703, 325, 2817, 3215, 154, - 337, -703, -703, -703, 342, 3600, 356, 311, 3527, -703, - 322, 2093, 324, -703, -703, 2704, 480, 3446, 193, 193, - -703, -703, 3446, 25, -703, -703, -703, 346, -703, 3624, - -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, - -703, -703, 355, 176, -703, 74, -703, 358, 344, 359, - 3034, -703, -703, -703, 2365, 2365, 360, -703, -703, 3156, - -703, 363, 11, -703, -703, 365, 3624, -703, -703, 1800, - -703, 2139, -703, 2817, -703, 74, 2817, -703, 3446, 3328, - -703, -703, -703, -703, -703, -703, 366, 367, -703, -703, - -703, -703, 2478, 2478, 370, -703, 53, 380, -703, 324, - 243, 243, 369, -703, 368, 381, 368, 379, 2365, -703, - 3552, -703, -703, 213, 213, 109, 323, 157, 388, 3624, - -703, -703, -703, -703, 389, 2252, -703, 391, 2817, 188, - -703, 401, 268, 402, 967, 3387, 3600, 3648, 411, 403, - 407, 2817, 413, 380, 2817, 2817, -703, -703, 368, -703, - 74, 1687, -703, 2365, -703, -703, 388, -703, -703, -703, - 3328, -703, 410, 2365, 74, -703, 1913, 412, 417, -703, - 353, -703, -703, -703, 418, 421, 432, 324, 427, -703, - 433, -703, 33, -703, 3672, 430, 74, 3309, 431, 434, - -703, 436, -703, -703, 130, -703, 440, 442, -703, 2817, - -703, 444, 377, 445, 2365, 1800, 446, -703, 2139, -703, - -703, 448, 441, 453, 324, 450, 486, 2026, 3147, 289, - -703, -703, -703, 458, 2252, -703, -703, 459, 461, -703, - 463, 464, 466, 467, -703, -703, 1800, -703, 481, -703, - 368, 74, 472, 2139, -703, 474, -703, 479, -703, -703, - -703, 2026, 482, 485, -703 + 521, -714, -714, -714, -714, -714, 97, -714, -714, -714, + 708, -714, -714, -714, 730, 1396, 7333, 7333, 7333, 101, + 34, 243, 28, -714, 5528, 1654, 89, 521, -714, -714, + -714, -714, -714, 6704, 562, -714, -714, -714, -714, 126, + 177, -714, -714, -714, -714, -45, -714, -714, 143, 78, + 102, -714, -714, -714, -714, 59, -714, 104, -714, -714, + -714, 7333, 7333, 7333, -714, 1654, -714, 95, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + 871, -714, -714, -714, -714, 123, 997, 997, 23, -714, + 997, 6478, 7333, 7333, 1767, 113, -714, -714, -714, 124, + 7333, 125, 125, -714, -714, -714, 5461, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, 115, -714, -714, + 115, 122, -714, -714, -714, -714, -714, 139, -714, 145, + 1654, 134, 169, -714, 190, -714, 1880, 1396, -45, 134, + -714, -714, 38, 188, -714, -714, 197, 7333, 2, -714, + -714, -714, 216, -714, 114, -714, -714, -714, 132, -714, + 202, 206, 1993, 1993, 7333, 248, -714, -714, -714, 134, + 6817, 209, -714, 1506, -714, -714, -714, -714, -714, -714, + -714, -714, 1619, -714, -714, -714, -714, 1732, 1845, -714, + -714, -714, 1958, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, 2071, 2184, 2297, 2410, 2523, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, 2636, -714, 2749, 2862, 2975, + 3088, 3201, 3314, -714, 3427, -714, -714, 3540, 3653, 3766, + 3879, 3992, 4105, 4218, 4331, 4444, 4557, 4670, 4783, 4896, + 5009, 5122, 5235, -714, -714, -714, -714, -714, -714, -714, + 5348, 997, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + 997, -714, -714, -714, -714, -714, -714, -714, 70, 6478, + -714, -714, -714, -714, 6930, 6478, 212, 7462, -714, 144, + -714, 153, -714, -714, -714, -714, 210, 220, 220, 47, + 47, 217, -714, 134, 1249, -714, 248, 214, 228, 231, + -714, -714, -714, -714, 1363, -714, 219, 188, -714, -714, + -714, -714, -714, 260, -714, -714, 244, -714, 82, 6704, + -714, 237, 166, 239, -714, -714, 176, 234, 252, -714, + 6817, 6139, 6817, 7333, 6817, -714, -714, 224, -714, -714, + -714, -714, -714, 6365, -714, -714, 254, -714, 7333, -714, + -714, 259, 7462, 245, -714, -714, -714, -714, 6624, 270, + -714, 6692, 7333, -714, -714, 6478, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, 6478, 6478, 262, 1484, 6817, 6817, + -714, -714, -714, -714, 5687, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -714, -714, 1123, -714, 328, 478, -714, -714, + -714, -714, -714, -714, -714, 5574, -714, -714, 6365, -714, + 7438, -714, -714, 256, 7333, -714, -714, -714, 33, 264, + 1993, 188, 233, 1654, 188, 235, 6365, 7333, 261, 263, + 271, 7486, 265, 275, -714, 289, 300, 286, 303, 118, + -714, 306, 301, -714, -714, -714, 799, 6817, 6989, -714, + 219, 315, -714, -714, -714, 316, 7462, 317, 305, 7207, + -714, 326, 1767, 319, -714, -714, 6591, 742, 7333, 125, + 125, -714, -714, 163, -714, -714, 321, -714, 245, 7486, + -714, -714, -714, -714, -714, -714, -714, -714, 320, 178, + -714, 28, -714, -714, -714, 25, 32, 35, 6798, -714, + -714, 6365, 6365, -714, 184, -714, 219, 187, -714, 323, + -714, -714, 324, 7486, -714, -714, 5800, -714, 6139, -714, + 6817, -714, 28, 6817, -714, 7333, 7102, -714, -714, -714, + -714, -714, 329, 330, -714, -714, -714, -714, 6478, 6478, + 333, -714, 63, 334, -714, 319, 220, 220, -714, 584, + 335, 584, 332, 6365, -714, 7414, -714, 1993, -714, 7215, + 188, 299, 188, 188, 170, 267, 207, 337, 7486, -714, + -714, -714, -714, 341, 6252, -714, 340, 6817, 198, -714, + 344, 254, 346, 997, 7274, 7462, 7510, 356, 347, 353, + 6817, 355, 334, 6817, 6817, -714, 584, -714, 28, 5687, + -714, 6365, 354, -714, -714, 359, -714, -714, 337, -714, + -714, -714, 7102, -714, 363, 6365, 28, -714, 5913, 365, + 357, -714, 304, -714, -714, -714, 371, 370, 381, 319, + 375, -714, 379, -714, 39, -714, 7534, 378, 188, 380, + 28, 7083, 382, 385, -714, 394, -714, -714, 53, -714, + 383, 395, -714, 6817, -714, 390, 387, -714, 338, 398, + 6365, 5800, 403, -714, 6139, -714, -714, 405, 413, 415, + 319, 408, 1993, 175, 6026, 6921, 263, -714, -714, -714, + 409, 6252, -714, -714, 410, 412, -714, 407, 417, 420, + 422, 419, -714, -714, 5800, -714, 434, -714, 584, 188, + 28, 433, 6139, -714, 437, -714, -714, 441, -714, -714, + -714, 6026, 443, 445, -714 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -614,134 +620,139 @@ static const short int yypact[] = means the default is an error. */ static const unsigned short int yydefact[] = { - 277, 405, 402, 406, 400, 401, 403, 397, 398, 0, - 396, 0, 282, 281, 0, 0, 0, 0, 510, 0, - 0, 0, 627, 283, 0, 0, 0, 278, 279, 285, - 284, 286, 290, 524, 388, 390, 389, 395, 409, 421, - 394, 287, 288, 289, 426, 443, 445, 446, 0, 0, - 455, 292, 291, 293, 0, 294, 0, 404, 399, 33, - 34, 615, 576, 24, 524, 530, 39, 38, 37, 35, - 36, 32, 31, 25, 29, 28, 26, 27, 40, 584, - 583, 581, 579, 580, 582, 578, 577, 585, 30, 613, - 611, 610, 612, 609, 608, 456, 0, 526, 528, 41, - 42, 396, 0, 0, 0, 0, 444, 431, 387, 296, - 307, 304, 306, 308, 309, 320, 317, 318, 315, 321, - 316, 0, 319, 310, 311, 312, 0, 337, 337, 0, - 300, 0, 0, 0, 510, 510, 0, 0, 372, 377, - 466, 376, 0, 518, 518, 391, 392, 393, 507, 358, - 406, 397, 361, 0, 0, 357, 386, 0, 0, 0, - 0, 629, 0, 628, 396, 0, 426, 0, 1, 280, - 520, 467, 0, 525, 411, 415, 413, 417, 410, 407, - 422, 409, 408, 0, 0, 457, 457, 0, 0, 0, - 525, 531, 524, 469, 527, 529, 391, 392, 393, 0, - 0, 323, 324, 325, 327, 328, 326, 322, 337, 302, - 297, 68, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 158, 159, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 108, 106, 107, 105, 103, 104, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 160, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 156, 153, 154, 155, 157, 339, - 305, 338, 298, 313, 314, 299, 322, 301, 347, 348, - 0, 0, 22, 23, 20, 21, 0, 0, 350, 303, - 349, 456, 391, 509, 392, 508, 373, 369, 378, 0, - 0, 0, 0, 0, 0, 0, 295, 0, 0, 435, - 0, 0, 0, 0, 436, 0, 471, 524, 520, 416, - 412, 418, 419, 414, 423, 0, 424, 458, 0, 524, - 0, 459, 460, 462, 0, 486, 512, 484, 0, 627, - 0, 0, 0, 621, 622, 0, 552, 555, 554, 556, - 557, 0, 558, 0, 0, 432, 433, 0, 430, 0, - 330, 340, 506, 505, 0, 0, 501, 0, 0, 345, - 342, 352, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 13, 12, 14, 15, 16, 17, 18, 19, - 0, 0, 370, 0, 0, 0, 0, 474, 473, 475, - 472, 524, 468, 362, 437, 186, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 274, 275, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 224, 222, 223, 221, 219, - 220, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 276, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 272, 269, 270, 271, - 273, 441, 442, 0, 439, 0, 0, 371, 425, 497, - 495, 494, 496, 0, 521, 0, 0, 498, 0, 488, - 499, 0, 470, 420, 428, 0, 465, 0, 463, 520, - 0, 0, 520, 0, 0, 513, 0, 0, 0, 604, - 0, 0, 603, 42, 0, 0, 0, 0, 624, 0, - 0, 598, 532, 553, 0, 454, 0, 0, 331, 524, - 0, 502, 504, 341, 0, 354, 0, 353, 0, 343, - 0, 0, 514, 381, 374, 382, 0, 383, 518, 518, - 380, 379, 0, 497, 366, 367, 368, 0, 364, 363, - 438, 440, 533, 545, 546, 547, 548, 544, 549, 550, - 551, 543, 0, 0, 537, 627, 542, 24, 0, 0, - 0, 522, 492, 523, 0, 0, 0, 429, 427, 464, - 449, 0, 0, 461, 447, 0, 487, 485, 483, 0, - 559, 627, 602, 0, 541, 627, 0, 623, 0, 599, - 596, 620, 453, 434, 332, 335, 0, 333, 503, 500, - 346, 351, 0, 0, 0, 375, 0, 479, 476, 514, - 0, 0, 0, 356, 0, 0, 0, 539, 0, 490, - 0, 491, 451, 520, 520, 497, 0, 31, 30, 565, - 570, 566, 568, 569, 41, 0, 605, 616, 0, 0, - 625, 615, 601, 0, 337, 0, 355, 344, 0, 515, - 0, 0, 0, 479, 385, 384, 452, 534, 0, 538, - 627, 362, 489, 0, 450, 448, 0, 567, 590, 576, - 599, 591, 0, 0, 627, 571, 627, 0, 0, 626, - 0, 329, 334, 336, 0, 0, 0, 514, 480, 477, - 0, 535, 0, 540, 493, 0, 627, 0, 586, 0, - 618, 617, 606, 560, 0, 519, 0, 0, 481, 0, - 478, 0, 0, 0, 0, 0, 0, 607, 627, 614, - 597, 0, 0, 0, 514, 0, 0, 592, 0, 498, - 588, 563, 561, 587, 0, 575, 619, 0, 0, 482, - 0, 0, 0, 593, 594, 572, 0, 562, 0, 516, - 0, 627, 0, 627, 589, 0, 536, 0, 573, 595, - 517, 592, 0, 0, 574 + 277, 396, 393, 397, 391, 392, 394, 388, 389, 387, + 386, 378, 282, 281, 0, 0, 0, 0, 499, 377, + 0, 0, 624, 283, 0, 0, 0, 278, 279, 285, + 284, 286, 290, 516, 0, 374, 380, 379, 385, 400, + 412, 384, 287, 288, 289, 417, 435, 437, 438, 0, + 0, 448, 292, 291, 293, 0, 294, 0, 395, 390, + 386, 0, 0, 0, 377, 0, 436, 422, 296, 307, + 304, 306, 308, 309, 320, 317, 318, 315, 321, 316, + 0, 319, 310, 311, 312, 0, 332, 332, 0, 300, + 0, 0, 499, 499, 0, 0, 360, 365, 457, 364, + 0, 507, 507, 33, 34, 612, 573, 24, 39, 38, + 37, 35, 36, 32, 31, 25, 29, 28, 26, 27, + 40, 581, 580, 578, 576, 577, 579, 575, 574, 582, + 30, 610, 608, 607, 609, 606, 605, 381, 41, 42, + 382, 383, 496, 540, 541, 542, 543, 0, 537, 0, + 0, 0, 0, 626, 0, 625, 386, 0, 417, 0, + 1, 280, 522, 509, 376, 458, 0, 517, 518, 520, + 375, 402, 406, 404, 408, 401, 398, 413, 400, 399, + 0, 0, 449, 449, 0, 0, 381, 382, 383, 0, + 0, 0, 68, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 158, 159, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 108, 106, 107, 105, 103, 104, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 160, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 156, 153, 154, 155, 157, + 0, 332, 302, 297, 43, 52, 57, 58, 62, 106, + 107, 105, 103, 104, 124, 126, 127, 128, 129, 130, + 131, 160, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 334, 305, + 333, 298, 313, 314, 299, 301, 342, 343, 0, 0, + 22, 23, 20, 21, 0, 0, 345, 303, 344, 381, + 498, 382, 497, 361, 358, 366, 0, 0, 0, 0, + 0, 0, 295, 0, 0, 426, 0, 0, 0, 0, + 428, 525, 524, 523, 512, 460, 516, 509, 519, 521, + 407, 403, 409, 410, 405, 414, 0, 415, 387, 516, + 454, 0, 0, 451, 452, 455, 0, 475, 501, 473, + 0, 624, 0, 0, 0, 618, 619, 0, 549, 552, + 551, 553, 554, 0, 555, 429, 423, 424, 0, 421, + 419, 0, 324, 325, 322, 335, 495, 494, 0, 0, + 490, 0, 0, 340, 337, 347, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 463, 462, 464, 461, 0, 427, 186, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 274, 275, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 224, 222, 223, 221, + 219, 220, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 276, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 272, 269, 270, + 271, 273, 433, 434, 0, 431, 0, 0, 359, 416, + 486, 484, 483, 485, 514, 0, 515, 513, 0, 487, + 0, 477, 488, 0, 0, 517, 459, 411, 0, 456, + 449, 509, 0, 0, 509, 0, 0, 502, 0, 0, + 0, 601, 0, 0, 600, 42, 0, 0, 0, 0, + 621, 0, 0, 595, 526, 550, 0, 0, 326, 420, + 516, 0, 491, 493, 336, 0, 349, 0, 348, 0, + 338, 0, 0, 503, 369, 362, 370, 0, 371, 507, + 507, 368, 367, 486, 356, 357, 0, 352, 354, 353, + 430, 432, 527, 545, 546, 547, 548, 544, 0, 0, + 531, 624, 536, 538, 539, 612, 24, 0, 0, 481, + 511, 0, 0, 510, 0, 418, 516, 0, 441, 0, + 453, 439, 0, 476, 474, 472, 0, 556, 624, 599, + 0, 535, 624, 0, 620, 0, 596, 593, 617, 425, + 327, 330, 0, 328, 492, 489, 341, 346, 0, 0, + 0, 363, 0, 468, 465, 503, 0, 0, 351, 0, + 0, 0, 533, 0, 479, 0, 480, 449, 446, 0, + 509, 0, 509, 509, 486, 0, 31, 30, 562, 567, + 563, 565, 566, 41, 0, 602, 613, 0, 0, 622, + 612, 598, 0, 332, 0, 350, 339, 0, 504, 0, + 0, 0, 468, 373, 372, 528, 0, 532, 624, 0, + 478, 0, 0, 447, 444, 0, 442, 440, 0, 564, + 587, 573, 596, 588, 0, 0, 624, 568, 624, 0, + 0, 623, 0, 323, 329, 331, 0, 0, 0, 503, + 469, 466, 0, 529, 0, 534, 482, 0, 509, 0, + 624, 0, 583, 0, 615, 614, 603, 557, 0, 508, + 0, 0, 470, 0, 467, 0, 0, 445, 0, 0, + 0, 0, 0, 604, 624, 611, 594, 0, 0, 0, + 503, 0, 449, 0, 589, 0, 487, 585, 560, 558, + 584, 0, 572, 616, 0, 0, 471, 0, 0, 0, + 0, 590, 591, 569, 0, 559, 0, 505, 0, 509, + 624, 0, 624, 586, 0, 530, 443, 0, 570, 592, + 506, 589, 0, 0, 571 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -703, -324, -123, -4, 181, -703, -703, -703, 487, -703, - -703, -703, -703, -703, -703, -703, -703, -703, -703, 382, - -703, -703, -703, -125, -703, -292, -703, -703, -703, -703, - -703, -272, -703, -703, 361, -136, 32, -130, -156, -9, - -703, -703, -703, 488, -703, -703, 347, -703, -703, -703, - -703, 364, -703, -703, -703, -192, -703, -131, -703, -54, - 501, 41, 0, 40, -703, -703, 345, -703, -79, 8, - -33, -703, -703, 170, -323, -703, -247, -703, 4, -703, - -78, -322, -703, -116, -703, 114, -703, -443, -421, 92, - -703, -691, -124, -359, -58, -1, -703, 443, -703, 518, - -703, -205, -644, -702, -703, 182, -371, -703, -333, -663, - 155, -201, -703, -703, -664, -703, -703, -300, -332, -703, - -703, -703, -242, -703, -373, -385, -375, -703, -703, -703, - -703, -703, -703, -158, -21, -674 + -714, -333, -75, -6, -50, -714, -714, -714, 452, -714, + -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, + -714, -714, -84, -714, -284, -714, -714, -714, -329, -714, + -714, 325, -194, 30, -187, -176, -19, -14, -714, -714, + -714, 449, -714, -714, 322, -714, -714, -714, -714, 339, + -263, -714, -714, -173, -714, -120, -714, -106, 475, 80, + -2, 52, -714, -714, -714, -714, -179, -714, -131, -10, + -31, -714, -714, 127, -349, -714, -299, -714, 9, -714, + -133, -351, -714, -72, -714, 57, -714, -454, -444, 150, + -714, -711, -87, -376, -714, -371, -25, -714, 342, -714, + -714, 485, -714, -253, -669, -713, -714, -714, 493, -714, + 128, -392, -714, -391, -684, 96, -258, -714, -714, -685, + -714, -714, -365, -400, -714, -714, -714, -300, -714, -403, + -402, -397, -714, -714, -714, -714, -714, -714, -212, -21, + -689 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 695, 596, 170, 329, 581, 26, 27, 28, 29, - 30, 126, 127, 128, 129, 335, 130, 131, 132, 208, - 209, 726, 727, 330, 331, 349, 646, 647, 31, 154, - 155, 667, 668, 32, 137, 652, 653, 654, 33, 34, - 35, 36, 37, 38, 39, 40, 179, 380, 383, 182, - 41, 184, 605, 42, 200, 772, 43, 582, 583, 584, - 44, 45, 46, 140, 48, 49, 390, 391, 392, 50, - 597, 51, 52, 458, 459, 656, 782, 818, 142, 396, - 397, 619, 599, 600, 640, 426, 54, 143, 144, 148, - 616, 737, 360, 376, 172, 417, 97, 98, 55, 56, - 683, 684, 620, 685, 686, 405, 406, 407, 860, 861, - 862, 761, 762, 763, 99, 846, 863, 802, 872, 873, - 408, 630, 773, 409, 874, 622, 100, 807, 831, 410, - 411, 412, 627, 628, 624, 163 + -1, 712, 618, 163, 348, 602, 26, 27, 28, 29, + 30, 85, 86, 87, 88, 354, 89, 90, 91, 312, + 742, 743, 349, 350, 367, 667, 668, 31, 686, 687, + 32, 95, 673, 674, 675, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 176, 401, 404, 179, 42, 181, + 688, 43, 191, 791, 44, 603, 604, 605, 45, 46, + 47, 98, 410, 49, 411, 50, 412, 413, 414, 51, + 619, 52, 53, 481, 482, 677, 801, 840, 100, 418, + 419, 641, 621, 622, 661, 450, 55, 101, 102, 142, + 638, 753, 377, 395, 623, 166, 438, 168, 169, 393, + 56, 57, 699, 700, 642, 701, 147, 702, 703, 704, + 427, 428, 429, 887, 888, 889, 780, 781, 782, 138, + 872, 890, 824, 900, 901, 430, 652, 792, 431, 902, + 644, 139, 829, 855, 432, 433, 434, 649, 650, 646, + 155 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -749,472 +760,861 @@ static const short int yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const short int yytable[] = { - 171, 162, 108, 332, 53, 95, 189, 415, 96, 347, - 156, 658, 145, 146, 147, 139, 350, 631, 107, 602, - 361, 362, 363, 141, 623, 451, 621, 623, 369, 389, - 389, 53, 173, 659, 633, 765, 374, 455, 456, 65, - 47, 747, 787, 64, 790, 764, 760, 138, 783, 427, - 47, 106, 333, 598, 632, 430, -365, 714, -365, -365, - 65, 47, 159, 190, 47, 47, 167, 47, 149, 1, - 2, 150, 4, 5, 6, 151, 8, 152, 779, 57, - 457, 58, 153, 420, 697, 454, 821, 101, 780, 634, - -518, 698, 193, 801, 359, -518, 156, 841, 196, 197, - 198, 764, 805, 451, -446, -466, 451, -466, 157, 398, - 399, 400, 401, 402, 194, 403, 404, 207, 161, 174, - 175, 176, 381, 168, 177, 382, 838, 336, 348, 351, - 352, 354, 96, -455, 414, 199, 139, 178, 358, 645, - -497, 669, -497, -497, 141, 334, 747, 61, 849, 102, - 103, 104, 364, 717, -391, -511, 718, 185, 648, 649, - 828, 422, 423, 869, 183, 139, 416, 424, 356, 378, - 186, 864, 187, 141, 798, 799, -392, -511, 886, 425, - 188, 764, 843, 395, 191, 413, 180, 4, 5, 800, - 210, 190, 801, 393, 393, 609, 610, 138, 47, 367, - 764, 877, 864, 65, 47, 106, 612, 613, 658, 745, - 746, 672, 764, 658, 633, 174, 175, 176, 347, -455, - 177, 809, 637, 357, 347, 350, 353, 355, 359, -359, - 659, 350, -511, 178, 366, 659, 464, 887, -360, 365, - 89, 90, 91, 92, 93, 94, 368, 371, 370, 377, - 700, 375, 379, 704, 385, 419, 386, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 398, 399, 400, 401, - 402, 690, 403, 404, 692, 418, 453, 431, 452, 454, - 463, 1, 2, 3, 4, 5, 6, 7, 8, 586, - 587, 588, 706, 603, 9, 604, 611, 615, 655, 101, - 673, 614, 637, 674, 635, 638, 11, 675, 347, 676, - 677, 678, 679, 680, 681, 350, 642, 650, 691, 601, - 701, 451, 705, 708, 451, 451, 710, 347, 347, 709, - 682, 608, 711, 712, 350, 350, 623, 348, 766, 713, - 714, 715, 429, 348, 716, 732, 719, 734, 1, 2, - 3, 4, 5, 6, 7, 8, 171, 720, 722, 736, - 462, 102, 103, 104, 105, 617, 101, 625, 22, 629, - 729, 673, 750, 751, 674, 730, 190, 743, 675, 156, - 676, 677, 678, 679, 680, 681, 606, 759, 173, 731, - 744, -24, 748, 752, 794, 795, 753, 626, 754, 774, - 158, 775, 786, 662, 778, 398, 399, 400, 401, 402, - 636, 403, 404, 378, 781, 639, 788, 784, 785, 791, - 803, 804, 660, 661, 644, 806, 792, 348, 102, 103, - 104, 623, 796, 830, -600, 810, 814, 689, 815, 816, - 776, 777, 826, 759, 819, 832, 348, 348, 833, 850, - 834, 835, 451, 451, 139, 389, 836, 837, 657, 851, - 190, 839, 141, 842, 840, 845, 867, 847, 855, 669, - 848, 824, 852, 623, 856, 866, 853, 857, 868, 865, - 713, 827, 623, 870, 1, 2, 3, 4, 5, 6, - 7, 8, 876, 878, 879, 655, 881, 9, 880, 882, - 655, 883, 101, 798, 799, 888, 885, 890, 623, 11, - 889, 891, 421, 337, 169, 893, 623, 738, 894, 823, - 739, 735, 858, 759, 769, 166, 372, 181, 384, 671, - 373, 394, 703, 460, 740, 741, 820, 707, 641, 160, - 195, 789, 759, 884, 1, 2, 3, 4, 5, 6, - 7, 8, 585, 618, 759, 797, 871, 133, 825, 892, - 770, 0, 101, 0, 134, 135, 18, 105, 0, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 728, 0, 0, 0, 0, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 0, 0, 696, 0, 0, - 0, 651, 193, 0, 723, 0, 699, 0, 0, 347, - 347, 395, 0, 0, 0, 0, 350, 350, 0, 393, - 0, 0, 171, 0, 134, 135, 18, 105, 0, 0, - 0, 0, 0, 0, 725, 0, 0, 0, 190, 1, - 2, 3, 4, 5, 6, 7, 8, 0, 0, 811, - 0, 139, 153, 358, 173, 657, 139, 101, 742, 141, - 657, 136, 0, 0, 141, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, - 767, 0, 0, 416, 0, 0, 416, 0, 0, 0, - 59, 0, 0, 0, 768, 462, 0, 0, 0, 60, - 0, 606, 0, 0, 61, 62, 201, 202, 203, 63, - 0, 0, 0, 0, 626, 0, 0, 0, 0, 102, - 103, 104, 0, 0, 0, 0, 0, 0, 348, 348, - 0, 0, 0, 0, 0, 808, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 817, 0, - 0, 660, 661, 66, 67, 68, 69, 70, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 416, 0, 822, - 0, 813, 0, 0, 0, 71, 0, 72, 73, 74, - 75, 76, 77, 109, 78, 0, 0, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 0, 0, 0, 854, 0, 204, 0, - 205, 206, 859, 0, 0, 0, 0, 0, 0, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 0, 122, 123, 124, 125, 0, 0, 0, 0, - 0, -576, 0, 859, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, 0, -576, 0, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, - -576, -576, -576, -576, -576, -576, -576, -576, 0, -576, - -576, 0, -576, -576, -576, -576, -576, 211, 0, 0, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 67, 154, 165, 351, 416, 99, 409, 409, 167, 54, + 137, 140, 141, 97, 164, 378, 365, 436, 643, 368, + 170, 626, 653, 679, 645, 624, 442, 645, 478, 479, + 311, 385, 762, 680, 475, 655, 54, 784, 629, 390, + 355, 783, 779, 620, 802, 96, 805, 443, 808, 352, + 379, 162, 48, 380, -387, 186, 187, 188, -387, 659, + 149, -386, 48, 731, 11, -24, 715, 391, 763, 435, + 105, 875, 153, 48, 310, 451, 48, 48, 480, 48, + 180, 454, 656, 477, 99, 366, 369, 371, 798, 160, + 66, 823, 97, 843, 375, 184, 446, 447, 799, 783, + 827, 151, 448, 865, 143, 159, 58, 144, 59, 475, + 182, 145, -387, 146, 449, -387, -387, 48, 475, -386, + 402, 475, 64, 403, 373, 392, 398, -448, 862, 190, + 171, 172, 173, 689, 183, 174, 171, 172, 173, 762, + 185, 174, 353, 628, 374, 189, -507, 99, 175, 734, + 376, -507, 735, 313, 175, 97, -448, 852, -500, 437, + 376, 397, 381, 131, 132, 133, 134, 135, 136, 896, + 384, 666, 415, 415, -438, -457, 382, -457, 417, -381, + -500, 869, 891, 177, 4, 5, 783, 96, -382, -500, + 669, 670, 820, 821, -355, 915, -355, -355, 823, 631, + 632, -486, 48, -486, -486, 386, 783, 905, 48, 634, + 635, 760, 761, 387, 655, 891, 767, 768, 679, 783, + 770, 771, 400, 679, 820, 821, 394, 444, 680, 396, + 383, 831, 657, 680, 406, 365, 66, 407, 368, 822, + 439, 917, 370, 372, 455, 476, 607, 1, 2, 3, + 4, 5, 6, 7, 8, 718, 477, 484, 721, 608, + 9, 654, 609, 485, 708, 60, 627, 709, 162, 630, + 440, 659, 11, 633, 636, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 365, 723, 637, 368, 657, 744, + 365, 658, 663, 368, 671, 713, 716, 719, 725, 722, + 445, 676, 727, 726, 366, 728, 729, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 420, 421, 422, 423, + 424, 730, 425, 426, 731, 785, 732, 61, 62, 63, + 64, 645, 737, 475, 22, 733, 475, 475, 736, 748, + 420, 421, 422, 423, 424, 769, 425, 426, 745, 746, + 747, 750, 758, 366, 752, 759, 772, 773, 453, 366, + 765, 766, 793, 815, 794, 692, 150, 797, 800, 825, + 806, 625, 809, 826, 828, 778, 818, -597, 165, 832, + 365, 836, 837, 368, 167, 838, 841, 847, 857, 639, + 164, 647, 848, 651, 814, 850, 816, 817, 856, 365, + 365, 858, 368, 368, 859, 860, 861, 803, 804, 863, + 864, 866, 810, 868, 881, 878, 871, 648, 873, 882, + 420, 421, 422, 423, 424, 854, 425, 426, 874, 879, + 884, 645, 397, 778, 660, 883, 892, 730, 894, 707, + 895, 897, 908, 904, 906, 907, 665, 681, 682, 366, + 909, 717, 910, 912, 409, 911, 876, 409, 689, 914, + 846, 877, 475, 475, 795, 796, 918, 99, 366, 366, + 920, 893, 867, 921, 851, 97, 923, 645, 924, 161, + 845, 143, 388, 755, 144, 751, 678, 645, 145, 178, + 146, 693, 694, 695, 696, 697, 676, 389, 691, 158, + 405, 676, 720, 842, 724, 662, 152, 483, 807, 919, + 399, 698, 148, 913, 606, 645, 640, 819, 899, 885, + 778, 922, 849, 789, 645, 1, 2, 3, 4, 5, + 6, 7, 8, 916, 0, 0, 0, 0, 9, 0, + 778, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 11, 12, 13, 778, 0, 0, 0, 0, 0, 0, + 788, 0, 14, 0, 0, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 0, 60, 0, 0, 143, 812, 0, + 144, 409, 756, 757, 145, 0, 146, 693, 694, 695, + 696, 697, 0, 0, 15, 16, 17, 18, 19, 20, + 21, 0, 22, 0, 0, 0, 0, 0, 714, 0, + 415, 0, 0, 415, 0, 0, 739, 0, 0, 0, + 0, 417, 0, 0, 0, 625, 0, 23, 0, 0, + 0, 0, 24, 0, 25, 165, 61, 62, 63, 0, + 0, 167, 741, 0, 0, 0, 0, 164, 0, 0, + 0, 0, 99, 0, 0, 0, 0, 99, 0, 0, + 97, 0, 375, 365, 365, 97, 368, 368, 0, 0, + 0, 678, 0, 0, 0, 0, 678, 0, 164, 0, + 0, 625, 0, 0, 0, 0, 0, 0, 0, 786, + 0, 0, 437, 898, 0, 437, 409, 0, 0, 833, + 0, 787, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 9, 0, 0, 0, 648, + 60, 0, 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 366, 366, 0, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 0, 0, 830, 415, 0, 9, + 68, 0, 0, 714, 60, 0, 0, 0, 0, 839, + 0, 11, 681, 682, 0, 0, 0, 0, 0, 754, + 0, 0, 0, 0, 0, 0, 0, 844, 835, 0, + 0, 437, 61, 62, 63, 64, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 0, 81, + 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 92, 93, 18, 64, + 738, 65, 880, 0, 0, 0, 0, 0, 0, 0, + 886, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 0, + 0, 0, 0, 672, 711, 0, 0, 0, 0, 0, + 0, 192, 415, 886, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 0, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 0, 269, 0, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 0, 0, + 304, 0, 305, 306, 307, 308, 309, 192, 0, 0, + 314, 194, 195, 196, 197, 198, 199, 200, 201, 315, + 203, 204, 205, 206, 316, 317, 209, 210, 211, 318, + 213, 214, 215, 216, 217, 218, 219, 0, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 0, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 0, 288, 0, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 0, 0, 323, 0, 324, 325, - 326, 327, 328, 465, 0, 0, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, - 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, - 490, 491, 492, 0, 493, 494, 495, 496, 497, 368, - 670, 498, 499, 500, 501, 502, 503, 504, 505, 506, - 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, - 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, - 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, - 537, 538, 539, 0, 540, 0, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 0, 0, 575, 0, 576, 577, 578, 579, 580, 465, - 0, 0, 466, 467, 468, 469, 470, 471, 472, 473, - 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, - 484, 485, 486, 487, 488, 489, 490, 491, 492, 0, - 493, 494, 495, 496, 497, 368, 0, 498, 499, 500, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 319, 320, 321, 322, 323, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 0, 269, 0, + 270, 271, 272, 273, 274, 324, 276, 325, 326, 327, + 328, 329, 330, 283, 331, 285, 286, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 303, 0, 0, 304, 0, 305, 306, + 307, 308, 309, 486, 0, 0, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, - 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, - 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, - 531, 532, 533, 534, 535, 536, 537, 538, 539, 0, - 540, 0, 541, 542, 543, 544, 545, 546, 547, 548, - 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, - 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, - 569, 570, 571, 572, 573, 574, 59, 0, 575, 0, - 576, 577, 578, 579, 580, 60, 0, 0, 0, 0, - 61, 62, 589, 0, 0, 63, 590, 0, 591, 0, - 592, 340, 0, 0, 0, 593, 0, 0, 0, 0, - 0, 0, 594, 0, 0, 0, 0, 0, 0, 0, - 342, 343, 65, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 344, 345, 0, 0, 0, 0, 66, - 67, 68, 69, 70, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 71, 0, 72, 73, 74, 75, 76, 77, 0, - 78, 0, 0, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 1, - 2, 3, 4, 5, 6, 7, 8, 595, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 11, 12, 13, 1, 2, 3, - 4, 5, 6, 7, 8, 0, 14, 0, 0, 0, - 9, 0, 0, 0, 0, 101, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 0, 1, 2, 3, - 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, - 607, 0, 0, 0, 0, 101, 0, 0, 15, 16, - 17, 18, 19, 20, 21, 0, 22, 1, 2, 3, - 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 0, 101, 0, 134, 135, 18, - 105, 23, 11, 0, 0, 0, 24, 0, 25, 0, - 0, 0, 0, 0, 0, 0, 0, 59, 1, 2, - 3, 4, 5, 6, 7, 8, 60, 102, 103, 104, - 0, 61, 62, 589, 136, 0, 687, 590, 0, 591, - 0, 592, 340, 11, 0, 0, 593, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 134, 135, 18, - 105, 342, 343, 65, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 344, 345, 0, 0, 0, 0, - 66, 67, 68, 69, 70, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 651, 0, 0, 0, 102, 103, - 104, 688, 71, 0, 72, 73, 74, 75, 76, 77, - 0, 78, 0, 0, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 59, 0, 0, 0, 0, 0, 0, 0, 0, 60, - 0, 0, 0, 0, 61, 62, 663, 664, 665, 63, - 590, 0, 591, 666, 592, 340, 0, 0, 0, 593, - 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, - 6, 7, 8, 0, 342, 343, 65, 0, 9, 0, - 0, 0, 0, 164, 0, 0, 0, 344, 345, 0, - 11, 0, 0, 66, 67, 68, 69, 70, 1, 2, - 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, - 0, 9, 0, 0, 0, 71, 101, 72, 73, 74, - 75, 76, 77, 11, 78, 0, 0, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 59, 165, 102, 103, 104, 105, 0, - 0, 0, 60, 0, 0, 0, 0, 61, 62, 755, - 0, 0, 63, 590, 0, 591, 0, 592, 340, 0, - 0, 0, 593, 0, 0, 0, 0, 0, 102, 103, - 104, 105, 0, 0, 161, 0, 0, 342, 343, 65, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 344, 345, 0, 0, 0, 0, 66, 67, 68, 69, - 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 756, - 757, 73, 74, 75, 76, 77, 0, 78, 0, 0, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 758, - 89, 90, 91, 92, 93, 94, 59, 0, 0, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, - 61, 62, 589, 0, 0, 63, 590, 0, 591, 0, - 592, 340, 0, 0, 0, 593, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 161, 0, 0, - 342, 343, 65, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 344, 345, 0, 0, 829, 0, 66, - 67, 68, 69, 70, 1, 2, 3, 4, 5, 6, - 7, 8, 0, 0, 0, 0, 0, 9, 0, 0, - 0, 71, 101, 72, 73, 74, 75, 76, 77, 11, - 78, 0, 0, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 59, - 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, - 0, 0, 0, 61, 62, 589, 0, 0, 63, 590, - -627, 591, 0, 592, 340, 0, 0, 0, 593, 0, - 0, 0, 0, 0, 102, 103, 104, 105, 0, 0, - 161, 0, 0, 342, 343, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 344, 345, 0, 0, - 0, 0, 66, 67, 68, 69, 70, 1, 2, 3, - 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 71, 101, 72, 73, 74, 75, - 76, 77, 11, 78, 0, 0, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 59, 0, 0, 0, 0, 0, 0, 0, - 0, 60, 0, 0, 0, 0, 61, 62, 589, 0, - 0, 63, 590, 0, 591, 0, 592, 340, 0, 0, - 0, 593, 0, 0, 0, 0, 0, 134, 135, 18, - 105, 0, 0, 161, 0, 0, 342, 343, 65, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, - 345, 0, 0, 0, 0, 66, 67, 68, 69, 70, + 511, 512, 513, 0, 514, 515, 516, 517, 518, 384, + 690, 519, 520, 521, 522, 523, 524, 525, 526, 527, + 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, + 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, + 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, + 558, 559, 560, 0, 561, 0, 562, 563, 564, 565, + 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, + 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + 0, 0, 596, 0, 597, 598, 599, 600, 601, 486, + 0, 0, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 0, + 514, 515, 516, 517, 518, 384, 0, 519, 520, 521, + 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, + 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, + 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, + 552, 553, 554, 555, 556, 557, 558, 559, 560, 0, + 561, 0, 562, 563, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, + 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, + 590, 591, 592, 593, 594, 595, 103, 0, 596, 0, + 597, 598, 599, 600, 601, 104, 0, 0, 0, 0, + 105, 106, 610, 0, 0, 107, 611, 0, 612, 0, + 613, 358, 614, 0, 0, 615, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, - 0, 0, 0, 9, 0, 0, 0, 71, 101, 72, - 73, 74, 75, 76, 77, 11, 78, 0, 0, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 59, 0, 0, 0, 0, - 0, 0, 0, 0, 60, 0, 0, 0, 0, 61, - 62, 755, 0, 0, 63, 590, 0, 591, 0, 592, - 340, 0, 0, 0, 593, 0, 0, 0, 0, 0, - 102, 103, 104, 105, 0, 0, 0, 0, 0, 342, - 343, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 344, 345, 0, 0, 0, 0, 66, 67, - 68, 69, 70, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 71, 756, 757, 73, 74, 75, 76, 77, 0, 78, - 0, 0, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 758, 89, 90, 91, 92, 93, 94, 59, 0, - 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, - 0, 0, 61, 62, 589, 0, 0, 63, 590, 0, - 591, 0, 592, 340, 0, 0, 0, 593, 0, 0, - 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, - 0, 0, 342, 343, 65, 387, 0, 0, 0, 0, - 101, 0, 0, 0, 0, 344, 345, 11, 0, 0, - 0, 66, 67, 68, 69, 70, 1, 2, 3, 4, - 5, 6, 7, 8, 0, 0, 0, 0, 0, 702, - 0, 0, 0, 71, 101, 72, 73, 74, 75, 76, - 77, 11, 78, 0, 0, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 59, 102, 103, 104, 388, 0, 0, 0, 0, - 60, 0, 0, 0, 0, 61, 62, 0, 0, 0, - 63, 0, 0, 338, 0, 339, 340, 0, 0, 0, - 341, 0, 0, 0, 0, 0, 102, 103, 104, 388, - 0, 0, 0, 0, 0, 342, 343, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 344, 345, - 0, 0, 0, 0, 66, 67, 68, 69, 70, 0, - 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 71, 0, 72, 73, - 74, 75, 76, 77, 0, 78, 0, 0, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 59, 0, 0, 0, 0, 0, - 0, 0, 0, 60, 0, 0, 0, 0, 61, 62, - 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 64, 0, 0, 0, 0, 1, 2, + 360, 361, 162, 9, 0, 0, 0, 0, 60, 0, + 0, 0, 0, 362, 363, 11, 0, 0, 0, 108, + 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 616, 113, 0, 114, 115, 116, 117, 118, 119, 0, + 120, 0, 0, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 0, + 92, 93, 18, 64, 0, 0, 0, 617, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, - 65, 0, 0, 0, 0, 0, 101, 0, 0, 0, - 422, 423, 0, 0, 0, 0, 0, 66, 67, 68, - 69, 70, 0, 0, 0, 0, 0, 0, 425, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, - 0, 72, 73, 74, 75, 76, 77, 0, 78, 0, - 0, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 59, 102, 103, - 104, 0, 0, 0, 0, 0, 60, 0, 0, 0, - 0, 61, 62, 0, 0, 0, 63, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -524, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 66, 67, 68, 69, 70, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 71, 0, 72, 73, 74, 75, 76, 77, - 0, 78, 0, 0, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 59, 0, 0, 0, 0, 0, 0, 0, 0, 60, - 721, 0, 0, 0, 61, 62, 0, 0, 0, 63, - 0, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 0, - 0, 0, 0, 0, 694, 0, 65, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66, 67, 68, 69, 70, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 71, 0, 72, 73, 74, - 75, 76, 77, 0, 78, 0, 0, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 59, 0, 0, 0, 0, 0, 0, - 0, 0, 60, 0, 0, 0, 0, 61, 62, 0, - 0, 0, 63, 0, 643, 0, 0, 0, 0, 0, - 0, 0, 192, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, - 449, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 66, 67, 68, 69, - 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, - 72, 73, 74, 75, 76, 77, 0, 78, 0, 0, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 59, 0, 0, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, - 61, 62, 0, 0, 0, 63, 0, 749, 0, 0, - 0, 0, 0, 0, 0, 428, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 449, 0, 0, 0, 0, 0, 694, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, - 67, 68, 69, 70, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 71, 0, 72, 73, 74, 75, 76, 77, 0, - 78, 0, 0, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 59, - 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, - 0, 0, 0, 61, 62, 0, 0, 0, 63, 0, - 875, 0, 0, 0, 0, 0, 0, 0, 461, 432, - 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 445, 446, 447, 448, 449, 0, 0, 0, - 0, 0, 694, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 66, 67, 68, 69, 70, 60, 0, 0, - 0, 0, 61, 62, 0, 0, 0, 63, 0, 0, - 0, 0, 0, 0, 71, 0, 72, 73, 74, 75, - 76, 77, 0, 78, 0, 0, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 0, 0, 0, 0, 0, 0, 0, 724, - 0, 66, 67, 68, 69, 70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 71, 0, 72, 73, 74, 75, 76, - 77, 0, 78, 0, 0, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 59, 0, 0, 0, 0, 0, 0, 0, 0, - 60, 0, 0, 844, 0, 771, 62, 0, 0, 0, - 63, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 0, - 0, 0, 0, 0, 694, 0, 0, 65, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 59, 0, 0, 0, 66, 67, 68, 69, 70, 60, - 0, 0, 0, 0, 61, 62, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 71, 0, 72, 73, - 74, 75, 76, 77, 0, 78, 0, 0, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 0, 0, 0, 0, 0, 59, - 0, 812, 0, 66, 67, 68, 69, 70, 60, 0, - 0, 0, 0, 61, 62, 0, 0, 0, 63, 0, - 0, 0, 0, 0, 0, 71, 0, 72, 73, 74, - 75, 76, 77, 0, 78, 0, 0, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 66, 67, 68, 69, 70, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 71, 0, 72, 73, 74, 75, - 76, 77, 0, 78, 0, 0, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 733, 0, 0, 0, 0, 0, 0, 432, - 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 445, 446, 447, 448, 449, 793, 0, 0, - 0, 0, 450, 0, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 0, 0, 0, 693, 0, 694, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 0, 0, 0, 0, - 0, 694, 432, 433, 434, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, - 0, 0, 0, 0, 0, 450, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 449, 0, 0, 0, 0, 0, 694, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, 0, 0, - 0, 0, 0, 450, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 0, 0, 0, 0, 0, 694 + 0, 9, 0, 0, 0, 0, 60, 0, 0, -33, + 0, 0, 0, 11, 0, 0, 0, 94, -33, 0, + 0, 0, 0, -33, -33, 0, 0, 0, -33, 0, + 0, -33, -33, -33, -33, 0, 0, 0, -33, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -33, -33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -33, -33, 92, 93, + 18, 64, -33, -33, -33, -33, -33, 0, 0, 0, + 0, 0, 0, 0, -33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -33, 0, -33, -33, -33, -33, + -33, -33, 0, -33, 0, 672, -33, -33, -33, -33, + -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, + -33, -33, -34, 0, -33, 0, 0, 0, 0, 0, + 0, -34, 0, 0, 0, 0, -34, -34, 0, 0, + 0, -34, 0, 0, -34, -34, -34, -34, 0, 0, + 0, -34, 0, 0, 0, 0, 0, 0, 1, 2, + 3, 4, 5, 6, 7, 8, -34, -34, 0, 0, + 0, 9, 0, 0, 0, 0, 60, 0, 0, -34, + -34, 0, 0, 11, 0, -34, -34, -34, -34, -34, + 0, 0, 0, 0, 0, 0, 0, -34, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -34, 0, -34, + -34, -34, -34, -34, -34, 0, -34, 0, 0, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -57, 0, -34, 61, 62, + 63, 64, 0, 0, -57, 0, 0, 0, 0, -57, + -57, 0, 0, 0, -57, 0, 0, -57, -57, -57, + -57, 0, 0, 0, -57, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, -57, + -57, 0, 0, 0, 9, 0, 0, 0, 0, 60, + 0, 0, -57, -57, 0, 0, 11, 0, -57, -57, + -57, -57, -57, 0, 0, 0, 0, 0, 0, 0, + -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -57, 0, -57, -57, -57, -57, -57, -57, 0, -57, + 0, 0, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -57, -57, -57, -57, -57, -57, -57, -58, 0, + -612, 92, 93, 18, 64, 0, 0, -58, 0, 0, + 0, 0, -58, -58, 0, 0, 0, -58, 0, 0, + -58, -58, -58, -58, 0, 0, 0, -58, 0, 0, + 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, -58, -58, 0, 0, 0, 9, 0, 0, + 0, 0, 60, 0, 0, -58, -58, 0, 0, 11, + 0, -58, -58, -58, -58, -58, 0, 0, 0, 0, + 0, 0, 0, -58, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -58, 0, -58, -58, -58, -58, -58, + -58, 0, -58, 0, 0, -58, -58, -58, -58, -58, + -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, + -58, -24, 0, -573, 61, 62, 63, 64, 0, 0, + -24, 0, 0, 0, 0, -24, -24, 0, 0, 0, + -24, 0, 0, -24, -24, -24, -24, 0, 0, 0, + -24, 0, 0, 0, 0, 0, 0, 1, 2, 3, + 4, 5, 6, 7, 8, -24, -24, 0, 0, 0, + 408, 0, 0, 0, 0, 60, 0, 0, -24, -24, + 0, 0, 11, 0, -24, -24, -24, -24, -24, 0, + 0, 0, 0, 0, 0, 0, -24, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -24, 0, -24, -24, + -24, -24, -24, -24, 0, -24, 0, 0, -24, -24, + -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24, -24, -39, 0, -24, 61, 62, 63, + 64, 0, 0, -39, 0, 0, 0, 0, -39, -39, + 0, 0, 0, -39, 0, 0, -39, -39, -39, -39, + 0, 0, 0, -39, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -39, -39, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -39, -39, 0, 0, 0, 0, -39, -39, -39, + -39, -39, 0, 0, 0, 0, 0, 0, 0, -39, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -39, + 0, -39, -39, -39, -39, -39, -39, 0, -39, 0, + 0, -39, -39, -39, -39, -39, -39, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39, -38, 0, -39, + 0, 0, 0, 0, 0, 0, -38, 0, 0, 0, + 0, -38, -38, 0, 0, 0, -38, 0, 0, -38, + -38, -38, -38, 0, 0, 0, -38, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -38, -38, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -38, -38, 0, 0, 0, 0, + -38, -38, -38, -38, -38, 0, 0, 0, 0, 0, + 0, 0, -38, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -38, 0, -38, -38, -38, -38, -38, -38, + 0, -38, 0, 0, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -37, 0, -38, 0, 0, 0, 0, 0, 0, -37, + 0, 0, 0, 0, -37, -37, 0, 0, 0, -37, + 0, 0, -37, -37, -37, -37, 0, 0, 0, -37, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -37, -37, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -37, -37, 0, + 0, 0, 0, -37, -37, -37, -37, -37, 0, 0, + 0, 0, 0, 0, 0, -37, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -37, 0, -37, -37, -37, + -37, -37, -37, 0, -37, 0, 0, -37, -37, -37, + -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, + -37, -37, -37, -35, 0, -37, 0, 0, 0, 0, + 0, 0, -35, 0, 0, 0, 0, -35, -35, 0, + 0, 0, -35, 0, 0, -35, -35, -35, -35, 0, + 0, 0, -35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -35, -35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -35, -35, 0, 0, 0, 0, -35, -35, -35, -35, + -35, 0, 0, 0, 0, 0, 0, 0, -35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -35, 0, + -35, -35, -35, -35, -35, -35, 0, -35, 0, 0, + -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, -35, -35, -35, -35, -35, -36, 0, -35, 0, + 0, 0, 0, 0, 0, -36, 0, 0, 0, 0, + -36, -36, 0, 0, 0, -36, 0, 0, -36, -36, + -36, -36, 0, 0, 0, -36, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -36, -36, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -36, -36, 0, 0, 0, 0, -36, + -36, -36, -36, -36, 0, 0, 0, 0, 0, 0, + 0, -36, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -36, 0, -36, -36, -36, -36, -36, -36, 0, + -36, 0, 0, -36, -36, -36, -36, -36, -36, -36, + -36, -36, -36, -36, -36, -36, -36, -36, -36, -32, + 0, -36, 0, 0, 0, 0, 0, 0, -32, 0, + 0, 0, 0, -32, -32, 0, 0, 0, -32, 0, + 0, -32, -32, -32, -32, 0, 0, 0, -32, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -32, -32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -32, -32, 0, 0, + 0, 0, -32, -32, -32, -32, -32, 0, 0, 0, + 0, 0, 0, 0, -32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -32, 0, -32, -32, -32, -32, + -32, -32, 0, -32, 0, 0, -32, -32, -32, -32, + -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, + -32, -32, -31, 0, -32, 0, 0, 0, 0, 0, + 0, -31, 0, 0, 0, 0, -31, -31, 0, 0, + 0, -31, 0, 0, -31, -31, -31, -31, 0, 0, + 0, -31, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -31, -31, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -31, + -31, 0, 0, 0, 0, -31, -31, -31, -31, -31, + 0, 0, 0, 0, 0, 0, 0, -31, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -31, 0, -31, + -31, -31, -31, -31, -31, 0, -31, 0, 0, -31, + -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, + -31, -31, -31, -31, -31, -25, 0, -31, 0, 0, + 0, 0, 0, 0, -25, 0, 0, 0, 0, -25, + -25, 0, 0, 0, -25, 0, 0, -25, -25, -25, + -25, 0, 0, 0, -25, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, + -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -25, -25, 0, 0, 0, 0, -25, -25, + -25, -25, -25, 0, 0, 0, 0, 0, 0, 0, + -25, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -25, 0, -25, -25, -25, -25, -25, -25, 0, -25, + 0, 0, -25, -25, -25, -25, -25, -25, -25, -25, + -25, -25, -25, -25, -25, -25, -25, -25, -29, 0, + -25, 0, 0, 0, 0, 0, 0, -29, 0, 0, + 0, 0, -29, -29, 0, 0, 0, -29, 0, 0, + -29, -29, -29, -29, 0, 0, 0, -29, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -29, -29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -29, -29, 0, 0, 0, + 0, -29, -29, -29, -29, -29, 0, 0, 0, 0, + 0, 0, 0, -29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -29, 0, -29, -29, -29, -29, -29, + -29, 0, -29, 0, 0, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -28, 0, -29, 0, 0, 0, 0, 0, 0, + -28, 0, 0, 0, 0, -28, -28, 0, 0, 0, + -28, 0, 0, -28, -28, -28, -28, 0, 0, 0, + -28, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -28, -28, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -28, -28, + 0, 0, 0, 0, -28, -28, -28, -28, -28, 0, + 0, 0, 0, 0, 0, 0, -28, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -28, 0, -28, -28, + -28, -28, -28, -28, 0, -28, 0, 0, -28, -28, + -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, + -28, -28, -28, -28, -26, 0, -28, 0, 0, 0, + 0, 0, 0, -26, 0, 0, 0, 0, -26, -26, + 0, 0, 0, -26, 0, 0, -26, -26, -26, -26, + 0, 0, 0, -26, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -26, -26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -26, -26, 0, 0, 0, 0, -26, -26, -26, + -26, -26, 0, 0, 0, 0, 0, 0, 0, -26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, + 0, -26, -26, -26, -26, -26, -26, 0, -26, 0, + 0, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26, -26, -26, -26, -26, -27, 0, -26, + 0, 0, 0, 0, 0, 0, -27, 0, 0, 0, + 0, -27, -27, 0, 0, 0, -27, 0, 0, -27, + -27, -27, -27, 0, 0, 0, -27, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -27, -27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -27, -27, 0, 0, 0, 0, + -27, -27, -27, -27, -27, 0, 0, 0, 0, 0, + 0, 0, -27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -27, 0, -27, -27, -27, -27, -27, -27, + 0, -27, 0, 0, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -40, 0, -27, 0, 0, 0, 0, 0, 0, -40, + 0, 0, 0, 0, -40, -40, 0, 0, 0, -40, + 0, 0, -40, -40, -40, -40, 0, 0, 0, -40, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -40, -40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -40, -40, 0, + 0, 0, 0, -40, -40, -40, -40, -40, 0, 0, + 0, 0, 0, 0, 0, -40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -40, 0, -40, -40, -40, + -40, -40, -40, 0, -40, 0, 0, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -135, 0, -40, 0, 0, 0, 0, + 0, 0, -135, 0, 0, 0, 0, -135, -135, 0, + 0, 0, -135, 0, 0, -135, -135, -135, -135, 0, + 0, 0, -135, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -135, -135, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -135, -135, 0, 0, 0, 0, -135, -135, -135, -135, + -135, 0, 0, 0, 0, 0, 0, 0, -135, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -135, 0, + -135, -135, -135, -135, -135, -135, 0, -135, 0, 0, + -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, + -135, -135, -135, -135, -135, -135, -136, 0, -581, 0, + 0, 0, 0, 0, 0, -136, 0, 0, 0, 0, + -136, -136, 0, 0, 0, -136, 0, 0, -136, -136, + -136, -136, 0, 0, 0, -136, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -136, -136, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -136, -136, 0, 0, 0, 0, -136, + -136, -136, -136, -136, 0, 0, 0, 0, 0, 0, + 0, -136, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -136, 0, -136, -136, -136, -136, -136, -136, 0, + -136, 0, 0, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -137, + 0, -580, 0, 0, 0, 0, 0, 0, -137, 0, + 0, 0, 0, -137, -137, 0, 0, 0, -137, 0, + 0, -137, -137, -137, -137, 0, 0, 0, -137, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -137, -137, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -137, -137, 0, 0, + 0, 0, -137, -137, -137, -137, -137, 0, 0, 0, + 0, 0, 0, 0, -137, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -137, 0, -137, -137, -137, -137, + -137, -137, 0, -137, 0, 0, -137, -137, -137, -137, + -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, + -137, -137, -138, 0, -578, 0, 0, 0, 0, 0, + 0, -138, 0, 0, 0, 0, -138, -138, 0, 0, + 0, -138, 0, 0, -138, -138, -138, -138, 0, 0, + 0, -138, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -138, -138, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -138, + -138, 0, 0, 0, 0, -138, -138, -138, -138, -138, + 0, 0, 0, 0, 0, 0, 0, -138, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -138, 0, -138, + -138, -138, -138, -138, -138, 0, -138, 0, 0, -138, + -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, + -138, -138, -138, -138, -138, -139, 0, -576, 0, 0, + 0, 0, 0, 0, -139, 0, 0, 0, 0, -139, + -139, 0, 0, 0, -139, 0, 0, -139, -139, -139, + -139, 0, 0, 0, -139, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -139, + -139, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -139, -139, 0, 0, 0, 0, -139, -139, + -139, -139, -139, 0, 0, 0, 0, 0, 0, 0, + -139, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -139, 0, -139, -139, -139, -139, -139, -139, 0, -139, + 0, 0, -139, -139, -139, -139, -139, -139, -139, -139, + -139, -139, -139, -139, -139, -139, -139, -139, -140, 0, + -577, 0, 0, 0, 0, 0, 0, -140, 0, 0, + 0, 0, -140, -140, 0, 0, 0, -140, 0, 0, + -140, -140, -140, -140, 0, 0, 0, -140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -140, -140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -140, -140, 0, 0, 0, + 0, -140, -140, -140, -140, -140, 0, 0, 0, 0, + 0, 0, 0, -140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -140, 0, -140, -140, -140, -140, -140, + -140, 0, -140, 0, 0, -140, -140, -140, -140, -140, + -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, + -140, -141, 0, -579, 0, 0, 0, 0, 0, 0, + -141, 0, 0, 0, 0, -141, -141, 0, 0, 0, + -141, 0, 0, -141, -141, -141, -141, 0, 0, 0, + -141, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -141, -141, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -141, -141, + 0, 0, 0, 0, -141, -141, -141, -141, -141, 0, + 0, 0, 0, 0, 0, 0, -141, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -141, 0, -141, -141, + -141, -141, -141, -141, 0, -141, 0, 0, -141, -141, + -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, + -141, -141, -141, -141, -142, 0, -575, 0, 0, 0, + 0, 0, 0, -142, 0, 0, 0, 0, -142, -142, + 0, 0, 0, -142, 0, 0, -142, -142, -142, -142, + 0, 0, 0, -142, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -142, -142, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -142, -142, 0, 0, 0, 0, -142, -142, -142, + -142, -142, 0, 0, 0, 0, 0, 0, 0, -142, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -142, + 0, -142, -142, -142, -142, -142, -142, 0, -142, 0, + 0, -142, -142, -142, -142, -142, -142, -142, -142, -142, + -142, -142, -142, -142, -142, -142, -142, -143, 0, -574, + 0, 0, 0, 0, 0, 0, -143, 0, 0, 0, + 0, -143, -143, 0, 0, 0, -143, 0, 0, -143, + -143, -143, -143, 0, 0, 0, -143, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -143, -143, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -143, -143, 0, 0, 0, 0, + -143, -143, -143, -143, -143, 0, 0, 0, 0, 0, + 0, 0, -143, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -143, 0, -143, -143, -143, -143, -143, -143, + 0, -143, 0, 0, -143, -143, -143, -143, -143, -143, + -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, + -30, 0, -582, 0, 0, 0, 0, 0, 0, -30, + 0, 0, 0, 0, -30, -30, 0, 0, 0, -30, + 0, 0, -30, -30, -30, -30, 0, 0, 0, -30, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -30, -30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -30, -30, 0, + 0, 0, 0, -30, -30, -30, -30, -30, 0, 0, + 0, 0, 0, 0, 0, -30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -30, 0, -30, -30, -30, + -30, -30, -30, 0, -30, 0, 0, -30, -30, -30, + -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, + -30, -30, -30, -145, 0, -30, 0, 0, 0, 0, + 0, 0, -145, 0, 0, 0, 0, -145, -145, 0, + 0, 0, -145, 0, 0, -145, -145, -145, -145, 0, + 0, 0, -145, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -145, -145, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -145, -145, 0, 0, 0, 0, -145, -145, -145, -145, + -145, 0, 0, 0, 0, 0, 0, 0, -145, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -145, 0, + -145, -145, -145, -145, -145, -145, 0, -145, 0, 0, + -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, + -145, -145, -145, -145, -145, -145, -146, 0, -610, 0, + 0, 0, 0, 0, 0, -146, 0, 0, 0, 0, + -146, -146, 0, 0, 0, -146, 0, 0, -146, -146, + -146, -146, 0, 0, 0, -146, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -146, -146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -146, -146, 0, 0, 0, 0, -146, + -146, -146, -146, -146, 0, 0, 0, 0, 0, 0, + 0, -146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -146, 0, -146, -146, -146, -146, -146, -146, 0, + -146, 0, 0, -146, -146, -146, -146, -146, -146, -146, + -146, -146, -146, -146, -146, -146, -146, -146, -146, -147, + 0, -608, 0, 0, 0, 0, 0, 0, -147, 0, + 0, 0, 0, -147, -147, 0, 0, 0, -147, 0, + 0, -147, -147, -147, -147, 0, 0, 0, -147, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -147, -147, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -147, -147, 0, 0, + 0, 0, -147, -147, -147, -147, -147, 0, 0, 0, + 0, 0, 0, 0, -147, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -147, 0, -147, -147, -147, -147, + -147, -147, 0, -147, 0, 0, -147, -147, -147, -147, + -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, + -147, -147, -148, 0, -607, 0, 0, 0, 0, 0, + 0, -148, 0, 0, 0, 0, -148, -148, 0, 0, + 0, -148, 0, 0, -148, -148, -148, -148, 0, 0, + 0, -148, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -148, -148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -148, + -148, 0, 0, 0, 0, -148, -148, -148, -148, -148, + 0, 0, 0, 0, 0, 0, 0, -148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -148, 0, -148, + -148, -148, -148, -148, -148, 0, -148, 0, 0, -148, + -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, + -148, -148, -148, -148, -148, -149, 0, -609, 0, 0, + 0, 0, 0, 0, -149, 0, 0, 0, 0, -149, + -149, 0, 0, 0, -149, 0, 0, -149, -149, -149, + -149, 0, 0, 0, -149, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -149, + -149, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -149, -149, 0, 0, 0, 0, -149, -149, + -149, -149, -149, 0, 0, 0, 0, 0, 0, 0, + -149, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -149, 0, -149, -149, -149, -149, -149, -149, 0, -149, + 0, 0, -149, -149, -149, -149, -149, -149, -149, -149, + -149, -149, -149, -149, -149, -149, -149, -149, -150, 0, + -606, 0, 0, 0, 0, 0, 0, -150, 0, 0, + 0, 0, -150, -150, 0, 0, 0, -150, 0, 0, + -150, -150, -150, -150, 0, 0, 0, -150, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -150, -150, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -150, -150, 0, 0, 0, + 0, -150, -150, -150, -150, -150, 0, 0, 0, 0, + 0, 0, 0, -150, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -150, 0, -150, -150, -150, -150, -150, + -150, 0, -150, 0, 0, -150, -150, -150, -150, -150, + -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, + -150, 103, 0, -605, 0, 0, 0, 0, 0, 0, + 104, 0, 0, 0, 0, 105, 106, 0, 0, 0, + 107, 0, 0, 356, 440, 357, 358, 0, 0, 0, + 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 360, 361, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 362, 363, + 0, 0, 0, 0, 108, 109, 110, 111, 112, 0, + 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 113, 0, 114, 115, + 116, 117, 118, 119, 0, 120, 0, 0, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, -573, 0, 441, 0, 0, 0, + 0, 0, 0, -573, 0, 0, 0, 0, -573, -573, + 0, 0, 0, -573, 0, 0, 0, 0, 0, 0, + -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, + -573, -573, 0, -573, -573, -573, -573, -573, -573, -573, + -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, + -573, 0, 0, 0, 0, 0, -573, -573, -573, -573, + -573, -573, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 0, 0, 0, 0, 9, 0, 0, -573, -573, + 156, -573, -573, -573, -573, -573, -573, 11, -573, 0, + 0, -573, -573, -573, -573, -573, -573, -573, -573, -573, + -573, -573, -573, -573, -573, -573, -573, 103, 1, 2, + 3, 4, 5, 6, 7, 8, 104, 0, 0, 0, + 0, 705, 106, 610, 0, 0, 706, 611, 0, 612, + 0, 613, 358, 11, 0, 0, 615, 0, 0, 0, + 0, 157, 61, 62, 63, 64, 0, 0, 0, 0, + 0, 360, 361, 162, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 362, 363, 0, 0, 0, 0, + 108, 109, 110, 111, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 61, 62, + 63, 64, 113, 0, 114, 115, 116, 117, 118, 119, + 0, 120, 0, 0, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 103, 0, 0, 0, 0, 0, 0, 0, 0, 104, + 0, 0, 0, 0, 105, 106, 683, 684, 685, 107, + 611, 0, 612, 440, 613, 358, 0, 0, 0, 615, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 360, 361, 162, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 362, 363, 0, + 0, 0, 0, 108, 109, 110, 111, 112, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 113, 0, 114, 115, 116, + 117, 118, 119, 0, 120, 0, 0, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 104, 0, 0, 0, 0, 105, 106, 774, + 0, 0, 107, 611, 0, 612, 0, 613, 358, 0, + 0, 0, 615, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 153, 0, 0, 360, 361, 162, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 362, 363, 0, 0, 0, 0, 108, 109, 110, 111, + 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 775, + 776, 115, 116, 117, 118, 119, 0, 120, 0, 0, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 777, + 131, 132, 133, 134, 135, 136, 103, 0, 0, 0, + 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, + 105, 106, 610, 0, 0, 107, 611, 0, 612, 0, + 613, 358, 0, 0, 0, 615, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 153, 0, 0, + 360, 361, 162, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 362, 363, 0, 0, 853, 0, 108, + 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 113, 0, 114, 115, 116, 117, 118, 119, 0, + 120, 0, 0, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 103, + 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, + 0, 0, 0, 105, 106, 610, 0, 0, 107, 611, + -624, 612, 0, 613, 358, 0, 0, 0, 615, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 153, 0, 0, 360, 361, 162, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 362, 363, 0, 0, + 0, 0, 108, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 113, 0, 114, 115, 116, 117, + 118, 119, 0, 120, 0, 0, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 103, 0, 0, 0, 0, 0, 0, 0, + 0, 104, 0, 0, 0, 0, 105, 106, 610, 0, + 0, 107, 611, 0, 612, 0, 613, 358, 0, 0, + 0, 615, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 153, 0, 0, 360, 361, 162, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, + 363, 0, 0, 0, 0, 108, 109, 110, 111, 112, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 113, 0, 114, + 115, 116, 117, 118, 119, 0, 120, 0, 0, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 104, 0, 0, 0, 0, 105, + 106, 774, 0, 0, 107, 611, 0, 612, 0, 613, + 358, 0, 0, 0, 615, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, + 361, 162, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 362, 363, 0, 0, 0, 0, 108, 109, + 110, 111, 112, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 775, 776, 115, 116, 117, 118, 119, 0, 120, + 0, 0, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 777, 131, 132, 133, 134, 135, 136, 103, 0, + 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, + 0, 0, 105, 106, 610, 0, 0, 107, 611, 0, + 612, 0, 613, 358, 0, 0, 0, 615, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 360, 361, 162, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 362, 363, 0, 0, 0, + 0, 108, 109, 110, 111, 112, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 113, 0, 114, 115, 116, 117, 118, + 119, 0, 120, 0, 0, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 103, 0, 0, 0, 0, 0, 0, 0, 0, + 104, 0, 0, 0, 0, 105, 106, 0, 0, 0, + 107, 0, 0, 356, 0, 357, 358, 0, 0, 0, + 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 360, 361, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 362, 363, + 0, 0, 0, 0, 108, 109, 110, 111, 112, 0, + 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 113, 0, 114, 115, + 116, 117, 118, 119, 0, 120, 0, 0, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 103, 0, 0, 0, 0, 0, + 0, 0, 0, 104, 0, 0, 0, 0, 105, 106, + 0, 0, 0, 107, 0, 0, 0, 0, 0, 0, + 11, 0, 0, -516, 0, 0, 0, 0, 1, 2, + 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, + 162, 9, 0, 0, 0, 0, 60, 0, 0, 0, + 446, 447, 0, 0, 0, 0, 0, 108, 109, 110, + 111, 112, 0, 0, 0, 0, 0, 0, 449, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 113, + 0, 114, 115, 116, 117, 118, 119, 0, 120, 0, + 0, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 103, 61, 62, + 63, 0, 0, 0, 0, 0, 104, 0, 0, 0, + 0, 105, 106, 0, 0, 664, 107, 0, 0, 0, + 0, 0, 0, 11, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 0, 162, 0, 0, 0, 474, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 108, 109, 110, 111, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 64, 113, 0, 114, 115, 116, 117, 118, 119, + 0, 120, 0, 0, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 103, 0, 0, 0, 0, 0, 0, 0, 0, 104, + 0, 764, 0, 0, 105, 106, 0, 0, 0, 107, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, 0, 0, + 0, 0, 0, 711, 0, 0, 162, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 108, 109, 110, 111, 112, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 113, 0, 114, 115, 116, + 117, 118, 119, 0, 120, 0, 0, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 104, 0, 0, 0, 0, 105, 106, 0, + 0, 0, 107, 0, 903, 0, 0, 0, 0, 0, + 0, 0, 452, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, + 473, 0, 0, 0, 0, 0, 711, 0, 0, 0, + 0, 0, 103, 0, 0, 0, 108, 109, 110, 111, + 112, 104, 0, 0, 0, 0, 105, 106, 0, 0, + 0, 107, 0, 0, 0, 0, 0, 0, 113, 0, + 114, 115, 116, 117, 118, 119, 0, 120, 0, 0, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 0, 0, 0, 0, + 0, 0, 0, 740, 0, 108, 109, 110, 111, 112, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 113, 0, 114, + 115, 116, 117, 118, 119, 0, 120, 0, 0, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 104, 0, 0, 870, 0, 790, + 106, 0, 0, 0, 107, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 0, 0, 0, 0, 0, 711, 0, + 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 108, 109, + 110, 111, 112, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 0, 114, 115, 116, 117, 118, 119, 0, 120, + 0, 0, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 103, 0, + 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, + 0, 0, 105, 106, 0, 0, 0, 107, 0, 0, + 0, 0, 749, 0, 0, 0, 0, 0, 813, 456, + 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 469, 470, 471, 472, 473, 0, 0, 0, + 0, 0, 474, 0, 0, 0, 0, 103, 0, 0, + 0, 108, 109, 110, 111, 112, 104, 0, 0, 0, + 0, 105, 106, 0, 0, 0, 107, 0, 0, 0, + 0, 0, 0, 113, 0, 114, 115, 116, 117, 118, + 119, 0, 120, 0, 0, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 0, 0, 0, 0, 0, 103, 0, 834, 0, + 108, 109, 110, 111, 112, 104, 0, 0, 0, 0, + 105, 106, 0, 0, 0, 107, 0, 0, 0, 0, + 0, 0, 113, 0, 114, 115, 116, 117, 118, 119, + 0, 120, 0, 0, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, + 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 113, 0, 114, 115, 116, 117, 118, 119, 0, + 120, 0, 0, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 811, + 0, 0, 0, 0, 0, 0, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, + 470, 471, 472, 473, 0, 0, 0, 710, 0, 711, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, 0, 0, + 0, 0, 0, 711, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 0, 0, 0, 0, 0, 474, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, + 468, 469, 470, 471, 472, 473, 0, 0, 0, 0, + 0, 711, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, + 0, 0, 0, 0, 0, 474, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, + 470, 471, 472, 473, 0, 0, 0, 0, 0, 711 }; static const short int yycheck[] = { - 33, 22, 11, 128, 0, 9, 64, 199, 9, 132, - 19, 454, 16, 17, 18, 15, 132, 402, 10, 378, - 144, 145, 146, 15, 399, 349, 399, 402, 159, 185, - 186, 27, 33, 454, 405, 709, 167, 360, 361, 49, - 0, 685, 744, 32, 746, 709, 709, 15, 739, 341, - 10, 10, 26, 375, 37, 347, 31, 24, 33, 34, - 49, 21, 21, 64, 24, 25, 25, 27, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 25, 9, - 31, 11, 17, 208, 26, 36, 788, 22, 35, 411, - 31, 33, 96, 757, 35, 36, 105, 64, 102, 103, - 104, 765, 765, 427, 31, 32, 430, 34, 26, 92, - 93, 94, 95, 96, 124, 98, 99, 121, 44, 4, - 5, 6, 6, 0, 9, 9, 817, 131, 132, 133, - 134, 135, 133, 32, 192, 34, 136, 22, 142, 431, - 31, 463, 33, 34, 136, 119, 790, 17, 18, 84, - 85, 86, 153, 31, 35, 36, 34, 32, 450, 451, - 804, 26, 27, 854, 125, 165, 199, 32, 136, 173, - 32, 845, 36, 165, 17, 18, 35, 36, 880, 44, - 36, 845, 826, 187, 87, 189, 6, 7, 8, 32, - 30, 192, 856, 185, 186, 33, 34, 165, 158, 158, - 864, 864, 876, 49, 164, 164, 33, 34, 651, 33, - 34, 37, 876, 656, 585, 4, 5, 6, 341, 32, - 9, 33, 34, 31, 347, 341, 134, 135, 35, 23, - 651, 347, 36, 22, 31, 656, 367, 881, 23, 23, - 110, 111, 112, 113, 114, 115, 36, 23, 36, 32, - 609, 38, 6, 612, 32, 118, 31, 100, 101, 102, + 10, 22, 33, 87, 183, 15, 182, 183, 33, 0, + 16, 17, 18, 15, 33, 102, 91, 190, 421, 91, + 34, 397, 424, 477, 421, 396, 310, 424, 377, 378, + 80, 151, 701, 477, 367, 427, 27, 726, 409, 159, + 90, 726, 726, 394, 755, 15, 759, 310, 761, 26, + 137, 49, 0, 140, 29, 61, 62, 63, 33, 26, + 26, 29, 10, 24, 29, 33, 33, 29, 33, 189, + 17, 18, 44, 21, 80, 359, 24, 25, 31, 27, + 125, 365, 433, 36, 94, 91, 92, 93, 25, 0, + 10, 776, 94, 806, 100, 36, 26, 27, 35, 784, + 784, 21, 32, 64, 3, 25, 9, 6, 11, 442, + 32, 10, 87, 12, 44, 33, 34, 65, 451, 87, + 6, 454, 87, 9, 94, 87, 124, 32, 839, 34, + 4, 5, 6, 484, 32, 9, 4, 5, 6, 808, + 36, 9, 119, 406, 31, 65, 31, 157, 22, 31, + 35, 36, 34, 30, 22, 157, 32, 826, 36, 190, + 35, 167, 23, 110, 111, 112, 113, 114, 115, 880, + 36, 455, 182, 183, 31, 32, 31, 34, 184, 35, + 36, 850, 871, 6, 7, 8, 871, 157, 35, 36, + 474, 475, 17, 18, 31, 908, 33, 34, 883, 33, + 34, 31, 150, 33, 34, 36, 891, 891, 156, 33, + 34, 33, 34, 23, 606, 904, 32, 33, 672, 904, + 33, 34, 6, 677, 17, 18, 38, 311, 672, 32, + 150, 33, 34, 677, 32, 310, 156, 31, 310, 32, + 31, 910, 92, 93, 32, 35, 32, 4, 5, 6, + 7, 8, 9, 10, 11, 631, 36, 40, 634, 31, + 17, 37, 31, 383, 615, 22, 6, 618, 49, 32, + 26, 26, 29, 34, 40, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 359, 636, 34, 359, 34, 660, + 365, 32, 22, 365, 32, 39, 32, 64, 37, 64, + 350, 477, 31, 40, 310, 40, 31, 100, 101, 102, 103, 104, 105, 106, 107, 108, 92, 93, 94, 95, - 96, 593, 98, 99, 596, 31, 35, 32, 31, 36, - 40, 4, 5, 6, 7, 8, 9, 10, 11, 32, - 31, 31, 614, 6, 17, 26, 34, 34, 454, 22, - 3, 40, 34, 6, 33, 32, 29, 10, 431, 12, - 13, 14, 15, 16, 17, 431, 22, 32, 39, 377, - 64, 645, 64, 37, 648, 649, 31, 450, 451, 40, - 33, 389, 40, 31, 450, 451, 711, 341, 711, 32, - 24, 40, 346, 347, 32, 34, 32, 25, 4, 5, - 6, 7, 8, 9, 10, 11, 389, 31, 33, 35, - 364, 84, 85, 86, 87, 398, 22, 400, 91, 402, - 33, 3, 694, 695, 6, 33, 377, 31, 10, 388, - 12, 13, 14, 15, 16, 17, 387, 709, 389, 33, - 35, 33, 33, 33, 753, 754, 33, 401, 33, 33, - 123, 34, 33, 461, 34, 92, 93, 94, 95, 96, - 414, 98, 99, 417, 34, 424, 35, 740, 741, 40, - 32, 32, 455, 456, 428, 34, 748, 431, 84, 85, - 86, 806, 109, 806, 33, 33, 25, 593, 35, 32, - 732, 733, 32, 765, 31, 33, 450, 451, 31, 834, - 97, 33, 776, 777, 454, 611, 35, 25, 454, 834, - 461, 34, 454, 33, 31, 34, 25, 33, 24, 791, - 34, 793, 32, 848, 97, 848, 34, 32, 25, 33, - 32, 803, 857, 33, 4, 5, 6, 7, 8, 9, - 10, 11, 34, 34, 33, 651, 32, 17, 35, 33, - 656, 34, 22, 17, 18, 33, 25, 33, 883, 29, - 883, 32, 331, 131, 27, 33, 891, 37, 33, 791, - 656, 651, 844, 845, 716, 24, 165, 39, 181, 583, - 166, 186, 611, 363, 658, 659, 783, 615, 424, 21, - 97, 746, 864, 876, 4, 5, 6, 7, 8, 9, - 10, 11, 370, 398, 876, 756, 856, 17, 800, 891, - 718, -1, 22, -1, 84, 85, 86, 87, -1, 29, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 639, -1, -1, -1, -1, 100, 101, 102, 103, - 104, 105, 106, 107, 108, -1, -1, 601, -1, -1, - -1, 121, 606, -1, 637, -1, 607, -1, -1, 732, - 733, 615, -1, -1, -1, -1, 732, 733, -1, 611, - -1, -1, 655, -1, 84, 85, 86, 87, -1, -1, - -1, -1, -1, -1, 638, -1, -1, -1, 639, 4, - 5, 6, 7, 8, 9, 10, 11, -1, -1, 774, - -1, 651, 17, 657, 655, 651, 656, 22, 662, 651, - 656, 121, -1, -1, 656, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 688, - 713, -1, -1, 716, -1, -1, 719, -1, -1, -1, - 3, -1, -1, -1, 715, 699, -1, -1, -1, 12, - -1, 702, -1, -1, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, 718, -1, -1, -1, -1, 84, - 85, 86, -1, -1, -1, -1, -1, -1, 732, 733, - -1, -1, -1, -1, -1, 768, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 781, -1, - -1, 784, 785, 66, 67, 68, 69, 70, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 800, -1, 790, - -1, 775, -1, -1, -1, 88, -1, 90, 91, 92, - 93, 94, 95, 30, 97, -1, -1, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, -1, -1, -1, 839, -1, 121, -1, - 123, 124, 845, -1, -1, -1, -1, -1, -1, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, -1, 79, 80, 81, 82, -1, -1, -1, -1, - -1, 0, -1, 876, 3, 4, 5, 6, 7, 8, + 96, 32, 98, 99, 24, 728, 40, 84, 85, 86, + 87, 728, 31, 666, 91, 32, 669, 670, 32, 34, + 92, 93, 94, 95, 96, 716, 98, 99, 33, 33, + 33, 25, 31, 359, 35, 35, 33, 33, 364, 365, + 711, 712, 33, 64, 34, 37, 123, 34, 34, 32, + 35, 396, 40, 32, 34, 726, 109, 33, 409, 33, + 455, 25, 35, 455, 409, 32, 31, 33, 31, 420, + 409, 422, 33, 424, 770, 32, 772, 773, 33, 474, + 475, 97, 474, 475, 33, 35, 25, 756, 757, 34, + 31, 33, 763, 33, 24, 32, 34, 423, 33, 32, + 92, 93, 94, 95, 96, 828, 98, 99, 34, 34, + 32, 828, 438, 784, 448, 97, 33, 32, 25, 615, + 25, 33, 35, 34, 34, 33, 452, 478, 479, 455, + 33, 630, 32, 34, 630, 33, 858, 633, 809, 25, + 811, 858, 795, 796, 748, 749, 33, 477, 474, 475, + 33, 874, 848, 32, 825, 477, 33, 874, 33, 27, + 809, 3, 157, 677, 6, 672, 477, 884, 10, 40, + 12, 13, 14, 15, 16, 17, 672, 158, 604, 24, + 178, 677, 633, 802, 637, 448, 21, 380, 761, 912, + 168, 33, 19, 904, 386, 912, 420, 775, 883, 870, + 871, 921, 822, 735, 921, 4, 5, 6, 7, 8, + 9, 10, 11, 909, -1, -1, -1, -1, 17, -1, + 891, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 904, -1, -1, -1, -1, -1, -1, + 733, -1, 41, -1, -1, -1, 4, 5, 6, 7, + 8, 9, 10, 11, -1, -1, -1, -1, -1, 17, + -1, -1, -1, -1, 22, -1, -1, 3, 767, -1, + 6, 767, 679, 680, 10, -1, 12, 13, 14, 15, + 16, 17, -1, -1, 83, 84, 85, 86, 87, 88, + 89, -1, 91, -1, -1, -1, -1, -1, 624, -1, + 630, -1, -1, 633, -1, -1, 657, -1, -1, -1, + -1, 637, -1, -1, -1, 660, -1, 116, -1, -1, + -1, -1, 121, -1, 123, 676, 84, 85, 86, -1, + -1, 676, 658, -1, -1, -1, -1, 676, -1, -1, + -1, -1, 672, -1, -1, -1, -1, 677, -1, -1, + 672, -1, 678, 748, 749, 677, 748, 749, -1, -1, + -1, 672, -1, -1, -1, -1, 677, -1, 707, -1, + -1, 716, -1, -1, -1, -1, -1, -1, -1, 730, + -1, -1, 733, 882, -1, 736, 882, -1, -1, 793, + -1, 732, 4, 5, 6, 7, 8, 9, 10, 11, + -1, -1, -1, -1, -1, 17, -1, -1, -1, 735, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, -1, 748, 749, -1, -1, 4, 5, 6, 7, + 8, 9, 10, 11, -1, -1, 787, 767, -1, 17, + 30, -1, -1, 769, 22, -1, -1, -1, -1, 800, + -1, 29, 803, 804, -1, -1, -1, -1, -1, 37, + -1, -1, -1, -1, -1, -1, -1, 808, 794, -1, + -1, 822, 84, 85, 86, 87, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, -1, 79, + 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, 87, + 31, 123, 863, -1, -1, -1, -1, -1, -1, -1, + 871, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, + -1, -1, -1, 121, 65, -1, -1, -1, -1, -1, + -1, 0, 882, 904, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, @@ -1222,7 +1622,7 @@ static const short int yycheck[] = 79, -1, 81, -1, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, -1, 118, + 109, 110, 111, 112, 113, 114, 115, 116, -1, -1, 119, -1, 121, 122, 123, 124, 125, 0, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, @@ -1263,55 +1663,452 @@ static const short int yycheck[] = 111, 112, 113, 114, 115, 116, 3, -1, 119, -1, 121, 122, 123, 124, 125, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, + 27, 28, 29, -1, -1, 32, -1, -1, -1, -1, + 4, 5, 6, 7, 8, 9, 10, 11, -1, -1, + 47, 48, 49, 17, -1, -1, -1, -1, 22, -1, + -1, -1, -1, 60, 61, 29, -1, -1, -1, 66, + 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 87, 88, -1, 90, 91, 92, 93, 94, 95, -1, + 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, -1, + 84, 85, 86, 87, -1, -1, -1, 124, 4, 5, + 6, 7, 8, 9, 10, 11, -1, -1, -1, -1, + -1, 17, -1, -1, -1, -1, 22, -1, -1, 3, + -1, -1, -1, 29, -1, -1, -1, 121, 12, -1, + -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, + -1, 25, 26, 27, 28, -1, -1, -1, 32, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 60, 61, 84, 85, + 86, 87, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, + 94, 95, -1, 97, -1, 121, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 3, -1, 118, -1, -1, -1, -1, -1, + -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, + -1, 22, -1, -1, 25, 26, 27, 28, -1, -1, + -1, 32, -1, -1, -1, -1, -1, -1, 4, 5, + 6, 7, 8, 9, 10, 11, 47, 48, -1, -1, + -1, 17, -1, -1, -1, -1, 22, -1, -1, 60, + 61, -1, -1, 29, -1, 66, 67, 68, 69, 70, + -1, -1, -1, -1, -1, -1, -1, 78, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 3, -1, 118, 84, 85, + 86, 87, -1, -1, 12, -1, -1, -1, -1, 17, + 18, -1, -1, -1, 22, -1, -1, 25, 26, 27, + 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, + -1, 4, 5, 6, 7, 8, 9, 10, 11, 47, + 48, -1, -1, -1, 17, -1, -1, -1, -1, 22, + -1, -1, 60, 61, -1, -1, 29, -1, 66, 67, + 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, + 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, + -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, + 118, 84, 85, 86, 87, -1, -1, 12, -1, -1, + -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, + 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, + -1, -1, -1, -1, 4, 5, 6, 7, 8, 9, + 10, 11, 47, 48, -1, -1, -1, 17, -1, -1, + -1, -1, 22, -1, -1, 60, 61, -1, -1, 29, + -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, + 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 3, -1, 118, 84, 85, 86, 87, -1, -1, + 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, + 22, -1, -1, 25, 26, 27, 28, -1, -1, -1, + 32, -1, -1, -1, -1, -1, -1, 4, 5, 6, + 7, 8, 9, 10, 11, 47, 48, -1, -1, -1, + 17, -1, -1, -1, -1, 22, -1, -1, 60, 61, + -1, -1, 29, -1, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, 78, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, + 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 3, -1, 118, 84, 85, 86, + 87, -1, -1, 12, -1, -1, -1, -1, 17, 18, + -1, -1, -1, 22, -1, -1, 25, 26, 27, 28, + -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 47, 48, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, + 69, 70, -1, -1, -1, -1, -1, -1, -1, 78, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, + -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 3, -1, 118, + -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, + -1, 17, 18, -1, -1, -1, 22, -1, -1, 25, + 26, 27, 28, -1, -1, -1, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, + 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, + -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, + -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 3, -1, 118, -1, -1, -1, -1, -1, -1, 12, + -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, + -1, -1, 25, 26, 27, 28, -1, -1, -1, 32, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, + 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 3, -1, 118, -1, -1, -1, -1, + -1, -1, 12, -1, -1, -1, -1, 17, 18, -1, + -1, -1, 22, -1, -1, 25, 26, 27, 28, -1, + -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, + 70, -1, -1, -1, -1, -1, -1, -1, 78, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 3, -1, 118, -1, + -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, + 17, 18, -1, -1, -1, 22, -1, -1, 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, -1, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, + 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, + -1, 118, -1, -1, -1, -1, -1, -1, 12, -1, + -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, + -1, 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, + -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, + 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 3, -1, 118, -1, -1, -1, -1, -1, + -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, + -1, 22, -1, -1, 25, 26, 27, 28, -1, -1, + -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, + 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, + -1, -1, -1, -1, -1, -1, -1, 78, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 3, -1, 118, -1, -1, + -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, + 18, -1, -1, -1, 22, -1, -1, 25, 26, 27, + 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, + 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, + 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, + -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, + 118, -1, -1, -1, -1, -1, -1, 12, -1, -1, + -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, + 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 47, 48, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, + -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, + 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 3, -1, 118, -1, -1, -1, -1, -1, -1, + 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, + 22, -1, -1, 25, 26, 27, 28, -1, -1, -1, + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, + -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, 78, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, + 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 3, -1, 118, -1, -1, -1, + -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, + -1, -1, -1, 22, -1, -1, 25, 26, 27, 28, + -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 47, 48, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, + 69, 70, -1, -1, -1, -1, -1, -1, -1, 78, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, + -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 3, -1, 118, + -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, + -1, 17, 18, -1, -1, -1, 22, -1, -1, 25, + 26, 27, 28, -1, -1, -1, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, + 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, + -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, + -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 3, -1, 118, -1, -1, -1, -1, -1, -1, 12, + -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, + -1, -1, 25, 26, 27, 28, -1, -1, -1, 32, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, + 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 3, -1, 118, -1, -1, -1, -1, + -1, -1, 12, -1, -1, -1, -1, 17, 18, -1, + -1, -1, 22, -1, -1, 25, 26, 27, 28, -1, + -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, + 70, -1, -1, -1, -1, -1, -1, -1, 78, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 3, -1, 118, -1, + -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, + 17, 18, -1, -1, -1, 22, -1, -1, 25, 26, + 27, 28, -1, -1, -1, 32, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, + 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, + 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, + -1, 118, -1, -1, -1, -1, -1, -1, 12, -1, + -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, + -1, 25, 26, 27, 28, -1, -1, -1, 32, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, + -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, + 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 3, -1, 118, -1, -1, -1, -1, -1, + -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, + -1, 22, -1, -1, 25, 26, 27, 28, -1, -1, + -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, + 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, + -1, -1, -1, -1, -1, -1, -1, 78, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 3, -1, 118, -1, -1, + -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, + 18, -1, -1, -1, 22, -1, -1, 25, 26, 27, + 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, + 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, + 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, + -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, + 118, -1, -1, -1, -1, -1, -1, 12, -1, -1, + -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, + 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 47, 48, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, + -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, + 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 3, -1, 118, -1, -1, -1, -1, -1, -1, + 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, + 22, -1, -1, 25, 26, 27, 28, -1, -1, -1, + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, + -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, 78, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, + 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 3, -1, 118, -1, -1, -1, + -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, + -1, -1, -1, 22, -1, -1, 25, 26, 27, 28, + -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 47, 48, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, + 69, 70, -1, -1, -1, -1, -1, -1, -1, 78, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, + -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 3, -1, 118, + -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, + -1, 17, 18, -1, -1, -1, 22, -1, -1, 25, + 26, 27, 28, -1, -1, -1, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, + 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, + -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, + -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 3, -1, 118, -1, -1, -1, -1, -1, -1, 12, + -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, + -1, -1, 25, 26, 27, 28, -1, -1, -1, 32, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, + 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 3, -1, 118, -1, -1, -1, -1, + -1, -1, 12, -1, -1, -1, -1, 17, 18, -1, + -1, -1, 22, -1, -1, 25, 26, 27, 28, -1, + -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, + 70, -1, -1, -1, -1, -1, -1, -1, 78, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 3, -1, 118, -1, + -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, + 17, 18, -1, -1, -1, 22, -1, -1, 25, 26, + 27, 28, -1, -1, -1, 32, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, + 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 4, - 5, 6, 7, 8, 9, 10, 11, 124, -1, -1, - -1, -1, 17, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, 30, 31, 4, 5, 6, - 7, 8, 9, 10, 11, -1, 41, -1, -1, -1, - 17, -1, -1, -1, -1, 22, -1, -1, -1, -1, - -1, -1, 29, -1, -1, -1, -1, 4, 5, 6, - 7, 8, 9, 10, 11, -1, -1, -1, -1, -1, - 17, -1, -1, -1, -1, 22, -1, -1, 83, 84, - 85, 86, 87, 88, 89, -1, 91, 4, 5, 6, - 7, 8, 9, 10, 11, -1, -1, -1, -1, -1, - 17, -1, -1, -1, -1, 22, -1, 84, 85, 86, - 87, 116, 29, -1, -1, -1, 121, -1, 123, -1, - -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 84, 85, 86, - -1, 17, 18, 19, 121, -1, 22, 23, -1, 25, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, + -1, 118, -1, -1, -1, -1, -1, -1, 12, -1, + -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, + -1, 25, 26, 27, 28, -1, -1, -1, 32, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, + -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, + 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 3, -1, 118, -1, -1, -1, -1, -1, + -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, + -1, 22, -1, -1, 25, 26, 27, 28, -1, -1, + -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, + 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, + -1, -1, -1, -1, -1, -1, -1, 78, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 3, -1, 118, -1, -1, + -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, + 18, -1, -1, -1, 22, -1, -1, 25, 26, 27, + 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, + 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, + 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, + -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, + 118, -1, -1, -1, -1, -1, -1, 12, -1, -1, + -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, + 25, 26, 27, 28, -1, -1, -1, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 47, 48, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, + -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, + 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 3, -1, 118, -1, -1, -1, -1, -1, -1, + 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, + 22, -1, -1, 25, 26, 27, 28, -1, -1, -1, + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, + -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, 78, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, + 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 3, -1, 118, -1, -1, -1, + -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, -1, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, + 69, 70, 4, 5, 6, 7, 8, 9, 10, 11, + -1, -1, -1, -1, -1, 17, -1, -1, 87, 88, + 22, 90, 91, 92, 93, 94, 95, 29, 97, -1, + -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, + -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, 27, 28, 29, -1, -1, 32, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, - 87, 47, 48, 49, -1, -1, -1, -1, -1, -1, + -1, 83, 84, 85, 86, 87, -1, -1, -1, -1, + -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 121, -1, -1, -1, 84, 85, + -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, 87, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, 20, 21, 22, 23, -1, 25, 26, 27, 28, -1, -1, -1, 32, - -1, -1, -1, -1, -1, 4, 5, 6, 7, 8, - 9, 10, 11, -1, 47, 48, 49, -1, 17, -1, - -1, -1, -1, 22, -1, -1, -1, 60, 61, -1, - 29, -1, -1, 66, 67, 68, 69, 70, 4, 5, - 6, 7, 8, 9, 10, 11, -1, -1, -1, -1, - -1, 17, -1, -1, -1, 88, 22, 90, 91, 92, - 93, 94, 95, 29, 97, -1, -1, 100, 101, 102, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, + 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 3, 83, 84, 85, 86, 87, -1, + 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, 27, 28, -1, - -1, -1, 32, -1, -1, -1, -1, -1, 84, 85, - 86, 87, -1, -1, 44, -1, -1, 47, 48, 49, + -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1325,38 +2122,38 @@ static const short int yycheck[] = -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, 64, -1, 66, - 67, 68, 69, 70, 4, 5, 6, 7, 8, 9, - 10, 11, -1, -1, -1, -1, -1, 17, -1, -1, - -1, 88, 22, 90, 91, 92, 93, 94, 95, 29, + 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, 24, 25, -1, 27, 28, -1, -1, -1, 32, -1, - -1, -1, -1, -1, 84, 85, 86, 87, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, - -1, -1, 66, 67, 68, 69, 70, 4, 5, 6, - 7, 8, 9, 10, 11, -1, -1, -1, -1, -1, - 17, -1, -1, -1, 88, 22, 90, 91, 92, 93, - 94, 95, 29, 97, -1, -1, 100, 101, 102, 103, + -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, + 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, 27, 28, -1, -1, - -1, 32, -1, -1, -1, -1, -1, 84, 85, 86, - 87, -1, -1, 44, -1, -1, 47, 48, 49, -1, + -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, - 4, 5, 6, 7, 8, 9, 10, 11, -1, -1, - -1, -1, -1, 17, -1, -1, -1, 88, 22, 90, - 91, 92, 93, 94, 95, 29, 97, -1, -1, 100, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, 27, 28, -1, -1, -1, 32, -1, -1, -1, -1, -1, - 84, 85, 86, 87, -1, -1, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, @@ -1367,18 +2164,18 @@ static const short int yycheck[] = -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, 19, -1, -1, 22, 23, -1, 25, -1, 27, 28, -1, -1, -1, 32, -1, -1, - -1, -1, 4, 5, 6, 7, 8, 9, 10, 11, - -1, -1, 47, 48, 49, 17, -1, -1, -1, -1, - 22, -1, -1, -1, -1, 60, 61, 29, -1, -1, - -1, 66, 67, 68, 69, 70, 4, 5, 6, 7, - 8, 9, 10, 11, -1, -1, -1, -1, -1, 17, - -1, -1, -1, 88, 22, 90, 91, 92, 93, 94, - 95, 29, 97, -1, -1, 100, 101, 102, 103, 104, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, + -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, + 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 3, 84, 85, 86, 87, -1, -1, -1, -1, + 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, 25, -1, 27, 28, -1, -1, -1, - 32, -1, -1, -1, -1, -1, 84, 85, 86, 87, + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, @@ -1389,31 +2186,31 @@ static const short int yycheck[] = 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 32, -1, -1, -1, -1, 4, 5, + 29, -1, -1, 32, -1, -1, -1, -1, 4, 5, 6, 7, 8, 9, 10, 11, -1, -1, -1, -1, - 49, -1, -1, -1, -1, -1, 22, -1, -1, -1, + 49, 17, -1, -1, -1, -1, 22, -1, -1, -1, 26, 27, -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, 44, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + -1, -1, -1, -1, -1, -1, -1, -1, 87, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, 84, 85, 86, -1, -1, -1, -1, -1, 12, -1, -1, -1, - -1, 17, 18, -1, -1, -1, 22, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, + -1, 17, 18, -1, -1, 33, 22, -1, -1, -1, + -1, -1, -1, 29, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, -1, 49, -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, + -1, 87, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, 12, - 31, -1, -1, -1, 17, 18, -1, -1, -1, 22, - -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, - -1, -1, -1, -1, 65, -1, 49, -1, -1, -1, + -1, 33, -1, -1, 17, 18, -1, -1, -1, 22, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, + -1, -1, -1, 65, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1426,81 +2223,67 @@ static const short int yycheck[] = -1, -1, 32, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, - 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + -1, -1, 3, -1, -1, -1, 66, 67, 68, 69, + 70, 12, -1, -1, -1, -1, 17, 18, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 3, -1, -1, -1, - -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, - 17, 18, -1, -1, -1, 22, -1, 33, -1, -1, - -1, -1, -1, -1, -1, 32, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, -1, -1, -1, -1, -1, 65, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, - 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, + 110, 111, 112, 113, 114, 115, -1, -1, -1, -1, + -1, -1, -1, 64, -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, - 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 3, - -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, - -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, - 33, -1, -1, -1, -1, -1, -1, -1, 32, 42, + -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, + 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 3, -1, -1, -1, -1, + -1, -1, -1, -1, 12, -1, -1, 34, -1, 17, + 18, -1, -1, -1, 22, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, -1, -1, -1, -1, -1, 65, -1, + -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, + -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 3, -1, + -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, + -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, + -1, -1, 35, -1, -1, -1, -1, -1, 33, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, - -1, -1, 65, -1, -1, -1, -1, -1, 3, -1, - -1, -1, 66, 67, 68, 69, 70, 12, -1, -1, - -1, -1, 17, 18, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, - 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, -1, -1, -1, -1, -1, -1, -1, 64, - -1, 66, 67, 68, 69, 70, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 65, -1, -1, -1, -1, 3, -1, -1, + -1, 66, 67, 68, 69, 70, 12, -1, -1, -1, + -1, 17, 18, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 3, -1, -1, -1, -1, -1, -1, -1, -1, - 12, -1, -1, 34, -1, 17, 18, -1, -1, -1, - 22, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, - -1, -1, -1, -1, 65, -1, -1, 49, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, -1, -1, -1, 66, 67, 68, 69, 70, 12, - -1, -1, -1, -1, 17, 18, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, -1, 97, -1, -1, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, -1, -1, -1, -1, -1, 3, - -1, 64, -1, 66, 67, 68, 69, 70, 12, -1, - -1, -1, -1, 17, 18, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 88, -1, 90, 91, 92, - 93, 94, 95, -1, 97, -1, -1, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + 115, -1, -1, -1, -1, -1, 3, -1, 64, -1, + 66, 67, 68, 69, 70, 12, -1, -1, -1, -1, + 17, 18, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 88, -1, 90, 91, 92, 93, 94, 95, + -1, 97, -1, -1, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, + 67, 68, 69, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 88, -1, 90, 91, 92, 93, - 94, 95, -1, 97, -1, -1, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 35, -1, -1, -1, -1, -1, -1, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 35, -1, -1, - -1, -1, 65, -1, 42, 43, 44, 45, 46, 47, + -1, 88, -1, 90, 91, 92, 93, 94, 95, -1, + 97, -1, -1, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 35, + -1, -1, -1, -1, -1, -1, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, -1, -1, -1, 39, -1, 65, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, + -1, -1, -1, 65, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, -1, -1, -1, 39, -1, 65, 42, 43, + 58, 59, -1, -1, -1, -1, -1, 65, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, 65, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, 65, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, -1, -1, -1, -1, -1, 65, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, -1, -1, - -1, -1, -1, 65, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, -1, -1, -1, -1, -1, 65 + 56, 57, 58, 59, -1, -1, -1, -1, -1, 65 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1510,93 +2293,96 @@ static const unsigned short int yystos[] = 0, 4, 5, 6, 7, 8, 9, 10, 11, 17, 22, 29, 30, 31, 41, 83, 84, 85, 86, 87, 88, 89, 91, 116, 121, 123, 146, 147, 148, 149, - 150, 168, 173, 178, 179, 180, 181, 182, 183, 184, - 185, 190, 193, 196, 200, 201, 202, 203, 204, 205, - 209, 211, 212, 218, 226, 238, 239, 9, 11, 3, - 12, 17, 18, 22, 32, 49, 66, 67, 68, 69, - 70, 88, 90, 91, 92, 93, 94, 95, 97, 100, + 150, 167, 170, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 188, 191, 194, 198, 199, 200, 201, 203, + 205, 209, 211, 212, 218, 226, 240, 241, 9, 11, + 22, 84, 85, 86, 87, 123, 199, 209, 30, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 79, 80, 81, 82, 151, 152, 153, 154, 156, + 157, 158, 84, 85, 121, 171, 173, 200, 201, 209, + 218, 227, 228, 3, 12, 17, 18, 22, 66, 67, + 68, 69, 70, 88, 90, 91, 92, 93, 94, 95, + 97, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 143, 259, 271, + 143, 143, 229, 3, 6, 10, 12, 246, 248, 26, + 123, 199, 241, 44, 279, 280, 22, 83, 198, 199, + 0, 148, 49, 143, 176, 210, 235, 236, 237, 238, + 177, 4, 5, 6, 9, 22, 184, 6, 181, 187, + 125, 189, 32, 32, 36, 36, 143, 143, 143, 199, + 34, 192, 0, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 119, 121, 122, 123, 124, 125, + 143, 144, 159, 30, 3, 12, 17, 18, 22, 66, + 67, 68, 69, 70, 88, 90, 91, 92, 93, 94, + 95, 97, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 144, 162, + 163, 162, 26, 119, 155, 144, 25, 27, 28, 32, + 47, 48, 60, 61, 78, 142, 143, 164, 223, 143, + 229, 143, 229, 173, 31, 143, 35, 232, 232, 232, + 232, 23, 31, 199, 36, 195, 36, 23, 171, 189, + 195, 29, 87, 239, 38, 233, 32, 143, 124, 238, + 6, 185, 6, 9, 186, 184, 32, 31, 17, 175, + 202, 204, 206, 207, 208, 209, 206, 143, 219, 220, + 92, 93, 94, 95, 96, 98, 99, 250, 251, 252, + 265, 268, 274, 275, 276, 195, 193, 210, 236, 31, + 26, 118, 164, 190, 162, 144, 26, 27, 32, 44, + 225, 164, 32, 143, 164, 32, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 65, 141, 35, 36, 214, 214, + 31, 213, 214, 213, 40, 195, 0, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 31, 32, 33, 34, 35, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 81, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 143, 235, 236, 237, 254, - 266, 22, 84, 85, 86, 87, 201, 209, 179, 30, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 79, 80, 81, 82, 151, 152, 153, 154, - 156, 157, 158, 17, 84, 85, 121, 174, 176, 202, - 203, 209, 218, 227, 228, 143, 143, 143, 229, 3, - 6, 10, 12, 17, 169, 170, 179, 26, 123, 201, - 239, 44, 274, 275, 22, 83, 200, 201, 0, 148, - 143, 210, 234, 235, 4, 5, 6, 9, 22, 186, - 6, 183, 189, 125, 191, 32, 32, 36, 36, 234, - 235, 87, 32, 143, 124, 237, 143, 143, 143, 34, - 194, 19, 20, 21, 121, 123, 124, 143, 159, 160, - 30, 0, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 81, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 119, 121, 122, 123, 124, 125, 144, - 163, 164, 163, 26, 119, 155, 143, 159, 25, 27, - 28, 32, 47, 48, 60, 61, 78, 142, 143, 165, - 223, 143, 143, 229, 143, 229, 176, 31, 143, 35, - 232, 232, 232, 232, 235, 23, 31, 201, 36, 197, - 36, 23, 174, 191, 197, 38, 233, 32, 143, 6, - 187, 6, 9, 188, 186, 32, 31, 17, 87, 178, - 206, 207, 208, 209, 206, 143, 219, 220, 92, 93, - 94, 95, 96, 98, 99, 245, 246, 247, 260, 263, - 269, 270, 271, 143, 234, 195, 210, 235, 31, 118, - 163, 144, 26, 27, 32, 44, 225, 165, 32, 143, - 165, 32, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 65, 141, 31, 35, 36, 214, 214, 31, 213, 214, - 213, 32, 143, 40, 197, 0, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 31, 32, 33, 34, 35, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 119, 121, 122, 123, 124, - 125, 145, 197, 198, 199, 245, 32, 31, 31, 19, - 23, 25, 27, 32, 39, 124, 142, 210, 221, 222, - 223, 234, 233, 6, 26, 192, 235, 17, 234, 33, - 34, 34, 33, 34, 40, 34, 230, 210, 250, 221, - 242, 264, 265, 266, 274, 210, 143, 272, 273, 210, - 261, 265, 37, 246, 221, 33, 143, 34, 32, 179, - 224, 225, 22, 33, 143, 165, 166, 167, 165, 165, - 32, 121, 175, 176, 177, 178, 215, 218, 227, 228, - 210, 210, 234, 19, 20, 21, 26, 171, 172, 221, - 37, 199, 37, 3, 6, 10, 12, 13, 14, 15, - 16, 17, 33, 240, 241, 243, 244, 22, 87, 178, - 221, 39, 221, 39, 65, 141, 143, 26, 33, 235, - 233, 64, 17, 208, 233, 64, 221, 220, 37, 40, - 31, 40, 31, 32, 24, 40, 32, 31, 34, 32, - 31, 31, 33, 210, 64, 143, 161, 162, 234, 33, - 33, 33, 34, 35, 25, 177, 35, 231, 37, 175, - 232, 232, 143, 31, 35, 33, 34, 242, 33, 33, - 221, 221, 33, 33, 33, 19, 89, 90, 109, 221, - 249, 251, 252, 253, 254, 275, 264, 210, 274, 195, - 273, 17, 195, 262, 33, 34, 165, 165, 34, 25, - 35, 34, 216, 231, 214, 214, 33, 243, 35, 241, - 243, 40, 221, 35, 233, 233, 109, 251, 17, 18, - 32, 254, 257, 32, 32, 249, 34, 267, 210, 33, - 33, 163, 64, 143, 25, 35, 32, 210, 217, 31, - 216, 243, 274, 171, 221, 262, 32, 221, 242, 64, - 264, 268, 33, 31, 97, 33, 35, 25, 231, 34, - 31, 64, 33, 242, 34, 34, 255, 33, 34, 18, - 265, 266, 32, 34, 210, 24, 97, 32, 221, 210, - 248, 249, 250, 256, 275, 33, 264, 25, 25, 231, - 33, 257, 258, 259, 264, 33, 34, 249, 34, 33, - 35, 32, 33, 34, 248, 25, 243, 242, 33, 264, - 33, 32, 258, 33, 33 + 111, 112, 113, 114, 115, 116, 119, 121, 122, 123, + 124, 125, 145, 195, 196, 197, 250, 32, 31, 31, + 19, 23, 25, 27, 29, 32, 87, 124, 142, 210, + 221, 222, 223, 234, 235, 236, 233, 6, 190, 235, + 32, 33, 34, 34, 33, 34, 40, 34, 230, 210, + 255, 221, 244, 269, 270, 271, 279, 210, 143, 277, + 278, 210, 266, 270, 37, 251, 221, 34, 32, 26, + 177, 224, 225, 22, 33, 143, 164, 165, 166, 164, + 164, 32, 121, 172, 173, 174, 175, 215, 218, 227, + 228, 210, 210, 19, 20, 21, 168, 169, 190, 221, + 37, 197, 37, 13, 14, 15, 16, 17, 33, 242, + 243, 245, 247, 248, 249, 17, 22, 175, 221, 221, + 39, 65, 141, 39, 143, 33, 32, 206, 233, 64, + 208, 233, 64, 221, 220, 37, 40, 31, 40, 31, + 32, 24, 40, 32, 31, 34, 32, 31, 31, 210, + 64, 143, 160, 161, 235, 33, 33, 33, 34, 35, + 25, 174, 35, 231, 37, 172, 232, 232, 31, 35, + 33, 34, 244, 33, 33, 221, 221, 32, 33, 235, + 33, 34, 33, 33, 19, 89, 90, 109, 221, 254, + 256, 257, 258, 259, 280, 269, 210, 279, 193, 278, + 17, 193, 267, 33, 34, 164, 164, 34, 25, 35, + 34, 216, 231, 214, 214, 245, 35, 243, 245, 40, + 221, 35, 206, 33, 233, 64, 233, 233, 109, 256, + 17, 18, 32, 259, 262, 32, 32, 254, 34, 272, + 210, 33, 33, 162, 64, 143, 25, 35, 32, 210, + 217, 31, 216, 245, 279, 168, 221, 33, 33, 267, + 32, 221, 244, 64, 269, 273, 33, 31, 97, 33, + 35, 25, 231, 34, 31, 64, 33, 233, 33, 244, + 34, 34, 260, 33, 34, 18, 270, 271, 32, 34, + 210, 24, 32, 97, 32, 221, 210, 253, 254, 255, + 261, 280, 33, 269, 25, 25, 231, 33, 206, 262, + 263, 264, 269, 33, 34, 254, 34, 33, 35, 33, + 32, 33, 34, 253, 25, 245, 233, 244, 33, 269, + 33, 32, 263, 33, 33 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1634,37 +2420,37 @@ static const unsigned short int yyr1[] = 148, 148, 148, 148, 148, 149, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, 152, 152, 153, 153, 154, 154, 154, 155, 155, 156, 156, 157, 157, 157, - 158, 158, 159, 159, 159, 159, 159, 159, 159, 160, - 160, 161, 161, 161, 161, 162, 162, 163, 163, 164, - 164, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 166, 166, 167, 167, 168, 169, 170, 170, - 170, 170, 171, 171, 171, 172, 172, 172, 172, 173, - 173, 173, 174, 174, 175, 175, 176, 176, 176, 176, - 176, 177, 177, 177, 177, 177, 178, 178, 178, 179, - 179, 180, 180, 180, 181, 181, 181, 182, 182, 182, - 183, 183, 184, 184, 184, 185, 185, 185, 185, 186, - 186, 186, 186, 186, 186, 187, 187, 188, 188, 188, - 188, 189, 189, 189, 190, 190, 191, 191, 192, 192, - 193, 194, 194, 195, 195, 196, 196, 196, 197, 198, - 198, 199, 199, 200, 200, 201, 201, 202, 202, 203, - 203, 204, 204, 204, 204, 205, 205, 206, 206, 206, - 207, 207, 208, 208, 208, 208, 209, 209, 209, 209, - 210, 210, 211, 212, 213, 213, 214, 215, 215, 216, - 216, 217, 217, 218, 219, 219, 220, 220, 221, 221, - 221, 221, 221, 221, 222, 222, 222, 222, 222, 222, - 223, 223, 224, 224, 225, 225, 225, 226, 227, 228, - 229, 229, 230, 230, 231, 231, 231, 231, 232, 232, - 233, 233, 233, 233, 234, 234, 235, 235, 236, 236, - 237, 237, 238, 238, 239, 239, 239, 240, 240, 241, - 241, 242, 243, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 245, 245, 246, 246, 246, 246, 246, 247, - 247, 248, 248, 248, 249, 249, 249, 249, 249, 249, - 250, 250, 251, 252, 252, 253, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 255, 255, 256, 256, - 257, 257, 258, 258, 259, 259, 260, 261, 261, 262, - 262, 262, 263, 264, 264, 264, 265, 265, 266, 266, - 266, 266, 266, 266, 266, 266, 267, 267, 268, 268, - 269, 270, 270, 271, 272, 272, 273, 274, 274, 275 + 158, 158, 159, 159, 159, 159, 160, 160, 160, 160, + 161, 161, 162, 162, 163, 163, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 165, 165, 166, + 166, 167, 168, 168, 168, 169, 169, 169, 170, 170, + 171, 171, 172, 172, 173, 173, 173, 173, 173, 174, + 174, 174, 174, 174, 175, 175, 175, 176, 176, 177, + 177, 178, 178, 178, 179, 179, 179, 179, 180, 180, + 180, 181, 181, 182, 182, 182, 183, 183, 183, 183, + 184, 184, 184, 184, 184, 184, 185, 185, 186, 186, + 186, 186, 187, 187, 187, 188, 188, 189, 189, 190, + 190, 191, 192, 192, 193, 193, 194, 194, 194, 194, + 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, + 200, 201, 201, 201, 202, 202, 203, 204, 205, 206, + 206, 206, 207, 207, 208, 208, 208, 209, 209, 210, + 210, 211, 212, 213, 213, 214, 215, 215, 216, 216, + 217, 217, 218, 219, 219, 220, 220, 221, 221, 221, + 221, 221, 221, 222, 222, 222, 222, 222, 222, 223, + 223, 224, 224, 225, 225, 225, 226, 227, 228, 229, + 229, 230, 230, 231, 231, 231, 231, 232, 232, 233, + 233, 233, 234, 234, 234, 234, 235, 235, 236, 236, + 237, 237, 238, 238, 239, 239, 240, 240, 241, 241, + 241, 242, 242, 243, 243, 244, 245, 246, 247, 247, + 248, 248, 248, 248, 249, 249, 249, 249, 249, 250, + 250, 251, 251, 251, 251, 251, 252, 252, 253, 253, + 253, 254, 254, 254, 254, 254, 254, 255, 255, 256, + 257, 257, 258, 259, 259, 259, 259, 259, 259, 259, + 259, 259, 259, 260, 260, 261, 261, 262, 262, 263, + 263, 264, 264, 265, 266, 266, 267, 267, 267, 268, + 269, 269, 269, 270, 270, 271, 271, 271, 271, 271, + 271, 271, 271, 272, 272, 273, 273, 274, 275, 275, + 276, 277, 277, 278, 279, 279, 280 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1702,37 +2488,37 @@ static const unsigned char yyr2[] = 1, 1, 1, 1, 1, 3, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 2, 0, 1, 1, 3, 1, 3, 0, 1, 1, - 2, 3, 2, 3, 5, 2, 4, 1, 1, 1, - 1, 4, 0, 1, 1, 3, 6, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 3, - 4, 4, 1, 2, 1, 2, 1, 1, 2, 4, - 4, 1, 1, 1, 3, 3, 2, 2, 1, 1, - 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 2, 1, 1, 2, 2, 0, - 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, - 2, 0, 1, 2, 3, 4, 0, 4, 1, 2, - 4, 0, 2, 1, 3, 3, 3, 4, 3, 1, - 2, 1, 1, 1, 2, 1, 1, 5, 7, 5, - 7, 6, 7, 6, 5, 1, 2, 0, 1, 1, - 1, 3, 1, 2, 3, 2, 1, 2, 4, 3, - 3, 2, 4, 4, 1, 1, 3, 4, 5, 0, - 2, 2, 4, 5, 1, 3, 1, 3, 1, 4, - 3, 3, 2, 5, 1, 1, 1, 1, 1, 1, - 4, 2, 1, 2, 2, 1, 1, 2, 2, 2, - 0, 1, 0, 1, 0, 2, 7, 9, 0, 7, - 0, 2, 3, 3, 0, 1, 1, 2, 1, 2, - 1, 2, 4, 5, 7, 8, 13, 1, 3, 2, - 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, - 6, 1, 2, 1, 1, 1, 1, 2, 1, 1, - 3, 4, 6, 8, 12, 5, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 1, 3, - 1, 1, 0, 1, 1, 3, 3, 6, 1, 0, - 1, 1, 3, 1, 1, 3, 5, 6, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 1, 3, - 3, 1, 1, 3, 1, 3, 4, 0, 1, 1 + 1, 1, 2, 6, 2, 2, 0, 1, 1, 3, + 1, 3, 0, 1, 1, 2, 3, 2, 3, 5, + 2, 4, 1, 1, 1, 1, 4, 0, 1, 1, + 3, 6, 1, 1, 1, 1, 1, 1, 3, 4, + 1, 2, 1, 2, 1, 1, 2, 4, 4, 1, + 1, 1, 3, 3, 1, 2, 2, 1, 1, 1, + 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, + 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, + 1, 2, 0, 1, 2, 3, 4, 0, 4, 1, + 2, 4, 0, 2, 1, 3, 3, 4, 3, 4, + 3, 1, 2, 1, 1, 1, 2, 1, 1, 5, + 7, 5, 7, 13, 5, 7, 6, 5, 1, 0, + 1, 1, 1, 3, 1, 1, 2, 1, 2, 3, + 2, 4, 4, 1, 1, 3, 4, 5, 0, 2, + 2, 4, 5, 1, 3, 1, 3, 1, 4, 3, + 3, 2, 5, 1, 1, 1, 1, 1, 1, 4, + 2, 1, 2, 2, 1, 1, 2, 2, 2, 0, + 1, 0, 1, 0, 2, 7, 9, 0, 7, 0, + 3, 3, 0, 1, 1, 1, 0, 1, 1, 2, + 1, 2, 1, 2, 1, 1, 4, 5, 7, 8, + 13, 1, 3, 2, 4, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 3, 6, 1, 2, + 1, 1, 1, 1, 2, 1, 1, 3, 4, 6, + 8, 12, 5, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 1, 3, 1, 1, 0, + 1, 1, 3, 3, 6, 1, 0, 1, 1, 3, + 1, 1, 3, 5, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 1, 3, 3, 1, 1, + 3, 1, 3, 4, 0, 1, 1 }; @@ -1771,21 +2557,21 @@ static const unsigned char yydprec[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1795,13 +2581,13 @@ static const unsigned char yydprec[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, + 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0 }; /* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */ @@ -1869,7 +2655,7 @@ static const unsigned char yymerger[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0 }; /* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as @@ -1938,7 +2724,7 @@ static const yybool yyimmediate[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0 }; /* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of @@ -1952,45 +2738,47 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 263, 0, 265, 267, + 0, 0, 0, 0, 0, 0, 0, 0, 3215, 0, + 0, 0, 0, 0, 0, 3217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 0, 11, 0, 0, 0, 3201, 3203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, + 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, - 271, 0, 273, 275, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 3197, + 0, 0, 0, 0, 0, 0, 0, 0, 3199, 0, + 0, 0, 0, 0, 3209, 0, 3211, 3213, 0, 0, + 0, 3219, 0, 3221, 3223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 261, + 0, 0, 0, 0, 0, 0, 0, 3225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2017,11 +2805,14 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2031,19 +2822,6 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 0, 0, 11, 13, 15, 17, 19, 21, - 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, - 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, - 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, - 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, - 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, - 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, - 163, 0, 165, 0, 167, 169, 171, 173, 175, 177, - 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, - 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, - 219, 221, 223, 225, 227, 229, 231, 233, 0, 235, - 237, 0, 239, 241, 243, 245, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2105,10 +2883,392 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, + 0, 0, 0, 0, 0, 0, 0, 0, 161, 0, + 0, 0, 0, 163, 165, 0, 0, 0, 167, 0, + 0, 169, 171, 173, 175, 0, 0, 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 179, 181, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 183, 185, 0, 0, + 0, 0, 187, 189, 191, 193, 195, 0, 0, 0, + 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 199, 0, 201, 203, 205, 207, + 209, 211, 0, 213, 0, 0, 215, 217, 219, 221, + 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, + 243, 245, 247, 0, 0, 0, 0, 0, 0, 0, + 0, 249, 0, 0, 0, 0, 251, 253, 0, 0, + 0, 255, 0, 0, 257, 259, 261, 263, 0, 0, + 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 267, 269, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 271, + 273, 0, 0, 0, 0, 275, 277, 279, 281, 283, + 0, 0, 0, 0, 0, 0, 0, 285, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 287, 0, 289, + 291, 293, 295, 297, 299, 0, 301, 0, 0, 303, + 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, + 325, 327, 329, 331, 333, 335, 0, 0, 0, 0, + 0, 0, 0, 0, 337, 0, 0, 0, 0, 339, + 341, 0, 0, 0, 343, 0, 0, 345, 347, 349, + 351, 0, 0, 0, 353, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 355, + 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 359, 361, 0, 0, 0, 0, 363, 365, + 367, 369, 371, 0, 0, 0, 0, 0, 0, 0, + 373, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 375, 0, 377, 379, 381, 383, 385, 387, 0, 389, + 0, 0, 391, 393, 395, 397, 399, 401, 403, 405, + 407, 409, 411, 413, 415, 417, 419, 421, 423, 0, + 0, 0, 0, 0, 0, 0, 0, 426, 0, 0, + 0, 0, 429, 432, 0, 0, 0, 435, 0, 0, + 438, 441, 444, 447, 0, 0, 0, 450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 453, 456, 0, 0, 0, 149, 0, 0, + 0, 0, 151, 0, 0, 459, 462, 0, 0, 153, + 0, 465, 468, 471, 474, 477, 0, 0, 0, 0, + 0, 0, 0, 480, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 483, 0, 486, 489, 492, 495, 498, + 501, 0, 504, 0, 0, 507, 510, 513, 516, 519, + 522, 525, 528, 531, 534, 537, 540, 543, 546, 549, + 552, 557, 0, 555, 0, 0, 0, 155, 0, 0, + 559, 0, 0, 0, 0, 561, 563, 0, 0, 0, + 565, 0, 0, 567, 569, 571, 573, 0, 0, 0, + 575, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 577, 579, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 581, 583, + 0, 0, 0, 0, 585, 587, 589, 591, 593, 0, + 0, 0, 0, 0, 0, 0, 595, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 597, 0, 599, 601, + 603, 605, 607, 609, 0, 611, 0, 0, 613, 615, + 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, + 637, 639, 641, 643, 645, 0, 0, 0, 0, 0, + 0, 0, 0, 647, 0, 0, 0, 0, 649, 651, + 0, 0, 0, 653, 0, 0, 655, 657, 659, 661, + 0, 0, 0, 663, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 667, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 669, 671, 0, 0, 0, 0, 673, 675, 677, + 679, 681, 0, 0, 0, 0, 0, 0, 0, 683, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 685, + 0, 687, 689, 691, 693, 695, 697, 0, 699, 0, + 0, 701, 703, 705, 707, 709, 711, 713, 715, 717, + 719, 721, 723, 725, 727, 729, 731, 733, 0, 0, + 0, 0, 0, 0, 0, 0, 735, 0, 0, 0, + 0, 737, 739, 0, 0, 0, 741, 0, 0, 743, + 745, 747, 749, 0, 0, 0, 751, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 753, 755, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 757, 759, 0, 0, 0, 0, + 761, 763, 765, 767, 769, 0, 0, 0, 0, 0, + 0, 0, 771, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 773, 0, 775, 777, 779, 781, 783, 785, + 0, 787, 0, 0, 789, 791, 793, 795, 797, 799, + 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, + 821, 0, 0, 0, 0, 0, 0, 0, 0, 823, + 0, 0, 0, 0, 825, 827, 0, 0, 0, 829, + 0, 0, 831, 833, 835, 837, 0, 0, 0, 839, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 841, 843, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 845, 847, 0, + 0, 0, 0, 849, 851, 853, 855, 857, 0, 0, + 0, 0, 0, 0, 0, 859, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 861, 0, 863, 865, 867, + 869, 871, 873, 0, 875, 0, 0, 877, 879, 881, + 883, 885, 887, 889, 891, 893, 895, 897, 899, 901, + 903, 905, 907, 909, 0, 0, 0, 0, 0, 0, + 0, 0, 911, 0, 0, 0, 0, 913, 915, 0, + 0, 0, 917, 0, 0, 919, 921, 923, 925, 0, + 0, 0, 927, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 929, 931, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 933, 935, 0, 0, 0, 0, 937, 939, 941, 943, + 945, 0, 0, 0, 0, 0, 0, 0, 947, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 949, 0, + 951, 953, 955, 957, 959, 961, 0, 963, 0, 0, + 965, 967, 969, 971, 973, 975, 977, 979, 981, 983, + 985, 987, 989, 991, 993, 995, 997, 0, 0, 0, + 0, 0, 0, 0, 0, 999, 0, 0, 0, 0, + 1001, 1003, 0, 0, 0, 1005, 0, 0, 1007, 1009, + 1011, 1013, 0, 0, 0, 1015, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1017, 1019, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1021, 1023, 0, 0, 0, 0, 1025, + 1027, 1029, 1031, 1033, 0, 0, 0, 0, 0, 0, + 0, 1035, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1037, 0, 1039, 1041, 1043, 1045, 1047, 1049, 0, + 1051, 0, 0, 1053, 1055, 1057, 1059, 1061, 1063, 1065, + 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, + 0, 0, 0, 0, 0, 0, 0, 0, 1087, 0, + 0, 0, 0, 1089, 1091, 0, 0, 0, 1093, 0, + 0, 1095, 1097, 1099, 1101, 0, 0, 0, 1103, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1105, 1107, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1109, 1111, 0, 0, + 0, 0, 1113, 1115, 1117, 1119, 1121, 0, 0, 0, + 0, 0, 0, 0, 1123, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1125, 0, 1127, 1129, 1131, 1133, + 1135, 1137, 0, 1139, 0, 0, 1141, 1143, 1145, 1147, + 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, 1165, 1167, + 1169, 1171, 1173, 0, 0, 0, 0, 0, 0, 0, + 0, 1175, 0, 0, 0, 0, 1177, 1179, 0, 0, + 0, 1181, 0, 0, 1183, 1185, 1187, 1189, 0, 0, + 0, 1191, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1193, 1195, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1197, + 1199, 0, 0, 0, 0, 1201, 1203, 1205, 1207, 1209, + 0, 0, 0, 0, 0, 0, 0, 1211, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1213, 0, 1215, + 1217, 1219, 1221, 1223, 1225, 0, 1227, 0, 0, 1229, + 1231, 1233, 1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249, + 1251, 1253, 1255, 1257, 1259, 1261, 0, 0, 0, 0, + 0, 0, 0, 0, 1263, 0, 0, 0, 0, 1265, + 1267, 0, 0, 0, 1269, 0, 0, 1271, 1273, 1275, + 1277, 0, 0, 0, 1279, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1281, + 1283, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1285, 1287, 0, 0, 0, 0, 1289, 1291, + 1293, 1295, 1297, 0, 0, 0, 0, 0, 0, 0, + 1299, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1301, 0, 1303, 1305, 1307, 1309, 1311, 1313, 0, 1315, + 0, 0, 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, + 1333, 1335, 1337, 1339, 1341, 1343, 1345, 1347, 1349, 0, + 0, 0, 0, 0, 0, 0, 0, 1351, 0, 0, + 0, 0, 1353, 1355, 0, 0, 0, 1357, 0, 0, + 1359, 1361, 1363, 1365, 0, 0, 0, 1367, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1369, 1371, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1373, 1375, 0, 0, 0, + 0, 1377, 1379, 1381, 1383, 1385, 0, 0, 0, 0, + 0, 0, 0, 1387, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1389, 0, 1391, 1393, 1395, 1397, 1399, + 1401, 0, 1403, 0, 0, 1405, 1407, 1409, 1411, 1413, + 1415, 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433, + 1435, 1437, 0, 0, 0, 0, 0, 0, 0, 0, + 1439, 0, 0, 0, 0, 1441, 1443, 0, 0, 0, + 1445, 0, 0, 1447, 1449, 1451, 1453, 0, 0, 0, + 1455, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1457, 1459, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1461, 1463, + 0, 0, 0, 0, 1465, 1467, 1469, 1471, 1473, 0, + 0, 0, 0, 0, 0, 0, 1475, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1477, 0, 1479, 1481, + 1483, 1485, 1487, 1489, 0, 1491, 0, 0, 1493, 1495, + 1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1515, + 1517, 1519, 1521, 1523, 1525, 0, 0, 0, 0, 0, + 0, 0, 0, 1527, 0, 0, 0, 0, 1529, 1531, + 0, 0, 0, 1533, 0, 0, 1535, 1537, 1539, 1541, + 0, 0, 0, 1543, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1545, 1547, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1549, 1551, 0, 0, 0, 0, 1553, 1555, 1557, + 1559, 1561, 0, 0, 0, 0, 0, 0, 0, 1563, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1565, + 0, 1567, 1569, 1571, 1573, 1575, 1577, 0, 1579, 0, + 0, 1581, 1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, + 1599, 1601, 1603, 1605, 1607, 1609, 1611, 1613, 0, 0, + 0, 0, 0, 0, 0, 0, 1615, 0, 0, 0, + 0, 1617, 1619, 0, 0, 0, 1621, 0, 0, 1623, + 1625, 1627, 1629, 0, 0, 0, 1631, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1633, 1635, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1637, 1639, 0, 0, 0, 0, + 1641, 1643, 1645, 1647, 1649, 0, 0, 0, 0, 0, + 0, 0, 1651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1653, 0, 1655, 1657, 1659, 1661, 1663, 1665, + 0, 1667, 0, 0, 1669, 1671, 1673, 1675, 1677, 1679, + 1681, 1683, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699, + 1701, 0, 0, 0, 0, 0, 0, 0, 0, 1703, + 0, 0, 0, 0, 1705, 1707, 0, 0, 0, 1709, + 0, 0, 1711, 1713, 1715, 1717, 0, 0, 0, 1719, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1721, 1723, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1725, 1727, 0, + 0, 0, 0, 1729, 1731, 1733, 1735, 1737, 0, 0, + 0, 0, 0, 0, 0, 1739, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1741, 0, 1743, 1745, 1747, + 1749, 1751, 1753, 0, 1755, 0, 0, 1757, 1759, 1761, + 1763, 1765, 1767, 1769, 1771, 1773, 1775, 1777, 1779, 1781, + 1783, 1785, 1787, 1789, 0, 0, 0, 0, 0, 0, + 0, 0, 1791, 0, 0, 0, 0, 1793, 1795, 0, + 0, 0, 1797, 0, 0, 1799, 1801, 1803, 1805, 0, + 0, 0, 1807, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1809, 1811, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1813, 1815, 0, 0, 0, 0, 1817, 1819, 1821, 1823, + 1825, 0, 0, 0, 0, 0, 0, 0, 1827, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1829, 0, + 1831, 1833, 1835, 1837, 1839, 1841, 0, 1843, 0, 0, + 1845, 1847, 1849, 1851, 1853, 1855, 1857, 1859, 1861, 1863, + 1865, 1867, 1869, 1871, 1873, 1875, 1877, 0, 0, 0, + 0, 0, 0, 0, 0, 1879, 0, 0, 0, 0, + 1881, 1883, 0, 0, 0, 1885, 0, 0, 1887, 1889, + 1891, 1893, 0, 0, 0, 1895, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1897, 1899, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1901, 1903, 0, 0, 0, 0, 1905, + 1907, 1909, 1911, 1913, 0, 0, 0, 0, 0, 0, + 0, 1915, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1917, 0, 1919, 1921, 1923, 1925, 1927, 1929, 0, + 1931, 0, 0, 1933, 1935, 1937, 1939, 1941, 1943, 1945, + 1947, 1949, 1951, 1953, 1955, 1957, 1959, 1961, 1963, 1965, + 0, 0, 0, 0, 0, 0, 0, 0, 1967, 0, + 0, 0, 0, 1969, 1971, 0, 0, 0, 1973, 0, + 0, 1975, 1977, 1979, 1981, 0, 0, 0, 1983, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1985, 1987, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1989, 1991, 0, 0, + 0, 0, 1993, 1995, 1997, 1999, 2001, 0, 0, 0, + 0, 0, 0, 0, 2003, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2005, 0, 2007, 2009, 2011, 2013, + 2015, 2017, 0, 2019, 0, 0, 2021, 2023, 2025, 2027, + 2029, 2031, 2033, 2035, 2037, 2039, 2041, 2043, 2045, 2047, + 2049, 2051, 2053, 0, 0, 0, 0, 0, 0, 0, + 0, 2055, 0, 0, 0, 0, 2057, 2059, 0, 0, + 0, 2061, 0, 0, 2063, 2065, 2067, 2069, 0, 0, + 0, 2071, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2073, 2075, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2077, + 2079, 0, 0, 0, 0, 2081, 2083, 2085, 2087, 2089, + 0, 0, 0, 0, 0, 0, 0, 2091, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2093, 0, 2095, + 2097, 2099, 2101, 2103, 2105, 0, 2107, 0, 0, 2109, + 2111, 2113, 2115, 2117, 2119, 2121, 2123, 2125, 2127, 2129, + 2131, 2133, 2135, 2137, 2139, 2141, 0, 0, 0, 0, + 0, 0, 0, 0, 2143, 0, 0, 0, 0, 2145, + 2147, 0, 0, 0, 2149, 0, 0, 2151, 2153, 2155, + 2157, 0, 0, 0, 2159, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2161, + 2163, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2165, 2167, 0, 0, 0, 0, 2169, 2171, + 2173, 2175, 2177, 0, 0, 0, 0, 0, 0, 0, + 2179, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2181, 0, 2183, 2185, 2187, 2189, 2191, 2193, 0, 2195, + 0, 0, 2197, 2199, 2201, 2203, 2205, 2207, 2209, 2211, + 2213, 2215, 2217, 2219, 2221, 2223, 2225, 2227, 2229, 0, + 0, 0, 0, 0, 0, 0, 0, 2231, 0, 0, + 0, 0, 2233, 2235, 0, 0, 0, 2237, 0, 0, + 2239, 2241, 2243, 2245, 0, 0, 0, 2247, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2249, 2251, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2253, 2255, 0, 0, 0, + 0, 2257, 2259, 2261, 2263, 2265, 0, 0, 0, 0, + 0, 0, 0, 2267, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2269, 0, 2271, 2273, 2275, 2277, 2279, + 2281, 0, 2283, 0, 0, 2285, 2287, 2289, 2291, 2293, + 2295, 2297, 2299, 2301, 2303, 2305, 2307, 2309, 2311, 2313, + 2315, 2317, 0, 0, 0, 0, 0, 0, 0, 0, + 2319, 0, 0, 0, 0, 2321, 2323, 0, 0, 0, + 2325, 0, 0, 2327, 2329, 2331, 2333, 0, 0, 0, + 2335, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2337, 2339, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2341, 2343, + 0, 0, 0, 0, 2345, 2347, 2349, 2351, 2353, 0, + 0, 0, 0, 0, 0, 0, 2355, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2357, 0, 2359, 2361, + 2363, 2365, 2367, 2369, 0, 2371, 0, 0, 2373, 2375, + 2377, 2379, 2381, 2383, 2385, 2387, 2389, 2391, 2393, 2395, + 2397, 2399, 2401, 2403, 2405, 0, 0, 0, 0, 0, + 0, 0, 0, 2407, 0, 0, 0, 0, 2409, 2411, + 0, 0, 0, 2413, 0, 0, 2415, 2417, 2419, 2421, + 0, 0, 0, 2423, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2425, 2427, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2429, 2431, 0, 0, 0, 0, 2433, 2435, 2437, + 2439, 2441, 0, 0, 0, 0, 0, 0, 0, 2443, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2445, + 0, 2447, 2449, 2451, 2453, 2455, 2457, 0, 2459, 0, + 0, 2461, 2463, 2465, 2467, 2469, 2471, 2473, 2475, 2477, + 2479, 2481, 2483, 2485, 2487, 2489, 2491, 2493, 0, 0, + 0, 0, 0, 0, 0, 0, 2495, 0, 0, 0, + 0, 2497, 2499, 0, 0, 0, 2501, 0, 0, 2503, + 2505, 2507, 2509, 0, 0, 0, 2511, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2513, 2515, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2517, 2519, 0, 0, 0, 0, + 2521, 2523, 2525, 2527, 2529, 0, 0, 0, 0, 0, + 0, 0, 2531, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2533, 0, 2535, 2537, 2539, 2541, 2543, 2545, + 0, 2547, 0, 0, 2549, 2551, 2553, 2555, 2557, 2559, + 2561, 2563, 2565, 2567, 2569, 2571, 2573, 2575, 2577, 2579, + 2581, 0, 0, 0, 0, 0, 0, 0, 0, 2583, + 0, 0, 0, 0, 2585, 2587, 0, 0, 0, 2589, + 0, 0, 2591, 2593, 2595, 2597, 0, 0, 0, 2599, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2601, 2603, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2605, 2607, 0, + 0, 0, 0, 2609, 2611, 2613, 2615, 2617, 0, 0, + 0, 0, 0, 0, 0, 2619, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2621, 0, 2623, 2625, 2627, + 2629, 2631, 2633, 0, 2635, 0, 0, 2637, 2639, 2641, + 2643, 2645, 2647, 2649, 2651, 2653, 2655, 2657, 2659, 2661, + 2663, 2665, 2667, 2669, 0, 0, 0, 0, 0, 0, + 0, 0, 2671, 0, 0, 0, 0, 2673, 2675, 0, + 0, 0, 2677, 0, 0, 2679, 2681, 2683, 2685, 0, + 0, 0, 2687, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2689, 2691, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2693, 2695, 0, 0, 0, 0, 2697, 2699, 2701, 2703, + 2705, 0, 0, 0, 0, 0, 0, 0, 2707, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2709, 0, + 2711, 2713, 2715, 2717, 2719, 2721, 0, 2723, 0, 0, + 2725, 2727, 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, + 2745, 2747, 2749, 2751, 2753, 2755, 2757, 0, 0, 0, + 0, 0, 0, 0, 0, 2759, 0, 0, 0, 0, + 2761, 2763, 0, 0, 0, 2765, 0, 0, 2767, 2769, + 2771, 2773, 0, 0, 0, 2775, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2777, 2779, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2781, 2783, 0, 0, 0, 0, 2785, + 2787, 2789, 2791, 2793, 0, 0, 0, 0, 0, 0, + 0, 2795, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2797, 0, 2799, 2801, 2803, 2805, 2807, 2809, 0, + 2811, 0, 0, 2813, 2815, 2817, 2819, 2821, 2823, 2825, + 2827, 2829, 2831, 2833, 2835, 2837, 2839, 2841, 2843, 2845, + 0, 0, 0, 0, 0, 0, 0, 0, 2847, 0, + 0, 0, 0, 2849, 2851, 0, 0, 0, 2853, 0, + 0, 2855, 2857, 2859, 2861, 0, 0, 0, 2863, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2865, 2867, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2869, 2871, 0, 0, + 0, 0, 2873, 2875, 2877, 2879, 2881, 0, 0, 0, + 0, 0, 0, 0, 2883, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2885, 0, 2887, 2889, 2891, 2893, + 2895, 2897, 0, 2899, 0, 0, 2901, 2903, 2905, 2907, + 2909, 2911, 2913, 2915, 2917, 2919, 2921, 2923, 2925, 2927, + 2929, 2931, 2933, 0, 0, 0, 0, 0, 0, 0, + 0, 2935, 0, 0, 0, 0, 2937, 2939, 0, 0, + 0, 2941, 0, 0, 2943, 2945, 2947, 2949, 0, 0, + 0, 2951, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2953, 2955, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2957, + 2959, 0, 0, 0, 0, 2961, 2963, 2965, 2967, 2969, + 0, 0, 0, 0, 0, 0, 0, 2971, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2973, 0, 2975, + 2977, 2979, 2981, 2983, 2985, 0, 2987, 0, 0, 2989, + 2991, 2993, 2995, 2997, 2999, 3001, 3003, 3005, 3007, 3009, + 3011, 3013, 3015, 3017, 3019, 3021, 0, 0, 0, 0, + 0, 0, 0, 0, 3023, 0, 0, 0, 0, 3025, + 3027, 0, 0, 0, 3029, 0, 0, 3031, 3033, 3035, + 3037, 0, 0, 0, 3039, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3041, + 3043, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3045, 3047, 0, 0, 0, 0, 3049, 3051, + 3053, 3055, 3057, 0, 0, 0, 0, 0, 0, 0, + 3059, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3061, 0, 3063, 3065, 3067, 3069, 3071, 3073, 0, 3075, + 0, 0, 3077, 3079, 3081, 3083, 3085, 3087, 3089, 3091, + 3093, 3095, 3097, 3099, 3101, 3103, 3105, 3107, 3109, 0, + 0, 0, 0, 0, 0, 0, 0, 3111, 0, 0, + 0, 0, 3113, 3115, 0, 0, 0, 3117, 0, 0, + 3119, 3121, 3123, 3125, 0, 0, 0, 3127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3129, 3131, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3133, 3135, 0, 0, 0, + 0, 3137, 3139, 3141, 3143, 3145, 0, 0, 0, 0, + 0, 0, 0, 3147, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3149, 0, 3151, 3153, 3155, 3157, 3159, + 3161, 0, 3163, 0, 0, 3165, 3167, 3169, 3171, 3173, + 3175, 3177, 3179, 3181, 3183, 3185, 3187, 3189, 3191, 3193, + 3195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2119,12 +3279,23 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 0, 21, 23, + 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, + 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, + 47, 49, 0, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, + 85, 0, 0, 0, 0, 0, 87, 89, 91, 93, + 95, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 99, 101, + 0, 103, 105, 107, 109, 111, 113, 0, 115, 0, + 0, 117, 119, 121, 123, 125, 127, 129, 131, 133, + 135, 137, 139, 141, 143, 145, 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2169,7 +3340,6 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 249, 0, 0, 0, 0, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2318,44 +3488,341 @@ static const unsigned short int yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 281 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3227, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3229 }; /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by 0, pointed into by YYCONFLP. */ static const short int yyconfl[] = { - 0, 396, 0, 396, 0, 409, 0, 466, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 614, - 0, 614, 0, 614, 0, 614, 0, 614, 0, 396, - 0, 396, 0, 409, 0, 511, 0, 511, 0, 459, - 0, 42, 0, 497, 0, 497, 0, 497, 0, 396, - 0, 564, 0, 564, 0, 564, 0, 615, 0, 344, - 0, 493, 0 + 0, 386, 0, 386, 0, 386, 0, 386, 0, 377, + 0, 377, 0, 400, 0, 457, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 611, + 0, 611, 0, 611, 0, 611, 0, 611, 0, 386, + 0, 386, 0, 386, 0, 386, 0, 400, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, + 0, 43, 0, 43, 0, 43, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 52, 0, 52, 0, 52, + 0, 52, 0, 52, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 612, 0, 612, 0, 612, 0, 612, + 0, 612, 0, 573, 611, 0, 573, 611, 0, 573, + 611, 0, 573, 611, 0, 573, 611, 0, 573, 611, + 0, 573, 611, 0, 573, 611, 0, 573, 611, 0, + 573, 611, 0, 573, 611, 0, 573, 611, 0, 573, + 611, 0, 573, 611, 0, 573, 611, 0, 573, 611, + 0, 573, 611, 0, 573, 611, 0, 573, 611, 0, + 573, 611, 0, 573, 611, 0, 573, 611, 0, 573, + 611, 0, 573, 611, 0, 573, 611, 0, 573, 611, + 0, 573, 611, 0, 573, 611, 0, 573, 611, 0, + 573, 611, 0, 573, 611, 0, 573, 611, 0, 573, + 611, 0, 573, 611, 0, 573, 611, 0, 573, 611, + 0, 573, 611, 0, 573, 611, 0, 573, 611, 0, + 573, 611, 0, 573, 611, 0, 573, 611, 0, 573, + 611, 0, 573, 611, 0, 611, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 62, 0, 62, 0, 62, + 0, 62, 0, 62, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 106, 0, 106, 0, 106, 0, 106, + 0, 106, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 107, 0, 107, 0, 107, 0, 107, 0, 107, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 105, + 0, 105, 0, 105, 0, 105, 0, 105, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 103, 0, 103, + 0, 103, 0, 103, 0, 103, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 104, 0, 104, 0, 104, + 0, 104, 0, 104, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 124, 0, 124, 0, 124, 0, 124, + 0, 124, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 127, + 0, 127, 0, 127, 0, 127, 0, 127, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 129, 0, 129, 0, 129, + 0, 129, 0, 129, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 130, 0, 130, 0, 130, 0, 130, + 0, 130, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 581, 0, 581, + 0, 581, 0, 581, 0, 581, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 580, 0, 580, 0, 580, + 0, 580, 0, 580, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 578, 0, 578, 0, 578, 0, 578, + 0, 578, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 576, 0, 576, 0, 576, 0, 576, 0, 576, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 577, + 0, 577, 0, 577, 0, 577, 0, 577, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 579, 0, 579, + 0, 579, 0, 579, 0, 579, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 575, 0, 575, 0, 575, + 0, 575, 0, 575, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 574, 0, 574, 0, 574, 0, 574, + 0, 574, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 582, 0, 582, 0, 582, 0, 582, 0, 582, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 610, 0, 610, + 0, 610, 0, 610, 0, 610, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 608, 0, 608, 0, 608, + 0, 608, 0, 608, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 607, 0, 607, 0, 607, 0, 607, + 0, 607, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 609, 0, 609, 0, 609, 0, 609, 0, 609, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 606, + 0, 606, 0, 606, 0, 606, 0, 606, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 605, 0, 605, + 0, 605, 0, 605, 0, 605, 0, 500, 0, 500, + 0, 450, 0, 450, 0, 451, 0, 42, 0, 486, + 0, 486, 0, 486, 0, 612, 0, 386, 0, 561, + 0, 561, 0, 561, 0, 612, 0, 339, 0, 482, + 0 }; /* Error token number */ @@ -2785,18 +4252,18 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, switch (yyn) { case 284: -#line 451 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 452 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_cpp_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { psi_cpp_exp_exec((*(struct psi_cpp_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), P->preproc, PSI_DATA(P)); psi_cpp_exp_free(&(*(struct psi_cpp_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } } -#line 2796 "src/parser_proc.c" /* glr.c:816 */ +#line 4263 "src/parser_proc.c" /* glr.c:816 */ break; case 285: -#line 457 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 458 "src/parser_proc_grammar.y" /* glr.c:816 */ { if (P->file.ln) { P->error(PSI_DATA(P), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), PSI_WARNING, @@ -2805,99 +4272,110 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, P->file.ln = strndup((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->size); } } -#line 2809 "src/parser_proc.c" /* glr.c:816 */ +#line 4276 "src/parser_proc.c" /* glr.c:816 */ break; case 286: -#line 465 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 466 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_const(P, (*(struct psi_const **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2817 "src/parser_proc.c" /* glr.c:816 */ +#line 4284 "src/parser_proc.c" /* glr.c:816 */ break; case 287: -#line 468 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 469 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_decl(P, (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2825 "src/parser_proc.c" /* glr.c:816 */ +#line 4292 "src/parser_proc.c" /* glr.c:816 */ break; case 288: -#line 471 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 472 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_decl_extvars(P, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2833 "src/parser_proc.c" /* glr.c:816 */ +#line 4300 "src/parser_proc.c" /* glr.c:816 */ break; - case 290: + case 289: #line 475 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + if (P->flags & PSI_DEBUG) { + P->error(PSI_DATA(P), (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->token, PSI_NOTICE, "Ignored decl: %s", (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->var->name); + } + psi_decl_free(&(*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); +} +#line 4311 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 290: +#line 481 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_typedef(P, (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2841 "src/parser_proc.c" /* glr.c:816 */ +#line 4319 "src/parser_proc.c" /* glr.c:816 */ break; case 291: -#line 478 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 484 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_struct(P, (*(struct psi_decl_struct **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2849 "src/parser_proc.c" /* glr.c:816 */ +#line 4327 "src/parser_proc.c" /* glr.c:816 */ break; case 292: -#line 481 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 487 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_union(P, (*(struct psi_decl_union **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2857 "src/parser_proc.c" /* glr.c:816 */ +#line 4335 "src/parser_proc.c" /* glr.c:816 */ break; case 293: -#line 484 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 490 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_enum(P, (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2865 "src/parser_proc.c" /* glr.c:816 */ +#line 4343 "src/parser_proc.c" /* glr.c:816 */ break; case 294: -#line 487 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 493 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_parser_proc_add_impl(P, (*(struct psi_impl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2873 "src/parser_proc.c" /* glr.c:816 */ +#line 4351 "src/parser_proc.c" /* glr.c:816 */ break; case 295: -#line 493 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 499 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 2881 "src/parser_proc.c" /* glr.c:816 */ +#line 4359 "src/parser_proc.c" /* glr.c:816 */ break; case 296: -#line 499 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 505 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = NULL; } -#line 2889 "src/parser_proc.c" /* glr.c:816 */ +#line 4367 "src/parser_proc.c" /* glr.c:816 */ break; case 297: -#line 502 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 508 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = (*(struct psi_cpp_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 2897 "src/parser_proc.c" /* glr.c:816 */ +#line 4375 "src/parser_proc.c" /* glr.c:816 */ break; case 298: -#line 508 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 514 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { struct psi_token *msg = NULL; @@ -2921,201 +4399,222 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, } (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 2925 "src/parser_proc.c" /* glr.c:816 */ +#line 4403 "src/parser_proc.c" /* glr.c:816 */ break; case 299: -#line 531 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 537 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)))); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 2934 "src/parser_proc.c" /* glr.c:816 */ +#line 4412 "src/parser_proc.c" /* glr.c:816 */ break; case 300: -#line 535 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 541 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, NULL); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2943 "src/parser_proc.c" /* glr.c:816 */ +#line 4421 "src/parser_proc.c" /* glr.c:816 */ break; case 301: -#line 539 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 545 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)))); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 2953 "src/parser_proc.c" /* glr.c:816 */ +#line 4431 "src/parser_proc.c" /* glr.c:816 */ break; case 302: -#line 544 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 550 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_cpp_macro_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 2962 "src/parser_proc.c" /* glr.c:816 */ +#line 4440 "src/parser_proc.c" /* glr.c:816 */ break; case 303: -#line 548 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 554 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 2971 "src/parser_proc.c" /* glr.c:816 */ +#line 4449 "src/parser_proc.c" /* glr.c:816 */ break; case 304: -#line 552 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 558 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_cpp_exp **)(&(*yyvalp))) = psi_cpp_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, NULL); (*(struct psi_cpp_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 2980 "src/parser_proc.c" /* glr.c:816 */ +#line 4458 "src/parser_proc.c" /* glr.c:816 */ break; case 305: -#line 556 "src/parser_proc_grammar.y" /* glr.c:816 */ +#line 562 "src/parser_proc_grammar.y" /* glr.c:816 */ { psi_plist_free((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_cpp_exp **)(&(*yyvalp))) = NULL; } -#line 2989 "src/parser_proc.c" /* glr.c:816 */ +#line 4467 "src/parser_proc.c" /* glr.c:816 */ break; - case 329: -#line 610 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 322: +#line 606 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; + (*(struct psi_cpp_macro_decl **)(&(*yyvalp))) = psi_cpp_macro_decl_init(NULL, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL); + (*(struct psi_cpp_macro_decl **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); +} +#line 4477 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 323: +#line 611 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_cpp_macro_decl **)(&(*yyvalp))) = psi_cpp_macro_decl_init((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL); (*(struct psi_cpp_macro_decl **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); } -#line 2999 "src/parser_proc.c" /* glr.c:816 */ +#line 4487 "src/parser_proc.c" /* glr.c:816 */ break; - case 330: -#line 615 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 324: +#line 616 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_cpp_macro_decl **)(&(*yyvalp))) = psi_cpp_macro_decl_init(NULL, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL); + (*(struct psi_cpp_macro_decl **)(&(*yyvalp))) = psi_cpp_macro_decl_init(NULL, psi_num_exp_tokens((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_cpp_macro_decl **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3009 "src/parser_proc.c" /* glr.c:816 */ +#line 4497 "src/parser_proc.c" /* glr.c:816 */ break; - case 331: -#line 623 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 325: +#line 621 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + struct psi_plist *list = psi_plist_init((psi_plist_dtor) psi_token_free); + (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; + (*(struct psi_cpp_macro_decl **)(&(*yyvalp))) = psi_cpp_macro_decl_init(NULL, psi_plist_add(list, &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))), NULL); + (*(struct psi_cpp_macro_decl **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); +} +#line 4508 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 326: +#line 630 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_init(NULL); } -#line 3017 "src/parser_proc.c" /* glr.c:816 */ +#line 4516 "src/parser_proc.c" /* glr.c:816 */ break; - case 332: -#line 626 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 327: +#line 633 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_init(NULL); /* FIXME */ } -#line 3025 "src/parser_proc.c" /* glr.c:816 */ +#line 4524 "src/parser_proc.c" /* glr.c:816 */ break; - case 334: -#line 630 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 329: +#line 637 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); } -#line 3033 "src/parser_proc.c" /* glr.c:816 */ +#line 4532 "src/parser_proc.c" /* glr.c:816 */ break; - case 335: -#line 636 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 330: +#line 643 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_token_free), &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3043 "src/parser_proc.c" /* glr.c:816 */ +#line 4542 "src/parser_proc.c" /* glr.c:816 */ break; - case 336: -#line 641 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 331: +#line 648 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3053 "src/parser_proc.c" /* glr.c:816 */ +#line 4552 "src/parser_proc.c" /* glr.c:816 */ break; - case 337: -#line 649 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 332: +#line 656 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 3061 "src/parser_proc.c" /* glr.c:816 */ +#line 4560 "src/parser_proc.c" /* glr.c:816 */ break; - case 339: -#line 656 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 334: +#line 663 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_token_free), &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3070 "src/parser_proc.c" /* glr.c:816 */ +#line 4569 "src/parser_proc.c" /* glr.c:816 */ break; - case 340: -#line 660 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 335: +#line 667 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3079 "src/parser_proc.c" /* glr.c:816 */ +#line 4578 "src/parser_proc.c" /* glr.c:816 */ break; - case 341: -#line 667 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 336: +#line 674 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_unary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 3088 "src/parser_proc.c" /* glr.c:816 */ +#line 4587 "src/parser_proc.c" /* glr.c:816 */ break; - case 342: -#line 671 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 337: +#line 678 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_unary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3097 "src/parser_proc.c" /* glr.c:816 */ +#line 4596 "src/parser_proc.c" /* glr.c:816 */ break; - case 343: -#line 675 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 338: +#line 682 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_binary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3106 "src/parser_proc.c" /* glr.c:816 */ +#line 4605 "src/parser_proc.c" /* glr.c:816 */ break; - case 344: -#line 679 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 339: +#line 686 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_ternary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 3115 "src/parser_proc.c" /* glr.c:816 */ +#line 4614 "src/parser_proc.c" /* glr.c:816 */ break; - case 345: -#line 684 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 340: +#line 691 "src/parser_proc_grammar.y" /* glr.c:816 */ { { uint8_t exists; @@ -3123,14 +4622,15 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; exists = psi_cpp_defined(P->preproc, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init(PSI_T_UINT8, &exists, 0)); - (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); + (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } } -#line 3130 "src/parser_proc.c" /* glr.c:816 */ +#line 4630 "src/parser_proc.c" /* glr.c:816 */ break; - case 346: -#line 694 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 341: +#line 702 "src/parser_proc_grammar.y" /* glr.c:816 */ { { uint8_t exists; @@ -3138,223 +4638,176 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; exists = psi_cpp_defined(P->preproc, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init(PSI_T_UINT8, &exists, 0)); - (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); + (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 3145 "src/parser_proc.c" /* glr.c:816 */ +#line 4646 "src/parser_proc.c" /* glr.c:816 */ break; - case 347: -#line 704 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 342: +#line 713 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->flags)); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3155 "src/parser_proc.c" /* glr.c:816 */ +#line 4656 "src/parser_proc.c" /* glr.c:816 */ break; - case 348: -#line 709 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 343: +#line 718 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0)); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3165 "src/parser_proc.c" /* glr.c:816 */ +#line 4666 "src/parser_proc.c" /* glr.c:816 */ break; - case 349: -#line 714 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 344: +#line 723 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num((*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 3174 "src/parser_proc.c" /* glr.c:816 */ +#line 4675 "src/parser_proc.c" /* glr.c:816 */ break; - case 350: -#line 718 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 345: +#line 727 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init(PSI_T_DEFINE, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0)); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3185 "src/parser_proc.c" /* glr.c:816 */ +#line 4686 "src/parser_proc.c" /* glr.c:816 */ break; - case 351: -#line 724 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 346: +#line 733 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num(psi_number_init(PSI_T_FUNCTION, psi_cpp_macro_call_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))), 0)); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); + (*(struct psi_num_exp **)(&(*yyvalp)))->data.n->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 3196 "src/parser_proc.c" /* glr.c:816 */ +#line 4698 "src/parser_proc.c" /* glr.c:816 */ break; - case 352: -#line 733 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 347: +#line 743 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 3204 "src/parser_proc.c" /* glr.c:816 */ +#line 4706 "src/parser_proc.c" /* glr.c:816 */ break; - case 354: -#line 740 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 349: +#line 750 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_num_exp_free), &(*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3213 "src/parser_proc.c" /* glr.c:816 */ +#line 4715 "src/parser_proc.c" /* glr.c:816 */ break; - case 355: -#line 744 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 350: +#line 754 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3221 "src/parser_proc.c" /* glr.c:816 */ +#line 4723 "src/parser_proc.c" /* glr.c:816 */ break; - case 356: -#line 750 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 351: +#line 760 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_const **)(&(*yyvalp))) = psi_const_init((*(struct psi_const_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text, (*(struct psi_impl_def_val **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_const **)(&(*yyvalp))) = psi_const_init((*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text, (*(struct psi_impl_def_val **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_const **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 3230 "src/parser_proc.c" /* glr.c:816 */ +#line 4732 "src/parser_proc.c" /* glr.c:816 */ break; - case 357: -#line 757 "src/parser_proc_grammar.y" /* glr.c:816 */ - { - (*(struct psi_const_type **)(&(*yyvalp))) = psi_const_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); -} -#line 3238 "src/parser_proc.c" /* glr.c:816 */ - break; - - case 362: -#line 770 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 352: +#line 767 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_impl_def_val **)(&(*yyvalp))) = NULL; + (*(struct psi_impl_def_val **)(&(*yyvalp))) = psi_impl_def_val_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); + (*(struct psi_impl_def_val **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3246 "src/parser_proc.c" /* glr.c:816 */ +#line 4741 "src/parser_proc.c" /* glr.c:816 */ break; - case 363: -#line 773 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 353: +#line 771 "src/parser_proc_grammar.y" /* glr.c:816 */ { - /* FIXME */ - if (psi_num_exp_validate(PSI_DATA(P), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL, NULL, NULL, NULL, NULL)) { - impl_val res = {0}; - token_t type = psi_num_exp_exec((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), &res, NULL, &P->preproc->defs); - - if (type == PSI_T_FLOAT || type == PSI_T_DOUBLE) { - (*(struct psi_impl_def_val **)(&(*yyvalp))) = psi_impl_def_val_init(type, NULL); - } else { - (*(struct psi_impl_def_val **)(&(*yyvalp))) = psi_impl_def_val_init(PSI_T_INT, NULL); - } - - switch (type) { - case PSI_T_UINT8: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.u8; break; - case PSI_T_UINT16: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.u16; break; - case PSI_T_UINT32: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.u32; break; - case PSI_T_UINT64: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.u64; break; /* FIXME */ - case PSI_T_INT8: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.i8; break; - case PSI_T_INT16: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.i16; break; - case PSI_T_INT32: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.i32; break; - case PSI_T_INT64: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.zend.lval = res.i64; break; - case PSI_T_FLOAT: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.dval = res.fval; break; - case PSI_T_DOUBLE: (*(struct psi_impl_def_val **)(&(*yyvalp)))->ival.dval = res.dval; break; - default: - assert(0); - - } - } else { - (*(struct psi_impl_def_val **)(&(*yyvalp))) = NULL; - } - psi_num_exp_free(&(*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); + (*(struct psi_impl_def_val **)(&(*yyvalp))) = psi_impl_def_val_init(PSI_T_NUMBER, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); + (*(struct psi_impl_def_val **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 3283 "src/parser_proc.c" /* glr.c:816 */ +#line 4750 "src/parser_proc.c" /* glr.c:816 */ break; - case 364: -#line 805 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 354: +#line 775 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_def_val **)(&(*yyvalp))) = psi_impl_def_val_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_impl_def_val **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3292 "src/parser_proc.c" /* glr.c:816 */ +#line 4759 "src/parser_proc.c" /* glr.c:816 */ break; - case 369: -#line 819 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 358: +#line 788 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3300 "src/parser_proc.c" /* glr.c:816 */ - break; - - case 370: -#line 822 "src/parser_proc_grammar.y" /* glr.c:816 */ - { - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init(PSI_T_VOID, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, 0, 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); -} -#line 3314 "src/parser_proc.c" /* glr.c:816 */ +#line 4767 "src/parser_proc.c" /* glr.c:816 */ break; - case 371: -#line 831 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 359: +#line 802 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3322 "src/parser_proc.c" /* glr.c:816 */ +#line 4775 "src/parser_proc.c" /* glr.c:816 */ break; - case 372: -#line 837 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 360: +#line 808 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3330 "src/parser_proc.c" /* glr.c:816 */ +#line 4783 "src/parser_proc.c" /* glr.c:816 */ break; - case 373: -#line 840 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 361: +#line 811 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3338 "src/parser_proc.c" /* glr.c:816 */ +#line 4791 "src/parser_proc.c" /* glr.c:816 */ break; - case 374: -#line 846 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 362: +#line 817 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3346 "src/parser_proc.c" /* glr.c:816 */ +#line 4799 "src/parser_proc.c" /* glr.c:816 */ break; - case 375: -#line 849 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 363: +#line 820 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3354 "src/parser_proc.c" /* glr.c:816 */ +#line 4807 "src/parser_proc.c" /* glr.c:816 */ break; - case 377: -#line 856 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 365: +#line 827 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( psi_decl_type_init(PSI_T_FUNCTION, (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->var->name), @@ -3363,11 +4816,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->token); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.func = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3367 "src/parser_proc.c" /* glr.c:816 */ +#line 4820 "src/parser_proc.c" /* glr.c:816 */ break; - case 378: -#line 864 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 366: +#line 835 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( @@ -3379,11 +4832,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.enm = (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); psi_parser_proc_add_enum(P, (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3383 "src/parser_proc.c" /* glr.c:816 */ +#line 4836 "src/parser_proc.c" /* glr.c:816 */ break; - case 379: -#line 875 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 367: +#line 846 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init(psi_decl_type_init(PSI_T_STRUCT, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text), (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)); @@ -3393,11 +4846,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.strct->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)).len; psi_parser_proc_add_struct(P, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.strct); } -#line 3397 "src/parser_proc.c" /* glr.c:816 */ +#line 4850 "src/parser_proc.c" /* glr.c:816 */ break; - case 380: -#line 884 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 368: +#line 855 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init(psi_decl_type_init(PSI_T_UNION, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text), (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)); @@ -3407,20 +4860,20 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.unn->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)).len; psi_parser_proc_add_union(P, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.unn); } -#line 3411 "src/parser_proc.c" /* glr.c:816 */ +#line 4864 "src/parser_proc.c" /* glr.c:816 */ break; - case 382: -#line 897 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 370: +#line 868 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), psi_decl_var_init(NULL, 0, 0)); (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 3420 "src/parser_proc.c" /* glr.c:816 */ +#line 4873 "src/parser_proc.c" /* glr.c:816 */ break; - case 383: -#line 901 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 371: +#line 872 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( psi_decl_type_init(PSI_T_ENUM, (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->name), @@ -3431,11 +4884,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.enm = (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); psi_parser_proc_add_enum(P, (*(struct psi_decl_enum **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3435 "src/parser_proc.c" /* glr.c:816 */ +#line 4888 "src/parser_proc.c" /* glr.c:816 */ break; - case 384: -#line 911 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 372: +#line 882 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init(psi_decl_type_init(PSI_T_STRUCT, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text), psi_decl_var_init(NULL, 0, 0)); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); @@ -3445,11 +4898,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.strct->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)).len; psi_parser_proc_add_struct(P, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.strct); } -#line 3449 "src/parser_proc.c" /* glr.c:816 */ +#line 4902 "src/parser_proc.c" /* glr.c:816 */ break; - case 385: -#line 920 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 373: +#line 891 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init(psi_decl_type_init(PSI_T_UNION, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text), psi_decl_var_init(NULL, 0, 0)); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); @@ -3459,138 +4912,146 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.unn->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)).len; psi_parser_proc_add_union(P, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.unn); } -#line 3463 "src/parser_proc.c" /* glr.c:816 */ +#line 4916 "src/parser_proc.c" /* glr.c:816 */ break; - case 386: -#line 932 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 375: +#line 904 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_type **)(&(*yyvalp))) = (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3471 "src/parser_proc.c" /* glr.c:816 */ +#line 4924 "src/parser_proc.c" /* glr.c:816 */ break; - case 387: -#line 935 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 376: +#line 907 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_decl_type **)(&(*yyvalp))) = (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); + (*(struct psi_decl_type **)(&(*yyvalp))) = (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3479 "src/parser_proc.c" /* glr.c:816 */ +#line 4932 "src/parser_proc.c" /* glr.c:816 */ break; - case 389: -#line 942 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 379: +#line 918 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_type **)(&(*yyvalp))) = psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_decl_type **)(&(*yyvalp)))->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3488 "src/parser_proc.c" /* glr.c:816 */ +#line 4941 "src/parser_proc.c" /* glr.c:816 */ break; - case 391: -#line 950 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 381: +#line 926 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_type **)(&(*yyvalp))) = psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_decl_type **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3498 "src/parser_proc.c" /* glr.c:816 */ +#line 4951 "src/parser_proc.c" /* glr.c:816 */ break; - case 392: -#line 955 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 382: +#line 931 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_type **)(&(*yyvalp))) = psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_decl_type **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3508 "src/parser_proc.c" /* glr.c:816 */ +#line 4961 "src/parser_proc.c" /* glr.c:816 */ break; - case 393: -#line 960 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 383: +#line 936 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_type **)(&(*yyvalp))) = psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_decl_type **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3518 "src/parser_proc.c" /* glr.c:816 */ +#line 4971 "src/parser_proc.c" /* glr.c:816 */ break; - case 396: -#line 970 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 386: +#line 946 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3526 "src/parser_proc.c" /* glr.c:816 */ +#line 4979 "src/parser_proc.c" /* glr.c:816 */ break; - case 397: -#line 976 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 387: +#line 949 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3534 "src/parser_proc.c" /* glr.c:816 */ +#line 4987 "src/parser_proc.c" /* glr.c:816 */ break; - case 398: -#line 979 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 388: +#line 955 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3542 "src/parser_proc.c" /* glr.c:816 */ +#line 4995 "src/parser_proc.c" /* glr.c:816 */ break; - case 399: -#line 982 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 389: +#line 958 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); +} +#line 5003 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 390: +#line 961 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3550 "src/parser_proc.c" /* glr.c:816 */ +#line 5011 "src/parser_proc.c" /* glr.c:816 */ break; - case 402: -#line 993 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 393: +#line 972 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3558 "src/parser_proc.c" /* glr.c:816 */ +#line 5019 "src/parser_proc.c" /* glr.c:816 */ break; - case 403: -#line 996 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 394: +#line 975 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3566 "src/parser_proc.c" /* glr.c:816 */ +#line 5027 "src/parser_proc.c" /* glr.c:816 */ break; - case 404: -#line 999 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 395: +#line 978 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3574 "src/parser_proc.c" /* glr.c:816 */ +#line 5035 "src/parser_proc.c" /* glr.c:816 */ break; - case 405: -#line 1005 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 396: +#line 984 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3582 "src/parser_proc.c" /* glr.c:816 */ +#line 5043 "src/parser_proc.c" /* glr.c:816 */ break; - case 406: -#line 1008 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 397: +#line 987 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3590 "src/parser_proc.c" /* glr.c:816 */ +#line 5051 "src/parser_proc.c" /* glr.c:816 */ break; - case 407: -#line 1011 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 398: +#line 990 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -3599,11 +5060,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 3603 "src/parser_proc.c" /* glr.c:816 */ +#line 5064 "src/parser_proc.c" /* glr.c:816 */ break; - case 408: -#line 1019 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 399: +#line 998 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -3613,35 +5074,35 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } } -#line 3617 "src/parser_proc.c" /* glr.c:816 */ +#line 5078 "src/parser_proc.c" /* glr.c:816 */ break; - case 409: -#line 1031 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 400: +#line 1010 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = NULL; } -#line 3625 "src/parser_proc.c" /* glr.c:816 */ +#line 5086 "src/parser_proc.c" /* glr.c:816 */ break; - case 410: -#line 1034 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 401: +#line 1013 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3633 "src/parser_proc.c" /* glr.c:816 */ +#line 5094 "src/parser_proc.c" /* glr.c:816 */ break; - case 411: -#line 1037 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 402: +#line 1016 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3641 "src/parser_proc.c" /* glr.c:816 */ +#line 5102 "src/parser_proc.c" /* glr.c:816 */ break; - case 412: -#line 1040 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 403: +#line 1019 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -3649,19 +5110,19 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 3653 "src/parser_proc.c" /* glr.c:816 */ +#line 5114 "src/parser_proc.c" /* glr.c:816 */ break; - case 413: -#line 1047 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 404: +#line 1026 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3661 "src/parser_proc.c" /* glr.c:816 */ +#line 5122 "src/parser_proc.c" /* glr.c:816 */ break; - case 414: -#line 1050 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 405: +#line 1029 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -3669,43 +5130,43 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 3673 "src/parser_proc.c" /* glr.c:816 */ +#line 5134 "src/parser_proc.c" /* glr.c:816 */ break; - case 415: -#line 1060 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 406: +#line 1039 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = NULL; } -#line 3681 "src/parser_proc.c" /* glr.c:816 */ +#line 5142 "src/parser_proc.c" /* glr.c:816 */ break; - case 417: -#line 1066 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 408: +#line 1045 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = NULL; } -#line 3689 "src/parser_proc.c" /* glr.c:816 */ +#line 5150 "src/parser_proc.c" /* glr.c:816 */ break; - case 421: -#line 1075 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 412: +#line 1054 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = NULL; } -#line 3697 "src/parser_proc.c" /* glr.c:816 */ +#line 5158 "src/parser_proc.c" /* glr.c:816 */ break; - case 422: -#line 1078 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 413: +#line 1057 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3705 "src/parser_proc.c" /* glr.c:816 */ +#line 5166 "src/parser_proc.c" /* glr.c:816 */ break; - case 423: -#line 1081 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 414: +#line 1060 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat(" ", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -3714,27 +5175,68 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 3718 "src/parser_proc.c" /* glr.c:816 */ +#line 5179 "src/parser_proc.c" /* glr.c:816 */ break; - case 424: -#line 1092 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 415: +#line 1071 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); + if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))) { + (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->redir = strdup((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text); + free((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + } } -#line 3726 "src/parser_proc.c" /* glr.c:816 */ +#line 5191 "src/parser_proc.c" /* glr.c:816 */ break; - case 425: -#line 1095 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 416: +#line 1078 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); + if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))) { + (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->redir = strdup((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text); + free((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + } +} +#line 5203 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 417: +#line 1088 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&(*yyvalp))) = NULL; +} +#line 5211 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 418: +#line 1091 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&(*yyvalp))) = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); +} +#line 5219 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 419: +#line 1097 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); +} +#line 5227 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 420: +#line 1100 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_token **)(&(*yyvalp))) = psi_token_cat("", 2, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); + free((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3734 "src/parser_proc.c" /* glr.c:816 */ +#line 5236 "src/parser_proc.c" /* glr.c:816 */ break; - case 430: -#line 1111 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 421: +#line 1107 "src/parser_proc_grammar.y" /* glr.c:816 */ { struct psi_plist *list = psi_plist_init((psi_plist_dtor) psi_decl_extvar_free); @@ -3762,76 +5264,84 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_plist **)(&(*yyvalp))) = list; } -#line 3766 "src/parser_proc.c" /* glr.c:816 */ +#line 5268 "src/parser_proc.c" /* glr.c:816 */ break; - case 431: -#line 1141 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 422: +#line 1137 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 3774 "src/parser_proc.c" /* glr.c:816 */ +#line 5276 "src/parser_proc.c" /* glr.c:816 */ break; - case 432: -#line 1144 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 423: +#line 1140 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3782 "src/parser_proc.c" /* glr.c:816 */ +#line 5284 "src/parser_proc.c" /* glr.c:816 */ break; - case 433: -#line 1150 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 424: +#line 1146 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_decl_var_free), &(*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3790 "src/parser_proc.c" /* glr.c:816 */ +#line 5292 "src/parser_proc.c" /* glr.c:816 */ break; - case 434: -#line 1153 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 425: +#line 1149 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3798 "src/parser_proc.c" /* glr.c:816 */ +#line 5300 "src/parser_proc.c" /* glr.c:816 */ break; - case 435: -#line 1159 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 426: +#line 1155 "src/parser_proc_grammar.y" /* glr.c:816 */ { - psi_decl_free(&(*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3806 "src/parser_proc.c" /* glr.c:816 */ +#line 5308 "src/parser_proc.c" /* glr.c:816 */ break; - case 436: -#line 1162 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 427: +#line 1158 "src/parser_proc_grammar.y" /* glr.c:816 */ { - psi_decl_free(&(*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3814 "src/parser_proc.c" /* glr.c:816 */ +#line 5316 "src/parser_proc.c" /* glr.c:816 */ break; - case 437: -#line 1165 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 428: +#line 1161 "src/parser_proc_grammar.y" /* glr.c:816 */ { - psi_decl_free(&(*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 3822 "src/parser_proc.c" /* glr.c:816 */ +#line 5324 "src/parser_proc.c" /* glr.c:816 */ break; - case 444: -#line 1186 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 429: +#line 1164 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); +} +#line 5332 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 436: +#line 1185 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_decl **)(&(*yyvalp)))->abi = psi_decl_abi_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text); } -#line 3831 "src/parser_proc.c" /* glr.c:816 */ +#line 5341 "src/parser_proc.c" /* glr.c:816 */ break; - case 447: -#line 1198 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 439: +#line 1197 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { @@ -3839,11 +5349,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } } -#line 3843 "src/parser_proc.c" /* glr.c:816 */ +#line 5353 "src/parser_proc.c" /* glr.c:816 */ break; - case 448: -#line 1205 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 440: +#line 1204 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); (*(struct psi_decl **)(&(*yyvalp)))->varargs = 1; @@ -3852,11 +5362,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } } -#line 3856 "src/parser_proc.c" /* glr.c:816 */ +#line 5366 "src/parser_proc.c" /* glr.c:816 */ break; - case 449: -#line 1216 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 441: +#line 1215 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { @@ -3864,11 +5374,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } } -#line 3868 "src/parser_proc.c" /* glr.c:816 */ +#line 5378 "src/parser_proc.c" /* glr.c:816 */ break; - case 450: -#line 1223 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 442: +#line 1222 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); (*(struct psi_decl **)(&(*yyvalp)))->varargs = 1; @@ -3877,172 +5387,168 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } } -#line 3881 "src/parser_proc.c" /* glr.c:816 */ +#line 5391 "src/parser_proc.c" /* glr.c:816 */ break; - case 451: -#line 1234 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 443: +#line 1230 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); - (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval)), psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), 0)); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval)); + (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval))->type = PSI_T_NAME; + + struct psi_token *type_token = psi_token_append("@", psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval))), 1, "rval"); + struct psi_decl_arg *rval_func = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-12)].yystate.yysemantics.yysval)), psi_decl_var_init(type_token->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-11)].yystate.yysemantics.yysval)), 0)); + struct psi_decl *rval_decl = psi_decl_init(rval_func, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); + + rval_func->var->token = psi_token_copy(type_token); + rval_func->token = psi_token_copy(type_token); + if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { + rval_func->var->pointer_level += 1; + rval_func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); + } + + struct psi_decl_type *type = psi_decl_type_init(PSI_T_FUNCTION, type_token->text); + struct psi_decl_arg *func = psi_decl_arg_init(type, psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval))->text, 1, 0)); + + type->real.func = rval_decl; + func->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval))); + func->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval))); + + (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init(func, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))); + } -#line 3893 "src/parser_proc.c" /* glr.c:816 */ +#line 5421 "src/parser_proc.c" /* glr.c:816 */ break; - case 452: -#line 1241 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 444: +#line 1258 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); - (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); + if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { + (*(struct psi_decl **)(&(*yyvalp)))->func->var->pointer_level += 1; + (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); + } } -#line 3909 "src/parser_proc.c" /* glr.c:816 */ +#line 5433 "src/parser_proc.c" /* glr.c:816 */ break; - case 453: -#line 1252 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 445: +#line 1265 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); - (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp))) = psi_decl_init((*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); + (*(struct psi_decl **)(&(*yyvalp)))->varargs = 1; + if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { + (*(struct psi_decl **)(&(*yyvalp)))->func->var->pointer_level += 1; + (*(struct psi_decl **)(&(*yyvalp)))->func->var->array_size = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); + } } -#line 3925 "src/parser_proc.c" /* glr.c:816 */ +#line 5446 "src/parser_proc.c" /* glr.c:816 */ break; - case 454: -#line 1263 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 446: +#line 1276 "src/parser_proc_grammar.y" /* glr.c:816 */ { (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, 0, 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); + (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval)), psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), 0)); (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 3941 "src/parser_proc.c" /* glr.c:816 */ +#line 5458 "src/parser_proc.c" /* glr.c:816 */ break; - case 456: -#line 1278 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 447: +#line 1322 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0, 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); + (void) (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); + (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), psi_decl_var_init(NULL, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), 0)); + (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); + (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 3955 "src/parser_proc.c" /* glr.c:816 */ +#line 5469 "src/parser_proc.c" /* glr.c:816 */ break; - case 457: -#line 1290 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 449: +#line 1378 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 3963 "src/parser_proc.c" /* glr.c:816 */ +#line 5477 "src/parser_proc.c" /* glr.c:816 */ break; - case 458: -#line 1293 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 450: +#line 1381 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 3971 "src/parser_proc.c" /* glr.c:816 */ +#line 5485 "src/parser_proc.c" /* glr.c:816 */ break; - case 459: -#line 1296 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 451: +#line 1384 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 3979 "src/parser_proc.c" /* glr.c:816 */ +#line 5493 "src/parser_proc.c" /* glr.c:816 */ break; - case 460: -#line 1302 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 452: +#line 1390 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_decl_arg_free), &(*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3987 "src/parser_proc.c" /* glr.c:816 */ +#line 5501 "src/parser_proc.c" /* glr.c:816 */ break; - case 461: -#line 1305 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 453: +#line 1393 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 3995 "src/parser_proc.c" /* glr.c:816 */ +#line 5509 "src/parser_proc.c" /* glr.c:816 */ break; - case 462: -#line 1312 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 454: +#line 1399 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); -} -#line 4003 "src/parser_proc.c" /* glr.c:816 */ - break; + char digest[17]; + struct psi_token *name; - case 463: -#line 1315 "src/parser_proc_grammar.y" /* glr.c:816 */ - { + psi_token_hash((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func ->token, digest); + name = psi_token_append("@", psi_token_copy((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->token), 2, "funct", digest); + (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), - psi_decl_var_init(NULL, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), 0) + psi_decl_type_init(PSI_T_FUNCTION, name->text), + psi_decl_var_copy((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->var) ); + (*(struct psi_decl_arg **)(&(*yyvalp)))->token = name; + (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->token); + (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.func = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4014 "src/parser_proc.c" /* glr.c:816 */ +#line 5529 "src/parser_proc.c" /* glr.c:816 */ break; - case 464: -#line 1321 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 455: +#line 1414 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text), - psi_decl_var_init(NULL, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + (*(struct psi_decl_arg **)(&(*yyvalp))) = (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4028 "src/parser_proc.c" /* glr.c:816 */ +#line 5537 "src/parser_proc.c" /* glr.c:816 */ break; - case 465: -#line 1330 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 456: +#line 1417 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text), + (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), psi_decl_var_init(NULL, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), 0) ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4042 "src/parser_proc.c" /* glr.c:816 */ +#line 5548 "src/parser_proc.c" /* glr.c:816 */ break; - case 466: -#line 1342 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 457: +#line 1446 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( psi_decl_type_init(PSI_T_FUNCTION, (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->var->name), @@ -4051,69 +5557,39 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->func->token); (*(struct psi_decl_arg **)(&(*yyvalp)))->type->real.func = (*(struct psi_decl **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4055 "src/parser_proc.c" /* glr.c:816 */ +#line 5561 "src/parser_proc.c" /* glr.c:816 */ break; - case 467: -#line 1350 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 458: +#line 1454 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4063 "src/parser_proc.c" /* glr.c:816 */ - break; - - case 468: -#line 1353 "src/parser_proc_grammar.y" /* glr.c:816 */ - { - (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); -} -#line 4078 "src/parser_proc.c" /* glr.c:816 */ - break; - - case 469: -#line 1363 "src/parser_proc_grammar.y" /* glr.c:816 */ - { - (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; - (*(struct psi_decl_arg **)(&(*yyvalp))) = psi_decl_arg_init( - psi_decl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text), - psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), 0) - ); - (*(struct psi_decl_arg **)(&(*yyvalp)))->type->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); - (*(struct psi_decl_arg **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); -} -#line 4093 "src/parser_proc.c" /* glr.c:816 */ +#line 5569 "src/parser_proc.c" /* glr.c:816 */ break; - case 470: -#line 1376 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 459: +#line 1482 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_var **)(&(*yyvalp))) = psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)) + !! (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_decl_var **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4103 "src/parser_proc.c" /* glr.c:816 */ +#line 5579 "src/parser_proc.c" /* glr.c:816 */ break; - case 471: -#line 1381 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 460: +#line 1487 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_var **)(&(*yyvalp))) = psi_decl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text, !! (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_decl_var **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4113 "src/parser_proc.c" /* glr.c:816 */ +#line 5589 "src/parser_proc.c" /* glr.c:816 */ break; - case 472: -#line 1389 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 461: +#line 1495 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_union **)(&(*yyvalp))) = psi_decl_union_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -4121,11 +5597,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_union **)(&(*yyvalp)))->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)).len; (*(struct psi_decl_union **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 4125 "src/parser_proc.c" /* glr.c:816 */ +#line 5601 "src/parser_proc.c" /* glr.c:816 */ break; - case 473: -#line 1399 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 462: +#line 1505 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_struct **)(&(*yyvalp))) = psi_decl_struct_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -4133,27 +5609,27 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_decl_struct **)(&(*yyvalp)))->size = (*(struct psi_layout*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)).len; (*(struct psi_decl_struct **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 4137 "src/parser_proc.c" /* glr.c:816 */ +#line 5613 "src/parser_proc.c" /* glr.c:816 */ break; - case 474: -#line 1409 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 463: +#line 1515 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 4145 "src/parser_proc.c" /* glr.c:816 */ +#line 5621 "src/parser_proc.c" /* glr.c:816 */ break; - case 476: -#line 1416 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 465: +#line 1522 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 4153 "src/parser_proc.c" /* glr.c:816 */ +#line 5629 "src/parser_proc.c" /* glr.c:816 */ break; - case 477: -#line 1422 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 466: +#line 1528 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->layout = (*(struct psi_layout **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_decl_arg_free), &(*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); @@ -4168,11 +5644,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, free((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 4172 "src/parser_proc.c" /* glr.c:816 */ +#line 5648 "src/parser_proc.c" /* glr.c:816 */ break; - case 478: -#line 1436 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 467: +#line 1542 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->layout = (*(struct psi_layout **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), &(*(struct psi_decl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); @@ -4187,27 +5663,27 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, free((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } } -#line 4191 "src/parser_proc.c" /* glr.c:816 */ +#line 5667 "src/parser_proc.c" /* glr.c:816 */ break; - case 479: -#line 1453 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 468: +#line 1559 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 4199 "src/parser_proc.c" /* glr.c:816 */ +#line 5675 "src/parser_proc.c" /* glr.c:816 */ break; - case 480: -#line 1456 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 469: +#line 1562 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4207 "src/parser_proc.c" /* glr.c:816 */ +#line 5683 "src/parser_proc.c" /* glr.c:816 */ break; - case 481: -#line 1462 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 470: +#line 1568 "src/parser_proc_grammar.y" /* glr.c:816 */ { { struct psi_decl_arg *arg = psi_decl_arg_init(NULL, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); @@ -4215,11 +5691,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_decl_arg_free), &arg); } } -#line 4219 "src/parser_proc.c" /* glr.c:816 */ +#line 5695 "src/parser_proc.c" /* glr.c:816 */ break; - case 482: -#line 1469 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 471: +#line 1575 "src/parser_proc_grammar.y" /* glr.c:816 */ { { struct psi_decl_arg *arg = psi_decl_arg_init(NULL, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); @@ -4227,189 +5703,189 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), &arg); } } -#line 4231 "src/parser_proc.c" /* glr.c:816 */ +#line 5707 "src/parser_proc.c" /* glr.c:816 */ break; - case 483: -#line 1479 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 472: +#line 1585 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_decl_enum **)(&(*yyvalp))) = psi_decl_enum_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); (*(struct psi_decl_enum **)(&(*yyvalp)))->token = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)); } -#line 4240 "src/parser_proc.c" /* glr.c:816 */ +#line 5716 "src/parser_proc.c" /* glr.c:816 */ break; - case 484: -#line 1486 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 473: +#line 1592 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_decl_enum_item_free), &(*(struct psi_decl_enum_item **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4248 "src/parser_proc.c" /* glr.c:816 */ +#line 5724 "src/parser_proc.c" /* glr.c:816 */ break; - case 485: -#line 1489 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 474: +#line 1595 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_decl_enum_item **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4256 "src/parser_proc.c" /* glr.c:816 */ +#line 5732 "src/parser_proc.c" /* glr.c:816 */ break; - case 486: -#line 1495 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 475: +#line 1601 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_enum_item **)(&(*yyvalp))) = psi_decl_enum_item_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, NULL); (*(struct psi_decl_enum_item **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4266 "src/parser_proc.c" /* glr.c:816 */ +#line 5742 "src/parser_proc.c" /* glr.c:816 */ break; - case 487: -#line 1500 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 476: +#line 1606 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_decl_enum_item **)(&(*yyvalp))) = psi_decl_enum_item_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->text, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_decl_enum_item **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 4276 "src/parser_proc.c" /* glr.c:816 */ +#line 5752 "src/parser_proc.c" /* glr.c:816 */ break; - case 488: -#line 1508 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 477: +#line 1614 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_num((*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 4285 "src/parser_proc.c" /* glr.c:816 */ +#line 5761 "src/parser_proc.c" /* glr.c:816 */ break; - case 489: -#line 1512 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 478: +#line 1618 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_cast((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->token); } -#line 4294 "src/parser_proc.c" /* glr.c:816 */ +#line 5770 "src/parser_proc.c" /* glr.c:816 */ break; - case 490: -#line 1516 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 479: +#line 1622 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_unary(PSI_T_LPAREN, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 4303 "src/parser_proc.c" /* glr.c:816 */ +#line 5779 "src/parser_proc.c" /* glr.c:816 */ break; - case 491: -#line 1520 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 480: +#line 1626 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_binary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4312 "src/parser_proc.c" /* glr.c:816 */ +#line 5788 "src/parser_proc.c" /* glr.c:816 */ break; - case 492: -#line 1524 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 481: +#line 1630 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_unary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4321 "src/parser_proc.c" /* glr.c:816 */ +#line 5797 "src/parser_proc.c" /* glr.c:816 */ break; - case 493: -#line 1528 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 482: +#line 1634 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_num_exp **)(&(*yyvalp))) = psi_num_exp_init_ternary((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_num_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 4330 "src/parser_proc.c" /* glr.c:816 */ +#line 5806 "src/parser_proc.c" /* glr.c:816 */ break; - case 494: -#line 1535 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 483: +#line 1641 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->flags); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4339 "src/parser_proc.c" /* glr.c:816 */ +#line 5815 "src/parser_proc.c" /* glr.c:816 */ break; - case 495: -#line 1539 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 484: +#line 1645 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4348 "src/parser_proc.c" /* glr.c:816 */ +#line 5824 "src/parser_proc.c" /* glr.c:816 */ break; - case 496: -#line 1543 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 485: +#line 1649 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4357 "src/parser_proc.c" /* glr.c:816 */ +#line 5833 "src/parser_proc.c" /* glr.c:816 */ break; - case 497: -#line 1547 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 486: +#line 1653 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = psi_number_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, 0); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4366 "src/parser_proc.c" /* glr.c:816 */ +#line 5842 "src/parser_proc.c" /* glr.c:816 */ break; - case 498: -#line 1551 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 487: +#line 1657 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_NAME, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), 0); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 4375 "src/parser_proc.c" /* glr.c:816 */ +#line 5851 "src/parser_proc.c" /* glr.c:816 */ break; - case 499: -#line 1555 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 488: +#line 1661 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = (*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4383 "src/parser_proc.c" /* glr.c:816 */ +#line 5859 "src/parser_proc.c" /* glr.c:816 */ break; - case 500: -#line 1561 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 489: +#line 1667 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = (*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 4392 "src/parser_proc.c" /* glr.c:816 */ +#line 5868 "src/parser_proc.c" /* glr.c:816 */ break; - case 501: -#line 1565 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 490: +#line 1671 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = (*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_number **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4401 "src/parser_proc.c" /* glr.c:816 */ +#line 5877 "src/parser_proc.c" /* glr.c:816 */ break; - case 502: -#line 1572 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 491: +#line 1678 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_number **)(&(*yyvalp))) = (*(struct psi_number **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4409 "src/parser_proc.c" /* glr.c:816 */ +#line 5885 "src/parser_proc.c" /* glr.c:816 */ break; - case 503: -#line 1575 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 492: +#line 1681 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { int8_t sizeof_void_p = sizeof(void *); @@ -4419,37 +5895,38 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_SIZEOF, (*(struct psi_decl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), 0); } } -#line 4423 "src/parser_proc.c" /* glr.c:816 */ +#line 5899 "src/parser_proc.c" /* glr.c:816 */ break; - case 504: -#line 1587 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 493: +#line 1693 "src/parser_proc_grammar.y" /* glr.c:816 */ { int8_t sizeof_void_p = sizeof(void *); (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_INT8, &sizeof_void_p, 0); } -#line 4432 "src/parser_proc.c" /* glr.c:816 */ +#line 5908 "src/parser_proc.c" /* glr.c:816 */ break; - case 505: -#line 1591 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 494: +#line 1697 "src/parser_proc_grammar.y" /* glr.c:816 */ { int8_t sizeof_a = sizeof('a'); (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_INT8, &sizeof_a, 0); } -#line 4441 "src/parser_proc.c" /* glr.c:816 */ +#line 5917 "src/parser_proc.c" /* glr.c:816 */ break; - case 506: -#line 1595 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 495: +#line 1701 "src/parser_proc_grammar.y" /* glr.c:816 */ { - (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_INT64, &(*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->size, 0); + uint64_t len = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->size + 1; + (*(struct psi_number **)(&(*yyvalp))) = psi_number_init(PSI_T_UINT64, &len, 0); } -#line 4449 "src/parser_proc.c" /* glr.c:816 */ +#line 5926 "src/parser_proc.c" /* glr.c:816 */ break; - case 507: -#line 1601 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 496: +#line 1708 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -4460,11 +5937,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_append("@", psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))), 1, digest); } } -#line 4464 "src/parser_proc.c" /* glr.c:816 */ +#line 5941 "src/parser_proc.c" /* glr.c:816 */ break; - case 508: -#line 1614 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 497: +#line 1721 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -4475,11 +5952,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_append("@", psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))), 1, digest); } } -#line 4479 "src/parser_proc.c" /* glr.c:816 */ +#line 5956 "src/parser_proc.c" /* glr.c:816 */ break; - case 509: -#line 1627 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 498: +#line 1734 "src/parser_proc_grammar.y" /* glr.c:816 */ { if ((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))) { (*(struct psi_token **)(&(*yyvalp))) = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); @@ -4490,192 +5967,188 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_token **)(&(*yyvalp))) = psi_token_append("@", psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))), 1, digest); } } -#line 4494 "src/parser_proc.c" /* glr.c:816 */ +#line 5971 "src/parser_proc.c" /* glr.c:816 */ break; - case 510: -#line 1640 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 499: +#line 1747 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = NULL; } -#line 4502 "src/parser_proc.c" /* glr.c:816 */ +#line 5979 "src/parser_proc.c" /* glr.c:816 */ break; - case 511: -#line 1643 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 500: +#line 1750 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&(*yyvalp))) = (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_token **)(&(*yyvalp)))->type = PSI_T_NAME; } -#line 4511 "src/parser_proc.c" /* glr.c:816 */ +#line 5988 "src/parser_proc.c" /* glr.c:816 */ break; - case 514: -#line 1655 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 503: +#line 1762 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout **)(&(*yyvalp))) = NULL; } -#line 4519 "src/parser_proc.c" /* glr.c:816 */ +#line 5996 "src/parser_proc.c" /* glr.c:816 */ break; - case 515: -#line 1658 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 504: +#line 1765 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout **)(&(*yyvalp))) = psi_layout_init(0, 0, psi_layout_init(0, atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text), NULL)); } -#line 4527 "src/parser_proc.c" /* glr.c:816 */ +#line 6004 "src/parser_proc.c" /* glr.c:816 */ break; - case 516: -#line 1661 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 505: +#line 1768 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout **)(&(*yyvalp))) = psi_layout_init(atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text), atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text), NULL); } -#line 4535 "src/parser_proc.c" /* glr.c:816 */ +#line 6012 "src/parser_proc.c" /* glr.c:816 */ break; - case 517: -#line 1664 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 506: +#line 1771 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout **)(&(*yyvalp))) = psi_layout_init(atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text), atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text), psi_layout_init(0, atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval))->text), NULL)); } -#line 4543 "src/parser_proc.c" /* glr.c:816 */ +#line 6020 "src/parser_proc.c" /* glr.c:816 */ break; - case 518: -#line 1670 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 507: +#line 1777 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout*)(&(*yyvalp))).pos = 0; (*(struct psi_layout*)(&(*yyvalp))).len = 0; } -#line 4552 "src/parser_proc.c" /* glr.c:816 */ +#line 6029 "src/parser_proc.c" /* glr.c:816 */ break; - case 519: -#line 1674 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 508: +#line 1781 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_layout*)(&(*yyvalp))).pos = atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text); (*(struct psi_layout*)(&(*yyvalp))).len = atol((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))->text); } -#line 4561 "src/parser_proc.c" /* glr.c:816 */ - break; - - case 520: -#line 1681 "src/parser_proc_grammar.y" /* glr.c:816 */ - { - (*(size_t*)(&(*yyvalp))) = 0; -} -#line 4569 "src/parser_proc.c" /* glr.c:816 */ +#line 6038 "src/parser_proc.c" /* glr.c:816 */ break; - case 521: -#line 1684 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 509: +#line 1788 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = 0; } -#line 4577 "src/parser_proc.c" /* glr.c:816 */ +#line 6046 "src/parser_proc.c" /* glr.c:816 */ break; - case 522: -#line 1687 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 510: +#line 1791 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = 0; } -#line 4585 "src/parser_proc.c" /* glr.c:816 */ +#line 6054 "src/parser_proc.c" /* glr.c:816 */ break; - case 523: -#line 1690 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 511: +#line 1794 "src/parser_proc_grammar.y" /* glr.c:816 */ { - if (psi_num_exp_validate(PSI_DATA(P), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), NULL, NULL, NULL, NULL, NULL)) { - (*(size_t*)(&(*yyvalp))) = psi_long_num_exp((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), NULL, &P->preproc->defs); + struct psi_validate_scope scope = {0}; + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + if (psi_num_exp_validate(PSI_DATA(P), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), &scope)) { + (*(size_t*)(&(*yyvalp))) = psi_num_exp_get_long((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), NULL, &P->preproc->defs); } else { (*(size_t*)(&(*yyvalp))) = 0; } psi_num_exp_free(&(*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); + psi_validate_scope_dtor(&scope); } -#line 4598 "src/parser_proc.c" /* glr.c:816 */ +#line 6071 "src/parser_proc.c" /* glr.c:816 */ break; - case 524: -#line 1701 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 516: +#line 1816 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = 0; } -#line 4606 "src/parser_proc.c" /* glr.c:816 */ +#line 6079 "src/parser_proc.c" /* glr.c:816 */ break; - case 525: -#line 1704 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 517: +#line 1819 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4614 "src/parser_proc.c" /* glr.c:816 */ +#line 6087 "src/parser_proc.c" /* glr.c:816 */ break; - case 527: -#line 1711 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 519: +#line 1826 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 4622 "src/parser_proc.c" /* glr.c:816 */ +#line 6095 "src/parser_proc.c" /* glr.c:816 */ break; - case 528: -#line 1717 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 520: +#line 1832 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = 1; } -#line 4630 "src/parser_proc.c" /* glr.c:816 */ +#line 6103 "src/parser_proc.c" /* glr.c:816 */ break; - case 529: -#line 1720 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 521: +#line 1835 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(size_t*)(&(*yyvalp))) = (*(size_t*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)) + 1; } -#line 4638 "src/parser_proc.c" /* glr.c:816 */ +#line 6111 "src/parser_proc.c" /* glr.c:816 */ break; - case 532: -#line 1737 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 526: +#line 1857 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl **)(&(*yyvalp))) = psi_impl_init((*(struct psi_impl_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); } -#line 4646 "src/parser_proc.c" /* glr.c:816 */ +#line 6119 "src/parser_proc.c" /* glr.c:816 */ break; - case 533: -#line 1740 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 527: +#line 1860 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl **)(&(*yyvalp))) = psi_impl_init((*(struct psi_impl_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->static_memory = 1; } -#line 4655 "src/parser_proc.c" /* glr.c:816 */ +#line 6128 "src/parser_proc.c" /* glr.c:816 */ break; - case 534: -#line 1747 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 528: +#line 1867 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_func **)(&(*yyvalp))) = psi_impl_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->text, NULL, (*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&(*yyvalp)))->return_reference = (*(bool*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval)); } -#line 4665 "src/parser_proc.c" /* glr.c:816 */ +#line 6138 "src/parser_proc.c" /* glr.c:816 */ break; - case 535: -#line 1752 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 529: +#line 1872 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_func **)(&(*yyvalp))) = psi_impl_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), (*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&(*yyvalp)))->return_reference = (*(bool*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval)); } -#line 4675 "src/parser_proc.c" /* glr.c:816 */ +#line 6148 "src/parser_proc.c" /* glr.c:816 */ break; - case 536: -#line 1757 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 530: +#line 1877 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_func **)(&(*yyvalp))) = psi_impl_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-10)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval)), (*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_impl_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-10)].yystate.yysemantics.yysval))); @@ -4683,522 +6156,531 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (*(struct psi_impl_func **)(&(*yyvalp)))->vararg = psi_impl_arg_init((*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval)), psi_impl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text, (*(bool*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))), NULL); (*(struct psi_impl_func **)(&(*yyvalp)))->vararg->var->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 4687 "src/parser_proc.c" /* glr.c:816 */ +#line 6160 "src/parser_proc.c" /* glr.c:816 */ break; - case 537: -#line 1767 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 531: +#line 1887 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_impl_arg_free), &(*(struct psi_impl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4695 "src/parser_proc.c" /* glr.c:816 */ +#line 6168 "src/parser_proc.c" /* glr.c:816 */ break; - case 538: -#line 1770 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 532: +#line 1890 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_impl_arg **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4703 "src/parser_proc.c" /* glr.c:816 */ +#line 6176 "src/parser_proc.c" /* glr.c:816 */ break; - case 539: -#line 1776 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 533: +#line 1896 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_arg **)(&(*yyvalp))) = psi_impl_arg_init((*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)), NULL); } -#line 4711 "src/parser_proc.c" /* glr.c:816 */ +#line 6184 "src/parser_proc.c" /* glr.c:816 */ break; - case 540: -#line 1779 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 534: +#line 1899 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_arg **)(&(*yyvalp))) = psi_impl_arg_init((*(struct psi_impl_type **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_impl_def_val **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4719 "src/parser_proc.c" /* glr.c:816 */ +#line 6192 "src/parser_proc.c" /* glr.c:816 */ break; - case 541: -#line 1785 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 535: +#line 1905 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_var **)(&(*yyvalp))) = psi_impl_var_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text, (*(bool*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_impl_var **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4728 "src/parser_proc.c" /* glr.c:816 */ +#line 6201 "src/parser_proc.c" /* glr.c:816 */ + break; + + case 536: +#line 1912 "src/parser_proc_grammar.y" /* glr.c:816 */ + { + (*(struct psi_impl_type **)(&(*yyvalp))) = psi_impl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); + (*(struct psi_impl_type **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); +} +#line 6210 "src/parser_proc.c" /* glr.c:816 */ break; - case 542: -#line 1792 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 537: +#line 1919 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_impl_type **)(&(*yyvalp))) = psi_impl_type_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->text); (*(struct psi_impl_type **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4737 "src/parser_proc.c" /* glr.c:816 */ +#line 6219 "src/parser_proc.c" /* glr.c:816 */ break; - case 552: -#line 1811 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 549: +#line 1946 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_impl_stmt_free), &(*(struct psi_token ***)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4745 "src/parser_proc.c" /* glr.c:816 */ +#line 6227 "src/parser_proc.c" /* glr.c:816 */ break; - case 553: -#line 1814 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 550: +#line 1949 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)), &(*(struct psi_token ***)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4753 "src/parser_proc.c" /* glr.c:816 */ +#line 6235 "src/parser_proc.c" /* glr.c:816 */ break; - case 554: -#line 1820 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 551: +#line 1955 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token ***)(&(*yyvalp))) = (struct psi_token **) (*(struct psi_return_stmt **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4761 "src/parser_proc.c" /* glr.c:816 */ +#line 6243 "src/parser_proc.c" /* glr.c:816 */ break; - case 555: -#line 1823 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 552: +#line 1958 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token ***)(&(*yyvalp))) = (struct psi_token **) (*(struct psi_let_stmt **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4769 "src/parser_proc.c" /* glr.c:816 */ +#line 6251 "src/parser_proc.c" /* glr.c:816 */ break; - case 556: -#line 1826 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 553: +#line 1961 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token ***)(&(*yyvalp))) = (struct psi_token **) (*(struct psi_set_stmt **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4777 "src/parser_proc.c" /* glr.c:816 */ +#line 6259 "src/parser_proc.c" /* glr.c:816 */ break; - case 557: -#line 1829 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 554: +#line 1964 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token ***)(&(*yyvalp))) = (struct psi_token **) (*(struct psi_assert_stmt **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4785 "src/parser_proc.c" /* glr.c:816 */ +#line 6267 "src/parser_proc.c" /* glr.c:816 */ break; - case 558: -#line 1832 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 555: +#line 1967 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token ***)(&(*yyvalp))) = (struct psi_token **) (*(struct psi_free_stmt **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4793 "src/parser_proc.c" /* glr.c:816 */ +#line 6275 "src/parser_proc.c" /* glr.c:816 */ break; - case 559: -#line 1838 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 556: +#line 1973 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_stmt **)(&(*yyvalp))) = psi_let_stmt_init((*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_let_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 4802 "src/parser_proc.c" /* glr.c:816 */ +#line 6284 "src/parser_proc.c" /* glr.c:816 */ break; - case 560: -#line 1842 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 557: +#line 1977 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_stmt **)(&(*yyvalp))) = psi_let_stmt_init(psi_let_exp_init_ex((*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval)), PSI_LET_TMP, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)))); (*(struct psi_let_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); (*(struct psi_let_stmt **)(&(*yyvalp)))->exp->is_reference = (*(bool*)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); } -#line 4812 "src/parser_proc.c" /* glr.c:816 */ +#line 6294 "src/parser_proc.c" /* glr.c:816 */ break; - case 562: -#line 1851 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 559: +#line 1986 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = (*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_let_exp **)(&(*yyvalp)))->is_reference = true; } -#line 4821 "src/parser_proc.c" /* glr.c:816 */ +#line 6303 "src/parser_proc.c" /* glr.c:816 */ break; - case 563: -#line 1855 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 560: +#line 1990 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = (*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_let_exp **)(&(*yyvalp)))->is_reference = false; } -#line 4830 "src/parser_proc.c" /* glr.c:816 */ +#line 6312 "src/parser_proc.c" /* glr.c:816 */ break; - case 564: -#line 1862 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 561: +#line 1997 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init(PSI_LET_NULL, NULL); } -#line 4838 "src/parser_proc.c" /* glr.c:816 */ +#line 6320 "src/parser_proc.c" /* glr.c:816 */ break; - case 565: -#line 1865 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 562: +#line 2000 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init_ex(NULL, PSI_LET_NUMEXP, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4846 "src/parser_proc.c" /* glr.c:816 */ +#line 6328 "src/parser_proc.c" /* glr.c:816 */ break; - case 566: -#line 1868 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 563: +#line 2003 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init(PSI_LET_CALLOC, (*(struct psi_let_calloc **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4854 "src/parser_proc.c" /* glr.c:816 */ +#line 6336 "src/parser_proc.c" /* glr.c:816 */ break; - case 567: -#line 1871 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 564: +#line 2006 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init(PSI_LET_CALLOC, (*(struct psi_let_calloc **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); (*(struct psi_let_calloc **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->static_memory = 1; } -#line 4863 "src/parser_proc.c" /* glr.c:816 */ +#line 6345 "src/parser_proc.c" /* glr.c:816 */ break; - case 568: -#line 1875 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 565: +#line 2010 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init(PSI_LET_CALLBACK, (*(struct psi_let_callback **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4871 "src/parser_proc.c" /* glr.c:816 */ +#line 6353 "src/parser_proc.c" /* glr.c:816 */ break; - case 569: -#line 1878 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 566: +#line 2013 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = psi_let_exp_init_ex(NULL, PSI_LET_FUNC, (*(struct psi_let_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4879 "src/parser_proc.c" /* glr.c:816 */ +#line 6361 "src/parser_proc.c" /* glr.c:816 */ break; - case 570: -#line 1884 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 567: +#line 2019 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = (*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_let_exp **)(&(*yyvalp)))->var = (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); } -#line 4888 "src/parser_proc.c" /* glr.c:816 */ +#line 6370 "src/parser_proc.c" /* glr.c:816 */ break; - case 571: -#line 1888 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 568: +#line 2023 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_exp **)(&(*yyvalp))) = (*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_let_exp **)(&(*yyvalp)))->is_reference = 1; (*(struct psi_let_exp **)(&(*yyvalp)))->var = (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)); } -#line 4898 "src/parser_proc.c" /* glr.c:816 */ +#line 6380 "src/parser_proc.c" /* glr.c:816 */ break; - case 572: -#line 1896 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 569: +#line 2031 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_calloc **)(&(*yyvalp))) = psi_let_calloc_init((*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_let_calloc **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); } -#line 4907 "src/parser_proc.c" /* glr.c:816 */ +#line 6389 "src/parser_proc.c" /* glr.c:816 */ break; - case 573: -#line 1903 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 570: +#line 2038 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_callback **)(&(*yyvalp))) = psi_let_callback_init(psi_let_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))->text, (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), NULL); (*(struct psi_let_callback **)(&(*yyvalp)))->func->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))); (*(struct psi_let_callback **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval))); } -#line 4917 "src/parser_proc.c" /* glr.c:816 */ +#line 6399 "src/parser_proc.c" /* glr.c:816 */ break; - case 574: -#line 1908 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 571: +#line 2043 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_callback **)(&(*yyvalp))) = psi_let_callback_init(psi_let_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))->text, (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval))); (*(struct psi_let_callback **)(&(*yyvalp)))->func->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval))); (*(struct psi_let_callback **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-11)].yystate.yysemantics.yysval))); } -#line 4927 "src/parser_proc.c" /* glr.c:816 */ +#line 6409 "src/parser_proc.c" /* glr.c:816 */ break; - case 575: -#line 1916 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 572: +#line 2051 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_let_func **)(&(*yyvalp))) = psi_let_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->text, (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); (*(struct psi_let_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); (*(struct psi_let_func **)(&(*yyvalp)))->inner = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 4937 "src/parser_proc.c" /* glr.c:816 */ +#line 6419 "src/parser_proc.c" /* glr.c:816 */ break; - case 586: -#line 1937 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 583: +#line 2072 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 4945 "src/parser_proc.c" /* glr.c:816 */ +#line 6427 "src/parser_proc.c" /* glr.c:816 */ break; - case 587: -#line 1940 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 584: +#line 2075 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4953 "src/parser_proc.c" /* glr.c:816 */ +#line 6435 "src/parser_proc.c" /* glr.c:816 */ break; - case 588: -#line 1946 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 585: +#line 2081 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_let_exp_free), &(*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4961 "src/parser_proc.c" /* glr.c:816 */ +#line 6443 "src/parser_proc.c" /* glr.c:816 */ break; - case 589: -#line 1949 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 586: +#line 2084 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_let_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4969 "src/parser_proc.c" /* glr.c:816 */ +#line 6451 "src/parser_proc.c" /* glr.c:816 */ break; - case 592: -#line 1960 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 589: +#line 2095 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 4977 "src/parser_proc.c" /* glr.c:816 */ +#line 6459 "src/parser_proc.c" /* glr.c:816 */ break; - case 593: -#line 1963 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 590: +#line 2098 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 4985 "src/parser_proc.c" /* glr.c:816 */ +#line 6467 "src/parser_proc.c" /* glr.c:816 */ break; - case 594: -#line 1969 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 591: +#line 2104 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_set_exp_free), &(*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 4993 "src/parser_proc.c" /* glr.c:816 */ +#line 6475 "src/parser_proc.c" /* glr.c:816 */ break; - case 595: -#line 1972 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 592: +#line 2107 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5001 "src/parser_proc.c" /* glr.c:816 */ +#line 6483 "src/parser_proc.c" /* glr.c:816 */ break; - case 596: -#line 1978 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 593: +#line 2113 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_return_stmt **)(&(*yyvalp))) = psi_return_stmt_init((*(struct psi_return_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_return_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 5010 "src/parser_proc.c" /* glr.c:816 */ +#line 6492 "src/parser_proc.c" /* glr.c:816 */ break; - case 597: -#line 1985 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 594: +#line 2120 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_return_exp **)(&(*yyvalp))) = psi_return_exp_init((*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval)), (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval)), psi_set_exp_init(PSI_SET_FUNC, (*(struct psi_set_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)))); (*(struct psi_return_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->token); } -#line 5019 "src/parser_proc.c" /* glr.c:816 */ +#line 6501 "src/parser_proc.c" /* glr.c:816 */ break; - case 598: -#line 1989 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 595: +#line 2124 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_return_exp **)(&(*yyvalp))) = psi_return_exp_init(NULL, NULL, psi_set_exp_init(PSI_SET_FUNC, (*(struct psi_set_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)))); (*(struct psi_return_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_set_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))->token); } -#line 5028 "src/parser_proc.c" /* glr.c:816 */ +#line 6510 "src/parser_proc.c" /* glr.c:816 */ break; - case 599: -#line 1996 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 596: +#line 2131 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 5036 "src/parser_proc.c" /* glr.c:816 */ +#line 6518 "src/parser_proc.c" /* glr.c:816 */ break; - case 600: -#line 1999 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 597: +#line 2134 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 5044 "src/parser_proc.c" /* glr.c:816 */ +#line 6526 "src/parser_proc.c" /* glr.c:816 */ break; - case 601: -#line 2002 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 598: +#line 2137 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 5052 "src/parser_proc.c" /* glr.c:816 */ +#line 6534 "src/parser_proc.c" /* glr.c:816 */ break; - case 602: -#line 2008 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 599: +#line 2143 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_stmt **)(&(*yyvalp))) = psi_set_stmt_init((*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_set_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 5061 "src/parser_proc.c" /* glr.c:816 */ +#line 6543 "src/parser_proc.c" /* glr.c:816 */ break; - case 603: -#line 2015 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 600: +#line 2150 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_exp **)(&(*yyvalp))) = psi_set_exp_init(PSI_SET_FUNC, (*(struct psi_set_func **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5069 "src/parser_proc.c" /* glr.c:816 */ +#line 6551 "src/parser_proc.c" /* glr.c:816 */ break; - case 604: -#line 2018 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 601: +#line 2153 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_exp **)(&(*yyvalp))) = psi_set_exp_init(PSI_SET_NUMEXP, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5077 "src/parser_proc.c" /* glr.c:816 */ +#line 6559 "src/parser_proc.c" /* glr.c:816 */ break; - case 605: -#line 2021 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 602: +#line 2156 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_exp **)(&(*yyvalp))) = (*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); (*(struct psi_set_exp **)(&(*yyvalp)))->var = (*(struct psi_impl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)); } -#line 5086 "src/parser_proc.c" /* glr.c:816 */ +#line 6568 "src/parser_proc.c" /* glr.c:816 */ break; - case 606: -#line 2028 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 603: +#line 2163 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_func **)(&(*yyvalp))) = psi_set_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))->text, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); (*(struct psi_set_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval))); (*(struct psi_set_func **)(&(*yyvalp)))->inner = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval)); } -#line 5096 "src/parser_proc.c" /* glr.c:816 */ +#line 6578 "src/parser_proc.c" /* glr.c:816 */ break; - case 607: -#line 2033 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 604: +#line 2168 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_set_func **)(&(*yyvalp))) = psi_set_func_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->type, (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))->text, (*(struct psi_decl_var **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); (*(struct psi_set_func **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval))); (*(struct psi_set_func **)(&(*yyvalp)))->recursive = 1; } -#line 5106 "src/parser_proc.c" /* glr.c:816 */ +#line 6588 "src/parser_proc.c" /* glr.c:816 */ break; - case 616: -#line 2052 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 613: +#line 2187 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = NULL; } -#line 5114 "src/parser_proc.c" /* glr.c:816 */ +#line 6596 "src/parser_proc.c" /* glr.c:816 */ break; - case 617: -#line 2055 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 614: +#line 2190 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)); } -#line 5122 "src/parser_proc.c" /* glr.c:816 */ +#line 6604 "src/parser_proc.c" /* glr.c:816 */ break; - case 618: -#line 2061 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 615: +#line 2196 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_set_exp_free), &(*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5130 "src/parser_proc.c" /* glr.c:816 */ +#line 6612 "src/parser_proc.c" /* glr.c:816 */ break; - case 619: -#line 2064 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 616: +#line 2199 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_set_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5138 "src/parser_proc.c" /* glr.c:816 */ +#line 6620 "src/parser_proc.c" /* glr.c:816 */ break; - case 620: -#line 2070 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 617: +#line 2205 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_assert_stmt **)(&(*yyvalp))) = psi_assert_stmt_init((enum psi_assert_kind) (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))->type, (*(struct psi_num_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_assert_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 5147 "src/parser_proc.c" /* glr.c:816 */ +#line 6629 "src/parser_proc.c" /* glr.c:816 */ break; - case 623: -#line 2082 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 620: +#line 2217 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_free_stmt **)(&(*yyvalp))) = psi_free_stmt_init((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_free_stmt **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval))); } -#line 5156 "src/parser_proc.c" /* glr.c:816 */ +#line 6638 "src/parser_proc.c" /* glr.c:816 */ break; - case 624: -#line 2089 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 621: +#line 2224 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add(psi_plist_init((psi_plist_dtor) psi_free_exp_free), &(*(struct psi_free_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5164 "src/parser_proc.c" /* glr.c:816 */ +#line 6646 "src/parser_proc.c" /* glr.c:816 */ break; - case 625: -#line 2092 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 622: +#line 2227 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_plist **)(&(*yyvalp))) = psi_plist_add((*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)), &(*(struct psi_free_exp **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval))); } -#line 5172 "src/parser_proc.c" /* glr.c:816 */ +#line 6654 "src/parser_proc.c" /* glr.c:816 */ break; - case 626: -#line 2098 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 623: +#line 2233 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->type = PSI_T_NAME; (*(struct psi_free_exp **)(&(*yyvalp))) = psi_free_exp_init((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))->text, (*(struct psi_plist **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval))); (*(struct psi_free_exp **)(&(*yyvalp)))->token = psi_token_copy((*(struct psi_token **)(&((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval))); } -#line 5182 "src/parser_proc.c" /* glr.c:816 */ +#line 6664 "src/parser_proc.c" /* glr.c:816 */ break; - case 627: -#line 2106 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 624: +#line 2241 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(bool*)(&(*yyvalp))) = false; } -#line 5190 "src/parser_proc.c" /* glr.c:816 */ +#line 6672 "src/parser_proc.c" /* glr.c:816 */ break; - case 628: -#line 2109 "src/parser_proc_grammar.y" /* glr.c:816 */ + case 625: +#line 2244 "src/parser_proc_grammar.y" /* glr.c:816 */ { (*(bool*)(&(*yyvalp))) = true; } -#line 5198 "src/parser_proc.c" /* glr.c:816 */ +#line 6680 "src/parser_proc.c" /* glr.c:816 */ break; -#line 5202 "src/parser_proc.c" /* glr.c:816 */ +#line 6684 "src/parser_proc.c" /* glr.c:816 */ default: break; } @@ -5249,727 +6731,757 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct psi_parser case 141: /* binary_op_token */ #line 315 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5253 "src/parser_proc.c" /* glr.c:846 */ +#line 6735 "src/parser_proc.c" /* glr.c:846 */ break; case 142: /* unary_op_token */ #line 315 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5259 "src/parser_proc.c" /* glr.c:846 */ +#line 6741 "src/parser_proc.c" /* glr.c:846 */ break; case 143: /* name_token */ #line 315 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5265 "src/parser_proc.c" /* glr.c:846 */ +#line 6747 "src/parser_proc.c" /* glr.c:846 */ break; case 144: /* any_noeol_token */ #line 315 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5271 "src/parser_proc.c" /* glr.c:846 */ +#line 6753 "src/parser_proc.c" /* glr.c:846 */ break; case 149: /* lib */ #line 309 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5277 "src/parser_proc.c" /* glr.c:846 */ +#line 6759 "src/parser_proc.c" /* glr.c:846 */ break; case 150: /* cpp */ #line 324 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_cpp_exp_free(&(*(struct psi_cpp_exp **)(&(*yyvaluep))));} -#line 5283 "src/parser_proc.c" /* glr.c:846 */ +#line 6765 "src/parser_proc.c" /* glr.c:846 */ break; case 151: /* cpp_exp */ #line 324 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_cpp_exp_free(&(*(struct psi_cpp_exp **)(&(*yyvaluep))));} -#line 5289 "src/parser_proc.c" /* glr.c:846 */ +#line 6771 "src/parser_proc.c" /* glr.c:846 */ break; case 153: /* cpp_message_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5295 "src/parser_proc.c" /* glr.c:846 */ +#line 6777 "src/parser_proc.c" /* glr.c:846 */ break; case 154: /* cpp_include_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5301 "src/parser_proc.c" /* glr.c:846 */ +#line 6783 "src/parser_proc.c" /* glr.c:846 */ break; case 155: /* cpp_header_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5307 "src/parser_proc.c" /* glr.c:846 */ +#line 6789 "src/parser_proc.c" /* glr.c:846 */ break; case 156: /* cpp_no_arg_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5313 "src/parser_proc.c" /* glr.c:846 */ +#line 6795 "src/parser_proc.c" /* glr.c:846 */ break; case 157: /* cpp_name_arg_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5319 "src/parser_proc.c" /* glr.c:846 */ +#line 6801 "src/parser_proc.c" /* glr.c:846 */ break; case 158: /* cpp_exp_arg_token */ #line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5325 "src/parser_proc.c" /* glr.c:846 */ - break; - - case 159: /* cpp_special_name_token */ -#line 312 "src/parser_proc_grammar.y" /* glr.c:846 */ - {} -#line 5331 "src/parser_proc.c" /* glr.c:846 */ +#line 6807 "src/parser_proc.c" /* glr.c:846 */ break; - case 160: /* cpp_macro_decl */ + case 159: /* cpp_macro_decl */ #line 326 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_cpp_macro_decl_free(&(*(struct psi_cpp_macro_decl **)(&(*yyvaluep))));} -#line 5337 "src/parser_proc.c" /* glr.c:846 */ +#line 6813 "src/parser_proc.c" /* glr.c:846 */ break; - case 161: /* cpp_macro_sig */ + case 160: /* cpp_macro_sig */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5343 "src/parser_proc.c" /* glr.c:846 */ +#line 6819 "src/parser_proc.c" /* glr.c:846 */ break; - case 162: /* cpp_macro_sig_args */ + case 161: /* cpp_macro_sig_args */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5349 "src/parser_proc.c" /* glr.c:846 */ +#line 6825 "src/parser_proc.c" /* glr.c:846 */ break; - case 163: /* cpp_macro_decl_tokens */ + case 162: /* cpp_macro_decl_tokens */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5355 "src/parser_proc.c" /* glr.c:846 */ +#line 6831 "src/parser_proc.c" /* glr.c:846 */ break; - case 164: /* cpp_macro_decl_token_list */ + case 163: /* cpp_macro_decl_token_list */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5361 "src/parser_proc.c" /* glr.c:846 */ +#line 6837 "src/parser_proc.c" /* glr.c:846 */ break; - case 165: /* cpp_macro_exp */ + case 164: /* cpp_macro_exp */ #line 330 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_num_exp_free(&(*(struct psi_num_exp **)(&(*yyvaluep))));} -#line 5367 "src/parser_proc.c" /* glr.c:846 */ +#line 6843 "src/parser_proc.c" /* glr.c:846 */ break; - case 166: /* cpp_macro_call_args */ + case 165: /* cpp_macro_call_args */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5373 "src/parser_proc.c" /* glr.c:846 */ +#line 6849 "src/parser_proc.c" /* glr.c:846 */ break; - case 167: /* cpp_macro_call_arg_list */ + case 166: /* cpp_macro_call_arg_list */ #line 328 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5379 "src/parser_proc.c" /* glr.c:846 */ +#line 6855 "src/parser_proc.c" /* glr.c:846 */ break; - case 168: /* constant */ + case 167: /* constant */ #line 336 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_const_free(&(*(struct psi_const **)(&(*yyvaluep))));} -#line 5385 "src/parser_proc.c" /* glr.c:846 */ +#line 6861 "src/parser_proc.c" /* glr.c:846 */ break; - case 169: /* constant_type */ + case 168: /* impl_def_val */ #line 338 "src/parser_proc_grammar.y" /* glr.c:846 */ - {psi_const_type_free(&(*(struct psi_const_type **)(&(*yyvaluep))));} -#line 5391 "src/parser_proc.c" /* glr.c:846 */ - break; - - case 170: /* constant_type_token */ -#line 333 "src/parser_proc_grammar.y" /* glr.c:846 */ - {} -#line 5397 "src/parser_proc.c" /* glr.c:846 */ - break; - - case 171: /* impl_def_val */ -#line 340 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_def_val_free(&(*(struct psi_impl_def_val **)(&(*yyvaluep))));} -#line 5403 "src/parser_proc.c" /* glr.c:846 */ +#line 6867 "src/parser_proc.c" /* glr.c:846 */ break; - case 172: /* impl_def_val_token */ + case 169: /* impl_def_val_token */ #line 333 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5409 "src/parser_proc.c" /* glr.c:846 */ +#line 6873 "src/parser_proc.c" /* glr.c:846 */ break; - case 173: /* decl_typedef */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 170: /* decl_typedef */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5415 "src/parser_proc.c" /* glr.c:846 */ +#line 6879 "src/parser_proc.c" /* glr.c:846 */ break; - case 174: /* typedef */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 171: /* typedef */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5421 "src/parser_proc.c" /* glr.c:846 */ +#line 6885 "src/parser_proc.c" /* glr.c:846 */ break; - case 175: /* typedef_anon */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 172: /* typedef_anon */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5427 "src/parser_proc.c" /* glr.c:846 */ +#line 6891 "src/parser_proc.c" /* glr.c:846 */ break; - case 176: /* typedef_decl */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 173: /* typedef_decl */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5433 "src/parser_proc.c" /* glr.c:846 */ +#line 6897 "src/parser_proc.c" /* glr.c:846 */ break; - case 177: /* typedef_anon_decl */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 174: /* typedef_anon_decl */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5439 "src/parser_proc.c" /* glr.c:846 */ +#line 6903 "src/parser_proc.c" /* glr.c:846 */ break; - case 178: /* qualified_decl_type */ -#line 346 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 175: /* qualified_decl_type */ +#line 347 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_type_free(&(*(struct psi_decl_type **)(&(*yyvaluep))));} -#line 5445 "src/parser_proc.c" /* glr.c:846 */ +#line 6909 "src/parser_proc.c" /* glr.c:846 */ break; - case 179: /* decl_type */ -#line 346 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 177: /* decl_type */ +#line 347 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_type_free(&(*(struct psi_decl_type **)(&(*yyvaluep))));} -#line 5451 "src/parser_proc.c" /* glr.c:846 */ +#line 6915 "src/parser_proc.c" /* glr.c:846 */ break; - case 180: /* decl_type_complex */ -#line 346 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 178: /* decl_type_complex */ +#line 347 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_type_free(&(*(struct psi_decl_type **)(&(*yyvaluep))));} -#line 5457 "src/parser_proc.c" /* glr.c:846 */ +#line 6921 "src/parser_proc.c" /* glr.c:846 */ break; - case 181: /* decl_type_simple */ -#line 343 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 179: /* decl_type_simple */ +#line 341 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5463 "src/parser_proc.c" /* glr.c:846 */ +#line 6927 "src/parser_proc.c" /* glr.c:846 */ break; - case 182: /* decl_real_type */ -#line 343 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 180: /* decl_real_type */ +#line 341 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5469 "src/parser_proc.c" /* glr.c:846 */ +#line 6933 "src/parser_proc.c" /* glr.c:846 */ break; - case 183: /* int_signed */ + case 181: /* int_signed */ #line 321 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5475 "src/parser_proc.c" /* glr.c:846 */ +#line 6939 "src/parser_proc.c" /* glr.c:846 */ break; - case 184: /* int_width */ + case 182: /* int_width */ #line 318 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5481 "src/parser_proc.c" /* glr.c:846 */ +#line 6945 "src/parser_proc.c" /* glr.c:846 */ break; - case 185: /* decl_int_type */ -#line 343 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 183: /* decl_int_type */ +#line 341 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5487 "src/parser_proc.c" /* glr.c:846 */ +#line 6951 "src/parser_proc.c" /* glr.c:846 */ break; - case 186: /* int_signed_types */ + case 184: /* int_signed_types */ #line 318 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5493 "src/parser_proc.c" /* glr.c:846 */ +#line 6957 "src/parser_proc.c" /* glr.c:846 */ break; - case 187: /* signed_short_types */ + case 185: /* signed_short_types */ #line 321 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5499 "src/parser_proc.c" /* glr.c:846 */ +#line 6963 "src/parser_proc.c" /* glr.c:846 */ break; - case 188: /* signed_long_types */ + case 186: /* signed_long_types */ #line 321 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5505 "src/parser_proc.c" /* glr.c:846 */ +#line 6969 "src/parser_proc.c" /* glr.c:846 */ break; - case 189: /* int_width_types */ + case 187: /* int_width_types */ #line 318 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5511 "src/parser_proc.c" /* glr.c:846 */ +#line 6975 "src/parser_proc.c" /* glr.c:846 */ break; - case 190: /* decl_stmt */ -#line 348 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 188: /* decl_stmt */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} -#line 5517 "src/parser_proc.c" /* glr.c:846 */ +#line 6981 "src/parser_proc.c" /* glr.c:846 */ break; - case 193: /* decl_extvar_stmt */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 189: /* decl_asm */ +#line 344 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} +#line 6987 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 190: /* quoted_strings */ +#line 344 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} +#line 6993 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 191: /* decl_extvar_stmt */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5523 "src/parser_proc.c" /* glr.c:846 */ +#line 6999 "src/parser_proc.c" /* glr.c:846 */ break; - case 194: /* decl_extvar_list */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 192: /* decl_extvar_list */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5529 "src/parser_proc.c" /* glr.c:846 */ +#line 7005 "src/parser_proc.c" /* glr.c:846 */ break; - case 195: /* decl_vars */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 193: /* decl_vars */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5535 "src/parser_proc.c" /* glr.c:846 */ +#line 7011 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 194: /* ignored_decl */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} +#line 7017 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 198: /* decl */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} +#line 7023 "src/parser_proc.c" /* glr.c:846 */ break; - case 200: /* decl */ -#line 348 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 199: /* decl_body */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} -#line 5541 "src/parser_proc.c" /* glr.c:846 */ +#line 7029 "src/parser_proc.c" /* glr.c:846 */ break; - case 201: /* decl_body */ -#line 348 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 200: /* decl_func_body */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} -#line 5547 "src/parser_proc.c" /* glr.c:846 */ +#line 7035 "src/parser_proc.c" /* glr.c:846 */ break; - case 202: /* decl_func_body */ -#line 348 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 201: /* decl_functor_body */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} -#line 5553 "src/parser_proc.c" /* glr.c:846 */ +#line 7041 "src/parser_proc.c" /* glr.c:846 */ break; - case 203: /* decl_functor_body */ -#line 348 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 202: /* decl_anon_functor_body */ +#line 349 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_free(&(*(struct psi_decl **)(&(*yyvaluep))));} -#line 5559 "src/parser_proc.c" /* glr.c:846 */ +#line 7047 "src/parser_proc.c" /* glr.c:846 */ break; - case 204: /* decl_functor */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 203: /* decl_functor */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5565 "src/parser_proc.c" /* glr.c:846 */ +#line 7053 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 204: /* decl_anon_functor */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} +#line 7059 "src/parser_proc.c" /* glr.c:846 */ break; case 205: /* decl_func */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5571 "src/parser_proc.c" /* glr.c:846 */ +#line 7065 "src/parser_proc.c" /* glr.c:846 */ break; case 206: /* decl_args */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5577 "src/parser_proc.c" /* glr.c:846 */ +#line 7071 "src/parser_proc.c" /* glr.c:846 */ break; case 207: /* decl_arg_list */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5583 "src/parser_proc.c" /* glr.c:846 */ +#line 7077 "src/parser_proc.c" /* glr.c:846 */ break; case 208: /* decl_anon_arg */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5589 "src/parser_proc.c" /* glr.c:846 */ +#line 7083 "src/parser_proc.c" /* glr.c:846 */ break; case 209: /* decl_arg */ -#line 350 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 351 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_arg_free(&(*(struct psi_decl_arg **)(&(*yyvaluep))));} -#line 5595 "src/parser_proc.c" /* glr.c:846 */ +#line 7089 "src/parser_proc.c" /* glr.c:846 */ break; case 210: /* decl_var */ -#line 352 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 353 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_var_free(&(*(struct psi_decl_var **)(&(*yyvaluep))));} -#line 5601 "src/parser_proc.c" /* glr.c:846 */ +#line 7095 "src/parser_proc.c" /* glr.c:846 */ break; case 211: /* decl_union */ -#line 356 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 357 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_union_free(&(*(struct psi_decl_union **)(&(*yyvaluep))));} -#line 5607 "src/parser_proc.c" /* glr.c:846 */ +#line 7101 "src/parser_proc.c" /* glr.c:846 */ break; case 212: /* decl_struct */ -#line 354 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 355 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_struct_free(&(*(struct psi_decl_struct **)(&(*yyvaluep))));} -#line 5613 "src/parser_proc.c" /* glr.c:846 */ +#line 7107 "src/parser_proc.c" /* glr.c:846 */ break; case 213: /* decl_struct_args */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5619 "src/parser_proc.c" /* glr.c:846 */ +#line 7113 "src/parser_proc.c" /* glr.c:846 */ break; case 214: /* struct_args_block */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5625 "src/parser_proc.c" /* glr.c:846 */ +#line 7119 "src/parser_proc.c" /* glr.c:846 */ break; case 215: /* struct_args */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5631 "src/parser_proc.c" /* glr.c:846 */ +#line 7125 "src/parser_proc.c" /* glr.c:846 */ break; case 216: /* struct_arg_var_list */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5637 "src/parser_proc.c" /* glr.c:846 */ +#line 7131 "src/parser_proc.c" /* glr.c:846 */ break; case 217: /* decl_vars_with_layout */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5643 "src/parser_proc.c" /* glr.c:846 */ +#line 7137 "src/parser_proc.c" /* glr.c:846 */ break; case 218: /* decl_enum */ -#line 358 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 359 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_enum_free(&(*(struct psi_decl_enum **)(&(*yyvaluep))));} -#line 5649 "src/parser_proc.c" /* glr.c:846 */ +#line 7143 "src/parser_proc.c" /* glr.c:846 */ break; case 219: /* decl_enum_items */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5655 "src/parser_proc.c" /* glr.c:846 */ +#line 7149 "src/parser_proc.c" /* glr.c:846 */ break; case 220: /* decl_enum_item */ -#line 360 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 361 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_decl_enum_item_free(&(*(struct psi_decl_enum_item **)(&(*yyvaluep))));} -#line 5661 "src/parser_proc.c" /* glr.c:846 */ +#line 7155 "src/parser_proc.c" /* glr.c:846 */ break; case 221: /* num_exp */ -#line 418 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 419 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_num_exp_free(&(*(struct psi_num_exp **)(&(*yyvaluep))));} -#line 5667 "src/parser_proc.c" /* glr.c:846 */ +#line 7161 "src/parser_proc.c" /* glr.c:846 */ break; case 222: /* number */ -#line 420 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 421 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_number_free(&(*(struct psi_number **)(&(*yyvaluep))));} -#line 5673 "src/parser_proc.c" /* glr.c:846 */ +#line 7167 "src/parser_proc.c" /* glr.c:846 */ break; case 223: /* sizeof */ -#line 370 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 371 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_number_free(&(*(struct psi_number **)(&(*yyvaluep))));} -#line 5679 "src/parser_proc.c" /* glr.c:846 */ +#line 7173 "src/parser_proc.c" /* glr.c:846 */ break; case 224: /* sizeof_body */ -#line 370 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 371 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_number_free(&(*(struct psi_number **)(&(*yyvaluep))));} -#line 5685 "src/parser_proc.c" /* glr.c:846 */ +#line 7179 "src/parser_proc.c" /* glr.c:846 */ break; case 225: /* sizeof_body_notypes */ -#line 370 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 371 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_number_free(&(*(struct psi_number **)(&(*yyvaluep))));} -#line 5691 "src/parser_proc.c" /* glr.c:846 */ +#line 7185 "src/parser_proc.c" /* glr.c:846 */ break; case 226: /* enum_name */ #line 309 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5697 "src/parser_proc.c" /* glr.c:846 */ +#line 7191 "src/parser_proc.c" /* glr.c:846 */ break; case 227: /* union_name */ #line 309 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5703 "src/parser_proc.c" /* glr.c:846 */ +#line 7197 "src/parser_proc.c" /* glr.c:846 */ break; case 228: /* struct_name */ #line 309 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5709 "src/parser_proc.c" /* glr.c:846 */ +#line 7203 "src/parser_proc.c" /* glr.c:846 */ break; case 229: /* optional_name */ #line 309 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5715 "src/parser_proc.c" /* glr.c:846 */ +#line 7209 "src/parser_proc.c" /* glr.c:846 */ break; case 231: /* decl_layout */ -#line 367 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 368 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_layout_free(&(*(struct psi_layout **)(&(*yyvaluep))));} -#line 5721 "src/parser_proc.c" /* glr.c:846 */ +#line 7215 "src/parser_proc.c" /* glr.c:846 */ break; case 232: /* align_and_size */ -#line 365 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 366 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5727 "src/parser_proc.c" /* glr.c:846 */ +#line 7221 "src/parser_proc.c" /* glr.c:846 */ break; case 233: /* array_size */ -#line 423 "src/parser_proc_grammar.y" /* glr.c:846 */ +#line 424 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5733 "src/parser_proc.c" /* glr.c:846 */ +#line 7227 "src/parser_proc.c" /* glr.c:846 */ break; - case 234: /* indirection */ -#line 423 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 235: /* indirection */ +#line 424 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5739 "src/parser_proc.c" /* glr.c:846 */ +#line 7233 "src/parser_proc.c" /* glr.c:846 */ break; - case 235: /* pointers */ -#line 423 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 236: /* pointers */ +#line 424 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5745 "src/parser_proc.c" /* glr.c:846 */ +#line 7239 "src/parser_proc.c" /* glr.c:846 */ break; - case 236: /* asterisks */ -#line 423 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 237: /* asterisks */ +#line 424 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5751 "src/parser_proc.c" /* glr.c:846 */ +#line 7245 "src/parser_proc.c" /* glr.c:846 */ break; - case 238: /* impl */ -#line 373 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 240: /* impl */ +#line 374 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_free(&(*(struct psi_impl **)(&(*yyvaluep))));} -#line 5757 "src/parser_proc.c" /* glr.c:846 */ +#line 7251 "src/parser_proc.c" /* glr.c:846 */ break; - case 239: /* impl_func */ -#line 375 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 241: /* impl_func */ +#line 376 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_func_free(&(*(struct psi_impl_func **)(&(*yyvaluep))));} -#line 5763 "src/parser_proc.c" /* glr.c:846 */ +#line 7257 "src/parser_proc.c" /* glr.c:846 */ break; - case 240: /* impl_args */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 242: /* impl_args */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5769 "src/parser_proc.c" /* glr.c:846 */ +#line 7263 "src/parser_proc.c" /* glr.c:846 */ break; - case 241: /* impl_arg */ -#line 377 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 243: /* impl_arg */ +#line 378 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_arg_free(&(*(struct psi_impl_arg **)(&(*yyvaluep))));} -#line 5775 "src/parser_proc.c" /* glr.c:846 */ +#line 7269 "src/parser_proc.c" /* glr.c:846 */ break; - case 242: /* impl_var */ -#line 381 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 244: /* impl_var */ +#line 382 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_var_free(&(*(struct psi_impl_var **)(&(*yyvaluep))));} -#line 5781 "src/parser_proc.c" /* glr.c:846 */ +#line 7275 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 245: /* impl_type */ +#line 380 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_impl_type_free(&(*(struct psi_impl_type **)(&(*yyvaluep))));} +#line 7281 "src/parser_proc.c" /* glr.c:846 */ break; - case 243: /* impl_type */ -#line 379 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 246: /* impl_type_restricted */ +#line 380 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_type_free(&(*(struct psi_impl_type **)(&(*yyvaluep))));} -#line 5787 "src/parser_proc.c" /* glr.c:846 */ +#line 7287 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 247: /* impl_type_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} +#line 7293 "src/parser_proc.c" /* glr.c:846 */ + break; + + case 248: /* impl_type_restricted_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ + {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} +#line 7299 "src/parser_proc.c" /* glr.c:846 */ break; - case 244: /* impl_type_token */ -#line 413 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 249: /* impl_type_extended_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5793 "src/parser_proc.c" /* glr.c:846 */ +#line 7305 "src/parser_proc.c" /* glr.c:846 */ break; - case 245: /* impl_stmts */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 250: /* impl_stmts */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5799 "src/parser_proc.c" /* glr.c:846 */ +#line 7311 "src/parser_proc.c" /* glr.c:846 */ break; - case 246: /* impl_stmt */ -#line 411 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 251: /* impl_stmt */ +#line 412 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_impl_stmt_free(&(*(struct psi_token ***)(&(*yyvaluep))));} -#line 5805 "src/parser_proc.c" /* glr.c:846 */ +#line 7317 "src/parser_proc.c" /* glr.c:846 */ break; - case 247: /* let_stmt */ -#line 384 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 252: /* let_stmt */ +#line 385 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_stmt_free(&(*(struct psi_let_stmt **)(&(*yyvaluep))));} -#line 5811 "src/parser_proc.c" /* glr.c:846 */ +#line 7323 "src/parser_proc.c" /* glr.c:846 */ break; - case 248: /* let_exp */ -#line 386 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 253: /* let_exp */ +#line 387 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_exp_free(&(*(struct psi_let_exp **)(&(*yyvaluep))));} -#line 5817 "src/parser_proc.c" /* glr.c:846 */ +#line 7329 "src/parser_proc.c" /* glr.c:846 */ break; - case 249: /* let_exp_byref */ -#line 386 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 254: /* let_exp_byref */ +#line 387 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_exp_free(&(*(struct psi_let_exp **)(&(*yyvaluep))));} -#line 5823 "src/parser_proc.c" /* glr.c:846 */ +#line 7335 "src/parser_proc.c" /* glr.c:846 */ break; - case 250: /* let_exp_assign */ -#line 386 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 255: /* let_exp_assign */ +#line 387 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_exp_free(&(*(struct psi_let_exp **)(&(*yyvaluep))));} -#line 5829 "src/parser_proc.c" /* glr.c:846 */ +#line 7341 "src/parser_proc.c" /* glr.c:846 */ break; - case 251: /* let_calloc */ -#line 388 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 256: /* let_calloc */ +#line 389 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_calloc_free(&(*(struct psi_let_calloc **)(&(*yyvaluep))));} -#line 5835 "src/parser_proc.c" /* glr.c:846 */ +#line 7347 "src/parser_proc.c" /* glr.c:846 */ break; - case 252: /* let_callback */ -#line 390 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 257: /* let_callback */ +#line 391 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_callback_free(&(*(struct psi_let_callback **)(&(*yyvaluep))));} -#line 5841 "src/parser_proc.c" /* glr.c:846 */ +#line 7353 "src/parser_proc.c" /* glr.c:846 */ break; - case 253: /* let_func */ -#line 392 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 258: /* let_func */ +#line 393 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_let_func_free(&(*(struct psi_let_func **)(&(*yyvaluep))));} -#line 5847 "src/parser_proc.c" /* glr.c:846 */ +#line 7359 "src/parser_proc.c" /* glr.c:846 */ break; - case 254: /* let_func_token */ -#line 413 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 259: /* let_func_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5853 "src/parser_proc.c" /* glr.c:846 */ +#line 7365 "src/parser_proc.c" /* glr.c:846 */ break; - case 255: /* let_func_exps */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 260: /* let_func_exps */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5859 "src/parser_proc.c" /* glr.c:846 */ +#line 7371 "src/parser_proc.c" /* glr.c:846 */ break; - case 256: /* let_exps */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 261: /* let_exps */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5865 "src/parser_proc.c" /* glr.c:846 */ +#line 7377 "src/parser_proc.c" /* glr.c:846 */ break; - case 257: /* callback_rval */ -#line 413 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 262: /* callback_rval */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5871 "src/parser_proc.c" /* glr.c:846 */ +#line 7383 "src/parser_proc.c" /* glr.c:846 */ break; - case 258: /* callback_arg_list */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 263: /* callback_arg_list */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5877 "src/parser_proc.c" /* glr.c:846 */ +#line 7389 "src/parser_proc.c" /* glr.c:846 */ break; - case 259: /* callback_args */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 264: /* callback_args */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5883 "src/parser_proc.c" /* glr.c:846 */ +#line 7395 "src/parser_proc.c" /* glr.c:846 */ break; - case 260: /* return_stmt */ -#line 402 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 265: /* return_stmt */ +#line 403 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_return_stmt_free(&(*(struct psi_return_stmt **)(&(*yyvaluep))));} -#line 5889 "src/parser_proc.c" /* glr.c:846 */ +#line 7401 "src/parser_proc.c" /* glr.c:846 */ break; - case 261: /* return_exp */ -#line 404 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 266: /* return_exp */ +#line 405 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_return_exp_free(&(*(struct psi_return_exp **)(&(*yyvaluep))));} -#line 5895 "src/parser_proc.c" /* glr.c:846 */ +#line 7407 "src/parser_proc.c" /* glr.c:846 */ break; - case 262: /* call_decl_vars */ -#line 362 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 267: /* call_decl_vars */ +#line 363 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5901 "src/parser_proc.c" /* glr.c:846 */ +#line 7413 "src/parser_proc.c" /* glr.c:846 */ break; - case 263: /* set_stmt */ -#line 394 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 268: /* set_stmt */ +#line 395 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_set_stmt_free(&(*(struct psi_set_stmt **)(&(*yyvaluep))));} -#line 5907 "src/parser_proc.c" /* glr.c:846 */ +#line 7419 "src/parser_proc.c" /* glr.c:846 */ break; - case 264: /* set_exp */ -#line 396 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 269: /* set_exp */ +#line 397 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_set_exp_free(&(*(struct psi_set_exp **)(&(*yyvaluep))));} -#line 5913 "src/parser_proc.c" /* glr.c:846 */ +#line 7425 "src/parser_proc.c" /* glr.c:846 */ break; - case 265: /* set_func */ -#line 398 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 270: /* set_func */ +#line 399 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_set_func_free(&(*(struct psi_set_func **)(&(*yyvaluep))));} -#line 5919 "src/parser_proc.c" /* glr.c:846 */ +#line 7431 "src/parser_proc.c" /* glr.c:846 */ break; - case 266: /* set_func_token */ -#line 413 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 271: /* set_func_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5925 "src/parser_proc.c" /* glr.c:846 */ +#line 7437 "src/parser_proc.c" /* glr.c:846 */ break; - case 267: /* set_func_exps */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 272: /* set_func_exps */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5931 "src/parser_proc.c" /* glr.c:846 */ +#line 7443 "src/parser_proc.c" /* glr.c:846 */ break; - case 268: /* set_exps */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 273: /* set_exps */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5937 "src/parser_proc.c" /* glr.c:846 */ +#line 7449 "src/parser_proc.c" /* glr.c:846 */ break; - case 269: /* assert_stmt */ -#line 400 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 274: /* assert_stmt */ +#line 401 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_assert_stmt_free(&(*(struct psi_assert_stmt **)(&(*yyvaluep))));} -#line 5943 "src/parser_proc.c" /* glr.c:846 */ +#line 7455 "src/parser_proc.c" /* glr.c:846 */ break; - case 270: /* assert_stmt_token */ -#line 413 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 275: /* assert_stmt_token */ +#line 414 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_token_free(&(*(struct psi_token **)(&(*yyvaluep))));} -#line 5949 "src/parser_proc.c" /* glr.c:846 */ +#line 7461 "src/parser_proc.c" /* glr.c:846 */ break; - case 271: /* free_stmt */ -#line 406 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 276: /* free_stmt */ +#line 407 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_free_stmt_free(&(*(struct psi_free_stmt **)(&(*yyvaluep))));} -#line 5955 "src/parser_proc.c" /* glr.c:846 */ +#line 7467 "src/parser_proc.c" /* glr.c:846 */ break; - case 272: /* free_exps */ -#line 415 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 277: /* free_exps */ +#line 416 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_plist_free((*(struct psi_plist **)(&(*yyvaluep))));} -#line 5961 "src/parser_proc.c" /* glr.c:846 */ +#line 7473 "src/parser_proc.c" /* glr.c:846 */ break; - case 273: /* free_exp */ -#line 408 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 278: /* free_exp */ +#line 409 "src/parser_proc_grammar.y" /* glr.c:846 */ {psi_free_exp_free(&(*(struct psi_free_exp **)(&(*yyvaluep))));} -#line 5967 "src/parser_proc.c" /* glr.c:846 */ +#line 7479 "src/parser_proc.c" /* glr.c:846 */ break; - case 274: /* reference */ -#line 425 "src/parser_proc_grammar.y" /* glr.c:846 */ + case 279: /* reference */ +#line 426 "src/parser_proc_grammar.y" /* glr.c:846 */ {} -#line 5973 "src/parser_proc.c" /* glr.c:846 */ +#line 7485 "src/parser_proc.c" /* glr.c:846 */ break; @@ -6026,7 +7538,7 @@ yylhsNonterm (yyRuleNum yyrule) } #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-703))) + (!!((Yystate) == (-714))) /** True iff LR state YYSTATE has only a default reduction (regardless * of token). */ @@ -7322,7 +8834,7 @@ yyparse (struct psi_parser *P, struct psi_plist *tokens, size_t *index) { } -#line 7326 "src/parser_proc.c" /* glr.c:2270 */ +#line 8838 "src/parser_proc.c" /* glr.c:2270 */ if (! yyinitGLRStack (yystackp, YYINITDEPTH)) goto yyexhaustedlab; @@ -7628,7 +9140,7 @@ yypdumpstack (yyGLRStack* yystackp) #define yydebug psi_parser_proc_debug #define yynerrs psi_parser_proc_nerrs -#line 2118 "src/parser_proc_grammar.y" /* glr.c:2584 */ +#line 2253 "src/parser_proc_grammar.y" /* glr.c:2584 */ /* epilogue */ diff --git a/src/parser_proc.h b/src/parser_proc.h index 27e6b18..382aa20 100644 --- a/src/parser_proc.h +++ b/src/parser_proc.h @@ -221,8 +221,6 @@ union YYSTYPE struct psi_assert_stmt * PSI_T_assert_stmt; /* constant */ struct psi_const * PSI_T_constant; - /* constant_type */ - struct psi_const_type * PSI_T_constant_type; /* cpp */ struct psi_cpp_exp * PSI_T_cpp; /* cpp_exp */ @@ -231,6 +229,8 @@ union YYSTYPE struct psi_cpp_macro_decl * PSI_T_cpp_macro_decl; /* decl_stmt */ struct psi_decl * PSI_T_decl_stmt; + /* ignored_decl */ + struct psi_decl * PSI_T_ignored_decl; /* decl */ struct psi_decl * PSI_T_decl; /* decl_body */ @@ -239,6 +239,8 @@ union YYSTYPE struct psi_decl * PSI_T_decl_func_body; /* decl_functor_body */ struct psi_decl * PSI_T_decl_functor_body; + /* decl_anon_functor_body */ + struct psi_decl * PSI_T_decl_anon_functor_body; /* decl_typedef */ struct psi_decl_arg * PSI_T_decl_typedef; /* typedef */ @@ -251,6 +253,8 @@ union YYSTYPE struct psi_decl_arg * PSI_T_typedef_anon_decl; /* decl_functor */ struct psi_decl_arg * PSI_T_decl_functor; + /* decl_anon_functor */ + struct psi_decl_arg * PSI_T_decl_anon_functor; /* decl_func */ struct psi_decl_arg * PSI_T_decl_func; /* decl_anon_arg */ @@ -287,6 +291,8 @@ union YYSTYPE struct psi_impl_func * PSI_T_impl_func; /* impl_type */ struct psi_impl_type * PSI_T_impl_type; + /* impl_type_restricted */ + struct psi_impl_type * PSI_T_impl_type_restricted; /* impl_var */ struct psi_impl_var * PSI_T_impl_var; /* align_and_size */ @@ -677,10 +683,6 @@ union YYSTYPE struct psi_token * PSI_T_cpp_name_arg_token; /* cpp_exp_arg_token */ struct psi_token * PSI_T_cpp_exp_arg_token; - /* cpp_special_name_token */ - struct psi_token * PSI_T_cpp_special_name_token; - /* constant_type_token */ - struct psi_token * PSI_T_constant_type_token; /* impl_def_val_token */ struct psi_token * PSI_T_impl_def_val_token; /* decl_type_simple */ @@ -701,6 +703,10 @@ union YYSTYPE struct psi_token * PSI_T_signed_long_types; /* int_width_types */ struct psi_token * PSI_T_int_width_types; + /* decl_asm */ + struct psi_token * PSI_T_decl_asm; + /* quoted_strings */ + struct psi_token * PSI_T_quoted_strings; /* enum_name */ struct psi_token * PSI_T_enum_name; /* union_name */ @@ -711,6 +717,10 @@ union YYSTYPE struct psi_token * PSI_T_optional_name; /* impl_type_token */ struct psi_token * PSI_T_impl_type_token; + /* impl_type_restricted_token */ + struct psi_token * PSI_T_impl_type_restricted_token; + /* impl_type_extended_token */ + struct psi_token * PSI_T_impl_type_extended_token; /* let_func_token */ struct psi_token * PSI_T_let_func_token; /* callback_rval */ @@ -721,7 +731,7 @@ union YYSTYPE struct psi_token * PSI_T_assert_stmt_token; /* impl_stmt */ struct psi_token ** PSI_T_impl_stmt; -#line 725 "src/parser_proc.h" /* glr.c:197 */ +#line 735 "src/parser_proc.h" /* glr.c:197 */ }; typedef union YYSTYPE YYSTYPE; diff --git a/src/parser_proc_grammar.y b/src/parser_proc_grammar.y index a7df0e8..bb8a9ce 100644 --- a/src/parser_proc_grammar.y +++ b/src/parser_proc_grammar.y @@ -69,7 +69,7 @@ static inline void psi_parser_proc_add_typedef(struct psi_parser *P, struct psi_ if (!P->types) { P->types = psi_plist_init((psi_plist_dtor) psi_decl_arg_free); } - psi_parser_proc_deanon_typedef(def); + //psi_parser_proc_deanon_typedef(def); P->types = psi_plist_add(P->types, &def); } static inline void psi_parser_proc_add_const(struct psi_parser *P, struct psi_const *cnst) { @@ -308,8 +308,8 @@ struct psi_parser; %type lib optional_name enum_name struct_name union_name %destructor {psi_token_free(&$$);} lib optional_name enum_name struct_name union_name -%type cpp_message_token cpp_include_token cpp_header_token cpp_no_arg_token cpp_name_arg_token cpp_exp_arg_token cpp_special_name_token -%destructor {} cpp_message_token cpp_include_token cpp_header_token cpp_no_arg_token cpp_name_arg_token cpp_exp_arg_token cpp_special_name_token +%type cpp_message_token cpp_include_token cpp_header_token cpp_no_arg_token cpp_name_arg_token cpp_exp_arg_token +%destructor {} cpp_message_token cpp_include_token cpp_header_token cpp_no_arg_token cpp_name_arg_token cpp_exp_arg_token %type name_token any_noeol_token binary_op_token unary_op_token %destructor {} name_token any_noeol_token binary_op_token unary_op_token @@ -329,25 +329,26 @@ struct psi_parser; %type cpp_macro_exp %destructor {psi_num_exp_free(&$$);} cpp_macro_exp -%type constant_type_token impl_def_val_token -%destructor {} constant_type_token impl_def_val_token +%type impl_def_val_token +%destructor {} impl_def_val_token %type constant %destructor {psi_const_free(&$$);} constant -%type constant_type -%destructor {psi_const_type_free(&$$);} constant_type %type impl_def_val %destructor {psi_impl_def_val_free(&$$);} impl_def_val %type decl_real_type decl_int_type decl_type_simple %destructor {psi_token_free(&$$);} decl_real_type decl_int_type decl_type_simple +%type decl_asm quoted_strings +%destructor {psi_token_free(&$$);} decl_asm quoted_strings + %type decl_type qualified_decl_type decl_type_complex %destructor {psi_decl_type_free(&$$);} decl_type qualified_decl_type decl_type_complex -%type decl_stmt decl decl_body decl_func_body decl_functor_body -%destructor {psi_decl_free(&$$);} decl_stmt decl decl_body decl_func_body decl_functor_body -%type decl_typedef decl_func decl_functor decl_arg decl_anon_arg typedef typedef_decl typedef_anon typedef_anon_decl -%destructor {psi_decl_arg_free(&$$);} decl_typedef decl_func decl_functor decl_arg decl_anon_arg typedef typedef_decl typedef_anon typedef_anon_decl +%type decl_stmt decl decl_body decl_func_body decl_functor_body decl_anon_functor_body ignored_decl +%destructor {psi_decl_free(&$$);} decl_stmt decl decl_body decl_func_body decl_functor_body decl_anon_functor_body ignored_decl +%type decl_typedef decl_func decl_functor decl_anon_functor decl_arg decl_anon_arg typedef typedef_decl typedef_anon typedef_anon_decl +%destructor {psi_decl_arg_free(&$$);} decl_typedef decl_func decl_functor decl_anon_functor decl_arg decl_anon_arg typedef typedef_decl typedef_anon typedef_anon_decl %type decl_var %destructor {psi_decl_var_free(&$$);} decl_var %type decl_struct @@ -375,8 +376,8 @@ struct psi_parser; %destructor {psi_impl_func_free(&$$);} impl_func %type impl_arg %destructor {psi_impl_arg_free(&$$);} impl_arg -%type impl_type -%destructor {psi_impl_type_free(&$$);} impl_type +%type impl_type impl_type_restricted +%destructor {psi_impl_type_free(&$$);} impl_type impl_type_restricted %type impl_var %destructor {psi_impl_var_free(&$$);} impl_var @@ -409,8 +410,8 @@ struct psi_parser; %type impl_stmt %destructor {psi_impl_stmt_free(&$$);} impl_stmt -%type impl_type_token callback_rval let_func_token set_func_token assert_stmt_token -%destructor {psi_token_free(&$$);} impl_type_token callback_rval let_func_token set_func_token assert_stmt_token +%type impl_type_token impl_type_restricted_token impl_type_extended_token callback_rval let_func_token set_func_token assert_stmt_token +%destructor {psi_token_free(&$$);} impl_type_token impl_type_restricted_token impl_type_extended_token callback_rval let_func_token set_func_token assert_stmt_token %type impl_args impl_stmts let_exps let_func_exps callback_arg_list callback_args set_exps set_func_exps free_exps %destructor {psi_plist_free($$);} impl_args impl_stmts let_exps let_func_exps callback_arg_list callback_args set_exps set_func_exps free_exps @@ -471,7 +472,12 @@ block: | decl_extvar_stmt[list] { psi_parser_proc_add_decl_extvars(P, $list); } -| ignored_decl +| ignored_decl { + if (P->flags & PSI_DEBUG) { + P->error(PSI_DATA(P), $ignored_decl->func->token, PSI_NOTICE, "Ignored decl: %s", $ignored_decl->func->var->name); + } + psi_decl_free(&$ignored_decl); +} | decl_typedef[def] { psi_parser_proc_add_typedef(P, $def); } @@ -536,7 +542,7 @@ cpp_exp[exp]: $exp = psi_cpp_exp_init($cpp_no_arg_token->type, NULL); $exp->token = psi_token_copy($cpp_no_arg_token); } -| cpp_name_arg_token cpp_special_name_token[name_token] { +| cpp_name_arg_token any_noeol_token[name_token] { $name_token->type = PSI_T_NAME; $exp = psi_cpp_exp_init($cpp_name_arg_token->type, psi_token_copy($name_token)); $exp->token = psi_token_copy($cpp_name_arg_token); @@ -596,25 +602,26 @@ cpp_exp_arg_token: | ELIF ; -cpp_special_name_token: - name_token -| NULL -| TRUE -| FALSE -| CPP_RESTRICT -| CPP_EXTENSION -| CPP_INLINE -; - cpp_macro_decl[macro]: - name_token NO_WHITESPACE LPAREN cpp_macro_sig RPAREN cpp_macro_decl_tokens { + any_noeol_token[name_token] cpp_macro_decl_tokens %dprec 1 { + $name_token->type = PSI_T_NAME; + $macro = psi_cpp_macro_decl_init(NULL, $cpp_macro_decl_tokens, NULL); + $macro->token = psi_token_copy($name_token); +} +| name_token NO_WHITESPACE LPAREN cpp_macro_sig RPAREN cpp_macro_decl_tokens %dprec 2 { $name_token->type = PSI_T_NAME; $macro = psi_cpp_macro_decl_init($cpp_macro_sig, $cpp_macro_decl_tokens, NULL); $macro->token = psi_token_copy($name_token); } -| cpp_special_name_token[name_token] cpp_macro_decl_tokens { +| name_token cpp_macro_exp[num_exp] %dprec 2 { $name_token->type = PSI_T_NAME; - $macro = psi_cpp_macro_decl_init(NULL, $cpp_macro_decl_tokens, NULL); + $macro = psi_cpp_macro_decl_init(NULL, psi_num_exp_tokens($num_exp, NULL), $num_exp); + $macro->token = psi_token_copy($name_token); +} +| name_token quoted_strings[strings] %dprec 2 { + struct psi_plist *list = psi_plist_init((psi_plist_dtor) psi_token_free); + $name_token->type = PSI_T_NAME; + $macro = psi_cpp_macro_decl_init(NULL, psi_plist_add(list, &$strings), NULL); $macro->token = psi_token_copy($name_token); } ; @@ -688,7 +695,8 @@ cpp_macro_exp[exp]: $name_token->type = PSI_T_NAME; exists = psi_cpp_defined(P->preproc, $name_token); $exp = psi_num_exp_init_num(psi_number_init(PSI_T_UINT8, &exists, 0)); - $exp->token = psi_token_copy($name_token); + $exp->token = psi_token_copy($DEFINED); + $exp->data.n->token = psi_token_copy($name_token); } } | DEFINED LPAREN name_token RPAREN { @@ -698,7 +706,8 @@ cpp_macro_exp[exp]: $name_token->type = PSI_T_NAME; exists = psi_cpp_defined(P->preproc, $name_token); $exp = psi_num_exp_init_num(psi_number_init(PSI_T_UINT8, &exists, 0)); - $exp->token = psi_token_copy($name_token); + $exp->token = psi_token_copy($DEFINED); + $exp->data.n->token = psi_token_copy($name_token); } } | NUMBER { @@ -726,6 +735,7 @@ cpp_macro_exp[exp]: $exp = psi_num_exp_init_num(psi_number_init(PSI_T_FUNCTION, psi_cpp_macro_call_init($name_token->text, $cpp_macro_call_args), 0)); $exp->token = psi_token_copy($name_token); + $exp->data.n->token = psi_token_copy($name_token); } ; @@ -747,62 +757,22 @@ cpp_macro_call_arg_list[args]: ; constant[const]: - CONST constant_type NSNAME EQUALS impl_def_val EOS { - $const = psi_const_init($constant_type, $NSNAME->text, $impl_def_val); + CONST impl_type_restricted[type] NSNAME EQUALS impl_def_val EOS { + $const = psi_const_init($type, $NSNAME->text, $impl_def_val); $const->token = psi_token_copy($NSNAME); } ; -constant_type[type]: - constant_type_token[token] { - $type = psi_const_type_init($token->type, $token->text); -} -; - -constant_type_token: - BOOL -| INT -| FLOAT -| STRING -; - impl_def_val[val]: - %empty { - $val = NULL; + impl_def_val_token[token] %dprec 2 { + $val = psi_impl_def_val_init($token->type, $token->text); + $val->token = psi_token_copy($token); } | num_exp[num] %dprec 1 { - /* FIXME */ - if (psi_num_exp_validate(PSI_DATA(P), $num, NULL, NULL, NULL, NULL, NULL)) { - impl_val res = {0}; - token_t type = psi_num_exp_exec($num, &res, NULL, &P->preproc->defs); - - if (type == PSI_T_FLOAT || type == PSI_T_DOUBLE) { - $val = psi_impl_def_val_init(type, NULL); - } else { - $val = psi_impl_def_val_init(PSI_T_INT, NULL); - } - - switch (type) { - case PSI_T_UINT8: $val->ival.zend.lval = res.u8; break; - case PSI_T_UINT16: $val->ival.zend.lval = res.u16; break; - case PSI_T_UINT32: $val->ival.zend.lval = res.u32; break; - case PSI_T_UINT64: $val->ival.zend.lval = res.u64; break; /* FIXME */ - case PSI_T_INT8: $val->ival.zend.lval = res.i8; break; - case PSI_T_INT16: $val->ival.zend.lval = res.i16; break; - case PSI_T_INT32: $val->ival.zend.lval = res.i32; break; - case PSI_T_INT64: $val->ival.zend.lval = res.i64; break; - case PSI_T_FLOAT: $val->ival.dval = res.fval; break; - case PSI_T_DOUBLE: $val->ival.dval = res.dval; break; - default: - assert(0); - - } - } else { - $val = NULL; - } - psi_num_exp_free(&$num); + $val = psi_impl_def_val_init(PSI_T_NUMBER, $num); + $val->token = psi_token_copy($num->token); } -| impl_def_val_token[token] %dprec 2 { +| quoted_strings[token] { $val = psi_impl_def_val_init($token->type, $token->text); $val->token = psi_token_copy($token); } @@ -812,13 +782,13 @@ impl_def_val_token: NULL | TRUE | FALSE -| QUOTED_STRING ; decl_typedef[def]: TYPEDEF typedef[def_] EOS { $def = $def_; } +/* | TYPEDEF VOID name_token EOS { $def = psi_decl_arg_init( psi_decl_type_init(PSI_T_VOID, $VOID->text), @@ -828,6 +798,7 @@ decl_typedef[def]: $def->type->token = psi_token_copy($VOID); $def->var->token = psi_token_copy($name_token); } +*/ | CPP_EXTENSION TYPEDEF typedef[def_] EOS { $def = $def_; } @@ -929,13 +900,18 @@ typedef_anon_decl[def]: ; qualified_decl_type[type]: - CONST decl_type[type_] { + decl_type +| decl_type_qualifier_token decl_type[type_] { $type = $type_; } -| VOLATILE decl_type[type_] { +| qualified_decl_type[type_] decl_type_qualifier_token { $type = $type_; } -| decl_type +; + +decl_type_qualifier_token: + CONST +| VOLATILE ; decl_type[type]: @@ -970,6 +946,9 @@ decl_type_simple[type]: | NAME[type_] { $type = psi_token_copy($type_); } +| VOID[type_] { + $type = psi_token_copy($type_); +} ; decl_real_type[type]: @@ -1091,20 +1070,37 @@ int_width_types[type]: decl_stmt: decl decl_asm EOS { $decl_stmt = $decl; + if ($decl_asm) { + $decl->redir = strdup($decl_asm->text); + free($decl_asm); + } } | CPP_EXTENSION decl decl_asm EOS { $decl_stmt = $decl; + if ($decl_asm) { + $decl->redir = strdup($decl_asm->text); + free($decl_asm); + } } ; decl_asm: - %empty -| CPP_ASM LPAREN ignored_quoted_strings RPAREN + %empty { + $decl_asm = NULL; +} +| CPP_ASM LPAREN quoted_strings RPAREN { + $decl_asm = $quoted_strings; +} ; -ignored_quoted_strings: - QUOTED_STRING -| ignored_quoted_strings QUOTED_STRING +quoted_strings[strings]: + QUOTED_STRING { + $strings = psi_token_copy($QUOTED_STRING); +} +| quoted_strings[strings_] QUOTED_STRING { + $strings = psi_token_cat("", 2, $strings_, $QUOTED_STRING); + free($strings_); +} ; decl_extvar_stmt[list]: @@ -1157,13 +1153,16 @@ decl_vars[vars]: ignored_decl: STATIC decl_body ignored_decl_body { - psi_decl_free(&$decl_body); + $ignored_decl = $decl_body; +} +| STATIC CPP_INLINE decl_body ignored_decl_body { + $ignored_decl = $decl_body; } | CPP_INLINE decl_body ignored_decl_body { - psi_decl_free(&$decl_body); + $ignored_decl = $decl_body; } -| STATIC CPP_INLINE decl_body ignored_decl_body { - psi_decl_free(&$decl_body); +| NAME CPP_INLINE decl_body ignored_decl_body { + $ignored_decl = $decl_body; } ; @@ -1228,6 +1227,49 @@ decl_functor_body[decl]: $decl->func->var->array_size = $as; } } +| qualified_decl_type[rval_type] indirection[i] LPAREN indirection[unused1] name_token[NAME] LPAREN decl_args[args] RPAREN RPAREN LPAREN decl_args[rval_args] RPAREN array_size[as] { + (void) $unused1; + $NAME->type = PSI_T_NAME; + + struct psi_token *type_token = psi_token_append("@", psi_token_copy($NAME), 1, "rval"); + struct psi_decl_arg *rval_func = psi_decl_arg_init($rval_type, psi_decl_var_init(type_token->text, $i, 0)); + struct psi_decl *rval_decl = psi_decl_init(rval_func, $rval_args); + + rval_func->var->token = psi_token_copy(type_token); + rval_func->token = psi_token_copy(type_token); + if ($as) { + rval_func->var->pointer_level += 1; + rval_func->var->array_size = $as; + } + + struct psi_decl_type *type = psi_decl_type_init(PSI_T_FUNCTION, type_token->text); + struct psi_decl_arg *func = psi_decl_arg_init(type, psi_decl_var_init($NAME->text, 1, 0)); + + type->real.func = rval_decl; + func->var->token = psi_token_copy($NAME); + func->token = psi_token_copy($NAME); + + $decl = psi_decl_init(func, $args); + +} +; + +decl_anon_functor_body[decl]: + decl_anon_functor[func] LPAREN decl_args[args] RPAREN array_size[as] { + $decl = psi_decl_init($func, $args); + if ($as) { + $decl->func->var->pointer_level += 1; + $decl->func->var->array_size = $as; + } +} +| decl_anon_functor[func] LPAREN decl_args[args] COMMA ELLIPSIS RPAREN array_size[as] { + $decl = psi_decl_init($func, $args); + $decl->varargs = 1; + if ($as) { + $decl->func->var->pointer_level += 1; + $decl->func->var->array_size = $as; + } +} ; decl_functor[arg]: @@ -1238,6 +1280,8 @@ decl_functor[arg]: $arg->var->token = psi_token_copy($NAME); $arg->token = psi_token_copy($NAME); } + +/* | CONST VOID pointers LPAREN indirection[unused1] name_token[NAME] RPAREN { (void) $unused1; $NAME->type = PSI_T_NAME; @@ -1271,10 +1315,53 @@ decl_functor[arg]: $arg->var->token = psi_token_copy($NAME); $arg->token = psi_token_copy($NAME); } +*/ +; + +decl_anon_functor[arg]: + qualified_decl_type[type] indirection[i] LPAREN indirection[unused1] RPAREN { + (void) $unused1; + $arg = psi_decl_arg_init($type, psi_decl_var_init(NULL, $i, 0)); + $arg->var->token = psi_token_copy($LPAREN); + $arg->token = psi_token_copy($LPAREN); +} +/* +| CONST VOID pointers LPAREN indirection[unused1] RPAREN { + (void) $unused1; + $arg = psi_decl_arg_init( + psi_decl_type_init($VOID->type, $VOID->text), + psi_decl_var_init(NULL, $pointers, 0) + ); + $arg->type->token = psi_token_copy($VOID); + $arg->var->token = psi_token_copy($VOID); + $arg->token = psi_token_copy($VOID); +} +| VOID pointers LPAREN indirection[unused1] RPAREN { + (void) $unused1; + $arg = psi_decl_arg_init( + psi_decl_type_init($VOID->type, $VOID->text), + psi_decl_var_init(NULL, $pointers, 0) + ); + $arg->type->token = psi_token_copy($VOID); + $arg->var->token = psi_token_copy($VOID); + $arg->token = psi_token_copy($VOID); +} +| VOID LPAREN indirection[unused1] RPAREN { + (void) $unused1; + $arg = psi_decl_arg_init( + psi_decl_type_init($VOID->type, $VOID->text), + psi_decl_var_init(NULL, 0, 0) + ); + $arg->type->token = psi_token_copy($VOID); + $arg->var->token = psi_token_copy($VOID); + $arg->token = psi_token_copy($VOID); +} +*/ ; decl_func[func]: decl_arg + /* | VOID name_token[NAME] { $func = psi_decl_arg_init( psi_decl_type_init($VOID->type, $VOID->text), @@ -1284,16 +1371,17 @@ decl_func[func]: $func->var->token = psi_token_copy($NAME); $func->token = psi_token_copy($NAME); } +*/ ; decl_args[args]: %empty { $args = NULL; } -| VOID { +| VOID %dprec 2 { $args = NULL; } -| decl_arg_list[args_] { +| decl_arg_list[args_] %dprec 1 { $args = $args_; } ; @@ -1308,8 +1396,22 @@ decl_arg_list[args]: ; decl_anon_arg[arg]: -/* FIXME decl_functor_body_anon */ - decl_arg %dprec 2 { + decl_anon_functor_body[decl] { + char digest[17]; + struct psi_token *name; + + psi_token_hash($decl->func ->token, digest); + name = psi_token_append("@", psi_token_copy($decl->func->token), 2, "funct", digest); + + $arg = psi_decl_arg_init( + psi_decl_type_init(PSI_T_FUNCTION, name->text), + psi_decl_var_copy($decl->func->var) + ); + $arg->token = name; + $arg->type->token = psi_token_copy($decl->func->token); + $arg->type->real.func = $decl; +} +| decl_arg %dprec 2 { $arg = $decl_arg; } | qualified_decl_type[type] indirection %dprec 1 { @@ -1318,6 +1420,7 @@ decl_anon_arg[arg]: psi_decl_var_init(NULL, $indirection, 0) ); } +/* | CONST VOID pointers { $arg = psi_decl_arg_init( psi_decl_type_init($VOID->type, $VOID->text), @@ -1336,6 +1439,7 @@ decl_anon_arg[arg]: $arg->var->token = psi_token_copy($VOID); $arg->token = psi_token_copy($VOID); } +*/ ; decl_arg[arg]: @@ -1350,6 +1454,7 @@ decl_arg[arg]: | qualified_decl_type[type] decl_var[var] { $arg = psi_decl_arg_init($type, $var); } +/* | CONST VOID pointers name_token[NAME] { $NAME->type = PSI_T_NAME; $arg = psi_decl_arg_init( @@ -1370,6 +1475,7 @@ decl_arg[arg]: $arg->var->token = psi_token_copy($NAME); $arg->token = psi_token_copy($NAME); } +*/ ; decl_var[var]: @@ -1593,7 +1699,8 @@ sizeof_body_notypes[sizeof]: $sizeof = psi_number_init(PSI_T_INT8, &sizeof_a, 0); } | QUOTED_STRING { - $sizeof = psi_number_init(PSI_T_INT64, &$QUOTED_STRING->size, 0); + uint64_t len = $QUOTED_STRING->size + 1; + $sizeof = psi_number_init(PSI_T_UINT64, &len, 0); } ; @@ -1681,22 +1788,30 @@ array_size[as]: %empty { $as = 0; } -| LBRACKET RBRACKET { - $as = 0; -} -| LBRACKET CPP_RESTRICT RBRACKET { +| LBRACKET array_qualifier_token RBRACKET { $as = 0; } | LBRACKET num_exp RBRACKET { - if (psi_num_exp_validate(PSI_DATA(P), $num_exp, NULL, NULL, NULL, NULL, NULL)) { - $as = psi_long_num_exp($num_exp, NULL, &P->preproc->defs); + struct psi_validate_scope scope = {0}; + psi_validate_scope_ctor(&scope); + scope.defs = &P->preproc->defs; + if (psi_num_exp_validate(PSI_DATA(P), $num_exp, &scope)) { + $as = psi_num_exp_get_long($num_exp, NULL, &P->preproc->defs); } else { $as = 0; } psi_num_exp_free(&$num_exp); + psi_validate_scope_dtor(&scope); } ; +array_qualifier_token: + %empty +| CPP_RESTRICT +| VOLATILE +| CONST +; + indirection[i]: %empty { $i = 0; @@ -1724,7 +1839,12 @@ asterisks[a]: asterisk: ASTERISK -| ASTERISK CONST +| ASTERISK pointer_qualifier_token +; + +pointer_qualifier_token: + CONST +| VOLATILE ; /* @@ -1795,13 +1915,28 @@ impl_type[type]: } ; +impl_type_restricted[type]: + impl_type_restricted_token[token] { + $type = psi_impl_type_init($token->type, $token->text); + $type->token = psi_token_copy($token); +} +; + impl_type_token: - VOID -| MIXED -| BOOL + impl_type_restricted_token +| impl_type_extended_token +; + +impl_type_restricted_token: + BOOL | INT | FLOAT | STRING +; + +impl_type_extended_token: + VOID +| MIXED | ARRAY | OBJECT | CALLABLE diff --git a/src/plist.c b/src/plist.c index 1a69fc1..38cde5b 100644 --- a/src/plist.c +++ b/src/plist.c @@ -121,7 +121,7 @@ struct psi_plist *psi_plist_add(struct psi_plist *list, void *ptr) { } struct psi_plist *psi_plist_add_r(struct psi_plist *list, size_t num_eles, void **eles) { - if (list && list->count) { + if (list) { list = realloc(list, sizeof(*list) + list->size + (num_eles + list->count) * list->size); } if (list) { diff --git a/src/token.h b/src/token.h index a5cc552..5f6c7c7 100644 --- a/src/token.h +++ b/src/token.h @@ -47,31 +47,31 @@ static inline size_t psi_offset_padding(size_t diff, size_t alignment) { #include "parser_proc.h" #undef YYDEBUG -#if SIZEOF_CHAR == SIZEOF_INT8_T +#if SIZEOF_CHAR == 1 # define ALIGNOF_INT8_T ALIGNOF_CHAR # define ALIGNOF_UINT8_T ALIGNOF_CHAR #else # error SIZEOF_CHAR != 8 #endif -#if SIZEOF_SHORT == SIZEOF_INT16_T +#if SIZEOF_SHORT == 2 # define ALIGNOF_INT16_T ALIGNOF_SHORT # define ALIGNOF_UINT16_T ALIGNOF_SHORT #else # error SIZEOF_SHORT != 16 #endif -#if SIZEOF_INT == SIZEOF_INT32_T +#if SIZEOF_INT == 4 # define ALIGNOF_INT32_T ALIGNOF_INT # define ALIGNOF_UINT32_T ALIGNOF_INT -#elif SIZEOF_LONG == SIZEOF_INT32_T +#elif SIZEOF_LONG == 4 # define ALIGNOF_INT32_T ALIGNOF_LONG # define ALIGNOF_UINT32_T ALIGNOF_LONG #else # error SIZEOF_INT != 32 and SIZEOF_LONG != 32 #endif -#if SIZEOF_LONG == SIZEOF_INT64_T +#if SIZEOF_LONG == 8 # define ALIGNOF_INT64_T ALIGNOF_LONG # define ALIGNOF_UINT64_T ALIGNOF_LONG -# elif HAVE_LONG_LONG_INT && SIZEOF_LONG_LONG_INT == SIZEOF_INT64_T +# elif HAVE_LONG_LONG_INT && SIZEOF_LONG_LONG_INT == 8 # define ALIGNOF_INT64_T ALIGNOF_LONG_LONG # define ALIGNOF_UINT64_T ALIGNOF_LONG_LONG #else @@ -94,19 +94,19 @@ typedef enum psi_token_type token_t; static inline size_t psi_t_alignment(token_t t) { -#define PSI_ALIGNOF(T) case PSI_T_## T: return ALIGNOF_## T ##_T; +#define PSI_ALIGNOF(T,S) case PSI_T_## T ##S: return S/8; switch (t) { - PSI_ALIGNOF(INT8); - PSI_ALIGNOF(UINT8); - PSI_ALIGNOF(INT16); - PSI_ALIGNOF(UINT16); - PSI_ALIGNOF(INT32); - PSI_ALIGNOF(UINT32); - PSI_ALIGNOF(INT64); - PSI_ALIGNOF(UINT64); + PSI_ALIGNOF(INT,8); + PSI_ALIGNOF(UINT,8); + PSI_ALIGNOF(INT,16); + PSI_ALIGNOF(UINT,16); + PSI_ALIGNOF(INT,32); + PSI_ALIGNOF(UINT,32); + PSI_ALIGNOF(INT,64); + PSI_ALIGNOF(UINT,64); #if HAVE_INT128 - PSI_ALIGNOF(INT128); - PSI_ALIGNOF(UINT128); + PSI_ALIGNOF(INT,128); + PSI_ALIGNOF(UINT,128); #endif case PSI_T_FLOAT: return ALIGNOF_FLOAT; @@ -129,19 +129,19 @@ static inline size_t psi_t_alignment(token_t t) static inline size_t psi_t_size(token_t t) { -#define PSI_SIZEOF(T) case PSI_T_## T : return SIZEOF_## T ##_T; +#define PSI_SIZEOF(T,S) case PSI_T_## T ##S : return S/8; switch (t) { - PSI_SIZEOF(INT8); - PSI_SIZEOF(UINT8); - PSI_SIZEOF(INT16); - PSI_SIZEOF(UINT16); - PSI_SIZEOF(INT32); - PSI_SIZEOF(UINT32); - PSI_SIZEOF(INT64); - PSI_SIZEOF(UINT64); + PSI_SIZEOF(INT,8); + PSI_SIZEOF(UINT,8); + PSI_SIZEOF(INT,16); + PSI_SIZEOF(UINT,16); + PSI_SIZEOF(INT,32); + PSI_SIZEOF(UINT,32); + PSI_SIZEOF(INT,64); + PSI_SIZEOF(UINT,64); #if HAVE_INT128 - PSI_SIZEOF(INT128); - PSI_SIZEOF(UINT128); + PSI_SIZEOF(INT,128); + PSI_SIZEOF(UINT,128); #endif case PSI_T_FLOAT: return SIZEOF_FLOAT; diff --git a/src/types.h b/src/types.h index 60fde11..220793c 100644 --- a/src/types.h +++ b/src/types.h @@ -39,7 +39,6 @@ #include "types/impl_type.h" #include "types/impl_var.h" #include "types/impl_def_val.h" -#include "types/const_type.h" #include "types/const.h" #include "types/impl_arg.h" #include "types/impl_func.h" diff --git a/src/types/assert_stmt.c b/src/types/assert_stmt.c index ba86758..7b860d9 100644 --- a/src/types/assert_stmt.c +++ b/src/types/assert_stmt.c @@ -68,14 +68,14 @@ bool psi_assert_stmt_exec(struct psi_assert_stmt *stmt, struct psi_call_frame *f return chk.u8; } -bool psi_assert_stmts_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_assert_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope) { size_t i = 0; struct psi_assert_stmt *ass; /* we can have multiple assert stmts */ - while (psi_plist_get(impl->stmts.ass, i++, &ass)) { - if (!psi_num_exp_validate(data, ass->exp, impl, NULL, NULL, NULL, NULL)) { + while (psi_plist_get(scope->impl->stmts.ass, i++, &ass)) { + if (!psi_num_exp_validate(data, ass->exp, scope)) { return false; } } diff --git a/src/types/assert_stmt.h b/src/types/assert_stmt.h index 5c7f39a..7bfa74a 100644 --- a/src/types/assert_stmt.h +++ b/src/types/assert_stmt.h @@ -49,7 +49,7 @@ bool psi_assert_stmt_exec(struct psi_assert_stmt *stmt, struct psi_call_frame *f void psi_assert_stmt_dump(int fd, struct psi_assert_stmt *stmt); void psi_assert_stmt_free(struct psi_assert_stmt **stmt); -bool psi_assert_stmts_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_assert_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope); char *psi_assert_stmt_message(struct psi_assert_stmt *stmt); diff --git a/src/types/const.c b/src/types/const.c index 449f04a..18e9da6 100644 --- a/src/types/const.c +++ b/src/types/const.c @@ -26,7 +26,7 @@ #include "php_psi_stdinc.h" #include "data.h" -struct psi_const *psi_const_init(struct psi_const_type *type, const char *name, +struct psi_const *psi_const_init(struct psi_impl_type *type, const char *name, struct psi_impl_def_val *val) { struct psi_const *c = calloc(1, sizeof(*c)); @@ -45,7 +45,7 @@ void psi_const_free(struct psi_const **constant_ptr) if (constant->token) { free(constant->token); } - psi_const_type_free(&constant->type); + psi_impl_type_free(&constant->type); free(constant->name); psi_impl_def_val_free(&constant->val); free(constant); @@ -55,15 +55,16 @@ void psi_const_free(struct psi_const **constant_ptr) void psi_const_dump(int fd, struct psi_const *cnst) { dprintf(fd, "const "); - psi_const_type_dump(fd, cnst->type); + psi_impl_type_dump(fd, cnst->type); dprintf(fd, " %s = ", cnst->name); psi_impl_def_val_dump(fd, cnst->val); dprintf(fd, ";"); } -bool psi_const_validate(struct psi_data *data, struct psi_const *c) +bool psi_const_validate(struct psi_data *data, struct psi_const *c, + struct psi_validate_scope *scope) { - if (!psi_impl_def_val_validate(data, c->val, c->type->type, c->type->name)) { + if (!psi_impl_def_val_validate(data, c->val, c->type, scope)) { return false; } return true; diff --git a/src/types/const.h b/src/types/const.h index 8af18f2..a75caf2 100644 --- a/src/types/const.h +++ b/src/types/const.h @@ -28,19 +28,21 @@ struct psi_data; struct psi_token; -struct psi_const_type; +struct psi_impl_type; struct psi_impl_def_val; struct psi_const { struct psi_token *token; - struct psi_const_type *type; + struct psi_impl_type *type; char *name; struct psi_impl_def_val *val; }; -struct psi_const *psi_const_init(struct psi_const_type *type, const char *name, struct psi_impl_def_val *val); +struct psi_const *psi_const_init(struct psi_impl_type *type, const char *name, + struct psi_impl_def_val *val); void psi_const_free(struct psi_const **constant_ptr); void psi_const_dump(int fd, struct psi_const *cnst); -bool psi_const_validate(struct psi_data *data, struct psi_const *c); +bool psi_const_validate(struct psi_data *data, struct psi_const *c, + struct psi_validate_scope *scope); #endif diff --git a/src/types/const_type.c b/src/types/const_type.c deleted file mode 100644 index 33c1233..0000000 --- a/src/types/const_type.c +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - Copyright (c) 2016, Michael Wallner . - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *******************************************************************************/ - -#include "php_psi_stdinc.h" -#include "data.h" - -struct psi_const_type *psi_const_type_init(token_t type, const char *name) -{ - struct psi_const_type *ct = calloc(1, sizeof(*ct)); - - ct->type = type; - ct->name = strdup(name); - - return ct; -} - -void psi_const_type_free(struct psi_const_type **type_ptr) -{ - if (*type_ptr) { - struct psi_const_type *type = *type_ptr; - - *type_ptr = NULL; - free(type->name); - free(type); - } -} - -void psi_const_type_dump(int fd, struct psi_const_type *type) -{ - dprintf(fd, "%s", type->name); -} diff --git a/src/types/const_type.h b/src/types/const_type.h deleted file mode 100644 index 42fc58f..0000000 --- a/src/types/const_type.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - Copyright (c) 2016, Michael Wallner . - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*******************************************************************************/ - -#ifndef PSI_TYPES_CONST_TYPE_H -#define PSI_TYPES_CONST_TYPE_H - -#include "token.h" - -struct psi_const_type { - token_t type; - char *name; -}; - -struct psi_const_type *psi_const_type_init(token_t type, const char *name); -void psi_const_type_free(struct psi_const_type **type_tr); -void psi_const_type_dump(int fd, struct psi_const_type *type); - -#endif diff --git a/src/types/cpp_macro_decl.c b/src/types/cpp_macro_decl.c index e540131..6d3747e 100644 --- a/src/types/cpp_macro_decl.c +++ b/src/types/cpp_macro_decl.c @@ -78,7 +78,9 @@ void psi_cpp_macro_decl_dump(int fd, struct psi_cpp_macro_decl *macro) if (macro->exp) { dprintf(fd, " "); psi_num_exp_dump(fd, macro->exp); - } else if (macro->tokens) { + if (!macro->tokens) abort(); + } else + if (macro->tokens) { size_t i = 0; struct psi_token *tok; @@ -129,6 +131,8 @@ bool psi_cpp_macro_decl_equal(struct psi_cpp_macro_decl *d1, struct psi_cpp_macr if (!cmp_token_list(d1->sig, d2->sig)) { return false; } + } else if (d2->sig) { + return false; } if (d1->tokens) { @@ -139,6 +143,8 @@ bool psi_cpp_macro_decl_equal(struct psi_cpp_macro_decl *d1, struct psi_cpp_macr if (!cmp_token_list(d1->tokens, d2->tokens)) { return false; } + } else if (d2->tokens) { + return false; } /* FIXME compare num_exps */ diff --git a/src/types/decl.c b/src/types/decl.c index 2d97480..85d93d4 100644 --- a/src/types/decl.c +++ b/src/types/decl.c @@ -57,6 +57,9 @@ void psi_decl_free(struct psi_decl **d_ptr) if (d->args) { psi_plist_free(d->args); } + if (d->redir) { + free(d->redir); + } free(d); } } @@ -65,6 +68,7 @@ void psi_decl_dump(int fd, struct psi_decl *decl) { psi_decl_abi_dump(fd, decl->abi); dprintf(fd, " "); + /* FIXME: functions returning arrays */ psi_decl_arg_dump(fd, decl->func, 0); dprintf(fd, "("); if (decl->args) { @@ -81,7 +85,11 @@ void psi_decl_dump(int fd, struct psi_decl *decl) dprintf(fd, ", ..."); } } - dprintf(fd, ");"); + if (decl->redir) { + dprintf(fd, ") __asm__ (\"%s\");", decl->redir); + } else { + dprintf(fd, ");"); + } } static inline bool psi_decl_validate_func(struct psi_data *data, @@ -106,10 +114,11 @@ static inline bool psi_decl_validate_func(struct psi_data *data, #ifndef RTLD_DEFAULT # define RTLD_DEFAULT ((void *) 0) #endif - decl->sym = dlsym(dl ?: RTLD_DEFAULT, func->var->name); + decl->sym = dlsym(dl ?: RTLD_DEFAULT, decl->redir ?: func->var->name); if (!decl->sym) { data->error(data, func->token, PSI_WARNING, - "Failed to locate symbol '%s': %s", func->var->name, + "Failed to locate symbol '%s(%s)': %s", + func->var->name, decl->redir ?: "", dlerror() ?: "not found"); return false; } @@ -117,13 +126,13 @@ static inline bool psi_decl_validate_func(struct psi_data *data, return true; } -bool psi_decl_validate(struct psi_data *data, struct psi_decl *decl, void *dl, - struct psi_validate_stack *type_stack) +bool psi_decl_validate(struct psi_data *data, struct psi_decl *decl, + struct psi_validate_scope *scope) { - if (!psi_decl_validate_nodl(data, decl, type_stack)) { + if (!psi_decl_validate_nodl(data, decl, scope)) { return false; } - if (!psi_decl_validate_func(data, decl, decl->func, dl)) { + if (!psi_decl_validate_func(data, decl, decl->func, scope->dlopened)) { return false; } @@ -131,7 +140,7 @@ bool psi_decl_validate(struct psi_data *data, struct psi_decl *decl, void *dl, } bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, - struct psi_validate_stack *type_stack) + struct psi_validate_scope *scope) { if (!decl->abi) { decl->abi = psi_decl_abi_init("default"); @@ -140,7 +149,7 @@ bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, "Invalid calling convention: '%s'", decl->abi->token->text); return false; } - if (!psi_decl_arg_validate(data, decl->func, type_stack)) { + if (!psi_decl_arg_validate(data, decl->func, scope)) { return false; } if (decl->args) { @@ -153,7 +162,7 @@ bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, snprintf(arg->var->name, 6, "arg%zu", i); arg->var->fqn = strdup(arg->var->name); } - if (!psi_decl_arg_validate(data, arg, type_stack)) { + if (!psi_decl_arg_validate(data, arg, scope)) { return false; } } @@ -175,3 +184,18 @@ bool psi_decl_is_blacklisted(const char *name) return false; } +struct psi_decl_arg *psi_decl_get_arg(struct psi_decl *decl, struct psi_decl_var *var) { + if (var->arg) { + size_t i = 0; + struct psi_decl_arg *arg = decl->func; + + do { + if (var->arg == arg) { + return arg; + } + } while (psi_plist_get(decl->args, i++, &arg)); + } + + return psi_decl_arg_get_by_var(var, decl->args, decl->func); +} + diff --git a/src/types/decl.h b/src/types/decl.h index 0ef42bd..1ab42f5 100644 --- a/src/types/decl.h +++ b/src/types/decl.h @@ -35,6 +35,7 @@ struct psi_decl { struct psi_decl_abi *abi; struct psi_decl_arg *func; struct psi_plist *args; + char *redir; void *sym; void *info; unsigned varargs:1; @@ -44,12 +45,10 @@ struct psi_decl *psi_decl_init(struct psi_decl_arg *func, struct psi_plist *args void psi_decl_free(struct psi_decl **d_ptr); void psi_decl_dump(int fd, struct psi_decl *decl); -bool psi_decl_validate(struct psi_data *data, struct psi_decl *decl, void *dl, struct psi_validate_stack *type_stack); -bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, struct psi_validate_stack *type_stack); +bool psi_decl_validate(struct psi_data *data, struct psi_decl *decl, struct psi_validate_scope *scope); +bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, struct psi_validate_scope *scope); -static inline struct psi_decl_arg *psi_decl_get_arg(struct psi_decl *decl, struct psi_decl_var *var) { - return psi_decl_arg_get_by_var(var, decl->args, decl->func); -} +struct psi_decl_arg *psi_decl_get_arg(struct psi_decl *decl, struct psi_decl_var *var); bool psi_decl_is_blacklisted(const char *name); diff --git a/src/types/decl_arg.c b/src/types/decl_arg.c index b4acdb1..46ce8e0 100644 --- a/src/types/decl_arg.c +++ b/src/types/decl_arg.c @@ -93,9 +93,9 @@ void psi_decl_arg_dump(int fd, struct psi_decl_arg *arg, unsigned level) } bool psi_decl_arg_validate(struct psi_data *data, struct psi_decl_arg *arg, - struct psi_validate_stack *type_stack) + struct psi_validate_scope *scope) { - if (!psi_decl_type_validate(data, arg->type, arg->var->pointer_level, type_stack)) { + if (!psi_decl_type_validate(data, arg->type, arg, scope)) { if (!arg->var->pointer_level) { data->error(data, arg->type->token, PSI_WARNING, "Cannot use '%s' as type for '%s'%s%s", arg->type->name, @@ -107,12 +107,12 @@ bool psi_decl_arg_validate(struct psi_data *data, struct psi_decl_arg *arg, } bool psi_decl_arg_validate_typedef(struct psi_data *data, - struct psi_decl_arg *def, struct psi_validate_stack *type_stack) + struct psi_decl_arg *def, struct psi_validate_scope *scope) { - if (psi_validate_stack_has_type(type_stack, def->var->name)) { + if (psi_validate_scope_has_type(scope, def->var->name)) { return true; } - psi_validate_stack_add_type(type_stack, def->var->name, def); + psi_validate_scope_add_type(scope, def->var->name, def); if (def->type->type == PSI_T_VOID) { if (def->var->pointer_level) { @@ -122,7 +122,7 @@ bool psi_decl_arg_validate_typedef(struct psi_data *data, "Type '%s' cannot be aliased to 'void'", def->type->name); return false; } - } else if (!psi_decl_type_validate(data, def->type, def->var->pointer_level, type_stack)) { + } else if (!psi_decl_type_validate(data, def->type, def, scope)) { const char *pre; switch (def->type->type) { diff --git a/src/types/decl_arg.h b/src/types/decl_arg.h index 17033f0..01433bd 100644 --- a/src/types/decl_arg.h +++ b/src/types/decl_arg.h @@ -32,7 +32,7 @@ struct psi_plist; struct psi_decl_type; struct psi_decl_var; struct psi_layout; -struct psi_validate_stack; +struct psi_validate_scope; struct psi_decl_arg { struct psi_token *token; @@ -45,8 +45,8 @@ struct psi_decl_arg *psi_decl_arg_init(struct psi_decl_type *type, struct psi_de void psi_decl_arg_free(struct psi_decl_arg **arg_ptr); void psi_decl_arg_dump(int fd, struct psi_decl_arg *arg, unsigned level); -bool psi_decl_arg_validate(struct psi_data *data, struct psi_decl_arg *arg, struct psi_validate_stack *type_stack); -bool psi_decl_arg_validate_typedef(struct psi_data *data, struct psi_decl_arg *def, struct psi_validate_stack *type_stack); +bool psi_decl_arg_validate(struct psi_data *data, struct psi_decl_arg *arg, struct psi_validate_scope *scope); +bool psi_decl_arg_validate_typedef(struct psi_data *data, struct psi_decl_arg *def, struct psi_validate_scope *scope); size_t psi_decl_arg_align(struct psi_decl_arg *darg, size_t *pos, size_t *len); size_t psi_decl_arg_get_align(struct psi_decl_arg *darg); diff --git a/src/types/decl_enum_item.c b/src/types/decl_enum_item.c index c403d97..7410e01 100644 --- a/src/types/decl_enum_item.c +++ b/src/types/decl_enum_item.c @@ -78,6 +78,8 @@ void psi_decl_enum_item_dump(int fd, struct psi_decl_enum_item *item) bool psi_decl_enum_item_validate(struct psi_data *data, struct psi_decl_enum *enm, struct psi_decl_enum_item *item, size_t seq) { + struct psi_validate_scope scope = {0}; + if (!item->num) { if (seq) { int64_t one = 1; @@ -97,11 +99,12 @@ bool psi_decl_enum_item_validate(struct psi_data *data, } } - if (!psi_num_exp_validate(data, item->num, NULL, NULL, NULL, NULL, enm)) { + scope.current_enum = enm; + if (!psi_num_exp_validate(data, item->num, &scope)) { return false; } - item->val = psi_long_num_exp(item->num, NULL, NULL); + item->val = psi_num_exp_get_long(item->num, NULL, NULL); return true; } diff --git a/src/types/decl_extvar.c b/src/types/decl_extvar.c index 5e7f14a..d85258b 100644 --- a/src/types/decl_extvar.c +++ b/src/types/decl_extvar.c @@ -57,10 +57,9 @@ void psi_decl_extvar_free(struct psi_decl_extvar **evar_ptr) } bool psi_decl_extvar_validate(struct psi_data *data, - struct psi_decl_extvar *evar, void *dl, - struct psi_validate_stack *type_stack) + struct psi_decl_extvar *evar, struct psi_validate_scope *scope) { - if (!psi_decl_arg_validate(data, evar->arg, type_stack)) { + if (!psi_decl_arg_validate(data, evar->arg, scope)) { return false; } @@ -78,7 +77,7 @@ bool psi_decl_extvar_validate(struct psi_data *data, #ifndef RTLD_DEFAULT # define RTLD_DEFAULT ((void *) 0) #endif - evar->sym = dlsym(dl ?: RTLD_DEFAULT, evar->arg->var->name); + evar->sym = dlsym(scope->dlopened ?: RTLD_DEFAULT, evar->arg->var->name); if (!evar->sym) { data->error(data, evar->arg->var->token, PSI_WARNING, "Failed to locate symbol '%s': %s", evar->arg->var->name, @@ -88,11 +87,11 @@ bool psi_decl_extvar_validate(struct psi_data *data, } evar->getter = psi_decl_extvar_getter(evar); - if (!psi_decl_validate_nodl(data, evar->getter, type_stack)) { + if (!psi_decl_validate_nodl(data, evar->getter, scope)) { return false; } evar->setter = psi_decl_extvar_setter(evar); - if (!psi_decl_validate_nodl(data, evar->setter, type_stack)) { + if (!psi_decl_validate_nodl(data, evar->setter, scope)) { return false; } @@ -117,6 +116,8 @@ struct psi_decl *psi_decl_extvar_setter(struct psi_decl_extvar *evar) struct psi_plist *args = psi_plist_init((psi_plist_dtor) psi_decl_arg_free); struct psi_decl *decl = psi_decl_init(func, psi_plist_add(args, &arg)); + func_var->pointer_level = 0; + func_var->array_size = 0; func_var->name = realloc(func_var->name, strlen(evar->arg->var->name) + sizeof("_set")); strcat(func_var->name, "_set"); diff --git a/src/types/decl_extvar.h b/src/types/decl_extvar.h index 8245c3e..7c0675f 100644 --- a/src/types/decl_extvar.h +++ b/src/types/decl_extvar.h @@ -44,7 +44,7 @@ struct psi_decl_extvar { struct psi_decl_extvar *psi_decl_extvar_init(struct psi_decl_arg *arg); void psi_decl_extvar_free(struct psi_decl_extvar **evar); bool psi_decl_extvar_validate(struct psi_data *data, struct psi_decl_extvar *evar, - void *dl, struct psi_validate_stack *type_stack); + struct psi_validate_scope *scope); void psi_decl_extvar_dump(int fd, struct psi_decl_extvar *evar); bool psi_decl_extvar_is_blacklisted(const char *name); diff --git a/src/types/decl_struct.c b/src/types/decl_struct.c index a636115..d5309b9 100644 --- a/src/types/decl_struct.c +++ b/src/types/decl_struct.c @@ -79,7 +79,7 @@ struct psi_decl_arg *psi_decl_struct_get_arg(struct psi_decl_struct *s, } bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, - struct psi_validate_stack *type_stack) + struct psi_validate_scope *scope) { size_t i, pos, len, size, align; struct psi_decl_arg *darg, *prev_arg; @@ -87,7 +87,7 @@ bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, if (!s) { return false; } - if (psi_validate_stack_has_struct(type_stack, s->name)) { + if (psi_validate_scope_has_struct(scope, s->name)) { return true; } @@ -95,13 +95,13 @@ bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, return false; } - psi_validate_stack_add_struct(type_stack, s->name, s); + psi_validate_scope_add_struct(scope, s->name, s); for (i = 0; psi_plist_get(s->args, i, &darg); ++i) { darg->var->arg = darg; - if (!psi_decl_arg_validate(data, darg, type_stack)) { - psi_validate_stack_del_struct(type_stack, s->name); + if (!psi_decl_arg_validate(data, darg, scope)) { + psi_validate_scope_del_struct(scope, s->name); return false; } @@ -113,7 +113,7 @@ bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, data->error(data, darg->token, PSI_WARNING, "Computed zero alignment of %s.%s of type '%s'", len, s->name, darg->var->name, darg->type->name); - psi_validate_stack_del_struct(type_stack, s->name); + psi_validate_scope_del_struct(scope, s->name); return false; } @@ -149,7 +149,7 @@ bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, default: data->error(data, darg->token, PSI_WARNING, "Unsupported type for bit field: %s", real->name); - psi_validate_stack_del_struct(type_stack, s->name); + psi_validate_scope_del_struct(scope, s->name); return false; } darg->layout->bfw->pos = prev_arg->layout->bfw->pos + prev_arg->layout->bfw->len; diff --git a/src/types/decl_struct.h b/src/types/decl_struct.h index ca22f3b..5a7e45a 100644 --- a/src/types/decl_struct.h +++ b/src/types/decl_struct.h @@ -30,7 +30,7 @@ struct psi_data; struct psi_token; struct psi_plist; struct psi_decl_var; -struct psi_validate_stack; +struct psi_validate_scope; struct psi_decl_struct { struct psi_token *token; @@ -48,7 +48,7 @@ struct psi_decl_struct *psi_decl_struct_init(const char *name, struct psi_plist void psi_decl_struct_free(struct psi_decl_struct **s_ptr); void psi_decl_struct_dump(int fd, struct psi_decl_struct *strct); -bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, struct psi_validate_stack *type_stack); +bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s, struct psi_validate_scope *scope); struct psi_decl_arg *psi_decl_struct_get_arg(struct psi_decl_struct *s, struct psi_decl_var *var); size_t psi_decl_struct_get_align(struct psi_decl_struct *s); diff --git a/src/types/decl_type.c b/src/types/decl_type.c index c64b24d..dfded25 100644 --- a/src/types/decl_type.c +++ b/src/types/decl_type.c @@ -213,18 +213,23 @@ bool psi_decl_type_get_decl(struct psi_decl_type *type, struct psi_plist *decls) } bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, - bool is_pointer, struct psi_validate_stack *type_stack) + struct psi_decl_arg *def, struct psi_validate_scope *scope) { if (psi_decl_type_is_weak(type)) { if (!psi_decl_type_get_alias(type, data->types)) { - if (!psi_validate_stack_has_type(type_stack, type->name)) { + if (!psi_validate_scope_has_type(scope, type->name)) { return false; } - type->real.def = psi_validate_stack_get_type(type_stack, type->name); + type->real.def = psi_validate_scope_get_type(scope, type->name); } if (type->real.def) { - return psi_decl_type_validate(data, type->real.def->type, - is_pointer, type_stack); + if (!psi_decl_type_validate(data, type->real.def->type, + type->real.def, scope)) { + return false; + } + if (def) { + def->var->pointer_level += type->real.def->var->pointer_level; + } } return true; } @@ -232,9 +237,9 @@ bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, switch (type->type) { case PSI_T_STRUCT: if (!psi_decl_type_get_struct(type, data->structs)) { - if (psi_validate_stack_has_struct(type_stack, type->name)) { - type->real.strct = psi_validate_stack_get_struct(type_stack, type->name); - } else if (is_pointer) { + if (psi_validate_scope_has_struct(scope, type->name)) { + type->real.strct = psi_validate_scope_get_struct(scope, type->name); + } else if (def && def->var->pointer_level) { return true; } else { data->error(data, type->token, PSI_WARNING, @@ -242,15 +247,15 @@ bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, return false; } } - if (!psi_decl_struct_validate(data, type->real.strct, type_stack)) { + if (!psi_decl_struct_validate(data, type->real.strct, scope)) { return false; } break; case PSI_T_UNION: if (!psi_decl_type_get_union(type, data->unions)) { - if (psi_validate_stack_has_union(type_stack, type->name)) { - type->real.unn = psi_validate_stack_get_union(type_stack, type->name); - } else if (is_pointer) { + if (psi_validate_scope_has_union(scope, type->name)) { + type->real.unn = psi_validate_scope_get_union(scope, type->name); + } else if (def && def->var->pointer_level) { return true; } else { data->error(data, type->token, PSI_WARNING, @@ -258,7 +263,7 @@ bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, return false; } } - if (!psi_decl_union_validate(data, type->real.unn, type_stack)) { + if (!psi_decl_union_validate(data, type->real.unn, scope)) { return false; } break; @@ -275,7 +280,7 @@ bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, "Unknown decl '%s'", type->name); return false; } - if (!psi_decl_validate_nodl(data, type->real.func, type_stack)) { + if (!psi_decl_validate_nodl(data, type->real.func, scope)) { return false; } break; diff --git a/src/types/decl_type.h b/src/types/decl_type.h index 4e56a23..8e80b5e 100644 --- a/src/types/decl_type.h +++ b/src/types/decl_type.h @@ -36,7 +36,7 @@ struct psi_decl_struct; struct psi_decl_union; struct psi_decl_enum; struct psi_decl; -struct psi_validate_stack; +struct psi_validate_scope; struct psi_decl_type { struct psi_token *token; @@ -58,7 +58,8 @@ struct psi_decl_type *psi_decl_type_init(token_t type, const char *name); struct psi_decl_type *psi_decl_type_copy(struct psi_decl_type *src); void psi_decl_type_free(struct psi_decl_type **type_ptr); void psi_decl_type_dump(int fd, struct psi_decl_type *t, unsigned level); -bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, bool is_pointer, struct psi_validate_stack *type_stack); +bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, + struct psi_decl_arg *def, struct psi_validate_scope *scope); bool psi_decl_type_validate_args(struct psi_data *data, struct psi_decl_type *decl_type, token_t type, void *current); diff --git a/src/types/decl_union.c b/src/types/decl_union.c index 1e5c1c7..5d0f163 100644 --- a/src/types/decl_union.c +++ b/src/types/decl_union.c @@ -75,12 +75,12 @@ struct psi_decl_arg *psi_decl_union_get_arg(struct psi_decl_union *u, } bool psi_decl_union_validate(struct psi_data *data, struct psi_decl_union *u, - struct psi_validate_stack *type_stack) + struct psi_validate_scope *scope) { size_t i, pos, len, size = 0, align; struct psi_decl_arg *darg; - if (psi_validate_stack_has_union(type_stack, u->name)) { + if (psi_validate_scope_has_union(scope, u->name)) { return true; } @@ -90,13 +90,13 @@ bool psi_decl_union_validate(struct psi_data *data, struct psi_decl_union *u, return false; } - psi_validate_stack_add_union(type_stack, u->name, u); + psi_validate_scope_add_union(scope, u->name, u); for (i = 0; psi_plist_get(u->args, i, &darg); ++i) { darg->var->arg = darg; - if (!psi_decl_arg_validate(data, darg, type_stack)) { - psi_validate_stack_del_union(type_stack, u->name); + if (!psi_decl_arg_validate(data, darg, scope)) { + psi_validate_scope_del_union(scope, u->name); return false; } diff --git a/src/types/decl_union.h b/src/types/decl_union.h index 95184e2..be059ba 100644 --- a/src/types/decl_union.h +++ b/src/types/decl_union.h @@ -29,7 +29,7 @@ struct psi_data; struct psi_token; struct psi_plist; struct psi_decl_var; -struct psi_validate_stack; +struct psi_validate_scope; struct psi_decl_union { struct psi_token *token; @@ -43,7 +43,7 @@ struct psi_decl_union *psi_decl_union_init(const char *name, struct psi_plist *a void psi_decl_union_free(struct psi_decl_union **u_ptr); void psi_decl_union_dump(int fd, struct psi_decl_union *unn); -bool psi_decl_union_validate(struct psi_data *data, struct psi_decl_union *u, struct psi_validate_stack *type_stack); +bool psi_decl_union_validate(struct psi_data *data, struct psi_decl_union *u, struct psi_validate_scope *scope); size_t psi_decl_union_get_align(struct psi_decl_union *u); struct psi_decl_arg *psi_decl_union_get_arg(struct psi_decl_union *u, struct psi_decl_var *var); diff --git a/src/types/decl_var.c b/src/types/decl_var.c index 680d7a1..7f04127 100644 --- a/src/types/decl_var.c +++ b/src/types/decl_var.c @@ -86,14 +86,13 @@ void psi_decl_var_dump(int fd, struct psi_decl_var *var) } bool psi_decl_var_validate(struct psi_data *data, struct psi_decl_var *dvar, - struct psi_impl *impl, struct psi_decl *decl, - struct psi_let_exp *let_exp, struct psi_set_exp *set_exp) + struct psi_validate_scope *scope) { bool okay = false; - struct psi_let_exp *current_let_exp = let_exp; - struct psi_set_exp *current_set_exp = set_exp; - if (current_let_exp) { + if (scope && scope->current_let) { + struct psi_let_exp *current_let_exp = scope->current_let; + /* walk up the let expression tree until found */ while ((current_let_exp = current_let_exp->outer)) { struct psi_decl_var *svar = current_let_exp->var; @@ -114,7 +113,9 @@ bool psi_decl_var_validate(struct psi_data *data, struct psi_decl_var *dvar, dvar->fqn = psi_decl_var_name_prepend(dvar->fqn, svar->name); } } - } else if (current_set_exp) { + } else if (scope && scope->current_set) { + struct psi_set_exp *current_set_exp = scope->current_set; + /* walk up the set expression tree until found */ while ((current_set_exp = current_set_exp->outer)) { struct psi_decl_var *svar = psi_set_exp_get_decl_var( @@ -137,10 +138,10 @@ bool psi_decl_var_validate(struct psi_data *data, struct psi_decl_var *dvar, } } - if (!okay && impl && psi_impl_get_decl_arg(impl, dvar)) { + if (!okay && scope && scope->impl && psi_impl_get_decl_arg(scope->impl, dvar)) { okay = true; } - if (!okay && decl && psi_decl_get_arg(decl, dvar)) { + if (!okay && scope && scope->cb_decl && psi_decl_get_arg(scope->cb_decl, dvar)) { okay = true; } diff --git a/src/types/decl_var.h b/src/types/decl_var.h index 031e291..69f9adc 100644 --- a/src/types/decl_var.h +++ b/src/types/decl_var.h @@ -31,6 +31,7 @@ struct psi_token; struct psi_decl_arg; struct psi_let_exp; struct psi_set_exp; +struct psi_validate_scope; struct psi_decl_var { struct psi_token *token; @@ -61,8 +62,7 @@ static inline char *psi_decl_var_name_prepend(char *current, const char *prepend } bool psi_decl_var_validate(struct psi_data *data, struct psi_decl_var *dvar, - struct psi_impl *impl, struct psi_decl *decl, - struct psi_let_exp *current_let_exp, struct psi_set_exp *current_set_exp); + struct psi_validate_scope *scope); size_t psi_decl_var_get_size(struct psi_decl_var *var); diff --git a/src/types/free_exp.c b/src/types/free_exp.c index 57ede26..9f53611 100644 --- a/src/types/free_exp.c +++ b/src/types/free_exp.c @@ -86,7 +86,7 @@ static inline struct psi_decl *locate_free_decl(struct psi_plist *decls, } bool psi_free_exp_validate(struct psi_data *data, struct psi_free_exp *exp, - struct psi_impl *impl) + struct psi_validate_scope *scope) { size_t i; struct psi_decl_var *free_var; @@ -95,22 +95,22 @@ bool psi_free_exp_validate(struct psi_data *data, struct psi_free_exp *exp, if (!locate_free_decl(data->decls, exp)) { data->error(data, exp->token, PSI_WARNING, "Missing declaration '%s' in `free` statement" - " of implementation '%s'", exp->func, impl->func->name); + " of implementation '%s'", exp->func, scope->impl->func->name); return false; } /* now check for known vars */ exp->let = calloc(psi_plist_count(exp->vars), sizeof(*exp->let)); for (i = 0; psi_plist_get(exp->vars, i, &free_var); ++i) { - if (!psi_impl_get_decl_arg(impl, free_var)) { + if (!psi_impl_get_decl_arg(scope->impl, free_var)) { data->error(data, free_var->token, PSI_WARNING, "Unknown variable '%s' of `free` statement" " of implementation '%s'", - free_var->name, impl->func->name); + free_var->name, scope->impl->func->name); return false; } - exp->let[i] = psi_impl_get_let(impl, free_var); + exp->let[i] = psi_impl_get_let(scope->impl, free_var); assert(exp->let[i]); } diff --git a/src/types/free_exp.h b/src/types/free_exp.h index c295b56..41abc02 100644 --- a/src/types/free_exp.h +++ b/src/types/free_exp.h @@ -46,7 +46,7 @@ struct psi_free_exp *psi_free_exp_init(const char *func, struct psi_plist *vars) void psi_free_exp_free(struct psi_free_exp **f_ptr); void psi_free_exp_dump(int fd, struct psi_free_exp *call); -bool psi_free_exp_validate(struct psi_data *data, struct psi_free_exp *fc, struct psi_impl *impl); +bool psi_free_exp_validate(struct psi_data *data, struct psi_free_exp *fc, struct psi_validate_scope *scope); void psi_free_exp_exec(struct psi_free_exp *f, struct psi_call_frame *frame); diff --git a/src/types/free_stmt.c b/src/types/free_stmt.c index 9b6544c..4e5a10c 100644 --- a/src/types/free_stmt.c +++ b/src/types/free_stmt.c @@ -62,18 +62,18 @@ void psi_free_stmt_dump(int fd, struct psi_free_stmt *fre) dprintf(fd, ";\n"); } -bool psi_free_stmts_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_free_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope) { size_t i; struct psi_free_stmt *fre; /* we can have any count of free stmts; freeing any out vars */ - for (i = 0; psi_plist_get(impl->stmts.fre, i, &fre); ++i) { + for (i = 0; psi_plist_get(scope->impl->stmts.fre, i, &fre); ++i) { size_t j; struct psi_free_exp *exp; for (j = 0; psi_plist_get(fre->exps, j, &exp); ++j) { - if (!psi_free_exp_validate(data, exp, impl)) { + if (!psi_free_exp_validate(data, exp, scope)) { return false; } } diff --git a/src/types/free_stmt.h b/src/types/free_stmt.h index c0fb998..f490f01 100644 --- a/src/types/free_stmt.h +++ b/src/types/free_stmt.h @@ -40,7 +40,7 @@ struct psi_free_stmt *psi_free_stmt_init(struct psi_plist *calls); void psi_free_stmt_free(struct psi_free_stmt **f_ptr); void psi_free_stmt_dump(int fd, struct psi_free_stmt *fre); -bool psi_free_stmts_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_free_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope); void psi_free_stmt_exec(struct psi_free_stmt *fre, struct psi_call_frame *frame); #endif diff --git a/src/types/impl.c b/src/types/impl.c index e9bd39b..e987147 100644 --- a/src/types/impl.c +++ b/src/types/impl.c @@ -116,24 +116,27 @@ void psi_impl_dump(int fd, struct psi_impl *impl) dprintf(fd, "}\n"); } -bool psi_impl_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_impl_validate(struct psi_data *data, struct psi_impl *impl, + struct psi_validate_scope *scope) { - if (!psi_impl_func_validate(data, impl->func)) { + scope->impl = impl; + + if (!psi_impl_func_validate(data, impl->func, scope)) { return false; } - if (!psi_return_stmt_validate(data, impl)) { + if (!psi_return_stmt_validate(data, scope)) { return false; } - if (!psi_let_stmts_validate(data, impl)) { + if (!psi_let_stmts_validate(data, scope)) { return false; } - if (!psi_set_stmts_validate(data, impl)) { + if (!psi_set_stmts_validate(data, scope)) { return false; } - if (!psi_assert_stmts_validate(data, impl)) { + if (!psi_assert_stmts_validate(data, scope)) { return false; } - if (!psi_free_stmts_validate(data, impl)) { + if (!psi_free_stmts_validate(data, scope)) { return false; } return true; diff --git a/src/types/impl.h b/src/types/impl.h index 6a1b741..fd1c9d0 100644 --- a/src/types/impl.h +++ b/src/types/impl.h @@ -50,7 +50,8 @@ struct psi_impl { struct psi_impl *psi_impl_init(struct psi_impl_func *func, struct psi_plist *stmts); void psi_impl_free(struct psi_impl **impl_ptr); void psi_impl_dump(int fd, struct psi_impl *impl); -bool psi_impl_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_impl_validate(struct psi_data *data, struct psi_impl *impl, + struct psi_validate_scope *scope); size_t psi_impl_num_min_args(struct psi_impl *impl); diff --git a/src/types/impl_arg.c b/src/types/impl_arg.c index d9cb473..adbc021 100644 --- a/src/types/impl_arg.c +++ b/src/types/impl_arg.c @@ -54,13 +54,12 @@ void psi_impl_arg_free(struct psi_impl_arg **arg_ptr) void psi_impl_arg_dump(int fd, struct psi_impl_arg *iarg, bool vararg) { - dprintf(fd, "%s %s%s%s", - iarg->type->name, - iarg->var->reference ? "&" : "", - vararg ? "..." : "", - iarg->var->name); + psi_impl_type_dump(fd, iarg->type); + dprintf(fd, " "); + psi_impl_var_dump(fd, iarg->var, vararg); if (iarg->def) { - dprintf(fd, " = %s", iarg->def->text); + dprintf(fd, " = "); + psi_impl_def_val_dump(fd, iarg->def); } } diff --git a/src/types/impl_def_val.c b/src/types/impl_def_val.c index 6d983cd..c6778f9 100644 --- a/src/types/impl_def_val.c +++ b/src/types/impl_def_val.c @@ -28,12 +28,32 @@ #include -struct psi_impl_def_val *psi_impl_def_val_init(token_t t, const char *text) +struct psi_impl_def_val *psi_impl_def_val_init(token_t t, void *data) { struct psi_impl_def_val *def = calloc(1, sizeof(*def)); - def->type = t; - def->text = text ? strdup(text) : NULL; + switch ((def->type = t)) { + case PSI_T_TRUE: + case PSI_T_FALSE: + case PSI_T_NULL: + break; + case PSI_T_QUOTED_STRING: + /* immediate upgrade */ + def->type = PSI_T_STRING; + /* no break */ + case PSI_T_STRING: + if (data) { + def->ival.zend.str = zend_string_init(data, strlen(data), 1); + } + break; + + case PSI_T_NUMBER: + def->data.num = data; + break; + + default: + assert(0); + } return def; } @@ -48,8 +68,11 @@ void psi_impl_def_val_free(struct psi_impl_def_val **def_ptr) free(def->token); } switch (def->type) { + case PSI_T_NUMBER: + psi_num_exp_free(&def->data.num); + break; + case PSI_T_STRING: - case PSI_T_QUOTED_STRING: if (def->ival.zend.str) { zend_string_release(def->ival.zend.str); } @@ -57,44 +80,95 @@ void psi_impl_def_val_free(struct psi_impl_def_val **def_ptr) default: break; } - if (def->text) { - free(def->text); - } free(def); } } bool psi_impl_def_val_validate(struct psi_data *data, - struct psi_impl_def_val *def, token_t type_t, const char *type_name) + struct psi_impl_def_val *def, struct psi_impl_type *cmp, + struct psi_validate_scope *scope) { - if (def->type != PSI_T_NULL && def->text) { - switch (type_t) { - case PSI_T_BOOL: - def->ival.zend.bval = def->type == PSI_T_TRUE ? 1 : 0; - break; - case PSI_T_INT: - def->ival.zend.lval = zend_atol(def->text, strlen(def->text)); - break; - case PSI_T_FLOAT: - case PSI_T_DOUBLE: - def->ival.dval = zend_strtod(def->text, NULL); - break; - case PSI_T_STRING: - case PSI_T_QUOTED_STRING: - def->ival.zend.str = zend_string_init(def->text, strlen(def->text), 1); - break; - default: - data->error(data, def->token, PSI_WARNING, - "Invalid default value type '%s', expected one of bool, int, double, string.", - type_name); - return false; + if (def->type == PSI_T_NULL) { + return true; + } + + switch (cmp->type) { + case PSI_T_BOOL: + def->ival.zend.bval = def->type == PSI_T_TRUE ? 1 : 0; + break; + + /* macros */ + case PSI_T_NUMBER: + if (def->type == PSI_T_NUMBER) { + token_t typ = psi_num_exp_exec(def->data.num, &def->ival, NULL, scope->defs); + + switch (typ) { + case PSI_T_FLOAT: + def->ival.dval = def->ival.fval; + /* no break */ + case PSI_T_DOUBLE: + def->type = PSI_T_FLOAT; + cmp->type = PSI_T_FLOAT; + strcpy(cmp->name, "float"); + break; + default: + def->type = PSI_T_INT; + cmp->type = PSI_T_INT; + strcpy(cmp->name, "int"); + break; + } + psi_num_exp_free(&def->data.num); + return true; } + break; + + case PSI_T_INT: + if (def->type == PSI_T_NUMBER) { + def->type = PSI_T_INT; + def->ival.zend.lval = psi_num_exp_get_long(def->data.num, NULL, scope->defs); + psi_num_exp_free(&def->data.num); + } + if (def->type == PSI_T_INT) { + return true; + } + break; + + case PSI_T_FLOAT: + case PSI_T_DOUBLE: + if (def->type == PSI_T_NUMBER) { + def->type = PSI_T_DOUBLE; + def->ival.dval = psi_num_exp_get_double(def->data.num, NULL, scope->defs); + psi_num_exp_free(&def->data.num); + } + if (def->type == PSI_T_DOUBLE) { + return true; + } + break; + + case PSI_T_STRING: + if (def->type == PSI_T_STRING) { + return true; + } + break; + + default: + data->error(data, def->token, PSI_WARNING, + "Invalid default value type '%s', " + "expected one of bool, int, float, string.", + cmp->name); } - return true; + + return false; } void psi_impl_def_val_dump(int fd, struct psi_impl_def_val *val) { switch (val->type) { + case PSI_T_TRUE: + dprintf(fd, "true"); + break; + case PSI_T_FALSE: + dprintf(fd, "false"); + break; case PSI_T_BOOL: dprintf(fd, "%s", val->ival.zend.bval ? "true" : "false"); break; @@ -103,20 +177,12 @@ void psi_impl_def_val_dump(int fd, struct psi_impl_def_val *val) { break; case PSI_T_FLOAT: case PSI_T_DOUBLE: - dprintf(fd, "%f", val->ival.dval); + dprintf(fd, "%" PRIdval, val->ival.dval); break; case PSI_T_STRING: dprintf(fd, "\"%s\"", val->ival.zend.str->val); break; - case PSI_T_QUOTED_STRING: - dprintf(fd, "\"%s\"", val->text); - break; default: - if (val->text) { - dprintf(fd, "%s", val->text); - } else { - assert(0); - } - break; + assert(0); } } diff --git a/src/types/impl_def_val.h b/src/types/impl_def_val.h index 6688464..e597745 100644 --- a/src/types/impl_def_val.h +++ b/src/types/impl_def_val.h @@ -35,13 +35,16 @@ struct psi_impl_type; struct psi_impl_def_val { struct psi_token *token; token_t type; - char *text; + union { + struct psi_num_exp *num; + } data; impl_val ival; }; -struct psi_impl_def_val *psi_impl_def_val_init(token_t t, const char *text); +struct psi_impl_def_val *psi_impl_def_val_init(token_t t, void *data); void psi_impl_def_val_free(struct psi_impl_def_val **def_ptr); void psi_impl_def_val_dump(int fd, struct psi_impl_def_val *val); -bool psi_impl_def_val_validate(struct psi_data *data, struct psi_impl_def_val *def, token_t i_type_t, const char *i_type_n); +bool psi_impl_def_val_validate(struct psi_data *data, struct psi_impl_def_val *def, + struct psi_impl_type *cmp, struct psi_validate_scope *scope); #endif diff --git a/src/types/impl_func.c b/src/types/impl_func.c index b728b0c..5893b4f 100644 --- a/src/types/impl_func.c +++ b/src/types/impl_func.c @@ -61,7 +61,8 @@ void psi_impl_func_free(struct psi_impl_func **f_ptr) } } -bool psi_impl_func_validate(struct psi_data *data, struct psi_impl_func *func) +bool psi_impl_func_validate(struct psi_data *data, struct psi_impl_func *func, + struct psi_validate_scope *scope) { int def = 0; size_t i = 0; @@ -70,7 +71,7 @@ bool psi_impl_func_validate(struct psi_data *data, struct psi_impl_func *func) while (psi_plist_get(func->args, i++, &iarg)) { if (iarg->def) { def = 1; - if (!psi_impl_def_val_validate(data, iarg->def, iarg->type->type, iarg->type->name)) { + if (!psi_impl_def_val_validate(data, iarg->def, iarg->type, scope)) { return 0; } } else if (def) { diff --git a/src/types/impl_func.h b/src/types/impl_func.h index 52c4a66..cf87e1b 100644 --- a/src/types/impl_func.h +++ b/src/types/impl_func.h @@ -46,6 +46,7 @@ struct psi_impl_func { struct psi_impl_func *psi_impl_func_init(const char *name, struct psi_plist *args, struct psi_impl_type *return_type); void psi_impl_func_free(struct psi_impl_func **f_ptr); void psi_impl_func_dump(int fd, struct psi_impl_func *func); -bool psi_impl_func_validate(struct psi_data *data, struct psi_impl_func *func); +bool psi_impl_func_validate(struct psi_data *data, struct psi_impl_func *func, + struct psi_validate_scope *scope); #endif diff --git a/src/types/impl_type.c b/src/types/impl_type.c index f865bd8..25b1f1f 100644 --- a/src/types/impl_type.c +++ b/src/types/impl_type.c @@ -36,6 +36,11 @@ struct psi_impl_type *psi_impl_type_init(token_t type, const char *name) return t; } +void psi_impl_type_dump(int fd, struct psi_impl_type *type) +{ + dprintf(fd, "%s", type->name); +} + void psi_impl_type_free(struct psi_impl_type **type_ptr) { if (*type_ptr) { diff --git a/src/types/impl_type.h b/src/types/impl_type.h index 3a5ce21..330a978 100644 --- a/src/types/impl_type.h +++ b/src/types/impl_type.h @@ -36,5 +36,6 @@ struct psi_impl_type { struct psi_impl_type *psi_impl_type_init(token_t type, const char *name); void psi_impl_type_free(struct psi_impl_type **type_ptr); +void psi_impl_type_dump(int fd, struct psi_impl_type *type); #endif diff --git a/src/types/impl_var.c b/src/types/impl_var.c index af5acd2..7b690bb 100644 --- a/src/types/impl_var.c +++ b/src/types/impl_var.c @@ -67,18 +67,27 @@ void psi_impl_var_free(struct psi_impl_var **var_ptr) } } +void psi_impl_var_dump(int fd, struct psi_impl_var *var, bool vararg) +{ + dprintf(fd, "%s%s%s", + var->reference ? "&" : "", + vararg ? "..." : "", + var->name); +} bool psi_impl_var_validate(struct psi_data *data, struct psi_impl_var *ivar, - struct psi_impl *impl, struct psi_let_exp *current_let_exp, - struct psi_set_exp *current_set_exp) + struct psi_validate_scope *scope) { - if (current_let_exp) { + if (scope && scope->current_let) { + struct psi_let_exp *current_let_exp = scope->current_let; + while ((current_let_exp = current_let_exp->outer)) { struct psi_impl_var *svar = psi_let_exp_get_impl_var(current_let_exp); ivar->fqn = psi_impl_var_name_prepend(ivar->fqn, svar->name + 1); } - } else if (current_set_exp) { + } else if (scope && scope->current_set) { + struct psi_set_exp *current_set_exp = scope->current_set; while ((current_set_exp = current_set_exp->outer)) { struct psi_impl_var *svar = psi_set_exp_get_impl_var(current_set_exp); diff --git a/src/types/impl_var.h b/src/types/impl_var.h index 4576cb9..762f421 100644 --- a/src/types/impl_var.h +++ b/src/types/impl_var.h @@ -29,6 +29,7 @@ struct psi_token; struct psi_impl; struct psi_impl_arg; +struct psi_validate_scope; struct psi_impl_var { struct psi_token *token; @@ -40,6 +41,7 @@ struct psi_impl_var { struct psi_impl_var *psi_impl_var_init(const char *name, bool is_reference); struct psi_impl_var *psi_impl_var_copy(struct psi_impl_var *var); void psi_impl_var_free(struct psi_impl_var **var_ptr); +void psi_impl_var_dump(int fd, struct psi_impl_var *var, bool vararg); #include @@ -65,7 +67,7 @@ static inline char *psi_impl_var_name_prepend(char *current, const char *prepend return current; } -bool psi_impl_var_validate(struct psi_data *data, struct psi_impl_var *ivar, struct psi_impl *impl, - struct psi_let_exp *current_let_exp, struct psi_set_exp *current_set_exp); +bool psi_impl_var_validate(struct psi_data *data, struct psi_impl_var *ivar, + struct psi_validate_scope *scope); #endif diff --git a/src/types/let_callback.c b/src/types/let_callback.c index 322e3b0..45639f8 100644 --- a/src/types/let_callback.c +++ b/src/types/let_callback.c @@ -78,13 +78,14 @@ static inline bool psi_let_callback_validate_decl_args(struct psi_data *data, return true; } -bool psi_let_callback_validate(struct psi_data *data, struct psi_let_exp *exp, - struct psi_let_callback *cb, struct psi_impl *impl) +bool psi_let_callback_validate(struct psi_data *data, struct psi_let_callback *cb, + struct psi_validate_scope *scope) { size_t i = 0; struct psi_decl_type *cb_type; + struct psi_let_exp *exp = scope->current_let; struct psi_decl_var *cb_var = exp->var; - struct psi_set_exp *set_exp; + struct psi_set_exp *set_exp, *parent_set = scope->current_set; cb_type = psi_decl_type_get_real(cb_var->arg->type); if (cb_type->type != PSI_T_FUNCTION) { @@ -95,10 +96,10 @@ bool psi_let_callback_validate(struct psi_data *data, struct psi_let_exp *exp, } cb->decl = cb_type->real.func; - if (!psi_decl_validate_nodl(data, cb->decl, NULL /* FIXME type_stack */)) { + if (!psi_decl_validate_nodl(data, cb->decl, scope)) { return false; } - if (!psi_let_callback_validate_decl_args(data, cb, cb->decl, impl)) { + if (!psi_let_callback_validate_decl_args(data, cb, cb->decl, scope->impl)) { return false; } while (psi_plist_get(cb->args, i++, &set_exp)) { @@ -110,9 +111,17 @@ bool psi_let_callback_validate(struct psi_data *data, struct psi_let_exp *exp, dvar->arg = cb_var->arg; } } - if (!psi_set_exp_validate(data, set_exp, impl, cb->decl)) { + + scope->current_set = set_exp; + scope->cb_decl = cb->decl; + + if (!psi_set_exp_validate(data, set_exp, scope)) { + scope->cb_decl = NULL; + scope->current_set = parent_set; return false; } + scope->cb_decl = NULL; + scope->current_set = parent_set; } return true; diff --git a/src/types/let_callback.h b/src/types/let_callback.h index a08a7ab..e10b32a 100644 --- a/src/types/let_callback.h +++ b/src/types/let_callback.h @@ -45,6 +45,6 @@ struct psi_let_callback { struct psi_let_callback *psi_let_callback_init(struct psi_let_func *func, struct psi_plist *args, struct psi_plist *cb_args); void psi_let_callback_free(struct psi_let_callback **cb_ptr); void psi_let_callback_dump(int fd, struct psi_let_callback *cb, unsigned level); -bool psi_let_callback_validate(struct psi_data *data, struct psi_let_exp *exp, struct psi_let_callback *cb, struct psi_impl *impl); +bool psi_let_callback_validate(struct psi_data *data, struct psi_let_callback *cb, struct psi_validate_scope *scope); #endif diff --git a/src/types/let_exp.c b/src/types/let_exp.c index d4fe6db..3175060 100644 --- a/src/types/let_exp.c +++ b/src/types/let_exp.c @@ -156,25 +156,25 @@ void psi_let_exp_dump(int fd, struct psi_let_exp *val, unsigned level, int last) } bool psi_let_exp_validate(struct psi_data *data, struct psi_let_exp *val, - struct psi_impl *impl) + struct psi_validate_scope *scope) { struct psi_decl_var *dvar = psi_let_exp_get_decl_var(val); switch (val->kind) { case PSI_LET_TMP: - if (!psi_decl_var_validate(data, val->data.var, impl, impl->decl, val, NULL)) { + if (!psi_decl_var_validate(data, val->data.var, scope)) { data->error(data, dvar->token ? : **(struct psi_token ***) &val->data, PSI_WARNING, "Unknown variable '%s' in temp let statment of implementation '%s'", - dvar->name, impl->func->name); + dvar->name, scope->impl->func->name); return false; } break; default: - if (!psi_decl_var_validate(data, dvar, impl, impl->decl, val, NULL)) { + if (!psi_decl_var_validate(data, dvar, scope)) { data->error(data, dvar->token ? : **(struct psi_token ***) &val->data, PSI_WARNING, "Unknown variable '%s' in let statement of implementation '%s'", - dvar->name, impl->func->name); + dvar->name, scope->impl->func->name); return false; } break; @@ -189,28 +189,28 @@ bool psi_let_exp_validate(struct psi_data *data, struct psi_let_exp *val, val->var->arg = val->data.var->arg; break; case PSI_LET_NUMEXP: - if (!psi_num_exp_validate(data, val->data.num, impl, NULL, val, NULL, NULL)) { + if (!psi_num_exp_validate(data, val->data.num, scope)) { return false; } break; case PSI_LET_CALLOC: - if (!psi_num_exp_validate(data, val->data.alloc->nmemb, impl, NULL, val, NULL, NULL)) { + if (!psi_num_exp_validate(data, val->data.alloc->nmemb, scope)) { return false; } - if (!psi_num_exp_validate(data, val->data.alloc->size, impl, NULL, val, NULL, NULL)) { + if (!psi_num_exp_validate(data, val->data.alloc->size, scope)) { return false; } break; case PSI_LET_CALLBACK: - if (!psi_let_func_validate(data, val, val->data.callback->func, impl)) { + if (!psi_let_func_validate(data, val->data.callback->func, scope)) { return false; } - if (!psi_let_callback_validate(data, val, val->data.callback, impl)) { + if (!psi_let_callback_validate(data, val->data.callback, scope)) { return false; } break; case PSI_LET_FUNC: - if (!psi_let_func_validate(data, val, val->data.func, impl)) { + if (!psi_let_func_validate(data, val->data.func, scope)) { return false; } break; @@ -249,8 +249,8 @@ void *psi_let_exp_exec(struct psi_let_exp *val, struct psi_decl_arg *darg, case PSI_LET_CALLOC: { - zend_long n = psi_long_num_exp(val->data.alloc->nmemb, frame, NULL); - zend_long s = psi_long_num_exp(val->data.alloc->size, frame, NULL); + zend_long n = psi_num_exp_get_long(val->data.alloc->nmemb, frame, NULL); + zend_long s = psi_num_exp_get_long(val->data.alloc->size, frame, NULL); void *tmp; if (val->data.alloc->static_memory) { diff --git a/src/types/let_exp.h b/src/types/let_exp.h index 8429b61..3e6eddc 100644 --- a/src/types/let_exp.h +++ b/src/types/let_exp.h @@ -65,7 +65,7 @@ void psi_let_exp_free(struct psi_let_exp **let_ptr); void psi_let_exp_dump(int fd, struct psi_let_exp *exp, unsigned level, int last); void *psi_let_exp_exec(struct psi_let_exp *exp, struct psi_decl_arg *darg, void *actual_location, size_t actual_size, struct psi_call_frame *frame); -bool psi_let_exp_validate(struct psi_data *data, struct psi_let_exp *exp, struct psi_impl *impl); +bool psi_let_exp_validate(struct psi_data *data, struct psi_let_exp *exp, struct psi_validate_scope *scope); struct psi_let_func *psi_let_exp_get_func(struct psi_let_exp *exp); struct psi_impl_var *psi_let_exp_get_impl_var(struct psi_let_exp *exp); diff --git a/src/types/let_func.c b/src/types/let_func.c index abf69a4..fdb89a0 100644 --- a/src/types/let_func.c +++ b/src/types/let_func.c @@ -82,7 +82,7 @@ void psi_let_func_dump(int fd, struct psi_let_func *func, unsigned level) } static inline int validate_let_func_type(struct psi_data *data, - struct psi_let_func *func, struct psi_impl *impl) + struct psi_let_func *func, struct psi_validate_scope *scope) { switch (func->type) { case PSI_T_BOOLVAL: @@ -108,15 +108,16 @@ static inline int validate_let_func_type(struct psi_data *data, default: data->error(data, func->var->token, PSI_WARNING, "Unknown `let` cast function '%s' of implementation '%s'", - func->name, impl->func->name); + func->name, scope->impl->func->name); return false; } } static inline bool validate_let_func_inner(struct psi_data *data, - struct psi_let_exp *exp, struct psi_let_func *func, - struct psi_impl *impl) + struct psi_let_func *func, struct psi_validate_scope *scope) { + struct psi_let_exp *exp = scope->current_let; + if (func->inner) { struct psi_decl_var *let_var = psi_let_exp_get_decl_var(exp); struct psi_decl_type *var_typ; @@ -144,8 +145,13 @@ static inline bool validate_let_func_inner(struct psi_data *data, /* remove expr for portability with different struct members */ psi_plist_del(func->inner, --i, NULL); psi_let_exp_free(&inner); - } else if (!psi_let_exp_validate(data, inner, impl)) { - return false; + } else { + scope->current_let = inner; + if (!psi_let_exp_validate(data, inner, scope)) { + scope->current_let = exp; + return false; + } + scope->current_let = exp; } } } else if (func->type == PSI_T_ARRVAL @@ -169,9 +175,12 @@ static inline bool validate_let_func_inner(struct psi_data *data, " reference the same variable"); return false; } - if (!psi_let_exp_validate(data, inner, impl)) { + scope->current_let = inner; + if (!psi_let_exp_validate(data, inner, scope)) { + scope->current_let = exp; return false; } + scope->current_let = exp; } else { data->error(data, let_var->token, PSI_WARNING, "Inner let statement's values must refer to a structure or" @@ -191,22 +200,22 @@ static inline bool validate_let_func_inner(struct psi_data *data, return true; } -bool psi_let_func_validate(struct psi_data *data, struct psi_let_exp *val, - struct psi_let_func *func, struct psi_impl *impl) +bool psi_let_func_validate(struct psi_data *data, struct psi_let_func *func, + struct psi_validate_scope *scope) { - if (impl->func->args) { + if (scope->impl->func->args) { /* FIXME, func->var does not need to be referring to a func arg */ - psi_impl_get_arg(impl, func->var); + psi_impl_get_arg(scope->impl, func->var); } - if (!psi_impl_var_validate(data, func->var, impl, val, NULL)) { + if (!psi_impl_var_validate(data, func->var, scope)) { return false; } - if (!validate_let_func_type(data, func, impl)) { + if (!validate_let_func_type(data, func, scope)) { return false; } - if (!validate_let_func_inner(data, val, func, impl)) { + if (!validate_let_func_inner(data, func, scope)) { return false; } return 1; @@ -260,7 +269,7 @@ void exec_let_func_arrval_seq(struct psi_let_func *func, struct psi_let_exp *inner_let_exp, void *container, struct psi_call_frame *frame) { - zval *zval_ptr; + zval *zval_ptr = NULL; psi_marshal_let let_fn; size_t i = 0, size; struct psi_decl_var *dvar; diff --git a/src/types/let_func.h b/src/types/let_func.h index 63ebe32..60fdefd 100644 --- a/src/types/let_func.h +++ b/src/types/let_func.h @@ -48,7 +48,7 @@ void psi_let_func_free(struct psi_let_func **func_ptr); void psi_let_func_dump(int fd, struct psi_let_func *func, unsigned level); void *psi_let_func_exec(struct psi_let_exp *func_val, struct psi_let_func *func, struct psi_decl_arg *darg, struct psi_call_frame *frame); -bool psi_let_func_validate(struct psi_data *data, struct psi_let_exp *exp, struct psi_let_func *func, struct psi_impl *impl); +bool psi_let_func_validate(struct psi_data *data, struct psi_let_func *func, struct psi_validate_scope *scope); #include "marshal.h" diff --git a/src/types/let_stmt.c b/src/types/let_stmt.c index 49c905a..9ada463 100644 --- a/src/types/let_stmt.c +++ b/src/types/let_stmt.c @@ -57,14 +57,14 @@ void psi_let_stmt_dump(int fd, struct psi_let_stmt *let) dprintf(fd, "\n"); } -bool psi_let_stmts_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_let_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope) { size_t i = 0; struct psi_let_stmt *let; /* we can have multiple let stmts */ /* check that we have a decl arg and impl arg for every let stmt */ - while (psi_plist_get(impl->stmts.let, i++, &let)) { + while (psi_plist_get(scope->impl->stmts.let, i++, &let)) { struct psi_decl_var *let_var; struct psi_impl_var *let_ivar = NULL; @@ -77,14 +77,14 @@ bool psi_let_stmts_validate(struct psi_data *data, struct psi_impl *impl) if (!let->exp->var) { data->error(data, let->token, PSI_WARNING, "Missing variable in `let` statement for implementation %s", - impl->func->name); + scope->impl->func->name); return false; } - if (!psi_impl_get_decl_arg(impl, let_var)) { + if (!psi_impl_get_decl_arg(scope->impl, let_var)) { data->error(data, let_var->token, PSI_WARNING, "Unknown variable '%s' in `let` statement of implementation '%s'", - let_var->name, impl->func->name); + let_var->name, scope->impl->func->name); return false; } switch (let->exp->kind) { @@ -97,30 +97,33 @@ bool psi_let_stmts_validate(struct psi_data *data, struct psi_impl *impl) default: break; } - if (let_ivar && !psi_impl_get_arg(impl, let_ivar)) { + if (let_ivar && !psi_impl_get_arg(scope->impl, let_ivar)) { data->error(data, let_var->token, PSI_WARNING, "Unknown variable '%s' in `let` statement of implementation '%s'", - let_ivar->name, impl->func->name); + let_ivar->name, scope->impl->func->name); return false; } - if (!psi_let_exp_validate(data, let->exp, impl)) { + scope->current_let = let->exp; + if (!psi_let_exp_validate(data, let->exp, scope)) { + scope->current_let = NULL; return false; } + scope->current_let = NULL; } /* check that we have a let stmt for every decl arg */ - if (impl->decl->args) { + if (scope->impl->decl->args) { struct psi_decl_arg *darg; - for (i = 0; psi_plist_get(impl->decl->args, i, &darg); ++i) { - if (!psi_impl_get_let(impl, darg->var)) { - data->error(data, impl->func->token, PSI_WARNING, + for (i = 0; psi_plist_get(scope->impl->decl->args, i, &darg); ++i) { + if (!psi_impl_get_let(scope->impl, darg->var)) { + data->error(data, scope->impl->func->token, PSI_WARNING, "Missing `let` statement for arg '%s %s%s'" " of declaration '%s' for implementation '%s'", darg->type->name, psi_t_indirection(darg->var->pointer_level), - darg->var->name, impl->decl->func->var->name, - impl->func->name); + darg->var->name, scope->impl->decl->func->var->name, + scope->impl->func->name); return false; } } diff --git a/src/types/let_stmt.h b/src/types/let_stmt.h index 2c16f8b..37ef118 100644 --- a/src/types/let_stmt.h +++ b/src/types/let_stmt.h @@ -42,6 +42,6 @@ void psi_let_stmt_free(struct psi_let_stmt **stmt_ptr); void psi_let_stmt_dump(int fd, struct psi_let_stmt *stmt); void *psi_let_stmt_exec(struct psi_let_stmt *stmt, struct psi_call_frame *frame); -bool psi_let_stmts_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_let_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope); #endif diff --git a/src/types/num_exp.c b/src/types/num_exp.c index 6dac5ce..4b8846a 100644 --- a/src/types/num_exp.c +++ b/src/types/num_exp.c @@ -287,25 +287,59 @@ static inline const char *psi_num_exp_op_tok(token_t op) return 0; } -void psi_num_exp_dump(int fd, struct psi_num_exp *exp) +struct psi_plist *psi_num_exp_tokens(struct psi_num_exp *exp, + struct psi_plist *list) { + struct psi_token *ntoken; + if (!list) { + list = psi_plist_init((psi_plist_dtor) psi_token_free); + } + switch (exp->op) { case PSI_T_NUMBER: - psi_number_dump(fd, exp->data.n); + list = psi_number_tokens(exp->data.n, list); + break; + + case PSI_T_CAST: + ntoken = exp->data.c.typ->token; + ntoken = psi_token_init(PSI_T_LPAREN, "(", 1, ntoken->col-1, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + ntoken = psi_token_copy(exp->data.c.typ->token); + list = psi_plist_add(list, &ntoken); + ntoken = psi_token_init(PSI_T_RPAREN, ")", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); break; case PSI_T_NOT: case PSI_T_TILDE: - dprintf(fd, "%s", psi_num_exp_op_tok(exp->op)); - psi_num_exp_dump(fd, exp->data.u); + unary: + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + list = psi_num_exp_tokens(exp->data.u, list); break; case PSI_T_LPAREN: - dprintf(fd, "("); - psi_num_exp_dump(fd, exp->data.u); - dprintf(fd, ")"); + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + list = psi_num_exp_tokens(exp->data.u, list); + psi_plist_top(list, &ntoken); + ntoken = psi_token_init(PSI_T_RPAREN, ")", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); break; + case PSI_T_PLUS: + case PSI_T_MINUS: + if (!exp->data.b.rhs) { + goto unary; + } + /* no break */ + case PSI_T_PIPE: + case PSI_T_CARET: + case PSI_T_AMPERSAND: + case PSI_T_LSHIFT: + case PSI_T_RSHIFT: + case PSI_T_ASTERISK: + case PSI_T_SLASH: case PSI_T_OR: case PSI_T_AND: @@ -317,15 +351,80 @@ void psi_num_exp_dump(int fd, struct psi_num_exp *exp) case PSI_T_RCHEVR: case PSI_T_LCHEVR: + list = psi_num_exp_tokens(exp->data.b.lhs, list); + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + list = psi_num_exp_tokens(exp->data.b.rhs, list); + break; + + case PSI_T_IIF: + list = psi_num_exp_tokens(exp->data.t.cond, list); + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + list = psi_num_exp_tokens(exp->data.t.truthy, list); + psi_plist_top(list, &ntoken); + ntoken = psi_token_init(PSI_T_COLON, ":", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + list = psi_plist_add(list, &ntoken); + list = psi_num_exp_tokens(exp->data.t.falsy, list); + break; + + default: + assert(0); + } + + return list; +} + +void psi_num_exp_dump(int fd, struct psi_num_exp *exp) +{ + switch (exp->op) { + case PSI_T_NUMBER: + psi_number_dump(fd, exp->data.n); + break; + + case PSI_T_CAST: + dprintf(fd, "("); + psi_decl_type_dump(1, exp->data.c.typ, 0); + dprintf(fd, ")"); + break; + + case PSI_T_NOT: + case PSI_T_TILDE: + unary: + dprintf(fd, "%s", psi_num_exp_op_tok(exp->op)); + psi_num_exp_dump(fd, exp->data.u); + break; + + case PSI_T_LPAREN: + dprintf(fd, "("); + psi_num_exp_dump(fd, exp->data.u); + dprintf(fd, ")"); + break; + + case PSI_T_PLUS: + case PSI_T_MINUS: + if (!exp->data.b.rhs) { + goto unary; + } + /* no break */ case PSI_T_PIPE: case PSI_T_CARET: case PSI_T_AMPERSAND: case PSI_T_LSHIFT: case PSI_T_RSHIFT: - case PSI_T_PLUS: - case PSI_T_MINUS: case PSI_T_ASTERISK: case PSI_T_SLASH: + + case PSI_T_OR: + case PSI_T_AND: + + case PSI_T_CMP_EQ: + case PSI_T_CMP_NE: + case PSI_T_CMP_LE: + case PSI_T_CMP_GE: + case PSI_T_RCHEVR: + case PSI_T_LCHEVR: psi_num_exp_dump(fd, exp->data.b.lhs); dprintf(fd, " %s ", psi_num_exp_op_tok(exp->op)); psi_num_exp_dump(fd, exp->data.b.rhs); @@ -346,8 +445,7 @@ void psi_num_exp_dump(int fd, struct psi_num_exp *exp) } bool psi_num_exp_validate(struct psi_data *data, struct psi_num_exp *exp, - struct psi_impl *impl, struct psi_decl *cb_decl, struct psi_let_exp *current_let, - struct psi_set_exp *current_set, struct psi_decl_enum *current_enum) + struct psi_validate_scope *scope) { if (exp->op && exp->op != PSI_T_NUMBER) { switch (exp->op) { @@ -404,10 +502,16 @@ bool psi_num_exp_validate(struct psi_data *data, struct psi_num_exp *exp, exp->calc = psi_calc_bin_rshift; break; case PSI_T_PLUS: - exp->calc = psi_calc_add; + if (exp->data.b.rhs) { + exp->calc = psi_calc_add; + } break; case PSI_T_MINUS: - exp->calc = psi_calc_sub; + if (exp->data.b.rhs) { + exp->calc = psi_calc_sub; + } else { + exp->calc = psi_calc_minus; + } break; case PSI_T_ASTERISK: exp->calc = psi_calc_mul; @@ -427,19 +531,35 @@ bool psi_num_exp_validate(struct psi_data *data, struct psi_num_exp *exp, switch (exp->op) { case PSI_T_NUMBER: - return psi_number_validate(data, exp->data.n, impl, cb_decl, current_let, current_set, current_enum); + return psi_number_validate(data, exp->data.n, scope); case PSI_T_CAST: - return psi_num_exp_validate(data, exp->data.c.num, impl, cb_decl, current_let, current_set, current_enum) - && psi_decl_type_validate(data, exp->data.c.typ, 0, NULL); + return psi_num_exp_validate(data, exp->data.c.num, scope) + && psi_decl_type_validate(data, exp->data.c.typ, NULL, scope); break; case PSI_T_NOT: case PSI_T_TILDE: case PSI_T_LPAREN: - return psi_num_exp_validate(data, exp->data.u, impl, cb_decl, current_let, current_set, current_enum); + unary: + return psi_num_exp_validate(data, exp->data.u, scope); break; + case PSI_T_PLUS: + case PSI_T_MINUS: + if (!exp->data.b.rhs) { + goto unary; + } + /* no break */ + case PSI_T_PIPE: + case PSI_T_CARET: + case PSI_T_AMPERSAND: + case PSI_T_LSHIFT: + case PSI_T_RSHIFT: + case PSI_T_ASTERISK: + case PSI_T_SLASH: + case PSI_T_MODULO: + case PSI_T_OR: case PSI_T_AND: @@ -449,24 +569,13 @@ bool psi_num_exp_validate(struct psi_data *data, struct psi_num_exp *exp, case PSI_T_CMP_GE: case PSI_T_RCHEVR: case PSI_T_LCHEVR: - - case PSI_T_PIPE: - case PSI_T_CARET: - case PSI_T_AMPERSAND: - case PSI_T_LSHIFT: - case PSI_T_RSHIFT: - case PSI_T_PLUS: - case PSI_T_MINUS: - case PSI_T_ASTERISK: - case PSI_T_SLASH: - case PSI_T_MODULO: - return psi_num_exp_validate(data, exp->data.b.lhs, impl, cb_decl, current_let, current_set, current_enum) - && psi_num_exp_validate(data, exp->data.b.rhs, impl, cb_decl, current_let, current_set, current_enum); + return psi_num_exp_validate(data, exp->data.b.lhs, scope) + && psi_num_exp_validate(data, exp->data.b.rhs, scope); case PSI_T_IIF: - return psi_num_exp_validate(data, exp->data.t.cond, impl, cb_decl, current_let, current_set, current_enum) - && psi_num_exp_validate(data, exp->data.t.truthy, impl, cb_decl, current_let, current_set, current_enum) - && psi_num_exp_validate(data, exp->data.t.falsy, impl, cb_decl, current_let, current_set, current_enum); + return psi_num_exp_validate(data, exp->data.t.cond, scope) + && psi_num_exp_validate(data, exp->data.t.truthy, scope) + && psi_num_exp_validate(data, exp->data.t.falsy, scope); default: assert(0); @@ -533,7 +642,7 @@ static void psi_num_exp_reduce(struct psi_num_exp *exp, struct psi_plist **outpu switch (exp->op) { case PSI_T_NUMBER: - entry.type = psi_number_eval(exp->data.n, &entry.data.value, frame, defs); + entry.type = psi_number_eval(exp->data.n, &entry.data.value, frame, defs, exp); output = psi_plist_add(output, &entry); break; @@ -597,6 +706,19 @@ static void psi_num_exp_reduce(struct psi_num_exp *exp, struct psi_plist **outpu } break; + case PSI_T_MINUS: + case PSI_T_PLUS: + /* unary */ + if (!exp->data.b.rhs) { + entry.type = psi_num_exp_exec(exp->data.b.lhs, &entry.data.value, frame, defs); + + if (exp->calc) { + entry.type = exp->calc(entry.type, &entry.data.value, 0, NULL, &entry.data.value); + } + output = psi_plist_add(output, &entry); + break; + } + /* no break */ default: psi_num_exp_reduce(exp->data.b.lhs, &output, &input, frame, defs); while (psi_plist_top(input, &entry)) { diff --git a/src/types/num_exp.h b/src/types/num_exp.h index 7ec62e1..96fcee1 100644 --- a/src/types/num_exp.h +++ b/src/types/num_exp.h @@ -37,6 +37,7 @@ struct psi_decl_enum_item; struct psi_let_exp; struct psi_set_exp; struct psi_call_frame; +struct psi_validate_scope; struct psi_num_exp { struct psi_token *token; @@ -76,35 +77,33 @@ void psi_num_exp_free(struct psi_num_exp **c_ptr); struct psi_num_exp *psi_num_exp_copy(struct psi_num_exp *exp); void psi_num_exp_dump(int fd, struct psi_num_exp *exp); bool psi_num_exp_validate(struct psi_data *data, struct psi_num_exp *exp, - struct psi_impl *impl, struct psi_decl *cb_decl, - struct psi_let_exp *current_let, struct psi_set_exp *current_set, - struct psi_decl_enum *current_enum); + struct psi_validate_scope *scope); token_t psi_num_exp_exec(struct psi_num_exp *exp, impl_val *res, struct psi_call_frame *frame, HashTable *defs); -#include +struct psi_plist *psi_num_exp_tokens(struct psi_num_exp *exp, + struct psi_plist *list); -static inline zend_long psi_long_num_exp(struct psi_num_exp *exp, + +#include "calc.h" +static inline zend_long psi_num_exp_get_long(struct psi_num_exp *exp, struct psi_call_frame *frame, HashTable *defs) { - impl_val val = {0}; - - switch (psi_num_exp_exec(exp, &val, frame, defs)) { - case PSI_T_UINT8: return val.u8; - case PSI_T_UINT16: return val.u16; - case PSI_T_UINT32: return val.u32; - case PSI_T_UINT64: return val.u64; /* FIXME */ - case PSI_T_INT8: return val.i8; - case PSI_T_INT16: return val.i16; - case PSI_T_INT32: return val.i32; - case PSI_T_INT64: return val.i64; - case PSI_T_FLOAT: return val.fval; - case PSI_T_DOUBLE: return val.dval; - default: - assert(0); - } - return 0; + impl_val res = {0}; + + psi_calc_cast(psi_num_exp_exec(exp, &res, frame, defs), &res, + PSI_T_INT64, &res); + + return res.i64; } +static inline double psi_num_exp_get_double(struct psi_num_exp *exp, + struct psi_call_frame *frame, HashTable *defs) { + impl_val res = {0}; + + psi_calc_cast(psi_num_exp_exec(exp, &res, frame, defs), &res, + PSI_T_DOUBLE, &res); + return res.dval; +} #endif diff --git a/src/types/number.c b/src/types/number.c index 5e62c62..2316f3b 100644 --- a/src/types/number.c +++ b/src/types/number.c @@ -63,8 +63,7 @@ struct psi_number *psi_number_init(token_t t, void *num, unsigned flags) exp->data.ival.u64 = *(uint64_t *) num; break; case PSI_T_FLOAT: - exp->data.ival.dval = *(float *) num; - exp->type = PSI_T_DOUBLE; + exp->data.ival.fval = *(float *) num; break; case PSI_T_DOUBLE: exp->data.ival.dval = *(double *) num; @@ -116,6 +115,7 @@ struct psi_number *psi_number_copy(struct psi_number *exp) case PSI_T_UINT32: case PSI_T_INT64: case PSI_T_UINT64: + case PSI_T_FLOAT: case PSI_T_DOUBLE: #if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: @@ -163,6 +163,7 @@ void psi_number_free(struct psi_number **exp_ptr) case PSI_T_UINT32: case PSI_T_INT64: case PSI_T_UINT64: + case PSI_T_FLOAT: case PSI_T_DOUBLE: #if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: @@ -193,6 +194,66 @@ void psi_number_free(struct psi_number **exp_ptr) } } +struct psi_plist *psi_number_tokens(struct psi_number *exp, + struct psi_plist *list) +{ + struct psi_token *ntoken; + if (!list) { + list = psi_plist_init((psi_plist_dtor) psi_token_free); + } + + switch (exp->type) { + case PSI_T_NAME: + /* decl_var */ + ntoken = psi_token_copy(exp->data.dvar->token); + + if (exp->data.dvar->pointer_level > 1 || !exp->data.dvar->array_size) { + struct psi_token *temp = ntoken; + unsigned pl = exp->data.dvar->pointer_level - !!exp->data.dvar->array_size; + + while (pl--) { + + ntoken = psi_token_init(PSI_T_POINTER, "*", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + } + ntoken = temp; + } + + list = psi_plist_add(list, &ntoken); + + if (exp->data.dvar->array_size) { + char buf[0x20], *ptr; + + ntoken = psi_token_init(PSI_T_LBRACKET, "[", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + ptr = zend_print_ulong_to_buf(&buf[sizeof(buf) - 1], exp->data.dvar->array_size); + + ntoken = psi_token_init(PSI_T_NUMBER, ptr, strlen(ptr), ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + } + break; + + case PSI_T_SIZEOF: + /* decl_type */ + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + ntoken = psi_token_init(PSI_T_LPAREN, "(", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + ntoken = psi_token_copy(exp->data.dtyp->token); + list = psi_plist_add(list, &ntoken); + ntoken = psi_token_init(PSI_T_RPAREN, ")", 1, ntoken->col+ntoken->size, ntoken->line, ntoken->file); + list = psi_plist_add(list, &ntoken); + break; + + default: + ntoken = psi_token_copy(exp->token); + list = psi_plist_add(list, &ntoken); + break; + } + + return list; +} + void psi_number_dump(int fd, struct psi_number *exp) { switch (exp->type) { @@ -253,28 +314,52 @@ void psi_number_dump(int fd, struct psi_number *exp) psi_decl_var_dump(fd, exp->data.dvar); break; case PSI_T_SIZEOF: + dprintf(fd, "sizeof("); psi_decl_type_dump(fd, exp->data.dtyp, 0); + dprintf(fd, ")"); break; default: assert(0); } } -static inline bool psi_number_validate_enum(struct psi_data *data, struct psi_number *exp, - struct psi_decl_enum *enm) +static inline bool psi_number_validate_enum(struct psi_data *data, + struct psi_number *exp, struct psi_validate_scope *scope) { - size_t i = 0; - struct psi_decl_enum_item *itm; + if (scope && scope->current_enum) { + size_t i = 0; + struct psi_decl_enum_item *itm; + struct psi_decl_enum *enm; - while (psi_plist_get(enm->items, i++, &itm)) { - if (!strcmp(itm->name, exp->data.dvar->name)) { - psi_decl_var_free(&exp->data.dvar); - exp->type = PSI_T_ENUM; - exp->data.enm = itm; - return psi_number_validate(data, exp, NULL, NULL, NULL, NULL, enm); + enm = scope->current_enum; + + switch (exp->type) { + case PSI_T_NAME: + while (psi_plist_get(enm->items, i++, &itm)) { + if (!strcmp(itm->name, exp->data.dvar->name)) { + psi_decl_var_free(&exp->data.dvar); + exp->type = PSI_T_ENUM; + exp->data.enm = itm; + return psi_number_validate(data, exp, scope); + } + } + break; + + case PSI_T_DEFINE: + while (psi_plist_get(enm->items, i++, &itm)) { + if (!strcmp(itm->name, exp->data.numb)) { + free(exp->data.numb); + exp->type = PSI_T_ENUM; + exp->data.enm = itm; + return psi_number_validate(data, exp, scope); + } + } + break; + + default: + assert(0); } } - return false; } @@ -450,8 +535,7 @@ static inline bool psi_number_validate_number(struct psi_data *data, struct psi_ } bool psi_number_validate(struct psi_data *data, struct psi_number *exp, - struct psi_impl *impl, struct psi_decl *cb_decl, struct psi_let_exp *current_let, - struct psi_set_exp *current_set, struct psi_decl_enum *current_enum) + struct psi_validate_scope *scope) { size_t i = 0; struct psi_const *cnst; @@ -470,33 +554,32 @@ bool psi_number_validate(struct psi_data *data, struct psi_number *exp, case PSI_T_UINT32: case PSI_T_INT64: case PSI_T_UINT64: + case PSI_T_FLOAT: case PSI_T_DOUBLE: #if HAVE_LONG_DOUBLE case PSI_T_LONG_DOUBLE: #endif case PSI_T_ENUM: - case PSI_T_DEFINE: - case PSI_T_FUNCTION: return true; case PSI_T_NAME: - if (current_enum && psi_number_validate_enum(data, exp, current_enum)) { + if (scope && scope->defs && zend_hash_str_exists(scope->defs, exp->data.dvar->name, strlen(exp->data.dvar->name))) { + return true; + } + if (scope && scope->current_enum && psi_number_validate_enum(data, exp, scope)) { return true; } while (psi_plist_get(data->enums, i++, &enm)) { - if (psi_number_validate_enum(data, exp, enm)) { + struct psi_validate_scope enum_scope = *scope; + enum_scope.current_enum = enm; + if (psi_number_validate_enum(data, exp, &enum_scope)) { return true; } } if (exp->data.dvar->arg) { return true; } - if (psi_decl_var_validate(data, exp->data.dvar, impl, - impl ? impl->decl : NULL, current_let, current_set)) { - return true; - } - if (cb_decl && psi_decl_var_validate(data, exp->data.dvar, - NULL, cb_decl, NULL, NULL)) { + if (psi_decl_var_validate(data, exp->data.dvar, scope)) { return true; } data->error(data, exp->token, PSI_WARNING, @@ -504,8 +587,30 @@ bool psi_number_validate(struct psi_data *data, struct psi_number *exp, exp->data.dvar->name); return false; + case PSI_T_FUNCTION: + if (scope && scope->defs && zend_hash_str_exists(scope->defs, exp->data.numb, strlen(exp->data.numb))) { + return true; + } + return false; + + case PSI_T_DEFINE: + if (scope && scope->defs && zend_hash_str_exists(scope->defs, exp->data.numb, strlen(exp->data.numb))) { + if (!scope->macro || strcmp(scope->macro->token->text, exp->data.numb)) { + return true; + } + /* #define foo foo */ + } + while (psi_plist_get(data->enums, i++, &enm)) { + struct psi_validate_scope enum_scope = *scope; + enum_scope.current_enum = enm; + if (psi_number_validate_enum(data, exp, &enum_scope)) { + return true; + } + } + return false; + case PSI_T_SIZEOF: - if (psi_decl_type_validate(data, exp->data.dtyp, 0, NULL)) { + if (psi_decl_type_validate(data, exp->data.dtyp, NULL, scope)) { struct psi_decl_type *dtyp = exp->data.dtyp; exp->type = PSI_T_UINT64; @@ -513,9 +618,14 @@ bool psi_number_validate(struct psi_data *data, struct psi_number *exp, psi_decl_type_free(&dtyp); return true; } else { + struct psi_decl_type *dtyp = exp->data.dtyp; + data->error(data, exp->token, PSI_WARNING, - "Cannot compute sizeof(%s) (%u)", - exp->data.dtyp->name, exp->data.dtyp->type); + "Cannot compute sizeof(%s) (%u)", dtyp->name, dtyp->type); + + exp->type = PSI_T_UINT8; + exp->data.ival.u8 = 0; + psi_decl_type_free(&dtyp); } break; @@ -600,17 +710,22 @@ static inline token_t psi_number_eval_decl_var(struct psi_number *exp, } static inline token_t psi_number_eval_define(struct psi_number *exp, - impl_val *res, HashTable *defs) + impl_val *res, HashTable *defs, struct psi_num_exp *rec_guard) { - struct psi_cpp_macro_decl *macro = zend_hash_str_find_ptr(defs, exp->data.numb, strlen(exp->data.numb)); - - assert(!macro); + if (defs) { + struct psi_cpp_macro_decl *macro; + macro = zend_hash_str_find_ptr(defs, exp->data.numb, strlen(exp->data.numb)); + if (macro && macro->exp && macro->exp != rec_guard) { + return psi_num_exp_exec(macro->exp, res, NULL, defs); + } + } res->u8 = 0; return PSI_T_UINT8; } -token_t psi_number_eval(struct psi_number *exp, impl_val *res, struct psi_call_frame *frame, HashTable *defs) +token_t psi_number_eval(struct psi_number *exp, impl_val *res, + struct psi_call_frame *frame, HashTable *defs, struct psi_num_exp *rec_guard) { switch (exp->type) { case PSI_T_INT8: @@ -646,6 +761,11 @@ token_t psi_number_eval(struct psi_number *exp, impl_val *res, struct psi_call_f if (frame) PSI_DEBUG_PRINT(frame->context, " %" PRIu64, res->u64); return PSI_T_UINT64; + case PSI_T_FLOAT: + *res = exp->data.ival; + if (frame) PSI_DEBUG_PRINT(frame->context, " %" PRIfval, res->fval); + return exp->type; + case PSI_T_DOUBLE: *res = exp->data.ival; if (frame) PSI_DEBUG_PRINT(frame->context, " %" PRIdval, res->dval); @@ -674,7 +794,7 @@ token_t psi_number_eval(struct psi_number *exp, impl_val *res, struct psi_call_f return psi_number_eval_decl_var(exp, res, frame); case PSI_T_DEFINE: - return psi_number_eval_define(exp, res, defs); + return psi_number_eval_define(exp, res, defs, rec_guard); case PSI_T_FUNCTION: res->u8 = 0; diff --git a/src/types/number.h b/src/types/number.h index b691a7a..a2dc792 100644 --- a/src/types/number.h +++ b/src/types/number.h @@ -36,6 +36,7 @@ struct psi_let_exp; struct psi_set_exp; struct psi_call_frame; struct psi_cpp_macro_call; +struct psi_validate_scope; enum psi_number_suffix { PSI_NUMBER_U = 0x0100, @@ -78,11 +79,13 @@ void psi_number_free(struct psi_number **exp_ptr); void psi_number_dump(int fd, struct psi_number *exp); bool psi_number_validate(struct psi_data *data, struct psi_number *exp, - struct psi_impl *impl, struct psi_decl *cb_decl, - struct psi_let_exp *current_let, struct psi_set_exp *current_set, - struct psi_decl_enum *current_enum); + struct psi_validate_scope *scope); token_t psi_number_eval(struct psi_number *exp, impl_val *res, - struct psi_call_frame *frame, HashTable *defs); + struct psi_call_frame *frame, HashTable *defs, + struct psi_num_exp *rec_guard); + +struct psi_plist *psi_number_tokens(struct psi_number *exp, + struct psi_plist *list); #endif diff --git a/src/types/return_exp.c b/src/types/return_exp.c index 8718ecf..c5ee0a3 100644 --- a/src/types/return_exp.c +++ b/src/types/return_exp.c @@ -122,23 +122,32 @@ static inline bool psi_return_exp_validate_decl_args(struct psi_data *data, } bool psi_return_exp_validate(struct psi_data *data, struct psi_return_exp *exp, - struct psi_impl *impl) + struct psi_validate_scope *scope) { size_t i = 0; struct psi_decl *decl; const char *name = psi_return_exp_get_decl_name(exp); + + while (psi_plist_get(data->decls, i++, &decl)) { if (!strcmp(decl->func->var->name, name)) { - impl->decl = decl; - return psi_return_exp_validate_decl_args(data, exp, impl) && - psi_set_exp_validate(data, exp->set, impl, NULL); + scope->impl->decl = decl; + if (psi_return_exp_validate_decl_args(data, exp, scope->impl)) { + scope->current_set = exp->set; + if (psi_set_exp_validate(data, exp->set, scope)) { + scope->current_set = NULL; + return true; + } + scope->current_set = NULL; + } + return false; } } data->error(data, exp->token, PSI_WARNING, "Missing declaration '%s' for `return` statement of implementation %s", - name, impl->func->name); + name, scope->impl->func->name); return false; } diff --git a/src/types/return_exp.h b/src/types/return_exp.h index bbd1804..864a798 100644 --- a/src/types/return_exp.h +++ b/src/types/return_exp.h @@ -40,7 +40,7 @@ void psi_return_exp_dump(int fd, struct psi_return_exp *exp); void psi_return_exp_exec(struct psi_return_exp *exp, zval *return_value, struct psi_call_frame *frame); bool psi_return_exp_validate(struct psi_data *data, struct psi_return_exp *exp, - struct psi_impl *impl); + struct psi_validate_scope *scope); const char *psi_return_exp_get_decl_name(struct psi_return_exp *exp); #endif /* RETURN_EXP_H */ diff --git a/src/types/return_stmt.c b/src/types/return_stmt.c index 123a8df..b4bcb52 100644 --- a/src/types/return_stmt.c +++ b/src/types/return_stmt.c @@ -61,12 +61,13 @@ void psi_return_stmt_dump(int fd, struct psi_return_stmt *ret) dprintf(fd, ";\n"); } -bool psi_return_stmt_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_return_stmt_validate(struct psi_data *data, + struct psi_validate_scope *scope) { struct psi_return_stmt *ret; - size_t count = psi_plist_count(impl->stmts.ret); + size_t count = psi_plist_count(scope->impl->stmts.ret); - psi_plist_get(impl->stmts.ret, 0, &ret); + psi_plist_get(scope->impl->stmts.ret, 0, &ret); /* * we must have exactly one ret stmt declaring the native func to call @@ -77,18 +78,18 @@ bool psi_return_stmt_validate(struct psi_data *data, struct psi_impl *impl) data->error(data, ret->token, PSI_WARNING, "Too many `return` statements for implementation %s;" " found %zu, exactly one is required", - impl->func->name, count); + scope->impl->func->name, count); return false; case 0: - data->error(data, impl->func->token, PSI_WARNING, + data->error(data, scope->impl->func->token, PSI_WARNING, "Missing `return` statement for implementation %s", - impl->func->name); + scope->impl->func->name); return false; case 1: break; } - if (!psi_return_exp_validate(data, ret->exp, impl)) { + if (!psi_return_exp_validate(data, ret->exp, scope)) { return false; } diff --git a/src/types/return_stmt.h b/src/types/return_stmt.h index ae05b3a..7d088a6 100644 --- a/src/types/return_stmt.h +++ b/src/types/return_stmt.h @@ -43,6 +43,6 @@ struct psi_return_stmt *psi_return_stmt_init(struct psi_return_exp *exp); void psi_return_stmt_free(struct psi_return_stmt **ret_ptr); void psi_return_stmt_dump(int fd, struct psi_return_stmt *ret); void psi_return_stmt_exec(struct psi_return_stmt *ret, zval *return_value, struct psi_call_frame *frame); -bool psi_return_stmt_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_return_stmt_validate(struct psi_data *data, struct psi_validate_scope *impl); #endif diff --git a/src/types/set_exp.c b/src/types/set_exp.c index bbd7d80..e19e79d 100644 --- a/src/types/set_exp.c +++ b/src/types/set_exp.c @@ -184,11 +184,11 @@ struct psi_impl_var *psi_set_exp_get_impl_var(struct psi_set_exp *exp) } bool psi_set_exp_validate(struct psi_data *data, struct psi_set_exp *set, - struct psi_impl *impl, struct psi_decl *cb_decl) + struct psi_validate_scope *scope) { struct psi_impl_var *ivar = psi_set_exp_get_impl_var(set); - if (ivar && !psi_impl_var_validate(data, ivar, impl, NULL, set)) { + if (ivar && !psi_impl_var_validate(data, ivar, scope)) { data->error(data, ivar->token ? : **(struct psi_token ***) &set->data, PSI_WARNING, "Unknown variable '%s'", ivar->name); return false; @@ -196,12 +196,12 @@ bool psi_set_exp_validate(struct psi_data *data, struct psi_set_exp *set, switch (set->kind) { case PSI_SET_NUMEXP: - if (!psi_num_exp_validate(data, set->data.num, impl, cb_decl, NULL, set, NULL)) { + if (!psi_num_exp_validate(data, set->data.num, scope)) { return false; } break; case PSI_SET_FUNC: - if (!psi_set_func_validate(data, set->data.func, set, impl, cb_decl)) { + if (!psi_set_func_validate(data, set->data.func, scope)) { return false; } break; diff --git a/src/types/set_exp.h b/src/types/set_exp.h index c43cf06..cf19ff9 100644 --- a/src/types/set_exp.h +++ b/src/types/set_exp.h @@ -34,6 +34,7 @@ struct psi_set_func; struct psi_num_exp; struct psi_impl; struct psi_decl; +struct psi_validate_scope; enum psi_set_exp_kind { PSI_SET_FUNC, @@ -56,7 +57,7 @@ void psi_set_exp_free(struct psi_set_exp **exp_ptr); void psi_set_exp_dump(int fd, struct psi_set_exp *set, unsigned level, int last); void psi_set_exp_exec(struct psi_set_exp *val, struct psi_call_frame *frame); void psi_set_exp_exec_ex(struct psi_set_exp *val, zval *zv, impl_val *iv, struct psi_call_frame *frame); -bool psi_set_exp_validate(struct psi_data *data, struct psi_set_exp *set, struct psi_impl *impl, struct psi_decl *cb_decl); +bool psi_set_exp_validate(struct psi_data *data, struct psi_set_exp *set, struct psi_validate_scope *scope); struct psi_impl_var *psi_set_exp_get_impl_var(struct psi_set_exp *exp); struct psi_decl_var *psi_set_exp_get_decl_var(struct psi_set_exp *exp); diff --git a/src/types/set_func.c b/src/types/set_func.c index c6ab80f..2b59686 100644 --- a/src/types/set_func.c +++ b/src/types/set_func.c @@ -202,15 +202,15 @@ static inline bool psi_set_func_validate_to_recursive(struct psi_data *data, } bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func, - struct psi_set_exp *set, struct psi_impl *impl, struct psi_decl *cb_decl) + struct psi_validate_scope *scope) { - if (!func->var->arg - && !psi_decl_var_validate(data, func->var, impl, impl->decl, NULL, set) - && !psi_decl_var_validate(data, func->var, NULL, cb_decl, NULL, NULL) - && !psi_impl_get_temp_let_arg(impl, func->var)) { + struct psi_set_exp *set = scope->current_set; + + if (!psi_decl_var_validate(data, func->var, scope) + && !psi_impl_get_temp_let_arg(scope->impl, func->var)) { data->error(data, func->var->token, PSI_WARNING, "Unknown variable '%s' in implementation %s", - func->var->name, impl->func->name); + func->var->name, scope->impl->func->name); return false; } @@ -223,7 +223,6 @@ bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func, } if (func->inner && (!set->outer || set->outer->inner != func->inner)) { - size_t i = 0; struct psi_set_exp *inner; @@ -232,17 +231,26 @@ bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func, struct psi_plist *sub_args; inner->outer = set; + scope->current_set = inner; + /* skip to "fail:" if field does not exists */ sub_var = psi_set_exp_get_decl_var(inner); sub_args = psi_decl_type_get_args(func->var->arg->type, NULL); - if (sub_var && sub_args && !psi_decl_arg_get_by_var(sub_var, sub_args, NULL)) { - /* remove expr for portability with different struct members */ - psi_plist_del(func->inner, --i, NULL); - psi_set_exp_free(&inner); - } else if (!psi_set_exp_validate(data, inner, impl, cb_decl)) { - /* remove exp for portability */ - psi_plist_del(func->inner, --i, NULL); + if (sub_var && sub_args) { + if (!psi_decl_arg_get_by_var(sub_var, sub_args, NULL)) { + goto fail; + } + } + + if (psi_set_exp_validate(data, inner, scope)) { + scope->current_set = set; + continue; } + fail: + scope->current_set = set; + /* remove expr for portability with different struct members */ + psi_plist_del(func->inner, --i, NULL); + psi_set_exp_free(&inner); } } @@ -266,19 +274,19 @@ bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func, func->handler = psi_set_to_object; break; case PSI_T_TO_STRING: - if (!psi_set_func_validate_to_string(data, func, set, impl)) { + if (!psi_set_func_validate_to_string(data, func, set, scope->impl)) { return false; } break; case PSI_T_TO_ARRAY: - if (!psi_set_func_validate_to_array(data, func, set, impl)) { + if (!psi_set_func_validate_to_array(data, func, set, scope->impl)) { return false; } break; default: data->error(data, func->token, PSI_WARNING, "Unknown cast '%s' in `set` statement of implementation '%s'", - func->name, impl->func->name); + func->name, scope->impl->func->name); return false; } diff --git a/src/types/set_func.h b/src/types/set_func.h index 4a81b20..3c35069 100644 --- a/src/types/set_func.h +++ b/src/types/set_func.h @@ -31,6 +31,7 @@ struct psi_plist; struct psi_decl_var; +struct psi_validate_scope; struct psi_set_func { struct psi_token *token; @@ -46,6 +47,6 @@ struct psi_set_func *psi_set_func_init(token_t type, const char *name, struct ps void psi_set_func_free(struct psi_set_func **func_ptr); void psi_set_func_dump(int fd, struct psi_set_func *func, unsigned level); bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func, - struct psi_set_exp *set, struct psi_impl *impl, struct psi_decl *cb_decl); + struct psi_validate_scope *scope); #endif diff --git a/src/types/set_stmt.c b/src/types/set_stmt.c index 13aac2c..2139dc4 100644 --- a/src/types/set_stmt.c +++ b/src/types/set_stmt.c @@ -61,44 +61,51 @@ void psi_set_stmt_dump(int fd, struct psi_set_stmt *set) } -bool psi_set_stmts_validate(struct psi_data *data, struct psi_impl *impl) +bool psi_set_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope) { size_t i = 0; struct psi_set_stmt *set; /* we can have any count of set stmts; processing out vars */ /* check that set stmts reference known variables */ - while (psi_plist_get(impl->stmts.set, i++, &set)) { + while (psi_plist_get(scope->impl->stmts.set, i++, &set)) { if (!set->exp->var) { data->error(data, set->token, PSI_WARNING, "Missing variable of `set` statement of implementation '%s'", - impl->func->name); + scope->impl->func->name); return false; } - if (!psi_impl_get_arg(impl, set->exp->var)) { + if (!psi_impl_get_arg(scope->impl, set->exp->var)) { data->error(data, set->token, PSI_WARNING, "Unknown variable '%s' of `set` statement of implementation '%s'", - set->exp->var->name, impl->func->name); + set->exp->var->name, scope->impl->func->name); return false; } + scope->current_set = set->exp; + switch (set->exp->kind) { case PSI_SET_NUMEXP: break; case PSI_SET_FUNC: - if (!psi_impl_get_decl_arg(impl, set->exp->data.func->var)) { - if (!psi_impl_get_temp_let_arg(impl, set->exp->data.func->var)) { + if (!psi_impl_get_decl_arg(scope->impl, set->exp->data.func->var)) { + if (!psi_impl_get_temp_let_arg(scope->impl, set->exp->data.func->var)) { data->error(data, set->token, PSI_WARNING, "Unknown variable '%s' of `set` statement of implementation '%s'", - set->exp->data.func->var->name, impl->func->name); + set->exp->data.func->var->name, scope->impl->func->name); + scope->current_set = NULL; return false; } } } + /* validate the expression itself */ - if (!psi_set_exp_validate(data, set->exp, impl, NULL)) { + if (!psi_set_exp_validate(data, set->exp, scope)) { + scope->current_set = NULL; return false; } + + scope->current_set = NULL; } return true; diff --git a/src/types/set_stmt.h b/src/types/set_stmt.h index 4b361cb..a4e40fa 100644 --- a/src/types/set_stmt.h +++ b/src/types/set_stmt.h @@ -41,6 +41,6 @@ struct psi_set_stmt *psi_set_stmt_init(struct psi_set_exp *val); void psi_set_stmt_free(struct psi_set_stmt **set_ptr); void psi_set_stmt_dump(int fd, struct psi_set_stmt *set); void psi_set_stmt_exec(struct psi_set_stmt *set, struct psi_call_frame *frame); -bool psi_set_stmts_validate(struct psi_data *data, struct psi_impl *impl); +bool psi_set_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope); #endif diff --git a/src/validate.c b/src/validate.c new file mode 100644 index 0000000..c2575e5 --- /dev/null +++ b/src/validate.c @@ -0,0 +1,227 @@ +/******************************************************************************* + Copyright (c) 2017, Michael Wallner . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*******************************************************************************/ + +#include "php_psi_stdinc.h" + +#include "data.h" + +typedef bool (*psi_validate_list_entry)(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr); + +struct psi_validate_list { + struct psi_plist *src; + struct psi_plist **dst; + struct psi_plist *cur; + struct psi_plist *chk; +}; + +static inline void psi_validate_list(struct psi_validate_scope *scope, + struct psi_data *dst, struct psi_validate_list *list, + psi_validate_list_entry validate) +{ + if (!list->cur) { + list->cur = list->src; + } + + if (psi_plist_count(list->cur)) { + size_t i = 0; + void *ptr = NULL; + + list->chk = psi_plist_init(NULL); + + while (psi_plist_get(list->cur, i++, &ptr)) { + *dst->last_error = 0; + + PSI_DEBUG_PRINT(dst, "PSI: validate %s ", "»"); + if (validate(scope, dst, ptr)) { + PSI_DEBUG_PRINT(dst, " %s\n", "✔"); + *list->dst = psi_plist_add(*list->dst, &ptr); + } else { + PSI_DEBUG_PRINT(dst, " %s (%s)\n", "✘", dst->last_error); + list->chk = psi_plist_add(list->chk, &ptr); + } + } + + if (list->cur != list->src) { + psi_plist_free(list->cur); + } + list->cur = list->chk; + } +} + +static bool psi_validate_type(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl_arg *def = ptr; + + PSI_DEBUG_PRINT(dst, "typedef %s", def->var->name); + return psi_decl_arg_validate_typedef(dst, def, scope); +} + +static bool psi_validate_struct(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl_struct *str = ptr; + + PSI_DEBUG_PRINT(dst, "struct %s", str->name); + if (psi_decl_struct_validate(dst, str, scope)) { + PSI_DEBUG_PRINT(dst, "::(%zu, %zu)", str->align, str->size); + return true; + } + return false; +} + +static bool psi_validate_union(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl_union *unn = ptr; + + PSI_DEBUG_PRINT(dst, "union %s", unn->name); + if (psi_decl_union_validate(dst, unn, scope)) { + PSI_DEBUG_PRINT(dst, "::(%zu, %zu)", unn->align, unn->size); + return true; + } + return false; +} + +static bool psi_validate_enum(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl_enum *enm = ptr; + + PSI_DEBUG_PRINT(dst, "enum %s", enm->name); + return psi_decl_enum_validate(dst, enm); +} + +static bool psi_validate_extvar(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl_extvar *evar = ptr; + + PSI_DEBUG_PRINT(dst, "extvar %s", evar->arg->var->name); + if (psi_decl_extvar_validate(dst, evar, scope)) { + dst->decls = psi_plist_add(dst->decls, &evar->getter); + dst->decls = psi_plist_add(dst->decls, &evar->setter); + return true; + } + return false; +} + +static bool psi_validate_decl(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_decl *decl = ptr; + + PSI_DEBUG_PRINT(dst, "decl %s", decl->func->var->name); + return psi_decl_validate(dst, decl, scope); +} + +static bool psi_validate_const(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_const *cnst = ptr; + + PSI_DEBUG_PRINT(dst, "constant %s", cnst->name); + return psi_const_validate(dst, cnst, scope); +} + +static bool psi_validate_impl(struct psi_validate_scope *scope, + struct psi_data *dst, void *ptr) +{ + struct psi_impl *impl = ptr; + + PSI_DEBUG_PRINT(dst, "impl %s", impl->func->name); + return psi_impl_validate(dst, impl, scope); +} + +bool psi_validate(struct psi_validate_scope *scope, + struct psi_data *dst, struct psi_data *src) +{ + struct psi_validate_list types = {src->types, &dst->types}; + struct psi_validate_list structs = {src->structs, &dst->structs}; + struct psi_validate_list unions = {src->unions, &dst->unions}; + struct psi_validate_list enums = {src->enums, &dst->enums}; + struct psi_validate_list vars = {src->vars, &dst->vars}; + struct psi_validate_list decls = {src->decls, &dst->decls}; + struct psi_validate_list consts = {src->consts, &dst->consts}; + struct psi_validate_list impls = {src->impls, &dst->impls}; + unsigned flags = dst->flags; + size_t check_count = ~0; + + /* fail early if library is not found */ + if (!psi_decl_file_validate(dst, src, &scope->dlopened)) { + return false; + } + + /* silence loop */ + dst->flags |= PSI_SILENT; + + while (true) { + size_t count_all = psi_plist_count(types.cur ?: types.src) + + psi_plist_count(structs.cur ?: structs.src) + + psi_plist_count(unions.cur ?: unions.src) + + psi_plist_count(enums.cur ?: enums.src) + + psi_plist_count(vars.cur ?: vars.src) + + psi_plist_count(decls.cur ?: decls.src); + + if (check_count != count_all) { + check_count = count_all; + + PSI_DEBUG_PRINT(dst, + "PSI: validate data(%p) %zu type checks remaining\n", + src, check_count); + + psi_validate_list(scope, dst, &types, psi_validate_type); + psi_validate_list(scope, dst, &structs, psi_validate_struct); + psi_validate_list(scope, dst, &unions, psi_validate_union); + psi_validate_list(scope, dst, &enums, psi_validate_enum); + psi_validate_list(scope, dst, &vars, psi_validate_extvar); + psi_validate_list(scope, dst, &decls, psi_validate_decl); + continue; + } + + /* nothing changed; bail out */ + if (count_all && (dst->flags & PSI_SILENT) && !(flags & PSI_SILENT)) { + /* one last error-spitting round, if not explicitly suppressed */ + dst->flags ^= PSI_SILENT; + check_count = ~0; + + PSI_DEBUG_PRINT(dst, "PSI: validation bail out with %zu" + " type checks remaining, errors follow\n", count_all); + continue; + } + + src->errors += count_all; + break; + } + + /* reset original flags */ + dst->flags = flags; + + psi_validate_list(scope, dst, &consts, psi_validate_const); + psi_validate_list(scope, dst, &impls, psi_validate_impl); + + return true; +} diff --git a/src/validate.h b/src/validate.h new file mode 100644 index 0000000..a50222a --- /dev/null +++ b/src/validate.h @@ -0,0 +1,91 @@ +/******************************************************************************* + Copyright (c) 2017, Michael Wallner . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*******************************************************************************/ + +#ifndef PSI_VALIDATE_H +#define PSI_VALIDATE_H + +struct psi_data; + +struct psi_validate_scope { + void *dlopened; + HashTable *defs; + HashTable types; + HashTable structs; + HashTable unions; + struct psi_impl *impl; + struct psi_decl *cb_decl; + struct psi_cpp_macro_decl *macro; + struct psi_let_exp *current_let; + struct psi_set_exp *current_set; + struct psi_decl_enum *current_enum; +}; + +bool psi_validate(struct psi_validate_scope *scope, struct psi_data *dst, + struct psi_data *src); + +static inline void psi_validate_scope_ctor(struct psi_validate_scope *scope) +{ + zend_hash_init(&scope->types, 0, NULL, NULL, 0); + zend_hash_init(&scope->structs, 0, NULL, NULL, 0); + zend_hash_init(&scope->unions, 0, NULL, NULL, 0); +} + +static inline void psi_validate_scope_dtor(struct psi_validate_scope *scope) +{ + zend_hash_destroy(&scope->types); + zend_hash_destroy(&scope->structs); + zend_hash_destroy(&scope->unions); +} + +#define psi_validate_scope_has_type(s, t) \ + ((s) ? zend_hash_str_exists(&(s)->types, (t), strlen(t)) : false) +#define psi_validate_scope_has_struct(s, t) \ + ((s) ? zend_hash_str_exists(&(s)->structs, (t), strlen(t)) : false) +#define psi_validate_scope_has_union(s, t) \ + ((s) ? zend_hash_str_exists(&(s)->unions, (t), strlen(t)) : false) + +#define psi_validate_scope_add_type(s, t, p) \ + do { if (s) zend_hash_str_add_ptr(&(s)->types, (t), strlen(t), (p)); } while(0) +#define psi_validate_scope_add_struct(s, t, p) \ + do { if (s) zend_hash_str_add_ptr(&(s)->structs, (t), strlen(t), (p)); } while(0) +#define psi_validate_scope_add_union(s, t, p) \ + do { if (s) zend_hash_str_add_ptr(&(s)->unions, (t), strlen(t), (p)); } while(0) + +#define psi_validate_scope_get_type(s, t) \ + ((s) ? zend_hash_str_find_ptr(&(s)->types, (t), strlen(t)) : NULL) +#define psi_validate_scope_get_struct(s, t) \ + ((s) ? zend_hash_str_find_ptr(&(s)->structs, (t), strlen(t)) : NULL) +#define psi_validate_scope_get_union(s, t) \ + ((s) ? zend_hash_str_find_ptr(&(s)->unions, (t), strlen(t)) : NULL) + +#define psi_validate_scope_del_type(s, t) \ + do { if (s) zend_hash_str_del(&(s)->types, (t), strlen(t)); } while(0) +#define psi_validate_scope_del_struct(s, t) \ + do { if (s) zend_hash_str_del(&(s)->structs, (t), strlen(t)); } while(0) +#define psi_validate_scope_del_union(s, t) \ + do { if (s) zend_hash_str_del(&(s)->unions, (t), strlen(t)); } while(0) + + +#endif /* PSI_VALIDATE_H */ diff --git a/tests/calc/calc.psi b/tests/calc/calc.psi index c90749c..cc5d9c7 100644 --- a/tests/calc/calc.psi +++ b/tests/calc/calc.psi @@ -1,7 +1,9 @@ +#include + function test\calc1() : array { let numerator = 3 * 5 + 2; let denominator = 17; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -10,7 +12,7 @@ function test\calc1() : array { function test\calc2() : array { let numerator = 4 + 5 * 2; let denominator = 14; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -19,7 +21,7 @@ function test\calc2() : array { function test\calc3() : array { let numerator = -1 + 2 - 3 * 2; let denominator = -5; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -28,7 +30,7 @@ function test\calc3() : array { function test\calc4() : array { let numerator = 1 * 5 / 5 * -1 / -1 * 10 / 5 + 4 * 2; let denominator = 10; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -37,7 +39,7 @@ function test\calc4() : array { function test\calc5() : array { let numerator = 5 % 3; let denominator = 2; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -46,7 +48,7 @@ function test\calc5() : array { function test\calc6() : array { let numerator = 5 % 3 + 1; let denominator = 3; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -55,7 +57,7 @@ function test\calc6() : array { function test\calc7() : array { let numerator = 5 % (3 + 1); let denominator = 1; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -64,7 +66,7 @@ function test\calc7() : array { function test\calc8() : array { let numerator = !0 + !0 + !0; let denominator = 3; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -73,7 +75,7 @@ function test\calc8() : array { function test\calc9() : array { let numerator = 1 && 2; let denominator = 1; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -82,7 +84,7 @@ function test\calc9() : array { function test\calc10() : array { let numerator = (1 | 2 | 4) & ~3; let denominator = 4; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -91,7 +93,7 @@ function test\calc10() : array { function test\calc11() : array { let numerator = 1 + (1 + 1 < 2); let denominator = 1; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); @@ -100,7 +102,7 @@ function test\calc11() : array { function test\calc12() : array { let numerator = 1 + (1 + 1 < 3); let denominator = 2; - return to_array(div, + return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); diff --git a/tests/ndbm/gdbm.psi b/tests/ndbm/gdbm.psi new file mode 100644 index 0000000..df51b32 --- /dev/null +++ b/tests/ndbm/gdbm.psi @@ -0,0 +1,2 @@ +lib "gdbm"; +#include diff --git a/tests/ndbm/ndbm.psi b/tests/ndbm/ndbm.psi index 92fa62b..8258796 100644 --- a/tests/ndbm/ndbm.psi +++ b/tests/ndbm/ndbm.psi @@ -1,8 +1,14 @@ +#include + +lib "gdbm_compat"; +#include + + function psi\dbm_open(string $file, int $open_flags, int $file_mode) : object { let file = pathval($file); let open_flags = intval($open_flags); let file_mode = intval($file_mode); - return to_object(dbm_open); + return dbm_open(file, open_flags, file_mode) as to_object(dbm_open); } function psi\dbm_store(object $db, string $key, string $data, int $mode) : int { @@ -16,7 +22,7 @@ function psi\dbm_store(object $db, string $key, string $data, int $mode) : int { dsize = strlen($0) ); let store_mode = intval($mode); - return to_int(dbm_store); + return dbm_store(db, key, content, store_mode) as to_int(dbm_store); } function psi\dbm_fetch(object $db, array $key) : array { @@ -25,7 +31,7 @@ function psi\dbm_fetch(object $db, array $key) : array { dptr = strval($dptr), dsize = intval($dsize) ); - return to_array(dbm_fetch, + return dbm_fetch(db, key) as to_array(dbm_fetch, to_int(dsize), to_string(dptr, dsize) ); @@ -33,5 +39,5 @@ function psi\dbm_fetch(object $db, array $key) : array { function psi\dbm_close(object $db) : void { let db = objval($db); - return void(dbm_close); + return dbm_close(db) as void(dbm_close); } diff --git a/tests/ndbm/ndbm001.phpt b/tests/ndbm/ndbm001.phpt index 403bdc3..ef6a906 100644 --- a/tests/ndbm/ndbm001.phpt +++ b/tests/ndbm/ndbm001.phpt @@ -5,7 +5,7 @@ psi.directory={PWD}:{PWD}/../../psi.d --SKIPIF-- --FILE-- ===TEST=== @@ -21,6 +21,7 @@ class db { function __destruct() { psi\dbm_close($this->db); + array_map("unlink", glob(__DIR__."/ndbm001.db*")); } function __set($k, $v) { diff --git a/tests/pipe/pipe.psi b/tests/pipe/pipe.psi index c7b2e73..568fc26 100644 --- a/tests/pipe/pipe.psi +++ b/tests/pipe/pipe.psi @@ -1,8 +1,7 @@ - -// extern int pipe(int fildes[2]); +#include function \pipe(array &$fds = null) : int { return pipe(fildes) as to_int(pipe); - let fildes = calloc(2, psi\SIZEOF_INT); + let fildes = calloc(2, sizeof(int)); set $fds = to_array(*fildes, 2, to_int(*fildes)); } diff --git a/tests/sqlite/sqlite.psi b/tests/sqlite/sqlite.psi index 4bc8059..20c24d8 100644 --- a/tests/sqlite/sqlite.psi +++ b/tests/sqlite/sqlite.psi @@ -1,19 +1,21 @@ lib "sqlite3"; -extern const char *sqlite3_libversion(void); +#include + +//extern const char *sqlite3_libversion(void); function sqlite3\version() : string { return to_string(sqlite3_libversion); } -extern const char *sqlite3_errstr(int errno); +//extern const char *sqlite3_errstr(int err); function sqlite3\errstr(int $errno) : string { - let errno = intval($errno); - return to_string(sqlite3_errstr); + let err = intval($errno); + return sqlite3_errstr(err) to_string(sqlite3_errstr); } /* obviously fake, we ever always need a pointer to it */ -struct sqlite3; - +//struct sqlite3; +/* typedef struct sqlite3 sqlite3; typedef int64_t sqlite_int64; @@ -25,28 +27,30 @@ typedef sqlite_uint64 sqlite3_uint64; extern void sqlite3_free(void *ptr); extern int sqlite3_close(sqlite3 *db); +*/ + function sqlite3\close(object &$db) : int { let db = objval($db); - return to_int(sqlite3_close); + return sqlite3_close(db) as to_int(sqlite3_close); // unset($db) as safe-guard set $db = void(db); } -extern int sqlite3_open(const char *filename, sqlite3 **db_ptr); +//extern int sqlite3_open(const char *filename, sqlite3 **db_ptr); function sqlite3\open(string $uri, object &$db) : int { let filename = pathval($uri); let db_ptr = &NULL; - return to_int(sqlite3_open); + return sqlite3_open(filename, db_ptr) as to_int(sqlite3_open); set $db = to_object(*db_ptr); } -typedef int (*sqlite3_callback)(void *data, int argc, char** argv, char** cols); +//typedef int (*sqlite3_callback)(void *data, int argc, char** argv, char** cols); -extern int sqlite3_exec(sqlite3 *db, const char *sql, sqlite3_callback cb, void *data, char **errmsg); +//extern int sqlite3_exec(sqlite3 *db, const char *sql, sqlite3_callback cb, void *data, char **errmsg); function sqlite3\exec(object $db, string $sql, callable $cb, mixed $cd, string &$error = null) : int { let db = objval($db); let sql = strval($sql); - let cb = callback intval( + let cb = callback(data, argc, argv, cols) as intval( $cb( zval(data), to_int(argc), @@ -56,7 +60,7 @@ function sqlite3\exec(object $db, string $sql, callable $cb, mixed $cd, string & ); let data = zval($cd); let errmsg = &NULL; - return to_int(sqlite3_exec); + return sqlite3_exec(db, sql, cb, data, errmsg) as to_int(sqlite3_exec); set $error = to_string(*errmsg); free sqlite3_free(*errmsg); } diff --git a/tests/uname/uname001.phpt b/tests/uname/uname001.phpt index 88aeb8c..304c865 100644 --- a/tests/uname/uname001.phpt +++ b/tests/uname/uname001.phpt @@ -6,7 +6,7 @@ psi.directory={PWD}/../../psi.d:{PWD} --FILE-- ===TEST=== diff --git a/tests/yaml/yaml.psi b/tests/yaml/yaml.psi index 1c94678..a18f8eb 100644 --- a/tests/yaml/yaml.psi +++ b/tests/yaml/yaml.psi @@ -1,1867 +1,3 @@ lib "yaml"; -extern const char * -yaml_get_version_string(void); - -extern void -yaml_get_version(int *major, int *minor, int *patch); - -typedef unsigned char yaml_char_t; - -/** The version directive data. */ -typedef struct yaml_version_directive_s { - /** The major version number. */ - int major; - /** The minor version number. */ - int minor; -} yaml_version_directive_t; - -/** The tag directive data. */ -typedef struct yaml_tag_directive_s { - /** The tag handle. */ - yaml_char_t *handle; - /** The tag prefix. */ - yaml_char_t *prefix; -} yaml_tag_directive_t; - -/** The stream encoding. */ -typedef enum yaml_encoding_e { - /** Let the parser choose the encoding. */ - YAML_ANY_ENCODING, - /** The default UTF-8 encoding. */ - YAML_UTF8_ENCODING, - /** The UTF-16-LE encoding with BOM. */ - YAML_UTF16LE_ENCODING, - /** The UTF-16-BE encoding with BOM. */ - YAML_UTF16BE_ENCODING -} yaml_encoding_t; - -/** Line break types. */ - -typedef enum yaml_break_e { - /** Let the parser choose the break type. */ - YAML_ANY_BREAK, - /** Use CR for line breaks (Mac style). */ - YAML_CR_BREAK, - /** Use LN for line breaks (Unix style). */ - YAML_LN_BREAK, - /** Use CR LN for line breaks (DOS style). */ - YAML_CRLN_BREAK -} yaml_break_t; - -/** Many bad things could happen with the parser and emitter. */ -typedef enum yaml_error_type_e { - /** No error is produced. */ - YAML_NO_ERROR, - - /** Cannot allocate or reallocate a block of memory. */ - YAML_MEMORY_ERROR, - - /** Cannot read or decode the input stream. */ - YAML_READER_ERROR, - /** Cannot scan the input stream. */ - YAML_SCANNER_ERROR, - /** Cannot parse the input stream. */ - YAML_PARSER_ERROR, - /** Cannot compose a YAML document. */ - YAML_COMPOSER_ERROR, - - /** Cannot write to the output stream. */ - YAML_WRITER_ERROR, - /** Cannot emit a YAML stream. */ - YAML_EMITTER_ERROR -} yaml_error_type_t; - -/** The pointer position. */ -typedef struct yaml_mark_s { - /** The position index. */ - size_t index; - - /** The position line. */ - size_t line; - - /** The position column. */ - size_t column; -} yaml_mark_t; - -/** Scalar styles. */ -typedef enum yaml_scalar_style_e { - /** Let the emitter choose the style. */ - YAML_ANY_SCALAR_STYLE, - - /** The plain scalar style. */ - YAML_PLAIN_SCALAR_STYLE, - - /** The single-quoted scalar style. */ - YAML_SINGLE_QUOTED_SCALAR_STYLE, - /** The double-quoted scalar style. */ - YAML_DOUBLE_QUOTED_SCALAR_STYLE, - - /** The literal scalar style. */ - YAML_LITERAL_SCALAR_STYLE, - /** The folded scalar style. */ - YAML_FOLDED_SCALAR_STYLE -} yaml_scalar_style_t; - -/** Sequence styles. */ -typedef enum yaml_sequence_style_e { - /** Let the emitter choose the style. */ - YAML_ANY_SEQUENCE_STYLE, - - /** The block sequence style. */ - YAML_BLOCK_SEQUENCE_STYLE, - /** The flow sequence style. */ - YAML_FLOW_SEQUENCE_STYLE -} yaml_sequence_style_t; - -/** Mapping styles. */ -typedef enum yaml_mapping_style_e { - /** Let the emitter choose the style. */ - YAML_ANY_MAPPING_STYLE, - - /** The block mapping style. */ - YAML_BLOCK_MAPPING_STYLE, - /** The flow mapping style. */ - YAML_FLOW_MAPPING_STYLE -/* YAML_FLOW_SET_MAPPING_STYLE */ -} yaml_mapping_style_t; - - -/** Token types. */ -typedef enum yaml_token_type_e { - /** An empty token. */ - YAML_NO_TOKEN, - - /** A STREAM-START token. */ - YAML_STREAM_START_TOKEN, - /** A STREAM-END token. */ - YAML_STREAM_END_TOKEN, - - /** A VERSION-DIRECTIVE token. */ - YAML_VERSION_DIRECTIVE_TOKEN, - /** A TAG-DIRECTIVE token. */ - YAML_TAG_DIRECTIVE_TOKEN, - /** A DOCUMENT-START token. */ - YAML_DOCUMENT_START_TOKEN, - /** A DOCUMENT-END token. */ - YAML_DOCUMENT_END_TOKEN, - - /** A BLOCK-SEQUENCE-START token. */ - YAML_BLOCK_SEQUENCE_START_TOKEN, - /** A BLOCK-SEQUENCE-END token. */ - YAML_BLOCK_MAPPING_START_TOKEN, - /** A BLOCK-END token. */ - YAML_BLOCK_END_TOKEN, - - /** A FLOW-SEQUENCE-START token. */ - YAML_FLOW_SEQUENCE_START_TOKEN, - /** A FLOW-SEQUENCE-END token. */ - YAML_FLOW_SEQUENCE_END_TOKEN, - /** A FLOW-MAPPING-START token. */ - YAML_FLOW_MAPPING_START_TOKEN, - /** A FLOW-MAPPING-END token. */ - YAML_FLOW_MAPPING_END_TOKEN, - - /** A BLOCK-ENTRY token. */ - YAML_BLOCK_ENTRY_TOKEN, - /** A FLOW-ENTRY token. */ - YAML_FLOW_ENTRY_TOKEN, - /** A KEY token. */ - YAML_KEY_TOKEN, - /** A VALUE token. */ - YAML_VALUE_TOKEN, - - /** An ALIAS token. */ - YAML_ALIAS_TOKEN, - /** An ANCHOR token. */ - YAML_ANCHOR_TOKEN, - /** A TAG token. */ - YAML_TAG_TOKEN, - /** A SCALAR token. */ - YAML_SCALAR_TOKEN -} yaml_token_type_t; - -/** The token structure. */ -typedef struct yaml_token_s { - - /** The token type. */ - yaml_token_type_t type; - - /** The token data. */ - union { - - /** The stream start (for @c YAML_STREAM_START_TOKEN). */ - struct { - /** The stream encoding. */ - yaml_encoding_t encoding; - } stream_start; - - /** The alias (for @c YAML_ALIAS_TOKEN). */ - struct { - /** The alias value. */ - yaml_char_t *value; - } alias; - - /** The anchor (for @c YAML_ANCHOR_TOKEN). */ - struct { - /** The anchor value. */ - yaml_char_t *value; - } anchor; - - /** The tag (for @c YAML_TAG_TOKEN). */ - struct { - /** The tag handle. */ - yaml_char_t *handle; - /** The tag suffix. */ - yaml_char_t *suffix; - } tag; - - /** The scalar value (for @c YAML_SCALAR_TOKEN). */ - struct { - /** The scalar value. */ - yaml_char_t *value; - /** The length of the scalar value. */ - size_t length; - /** The scalar style. */ - yaml_scalar_style_t style; - } scalar; - - /** The version directive (for @c YAML_VERSION_DIRECTIVE_TOKEN). */ - struct { - /** The major version number. */ - int major; - /** The minor version number. */ - int minor; - } version_directive; - - /** The tag directive (for @c YAML_TAG_DIRECTIVE_TOKEN). */ - struct { - /** The tag handle. */ - yaml_char_t *handle; - /** The tag prefix. */ - yaml_char_t *prefix; - } tag_directive; - - } data; - - /** The beginning of the token. */ - yaml_mark_t start_mark; - /** The end of the token. */ - yaml_mark_t end_mark; - -} yaml_token_t; - -extern void -yaml_token_delete(yaml_token_t *token); - -/** Event types. */ -typedef enum yaml_event_type_e { - /** An empty event. */ - YAML_NO_EVENT, - - /** A STREAM-START event. */ - YAML_STREAM_START_EVENT, - /** A STREAM-END event. */ - YAML_STREAM_END_EVENT, - - /** A DOCUMENT-START event. */ - YAML_DOCUMENT_START_EVENT, - /** A DOCUMENT-END event. */ - YAML_DOCUMENT_END_EVENT, - - /** An ALIAS event. */ - YAML_ALIAS_EVENT, - /** A SCALAR event. */ - YAML_SCALAR_EVENT, - - /** A SEQUENCE-START event. */ - YAML_SEQUENCE_START_EVENT, - /** A SEQUENCE-END event. */ - YAML_SEQUENCE_END_EVENT, - - /** A MAPPING-START event. */ - YAML_MAPPING_START_EVENT, - /** A MAPPING-END event. */ - YAML_MAPPING_END_EVENT -} yaml_event_type_t; - -/** The event structure. */ -typedef struct yaml_event_s { - - /** The event type. */ - yaml_event_type_t type; - - /** The event data. */ - union { - - /** The stream parameters (for @c YAML_STREAM_START_EVENT). */ - struct { - /** The document encoding. */ - yaml_encoding_t encoding; - } stream_start; - - /** The document parameters (for @c YAML_DOCUMENT_START_EVENT). */ - struct { - /** The version directive. */ - yaml_version_directive_t *version_directive; - - /** The list of tag directives. */ - struct { - /** The beginning of the tag directives list. */ - yaml_tag_directive_t *start; - /** The end of the tag directives list. */ - yaml_tag_directive_t *end; - } tag_directives; - - /** Is the document indicator implicit? */ - int implicit; - } document_start; - - /** The document end parameters (for @c YAML_DOCUMENT_END_EVENT). */ - struct { - /** Is the document end indicator implicit? */ - int implicit; - } document_end; - - /** The alias parameters (for @c YAML_ALIAS_EVENT). */ - struct { - /** The anchor. */ - yaml_char_t *anchor; - } alias; - - /** The scalar parameters (for @c YAML_SCALAR_EVENT). */ - struct { - /** The anchor. */ - yaml_char_t *anchor; - /** The tag. */ - yaml_char_t *tag; - /** The scalar value. */ - yaml_char_t *value; - /** The length of the scalar value. */ - size_t length; - /** Is the tag optional for the plain style? */ - int plain_implicit; - /** Is the tag optional for any non-plain style? */ - int quoted_implicit; - /** The scalar style. */ - yaml_scalar_style_t style; - } scalar; - - /** The sequence parameters (for @c YAML_SEQUENCE_START_EVENT). */ - struct { - /** The anchor. */ - yaml_char_t *anchor; - /** The tag. */ - yaml_char_t *tag; - /** Is the tag optional? */ - int implicit; - /** The sequence style. */ - yaml_sequence_style_t style; - } sequence_start; - - /** The mapping parameters (for @c YAML_MAPPING_START_EVENT). */ - struct { - /** The anchor. */ - yaml_char_t *anchor; - /** The tag. */ - yaml_char_t *tag; - /** Is the tag optional? */ - int implicit; - /** The mapping style. */ - yaml_mapping_style_t style; - } mapping_start; - - } data; - - /** The beginning of the event. */ - yaml_mark_t start_mark; - /** The end of the event. */ - yaml_mark_t end_mark; - -} yaml_event_t; - -/** - * Create the STREAM-START event. - * - * @param[out] event An empty event object. - * @param[in] encoding The stream encoding. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_stream_start_event_initialize(yaml_event_t *event, - yaml_encoding_t encoding); - -/** - * Create the STREAM-END event. - * - * @param[out] event An empty event object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_stream_end_event_initialize(yaml_event_t *event); - -/** - * Create the DOCUMENT-START event. - * - * The @a implicit argument is considered as a stylistic parameter and may be - * ignored by the emitter. - * - * @param[out] event An empty event object. - * @param[in] version_directive The %YAML directive value or - * @c NULL. - * @param[in] tag_directives_start The beginning of the %TAG - * directives list. - * @param[in] tag_directives_end The end of the %TAG directives - * list. - * @param[in] implicit If the document start indicator is - * implicit. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_document_start_event_initialize(yaml_event_t *event, - yaml_version_directive_t *version_directive, - yaml_tag_directive_t *tag_directives_start, - yaml_tag_directive_t *tag_directives_end, - int implicit); - -/** - * Create the DOCUMENT-END event. - * - * The @a implicit argument is considered as a stylistic parameter and may be - * ignored by the emitter. - * - * @param[out] event An empty event object. - * @param[in] implicit If the document end indicator is implicit. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_document_end_event_initialize(yaml_event_t *event, int implicit); - -/** - * Create an ALIAS event. - * - * @param[out] event An empty event object. - * @param[in] anchor The anchor value. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor); - -/** - * Create a SCALAR event. - * - * The @a style argument may be ignored by the emitter. - * - * Either the @a tag attribute or one of the @a plain_implicit and - * @a quoted_implicit flags must be set. - * - * @param[out] event An empty event object. - * @param[in] anchor The scalar anchor or @c NULL. - * @param[in] tag The scalar tag or @c NULL. - * @param[in] value The scalar value. - * @param[in] length The length of the scalar value. - * @param[in] plain_implicit If the tag may be omitted for the plain - * style. - * @param[in] quoted_implicit If the tag may be omitted for any - * non-plain style. - * @param[in] style The scalar style. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_scalar_event_initialize(yaml_event_t *event, - yaml_char_t *anchor, yaml_char_t *tag, - yaml_char_t *value, int length, - int plain_implicit, int quoted_implicit, - yaml_scalar_style_t style); - -/** - * Create a SEQUENCE-START event. - * - * The @a style argument may be ignored by the emitter. - * - * Either the @a tag attribute or the @a implicit flag must be set. - * - * @param[out] event An empty event object. - * @param[in] anchor The sequence anchor or @c NULL. - * @param[in] tag The sequence tag or @c NULL. - * @param[in] implicit If the tag may be omitted. - * @param[in] style The sequence style. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_sequence_start_event_initialize(yaml_event_t *event, - yaml_char_t *anchor, yaml_char_t *tag, int implicit, - yaml_sequence_style_t style); - -/** - * Create a SEQUENCE-END event. - * - * @param[out] event An empty event object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_sequence_end_event_initialize(yaml_event_t *event); - -/** - * Create a MAPPING-START event. - * - * The @a style argument may be ignored by the emitter. - * - * Either the @a tag attribute or the @a implicit flag must be set. - * - * @param[out] event An empty event object. - * @param[in] anchor The mapping anchor or @c NULL. - * @param[in] tag The mapping tag or @c NULL. - * @param[in] implicit If the tag may be omitted. - * @param[in] style The mapping style. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_mapping_start_event_initialize(yaml_event_t *event, - yaml_char_t *anchor, yaml_char_t *tag, int implicit, - yaml_mapping_style_t style); - -/** - * Create a MAPPING-END event. - * - * @param[out] event An empty event object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_mapping_end_event_initialize(yaml_event_t *event); - -/** - * Free any memory allocated for an event object. - * - * @param[in,out] event An event object. - */ - -extern void -yaml_event_delete(yaml_event_t *event); - -/** @} */ - -/** - * @defgroup nodes Nodes - * @{ - */ - -/** The tag @c !!null with the only possible value: @c null. */ -#define YAML_NULL_TAG "tag:yaml.org,2002:null" -/** The tag @c !!bool with the values: @c true and @c falce. */ -#define YAML_BOOL_TAG "tag:yaml.org,2002:bool" -/** The tag @c !!str for string values. */ -#define YAML_STR_TAG "tag:yaml.org,2002:str" -/** The tag @c !!int for integer values. */ -#define YAML_INT_TAG "tag:yaml.org,2002:int" -/** The tag @c !!float for float values. */ -#define YAML_FLOAT_TAG "tag:yaml.org,2002:float" -/** The tag @c !!timestamp for date and time values. */ -#define YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" - -/** The tag @c !!seq is used to denote sequences. */ -#define YAML_SEQ_TAG "tag:yaml.org,2002:seq" -/** The tag @c !!map is used to denote mapping. */ -#define YAML_MAP_TAG "tag:yaml.org,2002:map" - -/** The default scalar tag is @c !!str. */ -#define YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG -/** The default sequence tag is @c !!seq. */ -#define YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG -/** The default mapping tag is @c !!map. */ -#define YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG - -/** Node types. */ -typedef enum yaml_node_type_e { - /** An empty node. */ - YAML_NO_NODE, - - /** A scalar node. */ - YAML_SCALAR_NODE, - /** A sequence node. */ - YAML_SEQUENCE_NODE, - /** A mapping node. */ - YAML_MAPPING_NODE -} yaml_node_type_t; - -/** The forward definition of a document node structure. */ -typedef struct yaml_node_s yaml_node_t; - -/** An element of a sequence node. */ -typedef int yaml_node_item_t; - -/** An element of a mapping node. */ -typedef struct yaml_node_pair_s { - /** The key of the element. */ - int key; - /** The value of the element. */ - int value; -} yaml_node_pair_t; - -/** The node structure. */ -struct yaml_node_s { - - /** The node type. */ - yaml_node_type_t type; - - /** The node tag. */ - yaml_char_t *tag; - - /** The node data. */ - union { - - /** The scalar parameters (for @c YAML_SCALAR_NODE). */ - struct { - /** The scalar value. */ - yaml_char_t *value; - /** The length of the scalar value. */ - size_t length; - /** The scalar style. */ - yaml_scalar_style_t style; - } scalar; - - /** The sequence parameters (for @c YAML_SEQUENCE_NODE). */ - struct { - /** The stack of sequence items. */ - struct { - /** The beginning of the stack. */ - yaml_node_item_t *start; - /** The end of the stack. */ - yaml_node_item_t *end; - /** The top of the stack. */ - yaml_node_item_t *top; - } items; - /** The sequence style. */ - yaml_sequence_style_t style; - } sequence; - - /** The mapping parameters (for @c YAML_MAPPING_NODE). */ - struct { - /** The stack of mapping pairs (key, value). */ - struct { - /** The beginning of the stack. */ - yaml_node_pair_t *start; - /** The end of the stack. */ - yaml_node_pair_t *end; - /** The top of the stack. */ - yaml_node_pair_t *top; - } pairs; - /** The mapping style. */ - yaml_mapping_style_t style; - } mapping; - - } data; - - /** The beginning of the node. */ - yaml_mark_t start_mark; - /** The end of the node. */ - yaml_mark_t end_mark; - -}; - -/** The document structure. */ -typedef struct yaml_document_s { - - /** The document nodes. */ - struct { - /** The beginning of the stack. */ - yaml_node_t *start; - /** The end of the stack. */ - yaml_node_t *end; - /** The top of the stack. */ - yaml_node_t *top; - } nodes; - - /** The version directive. */ - yaml_version_directive_t *version_directive; - - /** The list of tag directives. */ - struct { - /** The beginning of the tag directives list. */ - yaml_tag_directive_t *start; - /** The end of the tag directives list. */ - yaml_tag_directive_t *end; - } tag_directives; - - /** Is the document start indicator implicit? */ - int start_implicit; - /** Is the document end indicator implicit? */ - int end_implicit; - - /** The beginning of the document. */ - yaml_mark_t start_mark; - /** The end of the document. */ - yaml_mark_t end_mark; - -} yaml_document_t; - -/** - * Create a YAML document. - * - * @param[out] document An empty document object. - * @param[in] version_directive The %YAML directive value or - * @c NULL. - * @param[in] tag_directives_start The beginning of the %TAG - * directives list. - * @param[in] tag_directives_end The end of the %TAG directives - * list. - * @param[in] start_implicit If the document start indicator is - * implicit. - * @param[in] end_implicit If the document end indicator is - * implicit. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_document_initialize(yaml_document_t *document, - yaml_version_directive_t *version_directive, - yaml_tag_directive_t *tag_directives_start, - yaml_tag_directive_t *tag_directives_end, - int start_implicit, int end_implicit); - -/** - * Delete a YAML document and all its nodes. - * - * @param[in,out] document A document object. - */ - -extern void -yaml_document_delete(yaml_document_t *document); - -/** - * Get a node of a YAML document. - * - * The pointer returned by this function is valid until any of the functions - * modifying the documents are called. - * - * @param[in] document A document object. - * @param[in] index The node id. - * - * @returns the node objct or @c NULL if @c node_id is out of range. - */ - -extern yaml_node_t * -yaml_document_get_node(yaml_document_t *document, int index); - -/** - * Get the root of a YAML document node. - * - * The root object is the first object added to the document. - * - * The pointer returned by this function is valid until any of the functions - * modifying the documents are called. - * - * An empty document produced by the parser signifies the end of a YAML - * stream. - * - * @param[in] document A document object. - * - * @returns the node object or @c NULL if the document is empty. - */ - -extern yaml_node_t * -yaml_document_get_root_node(yaml_document_t *document); - -/** - * Create a SCALAR node and attach it to the document. - * - * The @a style argument may be ignored by the emitter. - * - * @param[in,out] document A document object. - * @param[in] tag The scalar tag. - * @param[in] value The scalar value. - * @param[in] length The length of the scalar value. - * @param[in] style The scalar style. - * - * @returns the node id or @c 0 on error. - */ - -extern int -yaml_document_add_scalar(yaml_document_t *document, - yaml_char_t *tag, yaml_char_t *value, int length, - yaml_scalar_style_t style); - -/** - * Create a SEQUENCE node and attach it to the document. - * - * The @a style argument may be ignored by the emitter. - * - * @param[in,out] document A document object. - * @param[in] tag The sequence tag. - * @param[in] style The sequence style. - * - * @returns the node id or @c 0 on error. - */ - -extern int -yaml_document_add_sequence(yaml_document_t *document, - yaml_char_t *tag, yaml_sequence_style_t style); - -/** - * Create a MAPPING node and attach it to the document. - * - * The @a style argument may be ignored by the emitter. - * - * @param[in,out] document A document object. - * @param[in] tag The sequence tag. - * @param[in] style The sequence style. - * - * @returns the node id or @c 0 on error. - */ - -extern int -yaml_document_add_mapping(yaml_document_t *document, - yaml_char_t *tag, yaml_mapping_style_t style); - -/** - * Add an item to a SEQUENCE node. - * - * @param[in,out] document A document object. - * @param[in] sequence The sequence node id. - * @param[in] item The item node id. -* - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_document_append_sequence_item(yaml_document_t *document, - int sequence, int item); - -/** - * Add a pair of a key and a value to a MAPPING node. - * - * @param[in,out] document A document object. - * @param[in] mapping The mapping node id. - * @param[in] key The key node id. - * @param[in] value The value node id. -* - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_document_append_mapping_pair(yaml_document_t *document, - int mapping, int key, int value); - -/** @} */ - -/** - * @defgroup parser Parser Definitions - * @{ - */ - -/** - * The prototype of a read handler. - * - * The read handler is called when the parser needs to read more bytes from the - * source. The handler should write not more than @a size bytes to the @a - * buffer. The number of written bytes should be set to the @a length variable. - * - * @param[in,out] data A pointer to an application data specified by - * yaml_parser_set_input(). - * @param[out] buffer The buffer to write the data from the source. - * @param[in] size The size of the buffer. - * @param[out] size_read The actual number of bytes read from the source. - * - * @returns On success, the handler should return @c 1. If the handler failed, - * the returned value should be @c 0. On EOF, the handler should set the - * @a size_read to @c 0 and return @c 1. - */ - -typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, - size_t *size_read); - -/** - * This structure holds information about a potential simple key. - */ - -typedef struct yaml_simple_key_s { - /** Is a simple key possible? */ - int possible; - - /** Is a simple key required? */ - int required; - - /** The number of the token. */ - size_t token_number; - - /** The position mark. */ - yaml_mark_t mark; -} yaml_simple_key_t; - -/** - * The states of the parser. - */ -typedef enum yaml_parser_state_e { - /** Expect STREAM-START. */ - YAML_PARSE_STREAM_START_STATE, - /** Expect the beginning of an implicit document. */ - YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE, - /** Expect DOCUMENT-START. */ - YAML_PARSE_DOCUMENT_START_STATE, - /** Expect the content of a document. */ - YAML_PARSE_DOCUMENT_CONTENT_STATE, - /** Expect DOCUMENT-END. */ - YAML_PARSE_DOCUMENT_END_STATE, - /** Expect a block node. */ - YAML_PARSE_BLOCK_NODE_STATE, - /** Expect a block node or indentless sequence. */ - YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE, - /** Expect a flow node. */ - YAML_PARSE_FLOW_NODE_STATE, - /** Expect the first entry of a block sequence. */ - YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE, - /** Expect an entry of a block sequence. */ - YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE, - /** Expect an entry of an indentless sequence. */ - YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE, - /** Expect the first key of a block mapping. */ - YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE, - /** Expect a block mapping key. */ - YAML_PARSE_BLOCK_MAPPING_KEY_STATE, - /** Expect a block mapping value. */ - YAML_PARSE_BLOCK_MAPPING_VALUE_STATE, - /** Expect the first entry of a flow sequence. */ - YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE, - /** Expect an entry of a flow sequence. */ - YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE, - /** Expect a key of an ordered mapping. */ - YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE, - /** Expect a value of an ordered mapping. */ - YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE, - /** Expect the and of an ordered mapping entry. */ - YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE, - /** Expect the first key of a flow mapping. */ - YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE, - /** Expect a key of a flow mapping. */ - YAML_PARSE_FLOW_MAPPING_KEY_STATE, - /** Expect a value of a flow mapping. */ - YAML_PARSE_FLOW_MAPPING_VALUE_STATE, - /** Expect an empty value of a flow mapping. */ - YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE, - /** Expect nothing. */ - YAML_PARSE_END_STATE -} yaml_parser_state_t; - -/** - * This structure holds aliases data. - */ - -typedef struct yaml_alias_data_s { - /** The anchor. */ - yaml_char_t *anchor; - /** The node id. */ - int index; - /** The anchor mark. */ - yaml_mark_t mark; -} yaml_alias_data_t; - -/** - * The parser structure. - * - * All members are internal. Manage the structure using the @c yaml_parser_ - * family of functions. - */ - -typedef struct yaml_parser_s { - - /** - * @name Error handling - * @{ - */ - - /** Error type. */ - yaml_error_type_t error; - /** Error description. */ - const char *problem; - /** The byte about which the problem occured. */ - size_t problem_offset; - /** The problematic value (@c -1 is none). */ - int problem_value; - /** The problem position. */ - yaml_mark_t problem_mark; - /** The error context. */ - const char *context; - /** The context position. */ - yaml_mark_t context_mark; - - /** - * @} - */ - - /** - * @name Reader stuff - * @{ - */ - - /** Read handler. */ - yaml_read_handler_t *read_handler; - - /** A pointer for passing to the read handler. */ - void *read_handler_data; - - /** Standard (string or file) input data. */ - union { - /** String input data. */ - struct { - /** The string start pointer. */ - const unsigned char *start; - /** The string end pointer. */ - const unsigned char *end; - /** The string current position. */ - const unsigned char *current; - } string; - - /** File input data. */ - FILE *file; - } input; - - /** EOF flag */ - int eof; - - /** The working buffer. */ - struct { - /** The beginning of the buffer. */ - yaml_char_t *start; - /** The end of the buffer. */ - yaml_char_t *end; - /** The current position of the buffer. */ - yaml_char_t *pointer; - /** The last filled position of the buffer. */ - yaml_char_t *last; - } buffer; - - /* The number of unread characters in the buffer. */ - size_t unread; - - /** The raw buffer. */ - struct { - /** The beginning of the buffer. */ - unsigned char *start; - /** The end of the buffer. */ - unsigned char *end; - /** The current position of the buffer. */ - unsigned char *pointer; - /** The last filled position of the buffer. */ - unsigned char *last; - } raw_buffer; - - /** The input encoding. */ - yaml_encoding_t encoding; - - /** The offset of the current position (in bytes). */ - size_t offset; - - /** The mark of the current position. */ - yaml_mark_t mark; - - /** - * @} - */ - - /** - * @name Scanner stuff - * @{ - */ - - /** Have we started to scan the input stream? */ - int stream_start_produced; - - /** Have we reached the end of the input stream? */ - int stream_end_produced; - - /** The number of unclosed '[' and '{' indicators. */ - int flow_level; - - /** The tokens queue. */ - struct { - /** The beginning of the tokens queue. */ - yaml_token_t *start; - /** The end of the tokens queue. */ - yaml_token_t *end; - /** The head of the tokens queue. */ - yaml_token_t *head; - /** The tail of the tokens queue. */ - yaml_token_t *tail; - } tokens; - - /** The number of tokens fetched from the queue. */ - size_t tokens_parsed; - - /* Does the tokens queue contain a token ready for dequeueing. */ - int token_available; - - /** The indentation levels stack. */ - struct { - /** The beginning of the stack. */ - int *start; - /** The end of the stack. */ - int *end; - /** The top of the stack. */ - int *top; - } indents; - - /** The current indentation level. */ - int indent; - - /** May a simple key occur at the current position? */ - int simple_key_allowed; - - /** The stack of simple keys. */ - struct { - /** The beginning of the stack. */ - yaml_simple_key_t *start; - /** The end of the stack. */ - yaml_simple_key_t *end; - /** The top of the stack. */ - yaml_simple_key_t *top; - } simple_keys; - - /** - * @} - */ - - /** - * @name Parser stuff - * @{ - */ - - /** The parser states stack. */ - struct { - /** The beginning of the stack. */ - yaml_parser_state_t *start; - /** The end of the stack. */ - yaml_parser_state_t *end; - /** The top of the stack. */ - yaml_parser_state_t *top; - } states; - - /** The current parser state. */ - yaml_parser_state_t state; - - /** The stack of marks. */ - struct { - /** The beginning of the stack. */ - yaml_mark_t *start; - /** The end of the stack. */ - yaml_mark_t *end; - /** The top of the stack. */ - yaml_mark_t *top; - } marks; - - /** The list of TAG directives. */ - struct { - /** The beginning of the list. */ - yaml_tag_directive_t *start; - /** The end of the list. */ - yaml_tag_directive_t *end; - /** The top of the list. */ - yaml_tag_directive_t *top; - } tag_directives; - - /** - * @} - */ - - /** - * @name Dumper stuff - * @{ - */ - - /** The alias data. */ - struct { - /** The beginning of the list. */ - yaml_alias_data_t *start; - /** The end of the list. */ - yaml_alias_data_t *end; - /** The top of the list. */ - yaml_alias_data_t *top; - } aliases; - - /** The currently parsed document. */ - yaml_document_t *document; - - /** - * @} - */ - -} yaml_parser_t; - -/** - * Initialize a parser. - * - * This function creates a new parser object. An application is responsible - * for destroying the object using the yaml_parser_delete() function. - * - * @param[out] parser An empty parser object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_parser_initialize(yaml_parser_t *parser); - -/** - * Destroy a parser. - * - * @param[in,out] parser A parser object. - */ - -extern void -yaml_parser_delete(yaml_parser_t *parser); - -/** - * Set a string input. - * - * Note that the @a input pointer must be valid while the @a parser object - * exists. The application is responsible for destroing @a input after - * destroying the @a parser. - * - * @param[in,out] parser A parser object. - * @param[in] input A source data. - * @param[in] size The length of the source data in bytes. - */ - -extern void -yaml_parser_set_input_string(yaml_parser_t *parser, - const unsigned char *input, size_t size); - -/** - * Set a file input. - * - * @a file should be a file object open for reading. The application is - * responsible for closing the @a file. - * - * @param[in,out] parser A parser object. - * @param[in] file An open file. - */ - -extern void -yaml_parser_set_input_file(yaml_parser_t *parser, FILE *file); - -/** - * Set a generic input handler. - * - * @param[in,out] parser A parser object. - * @param[in] handler A read handler. - * @param[in] data Any application data for passing to the read - * handler. - */ - -extern void -yaml_parser_set_input(yaml_parser_t *parser, - yaml_read_handler_t *handler, void *data); - -/** - * Set the source encoding. - * - * @param[in,out] parser A parser object. - * @param[in] encoding The source encoding. - */ - -extern void -yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding); - -/** - * Scan the input stream and produce the next token. - * - * Call the function subsequently to produce a sequence of tokens corresponding - * to the input stream. The initial token has the type - * @c YAML_STREAM_START_TOKEN while the ending token has the type - * @c YAML_STREAM_END_TOKEN. - * - * An application is responsible for freeing any buffers associated with the - * produced token object using the @c yaml_token_delete function. - * - * An application must not alternate the calls of yaml_parser_scan() with the - * calls of yaml_parser_parse() or yaml_parser_load(). Doing this will break - * the parser. - * - * @param[in,out] parser A parser object. - * @param[out] token An empty token object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token); - -/** - * Parse the input stream and produce the next parsing event. - * - * Call the function subsequently to produce a sequence of events corresponding - * to the input stream. The initial event has the type - * @c YAML_STREAM_START_EVENT while the ending event has the type - * @c YAML_STREAM_END_EVENT. - * - * An application is responsible for freeing any buffers associated with the - * produced event object using the yaml_event_delete() function. - * - * An application must not alternate the calls of yaml_parser_parse() with the - * calls of yaml_parser_scan() or yaml_parser_load(). Doing this will break the - * parser. - * - * @param[in,out] parser A parser object. - * @param[out] event An empty event object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event); - -/** - * Parse the input stream and produce the next YAML document. - * - * Call this function subsequently to produce a sequence of documents - * constituting the input stream. - * - * If the produced document has no root node, it means that the document - * end has been reached. - * - * An application is responsible for freeing any data associated with the - * produced document object using the yaml_document_delete() function. - * - * An application must not alternate the calls of yaml_parser_load() with the - * calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break - * the parser. - * - * @param[in,out] parser A parser object. - * @param[out] document An empty document object. - * - * @return @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document); - -/** @} */ - -/** - * @defgroup emitter Emitter Definitions - * @{ - */ - -/** - * The prototype of a write handler. - * - * The write handler is called when the emitter needs to flush the accumulated - * characters to the output. The handler should write @a size bytes of the - * @a buffer to the output. - * - * @param[in,out] data A pointer to an application data specified by - * yaml_emitter_set_output(). - * @param[in] buffer The buffer with bytes to be written. - * @param[in] size The size of the buffer. - * - * @returns On success, the handler should return @c 1. If the handler failed, - * the returned value should be @c 0. - */ - -typedef int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size); - -/** The emitter states. */ -typedef enum yaml_emitter_state_e { - /** Expect STREAM-START. */ - YAML_EMIT_STREAM_START_STATE, - /** Expect the first DOCUMENT-START or STREAM-END. */ - YAML_EMIT_FIRST_DOCUMENT_START_STATE, - /** Expect DOCUMENT-START or STREAM-END. */ - YAML_EMIT_DOCUMENT_START_STATE, - /** Expect the content of a document. */ - YAML_EMIT_DOCUMENT_CONTENT_STATE, - /** Expect DOCUMENT-END. */ - YAML_EMIT_DOCUMENT_END_STATE, - /** Expect the first item of a flow sequence. */ - YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE, - /** Expect an item of a flow sequence. */ - YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE, - /** Expect the first key of a flow mapping. */ - YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE, - /** Expect a key of a flow mapping. */ - YAML_EMIT_FLOW_MAPPING_KEY_STATE, - /** Expect a value for a simple key of a flow mapping. */ - YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE, - /** Expect a value of a flow mapping. */ - YAML_EMIT_FLOW_MAPPING_VALUE_STATE, - /** Expect the first item of a block sequence. */ - YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE, - /** Expect an item of a block sequence. */ - YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE, - /** Expect the first key of a block mapping. */ - YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE, - /** Expect the key of a block mapping. */ - YAML_EMIT_BLOCK_MAPPING_KEY_STATE, - /** Expect a value for a simple key of a block mapping. */ - YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE, - /** Expect a value of a block mapping. */ - YAML_EMIT_BLOCK_MAPPING_VALUE_STATE, - /** Expect nothing. */ - YAML_EMIT_END_STATE -} yaml_emitter_state_t; - -/** - * The emitter structure. - * - * All members are internal. Manage the structure using the @c yaml_emitter_ - * family of functions. - */ - -typedef struct yaml_emitter_s { - - /** - * @name Error handling - * @{ - */ - - /** Error type. */ - yaml_error_type_t error; - /** Error description. */ - const char *problem; - - /** - * @} - */ - - /** - * @name Writer stuff - * @{ - */ - - /** Write handler. */ - yaml_write_handler_t *write_handler; - - /** A pointer for passing to the white handler. */ - void *write_handler_data; - - /** Standard (string or file) output data. */ - union { - /** String output data. */ - struct { - /** The buffer pointer. */ - unsigned char *buffer; - /** The buffer size. */ - size_t size; - /** The number of written bytes. */ - size_t *size_written; - } string; - - /** File output data. */ - FILE *file; - } output; - - /** The working buffer. */ - struct { - /** The beginning of the buffer. */ - yaml_char_t *start; - /** The end of the buffer. */ - yaml_char_t *end; - /** The current position of the buffer. */ - yaml_char_t *pointer; - /** The last filled position of the buffer. */ - yaml_char_t *last; - } buffer; - - /** The raw buffer. */ - struct { - /** The beginning of the buffer. */ - unsigned char *start; - /** The end of the buffer. */ - unsigned char *end; - /** The current position of the buffer. */ - unsigned char *pointer; - /** The last filled position of the buffer. */ - unsigned char *last; - } raw_buffer; - - /** The stream encoding. */ - yaml_encoding_t encoding; - - /** - * @} - */ - - /** - * @name Emitter stuff - * @{ - */ - - /** If the output is in the canonical style? */ - int canonical; - /** The number of indentation spaces. */ - int best_indent; - /** The preferred width of the output lines. */ - int best_width; - /** Allow unescaped non-ASCII characters? */ - int unicode; - /** The preferred line break. */ - yaml_break_t line_break; - - /** The stack of states. */ - struct { - /** The beginning of the stack. */ - yaml_emitter_state_t *start; - /** The end of the stack. */ - yaml_emitter_state_t *end; - /** The top of the stack. */ - yaml_emitter_state_t *top; - } states; - - /** The current emitter state. */ - yaml_emitter_state_t state; - - /** The event queue. */ - struct { - /** The beginning of the event queue. */ - yaml_event_t *start; - /** The end of the event queue. */ - yaml_event_t *end; - /** The head of the event queue. */ - yaml_event_t *head; - /** The tail of the event queue. */ - yaml_event_t *tail; - } events; - - /** The stack of indentation levels. */ - struct { - /** The beginning of the stack. */ - int *start; - /** The end of the stack. */ - int *end; - /** The top of the stack. */ - int *top; - } indents; - - /** The list of tag directives. */ - struct { - /** The beginning of the list. */ - yaml_tag_directive_t *start; - /** The end of the list. */ - yaml_tag_directive_t *end; - /** The top of the list. */ - yaml_tag_directive_t *top; - } tag_directives; - - /** The current indentation level. */ - int indent; - - /** The current flow level. */ - int flow_level; - - /** Is it the document root context? */ - int root_context; - /** Is it a sequence context? */ - int sequence_context; - /** Is it a mapping context? */ - int mapping_context; - /** Is it a simple mapping key context? */ - int simple_key_context; - - /** The current line. */ - int line; - /** The current column. */ - int column; - /** If the last character was a whitespace? */ - int whitespace; - /** If the last character was an indentation character (' ', '-', '?', ':')? */ - int indention; - /** If an explicit document end is required? */ - int open_ended; - - /** Anchor analysis. */ - struct { - /** The anchor value. */ - yaml_char_t *anchor; - /** The anchor length. */ - size_t anchor_length; - /** Is it an alias? */ - int alias; - } anchor_data; - - /** Tag analysis. */ - struct { - /** The tag handle. */ - yaml_char_t *handle; - /** The tag handle length. */ - size_t handle_length; - /** The tag suffix. */ - yaml_char_t *suffix; - /** The tag suffix length. */ - size_t suffix_length; - } tag_data; - - /** Scalar analysis. */ - struct { - /** The scalar value. */ - yaml_char_t *value; - /** The scalar length. */ - size_t length; - /** Does the scalar contain line breaks? */ - int multiline; - /** Can the scalar be expessed in the flow plain style? */ - int flow_plain_allowed; - /** Can the scalar be expressed in the block plain style? */ - int block_plain_allowed; - /** Can the scalar be expressed in the single quoted style? */ - int single_quoted_allowed; - /** Can the scalar be expressed in the literal or folded styles? */ - int block_allowed; - /** The output style. */ - yaml_scalar_style_t style; - } scalar_data; - - /** - * @} - */ - - /** - * @name Dumper stuff - * @{ - */ - - /** If the stream was already opened? */ - int opened; - /** If the stream was already closed? */ - int closed; - - /** The information associated with the document nodes. */ - struct { - /** The number of references. */ - int references; - /** The anchor id. */ - int anchor; - /** If the node has been emitted? */ - int serialized; - } *anchors; - - /** The last assigned anchor id. */ - int last_anchor_id; - - /** The currently emitted document. */ - yaml_document_t *document; - - /** - * @} - */ - -} yaml_emitter_t; - -/** - * Initialize an emitter. - * - * This function creates a new emitter object. An application is responsible - * for destroying the object using the yaml_emitter_delete() function. - * - * @param[out] emitter An empty parser object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_initialize(yaml_emitter_t *emitter); - -/** - * Destroy an emitter. - * - * @param[in,out] emitter An emitter object. - */ - -extern void -yaml_emitter_delete(yaml_emitter_t *emitter); - -/** - * Set a string output. - * - * The emitter will write the output characters to the @a output buffer of the - * size @a size. The emitter will set @a size_written to the number of written - * bytes. If the buffer is smaller than required, the emitter produces the - * YAML_WRITE_ERROR error. - * - * @param[in,out] emitter An emitter object. - * @param[in] output An output buffer. - * @param[in] size The buffer size. - * @param[in] size_written The pointer to save the number of written - * bytes. - */ - -extern void -yaml_emitter_set_output_string(yaml_emitter_t *emitter, - unsigned char *output, size_t size, size_t *size_written); - -/** - * Set a file output. - * - * @a file should be a file object open for writing. The application is - * responsible for closing the @a file. - * - * @param[in,out] emitter An emitter object. - * @param[in] file An open file. - */ - -extern void -yaml_emitter_set_output_file(yaml_emitter_t *emitter, FILE *file); - -/** - * Set a generic output handler. - * - * @param[in,out] emitter An emitter object. - * @param[in] handler A write handler. - * @param[in] data Any application data for passing to the write - * handler. - */ - -extern void -yaml_emitter_set_output(yaml_emitter_t *emitter, - yaml_write_handler_t *handler, void *data); - -/** - * Set the output encoding. - * - * @param[in,out] emitter An emitter object. - * @param[in] encoding The output encoding. - */ - -extern void -yaml_emitter_set_encoding(yaml_emitter_t *emitter, yaml_encoding_t encoding); - -/** - * Set if the output should be in the "canonical" format as in the YAML - * specification. - * - * @param[in,out] emitter An emitter object. - * @param[in] canonical If the output is canonical. - */ - -extern void -yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical); - -/** - * Set the intendation increment. - * - * @param[in,out] emitter An emitter object. - * @param[in] indent The indentation increment (1 < . < 10). - */ - -extern void -yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent); - -/** - * Set the preferred line width. @c -1 means unlimited. - * - * @param[in,out] emitter An emitter object. - * @param[in] width The preferred line width. - */ - -extern void -yaml_emitter_set_width(yaml_emitter_t *emitter, int width); - -/** - * Set if unescaped non-ASCII characters are allowed. - * - * @param[in,out] emitter An emitter object. - * @param[in] unicode If unescaped Unicode characters are allowed. - */ - -extern void -yaml_emitter_set_unicode(yaml_emitter_t *emitter, int unicode); - -/** - * Set the preferred line break. - * - * @param[in,out] emitter An emitter object. - * @param[in] line_break The preferred line break. - */ - -extern void -yaml_emitter_set_break(yaml_emitter_t *emitter, yaml_break_t line_break); - -/** - * Emit an event. - * - * The event object may be generated using the yaml_parser_parse() function. - * The emitter takes the responsibility for the event object and destroys its - * content after it is emitted. The event object is destroyed even if the - * function fails. - * - * @param[in,out] emitter An emitter object. - * @param[in,out] event An event object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event); - -/** - * Start a YAML stream. - * - * This function should be used before yaml_emitter_dump() is called. - * - * @param[in,out] emitter An emitter object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_open(yaml_emitter_t *emitter); - -/** - * Finish a YAML stream. - * - * This function should be used after yaml_emitter_dump() is called. - * - * @param[in,out] emitter An emitter object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_close(yaml_emitter_t *emitter); - -/** - * Emit a YAML document. - * - * The documen object may be generated using the yaml_parser_load() function - * or the yaml_document_initialize() function. The emitter takes the - * responsibility for the document object and destoys its content after - * it is emitted. The document object is destroyedeven if the function fails. - * - * @param[in,out] emitter An emitter object. - * @param[in,out] document A document object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document); - -/** - * Flush the accumulated characters to the output. - * - * @param[in,out] emitter An emitter object. - * - * @returns @c 1 if the function succeeded, @c 0 on error. - */ - -extern int -yaml_emitter_flush(yaml_emitter_t *emitter); +#include -- 2.30.2