diff options
author | Michal Krol <[email protected]> | 2009-12-17 17:00:46 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-12-17 17:00:46 +0100 |
commit | e195eab9093d2a6cf55a42b2e7789c9a381b7782 (patch) | |
tree | 508408dbb9537f508e6831df033506da8f66b8da /src | |
parent | 1c28073fdfb56a241424c739b57845f47fa05002 (diff) | |
parent | 75f371e973d19650a5c157a0844e43ffdea5e43e (diff) |
Merge branch 'glsl-pp-rework-2'
Diffstat (limited to 'src')
75 files changed, 9134 insertions, 12889 deletions
diff --git a/src/SConscript b/src/SConscript index 5440acd1351..6083fcbec98 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,5 +1,6 @@ Import('*') +SConscript('glsl/SConscript') SConscript('gallium/SConscript') if 'mesa' in env['statetrackers']: diff --git a/src/gallium/winsys/gdi/SConscript b/src/gallium/winsys/gdi/SConscript index 8f556daf04a..74f6b2fd475 100644 --- a/src/gallium/winsys/gdi/SConscript +++ b/src/gallium/winsys/gdi/SConscript @@ -45,5 +45,5 @@ if env['platform'] == 'windows': env.SharedLibrary( target ='opengl32', source = sources, - LIBS = wgl + glapi + mesa + drivers + auxiliaries + env['LIBS'], + LIBS = wgl + glapi + mesa + drivers + auxiliaries + glsl + env['LIBS'], ) diff --git a/src/glsl/Makefile b/src/glsl/Makefile new file mode 100644 index 00000000000..ca7f2d2ac7d --- /dev/null +++ b/src/glsl/Makefile @@ -0,0 +1,15 @@ +# src/glsl/Makefile + +TOP = ../.. + +include $(TOP)/configs/current + +SUBDIRS = pp cl apps + +default install clean: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) $@) || exit 1; \ + fi \ + done + diff --git a/src/glsl/Makefile.template b/src/glsl/Makefile.template new file mode 100644 index 00000000000..974987a0a04 --- /dev/null +++ b/src/glsl/Makefile.template @@ -0,0 +1,50 @@ +# src/glsl/Makefile.template + +# Template makefile for glsl libraries. +# +# Usage: +# The minimum that the including makefile needs to define +# is TOP, LIBNAME and one of of the *_SOURCES. +# +# Optional defines: +# LIBRARY_INCLUDES are appended to the list of includes directories. +# LIBRARY_DEFINES is not used for makedepend, but for compilation. + + +### Basic defines ### + +OBJECTS = $(C_SOURCES:.c=.o) + +INCLUDES = \ + -I. \ + $(LIBRARY_INCLUDES) + + +##### TARGETS ##### + +default: depend lib$(LIBNAME).a + +lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template + $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) + +depend: $(C_SOURCES) + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) 2> /dev/null + +# Remove .o and backup files +clean: + rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak + +# Dummy target +install: + @echo -n "" + + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ + +-include depend + diff --git a/src/glsl/SConscript b/src/glsl/SConscript new file mode 100644 index 00000000000..6f1f81b199a --- /dev/null +++ b/src/glsl/SConscript @@ -0,0 +1,68 @@ +import common + +Import('*') + +env = env.Clone() + +sources = [ + 'pp/sl_pp_context.c', + 'pp/sl_pp_define.c', + 'pp/sl_pp_dict.c', + 'pp/sl_pp_error.c', + 'pp/sl_pp_expression.c', + 'pp/sl_pp_extension.c', + 'pp/sl_pp_if.c', + 'pp/sl_pp_line.c', + 'pp/sl_pp_macro.c', + 'pp/sl_pp_pragma.c', + 'pp/sl_pp_process.c', + 'pp/sl_pp_purify.c', + 'pp/sl_pp_token.c', + 'pp/sl_pp_version.c', + 'cl/sl_cl_parse.c', +] + +glsl = env.StaticLibrary( + target = 'glsl', + source = sources, +) + +Export('glsl') + +env = env.Clone() + +if env['platform'] == 'windows': + env.PrependUnique(LIBS = [ + 'user32', + ]) + +env.Prepend(LIBS = [glsl]) + +env.Program( + target = 'purify', + source = ['apps/purify.c'], +) + +env.Program( + target = 'tokenise', + source = ['apps/tokenise.c'], +) + +env.Program( + target = 'version', + source = ['apps/version.c'], +) + +env.Program( + target = 'process', + source = ['apps/process.c'], +) + +glsl_compile = env.Program( + target = 'compile', + source = ['apps/compile.c'], +) + +if env['platform'] == common.default_platform: + # Only export the GLSL compiler when building for the host platform + Export('glsl_compile') diff --git a/src/glsl/apps/Makefile b/src/glsl/apps/Makefile new file mode 100644 index 00000000000..c80fcb9d974 --- /dev/null +++ b/src/glsl/apps/Makefile @@ -0,0 +1,42 @@ +# src/glsl/apps/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBS = \ + $(TOP)/src/glsl/pp/libglslpp.a \ + $(TOP)/src/glsl/cl/libglslcl.a + +SOURCES = \ + compile.c \ + process.c \ + purify.c \ + tokenise.c \ + version.c + +APPS = $(SOURCES:%.c=%) + +INCLUDES = -I. + + +##### RULES ##### + +.SUFFIXES: +.SUFFIXES: .c + +.c: + $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@ + +.c.o: + $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + + +##### TARGETS ##### + +default: $(APPS) + +clean: + -rm -f $(APPS) + -rm -f *.o + diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c new file mode 100644 index 00000000000..b1165420fb8 --- /dev/null +++ b/src/glsl/apps/compile.c @@ -0,0 +1,234 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include "../pp/sl_pp_public.h" +#include "../cl/sl_cl_parse.h" + + +static void +usage(void) +{ + printf("Usage:\n"); + printf(" compile fragment|vertex <source> <output>\n"); +} + +int +main(int argc, + char *argv[]) +{ + FILE *in; + long size; + char *inbuf; + struct sl_pp_purify_options options; + char errmsg[100] = ""; + struct sl_pp_context *context; + struct sl_pp_token_info *tokens; + unsigned int version; + unsigned int tokens_eaten; + struct sl_pp_token_info *outtokens; + FILE *out; + unsigned int i, j; + unsigned char *outbytes; + unsigned int cboutbytes; + unsigned int shader_type; + + if (argc != 4) { + usage(); + return 1; + } + + if (!strcmp(argv[1], "fragment")) { + shader_type = 1; + } else if (!strcmp(argv[1], "vertex")) { + shader_type = 2; + } else { + usage(); + return 1; + } + + in = fopen(argv[2], "rb"); + if (!in) { + printf("Could not open `%s' for read.\n", argv[2]); + usage(); + return 1; + } + + fseek(in, 0, SEEK_END); + size = ftell(in); + fseek(in, 0, SEEK_SET); + + out = fopen(argv[3], "w"); + if (!out) { + fclose(in); + printf("Could not open `%s' for write.\n", argv[3]); + usage(); + return 1; + } + + inbuf = malloc(size + 1); + if (!inbuf) { + fprintf(out, "$OOMERROR\n"); + + fclose(out); + fclose(in); + printf("Out of memory.\n"); + return 0; + } + + if (fread(inbuf, 1, size, in) != size) { + fprintf(out, "$READERROR\n"); + + free(inbuf); + fclose(out); + fclose(in); + printf("Could not read from `%s'.\n", argv[2]); + return 0; + } + inbuf[size] = '\0'; + + fclose(in); + + memset(&options, 0, sizeof(options)); + + context = sl_pp_context_create(); + if (!context) { + fprintf(out, "$CONTEXERROR\n"); + + free(inbuf); + fclose(out); + printf("Could not create parse context.\n"); + return 0; + } + + if (sl_pp_tokenise(context, inbuf, &options, &tokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s.\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(inbuf); + fclose(out); + return 0; + } + + free(inbuf); + + if (sl_pp_version(context, tokens, &version, &tokens_eaten)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + + if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") || + sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + + if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + + free(tokens); + + for (i = j = 0; outtokens[i].token != SL_PP_EOF; i++) { + switch (outtokens[i].token) { + case SL_PP_NEWLINE: + case SL_PP_EXTENSION_REQUIRE: + case SL_PP_EXTENSION_ENABLE: + case SL_PP_EXTENSION_WARN: + case SL_PP_EXTENSION_DISABLE: + case SL_PP_LINE: + break; + default: + outtokens[j++] = outtokens[i]; + } + } + outtokens[j] = outtokens[i]; + + if (sl_cl_compile(context, outtokens, shader_type, 1, &outbytes, &cboutbytes, errmsg, sizeof(errmsg)) == 0) { + unsigned int i; + unsigned int line = 0; + + fprintf(out, "\n/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */"); + fprintf(out, "\n/* %s */", argv[2]); + fprintf(out, "\n\n"); + + for (i = 0; i < cboutbytes; i++) { + unsigned int a; + + if (outbytes[i] < 10) { + a = 1; + } else if (outbytes[i] < 100) { + a = 2; + } else { + a = 3; + } + if (i < cboutbytes - 1) { + a++; + } + if (line + a >= 100) { + fprintf (out, "\n"); + line = 0; + } + line += a; + fprintf (out, "%u", outbytes[i]); + if (i < cboutbytes - 1) { + fprintf (out, ","); + } + } + fprintf (out, "\n"); + free(outbytes); + } else { + fprintf(out, "$SYNTAXERROR: `%s'\n", errmsg); + + printf("Error: %s\n", errmsg); + } + + sl_pp_context_destroy(context); + free(outtokens); + fclose(out); + return 0; +} diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c new file mode 100644 index 00000000000..d7bc16577e0 --- /dev/null +++ b/src/glsl/apps/process.c @@ -0,0 +1,394 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include "../pp/sl_pp_public.h" + + +int +main(int argc, + char *argv[]) +{ + FILE *in; + long size; + char *inbuf; + struct sl_pp_purify_options options; + struct sl_pp_context *context; + struct sl_pp_token_info *tokens; + unsigned int version; + unsigned int tokens_eaten; + struct sl_pp_token_info *outtokens; + FILE *out; + unsigned int i; + + if (argc != 3) { + return 1; + } + + in = fopen(argv[1], "rb"); + if (!in) { + return 1; + } + + fseek(in, 0, SEEK_END); + size = ftell(in); + fseek(in, 0, SEEK_SET); + + out = fopen(argv[2], "wb"); + if (!out) { + fclose(in); + return 1; + } + + inbuf = malloc(size + 1); + if (!inbuf) { + fprintf(out, "$OOMERROR\n"); + + fclose(out); + fclose(in); + return 1; + } + + if (fread(inbuf, 1, size, in) != size) { + fprintf(out, "$READERROR\n"); + + free(inbuf); + fclose(out); + fclose(in); + return 1; + } + inbuf[size] = '\0'; + + fclose(in); + + memset(&options, 0, sizeof(options)); + + context = sl_pp_context_create(); + if (!context) { + fprintf(out, "$CONTEXERROR\n"); + + free(inbuf); + fclose(out); + return 1; + } + + if (sl_pp_tokenise(context, inbuf, &options, &tokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(inbuf); + fclose(out); + return 1; + } + + free(inbuf); + + if (sl_pp_version(context, tokens, &version, &tokens_eaten)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return -1; + } + + if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") || + sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + + if (sl_pp_context_add_predefined(context, "__GLSL_PP_PREDEFINED_MACRO_TEST", "1")) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + + if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return -1; + } + + free(tokens); + + for (i = 0; outtokens[i].token != SL_PP_EOF; i++) { + switch (outtokens[i].token) { + case SL_PP_NEWLINE: + fprintf(out, "\n"); + break; + + case SL_PP_COMMA: + fprintf(out, ", "); + break; + + case SL_PP_SEMICOLON: + fprintf(out, "; "); + break; + + case SL_PP_LBRACE: + fprintf(out, "{ "); + break; + + case SL_PP_RBRACE: + fprintf(out, "} "); + break; + + case SL_PP_LPAREN: + fprintf(out, "( "); + break; + + case SL_PP_RPAREN: + fprintf(out, ") "); + break; + + case SL_PP_LBRACKET: + fprintf(out, "[ "); + break; + + case SL_PP_RBRACKET: + fprintf(out, "] "); + break; + + case SL_PP_DOT: + fprintf(out, ". "); + break; + + case SL_PP_INCREMENT: + fprintf(out, "++ "); + break; + + case SL_PP_ADDASSIGN: + fprintf(out, "+= "); + break; + + case SL_PP_PLUS: + fprintf(out, "+ "); + break; + + case SL_PP_DECREMENT: + fprintf(out, "-- "); + break; + + case SL_PP_SUBASSIGN: + fprintf(out, "-= "); + break; + + case SL_PP_MINUS: + fprintf(out, "- "); + break; + + case SL_PP_BITNOT: + fprintf(out, "~ "); + break; + + case SL_PP_NOTEQUAL: + fprintf(out, "!= "); + break; + + case SL_PP_NOT: + fprintf(out, "! "); + break; + + case SL_PP_MULASSIGN: + fprintf(out, "*= "); + break; + + case SL_PP_STAR: + fprintf(out, "* "); + break; + + case SL_PP_DIVASSIGN: + fprintf(out, "/= "); + break; + + case SL_PP_SLASH: + fprintf(out, "/ "); + break; + + case SL_PP_MODASSIGN: + fprintf(out, "%%= "); + break; + + case SL_PP_MODULO: + fprintf(out, "%% "); + break; + + case SL_PP_LSHIFTASSIGN: + fprintf(out, "<<= "); + break; + + case SL_PP_LSHIFT: + fprintf(out, "<< "); + break; + + case SL_PP_LESSEQUAL: + fprintf(out, "<= "); + break; + + case SL_PP_LESS: + fprintf(out, "< "); + break; + + case SL_PP_RSHIFTASSIGN: + fprintf(out, ">>= "); + break; + + case SL_PP_RSHIFT: + fprintf(out, ">> "); + break; + + case SL_PP_GREATEREQUAL: + fprintf(out, ">= "); + break; + + case SL_PP_GREATER: + fprintf(out, "> "); + break; + + case SL_PP_EQUAL: + fprintf(out, "== "); + break; + + case SL_PP_ASSIGN: + fprintf(out, "= "); + break; + + case SL_PP_AND: + fprintf(out, "&& "); + break; + + case SL_PP_BITANDASSIGN: + fprintf(out, "&= "); + break; + + case SL_PP_BITAND: + fprintf(out, "& "); + break; + + case SL_PP_XOR: + fprintf(out, "^^ "); + break; + + case SL_PP_BITXORASSIGN: + fprintf(out, "^= "); + break; + + case SL_PP_BITXOR: + fprintf(out, "^ "); + break; + + case SL_PP_OR: + fprintf(out, "|| "); + break; + + case SL_PP_BITORASSIGN: + fprintf(out, "|= "); + break; + + case SL_PP_BITOR: + fprintf(out, "| "); + break; + + case SL_PP_QUESTION: + fprintf(out, "? "); + break; + + case SL_PP_COLON: + fprintf(out, ": "); + break; + + case SL_PP_IDENTIFIER: + fprintf(out, "%s ", sl_pp_context_cstr(context, outtokens[i].data.identifier)); + break; + + case SL_PP_UINT: + fprintf(out, "%s ", sl_pp_context_cstr(context, outtokens[i].data._uint)); + break; + + case SL_PP_FLOAT: + fprintf(out, "%s ", sl_pp_context_cstr(context, outtokens[i].data._float)); + break; + + case SL_PP_OTHER: + fprintf(out, "%c", outtokens[i].data.other); + break; + + case SL_PP_PRAGMA_OPTIMIZE: + fprintf(out, "#pragma optimize(%s)", outtokens[i].data.pragma ? "on" : "off"); + break; + + case SL_PP_PRAGMA_DEBUG: + fprintf(out, "#pragma debug(%s)", outtokens[i].data.pragma ? "on" : "off"); + break; + + case SL_PP_EXTENSION_REQUIRE: + fprintf(out, "#extension %s : require", sl_pp_context_cstr(context, outtokens[i].data.extension)); + break; + + case SL_PP_EXTENSION_ENABLE: + fprintf(out, "#extension %s : enable", sl_pp_context_cstr(context, outtokens[i].data.extension)); + break; + + case SL_PP_EXTENSION_WARN: + fprintf(out, "#extension %s : warn", sl_pp_context_cstr(context, outtokens[i].data.extension)); + break; + + case SL_PP_EXTENSION_DISABLE: + fprintf(out, "#extension %s : disable", sl_pp_context_cstr(context, outtokens[i].data.extension)); + break; + + case SL_PP_LINE: + fprintf(out, "#line %u %u", outtokens[i].data.line.lineno, outtokens[i].data.line.fileno); + break; + + default: + assert(0); + } + } + + sl_pp_context_destroy(context); + free(outtokens); + fclose(out); + + return 0; +} diff --git a/src/glsl/apps/purify.c b/src/glsl/apps/purify.c new file mode 100644 index 00000000000..8c01f4fc6a3 --- /dev/null +++ b/src/glsl/apps/purify.c @@ -0,0 +1,105 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "../pp/sl_pp_public.h" + + +int +main(int argc, + char *argv[]) +{ + FILE *in; + long size; + char *inbuf; + struct sl_pp_purify_options options; + char *outbuf; + char errmsg[100] = ""; + unsigned int errline = 0; + FILE *out; + + if (argc != 3) { + return 1; + } + + in = fopen(argv[1], "rb"); + if (!in) { + return 1; + } + + fseek(in, 0, SEEK_END); + size = ftell(in); + fseek(in, 0, SEEK_SET); + + out = fopen(argv[2], "wb"); + if (!out) { + fclose(in); + return 1; + } + + inbuf = malloc(size + 1); + if (!inbuf) { + fprintf(out, "$OOMERROR\n"); + + fclose(out); + fclose(in); + return 1; + } + + if (fread(inbuf, 1, size, in) != size) { + fprintf(out, "$READERROR\n"); + + free(inbuf); + fclose(out); + fclose(in); + return 1; + } + inbuf[size] = '\0'; + + fclose(in); + + memset(&options, 0, sizeof(options)); + + if (sl_pp_purify(inbuf, &options, &outbuf, errmsg, sizeof(errmsg), &errline)) { + fprintf(out, "$PURIFYERROR %u: %s\n", errline, errmsg); + + free(inbuf); + fclose(out); + return 1; + } + + free(inbuf); + + fwrite(outbuf, 1, strlen(outbuf), out); + + free(outbuf); + fclose(out); + + return 0; +} diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c new file mode 100644 index 00000000000..91368c32a45 --- /dev/null +++ b/src/glsl/apps/tokenise.c @@ -0,0 +1,333 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include "../pp/sl_pp_public.h" + + +int +main(int argc, + char *argv[]) +{ + FILE *in; + long size; + char *inbuf; + struct sl_pp_purify_options options; + struct sl_pp_context *context; + struct sl_pp_token_info *tokens; + FILE *out; + unsigned int i; + + if (argc != 3) { + return 1; + } + + in = fopen(argv[1], "rb"); + if (!in) { + return 1; + } + + fseek(in, 0, SEEK_END); + size = ftell(in); + fseek(in, 0, SEEK_SET); + + out = fopen(argv[2], "wb"); + if (!out) { + fclose(in); + return 1; + } + + inbuf = malloc(size + 1); + if (!inbuf) { + fprintf(out, "$OOMERROR\n"); + + fclose(out); + fclose(in); + return 1; + } + + if (fread(inbuf, 1, size, in) != size) { + fprintf(out, "$READERROR\n"); + + free(inbuf); + fclose(out); + fclose(in); + return 1; + } + inbuf[size] = '\0'; + + fclose(in); + + memset(&options, 0, sizeof(options)); + + context = sl_pp_context_create(); + if (!context) { + fprintf(out, "$CONTEXERROR\n"); + + free(inbuf); + fclose(out); + return 1; + } + + if (sl_pp_tokenise(context, inbuf, &options, &tokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(inbuf); + fclose(out); + return 1; + } + + free(inbuf); + + for (i = 0; tokens[i].token != SL_PP_EOF; i++) { + switch (tokens[i].token) { + case SL_PP_WHITESPACE: + break; + + case SL_PP_NEWLINE: + fprintf(out, "\n"); + break; + + case SL_PP_HASH: + fprintf(out, "# "); + break; + + case SL_PP_COMMA: + fprintf(out, ", "); + break; + + case SL_PP_SEMICOLON: + fprintf(out, "; "); + break; + + case SL_PP_LBRACE: + fprintf(out, "{ "); + break; + + case SL_PP_RBRACE: + fprintf(out, "} "); + break; + + case SL_PP_LPAREN: + fprintf(out, "( "); + break; + + case SL_PP_RPAREN: + fprintf(out, ") "); + break; + + case SL_PP_LBRACKET: + fprintf(out, "[ "); + break; + + case SL_PP_RBRACKET: + fprintf(out, "] "); + break; + + case SL_PP_DOT: + fprintf(out, ". "); + break; + + case SL_PP_INCREMENT: + fprintf(out, "++ "); + break; + + case SL_PP_ADDASSIGN: + fprintf(out, "+= "); + break; + + case SL_PP_PLUS: + fprintf(out, "+ "); + break; + + case SL_PP_DECREMENT: + fprintf(out, "-- "); + break; + + case SL_PP_SUBASSIGN: + fprintf(out, "-= "); + break; + + case SL_PP_MINUS: + fprintf(out, "- "); + break; + + case SL_PP_BITNOT: + fprintf(out, "~ "); + break; + + case SL_PP_NOTEQUAL: + fprintf(out, "!= "); + break; + + case SL_PP_NOT: + fprintf(out, "! "); + break; + + case SL_PP_MULASSIGN: + fprintf(out, "*= "); + break; + + case SL_PP_STAR: + fprintf(out, "* "); + break; + + case SL_PP_DIVASSIGN: + fprintf(out, "/= "); + break; + + case SL_PP_SLASH: + fprintf(out, "/ "); + break; + + case SL_PP_MODASSIGN: + fprintf(out, "%%= "); + break; + + case SL_PP_MODULO: + fprintf(out, "%% "); + break; + + case SL_PP_LSHIFTASSIGN: + fprintf(out, "<<= "); + break; + + case SL_PP_LSHIFT: + fprintf(out, "<< "); + break; + + case SL_PP_LESSEQUAL: + fprintf(out, "<= "); + break; + + case SL_PP_LESS: + fprintf(out, "< "); + break; + + case SL_PP_RSHIFTASSIGN: + fprintf(out, ">>= "); + break; + + case SL_PP_RSHIFT: + fprintf(out, ">> "); + break; + + case SL_PP_GREATEREQUAL: + fprintf(out, ">= "); + break; + + case SL_PP_GREATER: + fprintf(out, "> "); + break; + + case SL_PP_EQUAL: + fprintf(out, "== "); + break; + + case SL_PP_ASSIGN: + fprintf(out, "= "); + break; + + case SL_PP_AND: + fprintf(out, "&& "); + break; + + case SL_PP_BITANDASSIGN: + fprintf(out, "&= "); + break; + + case SL_PP_BITAND: + fprintf(out, "& "); + break; + + case SL_PP_XOR: + fprintf(out, "^^ "); + break; + + case SL_PP_BITXORASSIGN: + fprintf(out, "^= "); + break; + + case SL_PP_BITXOR: + fprintf(out, "^ "); + break; + + case SL_PP_OR: + fprintf(out, "|| "); + break; + + case SL_PP_BITORASSIGN: + fprintf(out, "|= "); + break; + + case SL_PP_BITOR: + fprintf(out, "| "); + break; + + case SL_PP_QUESTION: + fprintf(out, "? "); + break; + + case SL_PP_COLON: + fprintf(out, ": "); + break; + + case SL_PP_IDENTIFIER: + fprintf(out, "%s ", sl_pp_context_cstr(context, tokens[i].data.identifier)); + break; + + case SL_PP_UINT: + fprintf(out, "(%s) ", sl_pp_context_cstr(context, tokens[i].data._uint)); + break; + + case SL_PP_FLOAT: + fprintf(out, "(%s) ", sl_pp_context_cstr(context, tokens[i].data._float)); + break; + + case SL_PP_OTHER: + if (tokens[i].data.other == '\'') { + fprintf(out, "'\\'' "); + } else { + fprintf(out, "'%c' ", tokens[i].data.other); + } + break; + + default: + assert(0); + } + } + + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + + return 0; +} diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c new file mode 100644 index 00000000000..6f77f230ca9 --- /dev/null +++ b/src/glsl/apps/version.c @@ -0,0 +1,131 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include "../pp/sl_pp_public.h" + + +int +main(int argc, + char *argv[]) +{ + FILE *in; + long size; + char *inbuf; + struct sl_pp_purify_options options; + struct sl_pp_context *context; + struct sl_pp_token_info *tokens; + unsigned int version; + unsigned int tokens_eaten; + FILE *out; + + if (argc != 3) { + return 1; + } + + in = fopen(argv[1], "rb"); + if (!in) { + return 1; + } + + fseek(in, 0, SEEK_END); + size = ftell(in); + fseek(in, 0, SEEK_SET); + + out = fopen(argv[2], "wb"); + if (!out) { + fclose(in); + return 1; + } + + inbuf = malloc(size + 1); + if (!inbuf) { + fprintf(out, "$OOMERROR\n"); + + fclose(out); + fclose(in); + return 1; + } + + if (fread(inbuf, 1, size, in) != size) { + fprintf(out, "$READERROR\n"); + + free(inbuf); + fclose(out); + fclose(in); + return 1; + } + inbuf[size] = '\0'; + + fclose(in); + + memset(&options, 0, sizeof(options)); + + context = sl_pp_context_create(); + if (!context) { + fprintf(out, "$CONTEXERROR\n"); + + free(inbuf); + fclose(out); + return 1; + } + + if (sl_pp_tokenise(context, inbuf, &options, &tokens)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(inbuf); + fclose(out); + return 1; + } + + free(inbuf); + + if (sl_pp_version(context, tokens, &version, &tokens_eaten)) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return -1; + } + + sl_pp_context_destroy(context); + free(tokens); + + fprintf(out, + "%u\n%u\n", + version, + tokens_eaten); + + fclose(out); + + return 0; +} diff --git a/src/glsl/cl/Makefile b/src/glsl/cl/Makefile new file mode 100644 index 00000000000..04a52df8c33 --- /dev/null +++ b/src/glsl/cl/Makefile @@ -0,0 +1,13 @@ +#src/glsl/cl/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBNAME = glslcl + +C_SOURCES = \ + sl_cl_parse.c + +include ../Makefile.template + diff --git a/src/glsl/cl/sl_cl_parse.c b/src/glsl/cl/sl_cl_parse.c new file mode 100644 index 00000000000..a9db65c7ad7 --- /dev/null +++ b/src/glsl/cl/sl_cl_parse.c @@ -0,0 +1,2714 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <assert.h> +#include <stdlib.h> +#include <string.h> +#include "../pp/sl_pp_public.h" +#include "sl_cl_parse.h" + + +/* revision number - increment after each change affecting emitted output */ +#define REVISION 5 + +/* external declaration (or precision or invariant stmt) */ +#define EXTERNAL_NULL 0 +#define EXTERNAL_FUNCTION_DEFINITION 1 +#define EXTERNAL_DECLARATION 2 +#define DEFAULT_PRECISION 3 +#define INVARIANT_STMT 4 + +/* precision */ +#define PRECISION_DEFAULT 0 +#define PRECISION_LOW 1 +#define PRECISION_MEDIUM 2 +#define PRECISION_HIGH 3 + +/* declaration */ +#define DECLARATION_FUNCTION_PROTOTYPE 1 +#define DECLARATION_INIT_DECLARATOR_LIST 2 + +/* function type */ +#define FUNCTION_ORDINARY 0 +#define FUNCTION_CONSTRUCTOR 1 +#define FUNCTION_OPERATOR 2 + +/* function call type */ +#define FUNCTION_CALL_NONARRAY 0 +#define FUNCTION_CALL_ARRAY 1 + +/* operator type */ +#define OPERATOR_ADDASSIGN 1 +#define OPERATOR_SUBASSIGN 2 +#define OPERATOR_MULASSIGN 3 +#define OPERATOR_DIVASSIGN 4 +/*#define OPERATOR_MODASSIGN 5*/ +/*#define OPERATOR_LSHASSIGN 6*/ +/*#define OPERATOR_RSHASSIGN 7*/ +/*#define OPERATOR_ORASSIGN 8*/ +/*#define OPERATOR_XORASSIGN 9*/ +/*#define OPERATOR_ANDASSIGN 10*/ +#define OPERATOR_LOGICALXOR 11 +/*#define OPERATOR_BITOR 12*/ +/*#define OPERATOR_BITXOR 13*/ +/*#define OPERATOR_BITAND 14*/ +#define OPERATOR_LESS 15 +#define OPERATOR_GREATER 16 +#define OPERATOR_LESSEQUAL 17 +#define OPERATOR_GREATEREQUAL 18 +/*#define OPERATOR_LSHIFT 19*/ +/*#define OPERATOR_RSHIFT 20*/ +#define OPERATOR_MULTIPLY 21 +#define OPERATOR_DIVIDE 22 +/*#define OPERATOR_MODULUS 23*/ +#define OPERATOR_INCREMENT 24 +#define OPERATOR_DECREMENT 25 +#define OPERATOR_PLUS 26 +#define OPERATOR_MINUS 27 +/*#define OPERATOR_COMPLEMENT 28*/ +#define OPERATOR_NOT 29 + +/* init declarator list */ +#define DECLARATOR_NONE 0 +#define DECLARATOR_NEXT 1 + +/* variable declaration */ +#define VARIABLE_NONE 0 +#define VARIABLE_IDENTIFIER 1 +#define VARIABLE_INITIALIZER 2 +#define VARIABLE_ARRAY_EXPLICIT 3 +#define VARIABLE_ARRAY_UNKNOWN 4 + +/* type qualifier */ +#define TYPE_QUALIFIER_NONE 0 +#define TYPE_QUALIFIER_CONST 1 +#define TYPE_QUALIFIER_ATTRIBUTE 2 +#define TYPE_QUALIFIER_VARYING 3 +#define TYPE_QUALIFIER_UNIFORM 4 +#define TYPE_QUALIFIER_FIXEDOUTPUT 5 +#define TYPE_QUALIFIER_FIXEDINPUT 6 + +/* invariant qualifier */ +#define TYPE_VARIANT 90 +#define TYPE_INVARIANT 91 + +/* centroid qualifier */ +#define TYPE_CENTER 95 +#define TYPE_CENTROID 96 + +/* type specifier */ +#define TYPE_SPECIFIER_VOID 0 +#define TYPE_SPECIFIER_BOOL 1 +#define TYPE_SPECIFIER_BVEC2 2 +#define TYPE_SPECIFIER_BVEC3 3 +#define TYPE_SPECIFIER_BVEC4 4 +#define TYPE_SPECIFIER_INT 5 +#define TYPE_SPECIFIER_IVEC2 6 +#define TYPE_SPECIFIER_IVEC3 7 +#define TYPE_SPECIFIER_IVEC4 8 +#define TYPE_SPECIFIER_FLOAT 9 +#define TYPE_SPECIFIER_VEC2 10 +#define TYPE_SPECIFIER_VEC3 11 +#define TYPE_SPECIFIER_VEC4 12 +#define TYPE_SPECIFIER_MAT2 13 +#define TYPE_SPECIFIER_MAT3 14 +#define TYPE_SPECIFIER_MAT4 15 +#define TYPE_SPECIFIER_SAMPLER1D 16 +#define TYPE_SPECIFIER_SAMPLER2D 17 +#define TYPE_SPECIFIER_SAMPLER3D 18 +#define TYPE_SPECIFIER_SAMPLERCUBE 19 +#define TYPE_SPECIFIER_SAMPLER1DSHADOW 20 +#define TYPE_SPECIFIER_SAMPLER2DSHADOW 21 +#define TYPE_SPECIFIER_SAMPLER2DRECT 22 +#define TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 +#define TYPE_SPECIFIER_STRUCT 24 +#define TYPE_SPECIFIER_TYPENAME 25 + +/* OpenGL 2.1 */ +#define TYPE_SPECIFIER_MAT23 26 +#define TYPE_SPECIFIER_MAT32 27 +#define TYPE_SPECIFIER_MAT24 28 +#define TYPE_SPECIFIER_MAT42 29 +#define TYPE_SPECIFIER_MAT34 30 +#define TYPE_SPECIFIER_MAT43 31 + +/* type specifier array */ +#define TYPE_SPECIFIER_NONARRAY 0 +#define TYPE_SPECIFIER_ARRAY 1 + +/* structure field */ +#define FIELD_NONE 0 +#define FIELD_NEXT 1 +#define FIELD_ARRAY 2 + +/* operation */ +#define OP_END 0 +#define OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 +#define OP_BLOCK_BEGIN_NEW_SCOPE 2 +#define OP_DECLARE 3 +#define OP_ASM 4 +#define OP_BREAK 5 +#define OP_CONTINUE 6 +#define OP_DISCARD 7 +#define OP_RETURN 8 +#define OP_EXPRESSION 9 +#define OP_IF 10 +#define OP_WHILE 11 +#define OP_DO 12 +#define OP_FOR 13 +#define OP_PUSH_VOID 14 +#define OP_PUSH_BOOL 15 +#define OP_PUSH_INT 16 +#define OP_PUSH_FLOAT 17 +#define OP_PUSH_IDENTIFIER 18 +#define OP_SEQUENCE 19 +#define OP_ASSIGN 20 +#define OP_ADDASSIGN 21 +#define OP_SUBASSIGN 22 +#define OP_MULASSIGN 23 +#define OP_DIVASSIGN 24 +/*#define OP_MODASSIGN 25*/ +/*#define OP_LSHASSIGN 26*/ +/*#define OP_RSHASSIGN 27*/ +/*#define OP_ORASSIGN 28*/ +/*#define OP_XORASSIGN 29*/ +/*#define OP_ANDASSIGN 30*/ +#define OP_SELECT 31 +#define OP_LOGICALOR 32 +#define OP_LOGICALXOR 33 +#define OP_LOGICALAND 34 +/*#define OP_BITOR 35*/ +/*#define OP_BITXOR 36*/ +/*#define OP_BITAND 37*/ +#define OP_EQUAL 38 +#define OP_NOTEQUAL 39 +#define OP_LESS 40 +#define OP_GREATER 41 +#define OP_LESSEQUAL 42 +#define OP_GREATEREQUAL 43 +/*#define OP_LSHIFT 44*/ +/*#define OP_RSHIFT 45*/ +#define OP_ADD 46 +#define OP_SUBTRACT 47 +#define OP_MULTIPLY 48 +#define OP_DIVIDE 49 +/*#define OP_MODULUS 50*/ +#define OP_PREINCREMENT 51 +#define OP_PREDECREMENT 52 +#define OP_PLUS 53 +#define OP_MINUS 54 +/*#define OP_COMPLEMENT 55*/ +#define OP_NOT 56 +#define OP_SUBSCRIPT 57 +#define OP_CALL 58 +#define OP_FIELD 59 +#define OP_POSTINCREMENT 60 +#define OP_POSTDECREMENT 61 +#define OP_PRECISION 62 +#define OP_METHOD 63 + +/* parameter qualifier */ +#define PARAM_QUALIFIER_IN 0 +#define PARAM_QUALIFIER_OUT 1 +#define PARAM_QUALIFIER_INOUT 2 + +/* function parameter */ +#define PARAMETER_NONE 0 +#define PARAMETER_NEXT 1 + +/* function parameter array presence */ +#define PARAMETER_ARRAY_NOT_PRESENT 0 +#define PARAMETER_ARRAY_PRESENT 1 + + +struct parse_dict { + int _void; + int _float; + int _int; + int _bool; + int vec2; + int vec3; + int vec4; + int bvec2; + int bvec3; + int bvec4; + int ivec2; + int ivec3; + int ivec4; + int mat2; + int mat3; + int mat4; + int mat2x3; + int mat3x2; + int mat2x4; + int mat4x2; + int mat3x4; + int mat4x3; + int sampler1D; + int sampler2D; + int sampler3D; + int samplerCube; + int sampler1DShadow; + int sampler2DShadow; + int sampler2DRect; + int sampler2DRectShadow; + + int invariant; + + int centroid; + + int precision; + int lowp; + int mediump; + int highp; + + int _const; + int attribute; + int varying; + int uniform; + int __fixed_output; + int __fixed_input; + + int in; + int out; + int inout; + + int _struct; + + int __constructor; + int __operator; + int ___asm; + + int _if; + int _else; + int _for; + int _while; + int _do; + + int _continue; + int _break; + int _return; + int discard; + + int _false; + int _true; +}; + + +struct parse_context { + struct sl_pp_context *context; + const struct sl_pp_token_info *input; + + struct parse_dict dict; + + unsigned char *out_buf; + unsigned int out_cap; + + unsigned int shader_type; + unsigned int parsing_builtin; + + char error[256]; +}; + + +struct parse_state { + unsigned int in; + unsigned int out; +}; + + +static __inline unsigned int +_emit(struct parse_context *ctx, + unsigned int *out, + unsigned char b) +{ + if (*out == ctx->out_cap) { + ctx->out_cap += 4096; + ctx->out_buf = (unsigned char *)realloc(ctx->out_buf, ctx->out_cap * sizeof(unsigned char)); + } + ctx->out_buf[*out] = b; + return (*out)++; +} + + +static void +_update(struct parse_context *ctx, + unsigned int out, + unsigned char b) +{ + ctx->out_buf[out] = b; +} + + +static void +_error(struct parse_context *ctx, + char *msg) +{ + if (ctx->error[0] == '\0') { + strcpy(ctx->error, msg); + } +} + + +static int +_parse_token(struct parse_context *ctx, + enum sl_pp_token token, + struct parse_state *ps) +{ + if (ctx->input[ps->in].token == token) { + ps->in++; + return 0; + } + return -1; +} + + +static int +_parse_id(struct parse_context *ctx, + int id, + struct parse_state *ps) +{ + if (ctx->input[ps->in].token == SL_PP_IDENTIFIER && + ctx->input[ps->in].data.identifier == id) { + ps->in++; + return 0; + } + return -1; +} + + +static int +_parse_identifier(struct parse_context *ctx, + struct parse_state *ps) +{ + if (ctx->input[ps->in].token == SL_PP_IDENTIFIER) { + const char *cstr = sl_pp_context_cstr(ctx->context, ctx->input[ps->in].data.identifier); + + do { + _emit(ctx, &ps->out, *cstr); + } while (*cstr++); + ps->in++; + return 0; + } + return -1; +} + + +static int +_parse_float(struct parse_context *ctx, + struct parse_state *ps) +{ + if (ctx->input[ps->in].token == SL_PP_FLOAT) { + const char *cstr = sl_pp_context_cstr(ctx->context, ctx->input[ps->in].data._float); + + _emit(ctx, &ps->out, 1); + do { + _emit(ctx, &ps->out, *cstr); + } while (*cstr++); + ps->in++; + return 0; + } + return -1; +} + + +static int +_parse_uint(struct parse_context *ctx, + struct parse_state *ps) +{ + if (ctx->input[ps->in].token == SL_PP_UINT) { + const char *cstr = sl_pp_context_cstr(ctx->context, ctx->input[ps->in].data._uint); + + _emit(ctx, &ps->out, 1); + do { + _emit(ctx, &ps->out, *cstr); + } while (*cstr++); + ps->in++; + return 0; + } + return -1; +} + + +/**************************************/ + + +static int +_parse_unary_expression(struct parse_context *ctx, + struct parse_state *ps); + +static int +_parse_conditional_expression(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_constant_expression(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_primary_expression(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_statement(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_type_specifier(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_declaration(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_statement_list(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_assignment_expression(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_precision(struct parse_context *ctx, + struct parse_state *ps); + + +static int +_parse_overriden_operator(struct parse_context *ctx, + struct parse_state *ps) +{ + unsigned int op; + + if (_parse_token(ctx, SL_PP_INCREMENT, ps) == 0) { + op = OPERATOR_INCREMENT; + } else if (_parse_token(ctx, SL_PP_ADDASSIGN, ps) == 0) { + op = OPERATOR_ADDASSIGN; + } else if (_parse_token(ctx, SL_PP_PLUS, ps) == 0) { + op = OPERATOR_PLUS; + } else if (_parse_token(ctx, SL_PP_DECREMENT, ps) == 0) { + op = OPERATOR_DECREMENT; + } else if (_parse_token(ctx, SL_PP_SUBASSIGN, ps) == 0) { + op = OPERATOR_SUBASSIGN; + } else if (_parse_token(ctx, SL_PP_MINUS, ps) == 0) { + op = OPERATOR_MINUS; + } else if (_parse_token(ctx, SL_PP_NOT, ps) == 0) { + op = OPERATOR_NOT; + } else if (_parse_token(ctx, SL_PP_MULASSIGN, ps) == 0) { + op = OPERATOR_MULASSIGN; + } else if (_parse_token(ctx, SL_PP_STAR, ps) == 0) { + op = OPERATOR_MULTIPLY; + } else if (_parse_token(ctx, SL_PP_DIVASSIGN, ps) == 0) { + op = OPERATOR_DIVASSIGN; + } else if (_parse_token(ctx, SL_PP_SLASH, ps) == 0) { + op = OPERATOR_DIVIDE; + } else if (_parse_token(ctx, SL_PP_LESSEQUAL, ps) == 0) { + op = OPERATOR_LESSEQUAL; + } else if (_parse_token(ctx, SL_PP_LESS, ps) == 0) { + op = OPERATOR_LESS; + } else if (_parse_token(ctx, SL_PP_GREATEREQUAL, ps) == 0) { + op = OPERATOR_GREATEREQUAL; + } else if (_parse_token(ctx, SL_PP_GREATER, ps) == 0) { + op = OPERATOR_GREATER; + } else if (_parse_token(ctx, SL_PP_XOR, ps) == 0) { + op = OPERATOR_LOGICALXOR; + } else { + return -1; + } + + _emit(ctx, &ps->out, op); + return 0; +} + + +static int +_parse_function_decl_identifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, 0); + + if (ctx->parsing_builtin && _parse_id(ctx, ctx->dict.__constructor, &p) == 0) { + _update(ctx, e, FUNCTION_CONSTRUCTOR); + *ps = p; + return 0; + } + + if (ctx->parsing_builtin && _parse_id(ctx, ctx->dict.__operator, &p) == 0) { + _update(ctx, e, FUNCTION_OPERATOR); + if (_parse_overriden_operator(ctx, &p) == 0) { + *ps = p; + return 0; + } + return -1; + } + + if (_parse_identifier(ctx, &p) == 0) { + _update(ctx, e, FUNCTION_ORDINARY); + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_invariant_qualifier(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_id(ctx, ctx->dict.invariant, ps)) { + return -1; + } + _emit(ctx, &ps->out, TYPE_INVARIANT); + return 0; +} + + +static int +_parse_centroid_qualifier(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_id(ctx, ctx->dict.centroid, ps)) { + return -1; + } + _emit(ctx, &ps->out, TYPE_CENTROID); + return 0; +} + + +static int +_parse_type_qualifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, 0); + int id; + + if (ctx->input[p.in].token != SL_PP_IDENTIFIER) { + return -1; + } + id = ctx->input[p.in].data.identifier; + + if (id == ctx->dict._const) { + _update(ctx, e, TYPE_QUALIFIER_CONST); + } else if (ctx->shader_type == 2 && id == ctx->dict.attribute) { + _update(ctx, e, TYPE_QUALIFIER_ATTRIBUTE); + } else if (id == ctx->dict.varying) { + _update(ctx, e, TYPE_QUALIFIER_VARYING); + } else if (id == ctx->dict.uniform) { + _update(ctx, e, TYPE_QUALIFIER_UNIFORM); + } else if (ctx->parsing_builtin && id == ctx->dict.__fixed_output) { + _update(ctx, e, TYPE_QUALIFIER_FIXEDOUTPUT); + } else if (ctx->parsing_builtin && id == ctx->dict.__fixed_input) { + _update(ctx, e, TYPE_QUALIFIER_FIXEDINPUT); + } else { + return -1; + } + _parse_token(ctx, SL_PP_IDENTIFIER, &p); + *ps = p; + return 0; +} + + +static int +_parse_struct_declarator(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e; + + if (_parse_identifier(ctx, &p)) { + return -1; + } + e = _emit(ctx, &p.out, FIELD_NONE); + *ps = p; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p)) { + return 0; + } + if (_parse_constant_expression(ctx, &p)) { + _error(ctx, "expected constant integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + _update(ctx, e, FIELD_ARRAY); + *ps = p; + return 0; +} + + +static int +_parse_struct_declarator_list(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_struct_declarator(ctx, &p)) { + return -1; + } + + for (;;) { + *ps = p; + _emit(ctx, &p.out, FIELD_NEXT); + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + return 0; + } + if (_parse_struct_declarator(ctx, &p)) { + return 0; + } + } +} + + +static int +_parse_struct_declaration(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_type_specifier(ctx, &p)) { + return -1; + } + if (_parse_struct_declarator_list(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + _emit(ctx, &p.out, FIELD_NONE); + *ps = p; + return 0; +} + + +static int +_parse_struct_declaration_list(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_struct_declaration(ctx, &p)) { + return -1; + } + + for (;;) { + *ps = p; + _emit(ctx, &p.out, FIELD_NEXT); + if (_parse_struct_declaration(ctx, &p)) { + return 0; + } + } +} + + +static int +_parse_struct_specifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_id(ctx, ctx->dict._struct, &p)) { + return -1; + } + if (_parse_identifier(ctx, &p)) { + _emit(ctx, &p.out, '\0'); + } + if (_parse_token(ctx, SL_PP_LBRACE, &p)) { + _error(ctx, "expected `{'"); + return -1; + } + if (_parse_struct_declaration_list(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACE, &p)) { + return -1; + } + _emit(ctx, &p.out, FIELD_NONE); + *ps = p; + return 0; +} + + +static int +_parse_type_specifier_nonarray(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, 0); + int id; + + if (_parse_struct_specifier(ctx, &p) == 0) { + _update(ctx, e, TYPE_SPECIFIER_STRUCT); + *ps = p; + return 0; + } + + if (ctx->input[p.in].token != SL_PP_IDENTIFIER) { + return -1; + } + id = ctx->input[p.in].data.identifier; + + if (id == ctx->dict._void) { + _update(ctx, e, TYPE_SPECIFIER_VOID); + } else if (id == ctx->dict._float) { + _update(ctx, e, TYPE_SPECIFIER_FLOAT); + } else if (id == ctx->dict._int) { + _update(ctx, e, TYPE_SPECIFIER_INT); + } else if (id == ctx->dict._bool) { + _update(ctx, e, TYPE_SPECIFIER_BOOL); + } else if (id == ctx->dict.vec2) { + _update(ctx, e, TYPE_SPECIFIER_VEC2); + } else if (id == ctx->dict.vec3) { + _update(ctx, e, TYPE_SPECIFIER_VEC3); + } else if (id == ctx->dict.vec4) { + _update(ctx, e, TYPE_SPECIFIER_VEC4); + } else if (id == ctx->dict.bvec2) { + _update(ctx, e, TYPE_SPECIFIER_BVEC2); + } else if (id == ctx->dict.bvec3) { + _update(ctx, e, TYPE_SPECIFIER_BVEC3); + } else if (id == ctx->dict.bvec4) { + _update(ctx, e, TYPE_SPECIFIER_BVEC4); + } else if (id == ctx->dict.ivec2) { + _update(ctx, e, TYPE_SPECIFIER_IVEC2); + } else if (id == ctx->dict.ivec3) { + _update(ctx, e, TYPE_SPECIFIER_IVEC3); + } else if (id == ctx->dict.ivec4) { + _update(ctx, e, TYPE_SPECIFIER_IVEC4); + } else if (id == ctx->dict.mat2) { + _update(ctx, e, TYPE_SPECIFIER_MAT2); + } else if (id == ctx->dict.mat3) { + _update(ctx, e, TYPE_SPECIFIER_MAT3); + } else if (id == ctx->dict.mat4) { + _update(ctx, e, TYPE_SPECIFIER_MAT4); + } else if (id == ctx->dict.mat2x3) { + _update(ctx, e, TYPE_SPECIFIER_MAT23); + } else if (id == ctx->dict.mat3x2) { + _update(ctx, e, TYPE_SPECIFIER_MAT32); + } else if (id == ctx->dict.mat2x4) { + _update(ctx, e, TYPE_SPECIFIER_MAT24); + } else if (id == ctx->dict.mat4x2) { + _update(ctx, e, TYPE_SPECIFIER_MAT42); + } else if (id == ctx->dict.mat3x4) { + _update(ctx, e, TYPE_SPECIFIER_MAT34); + } else if (id == ctx->dict.mat4x3) { + _update(ctx, e, TYPE_SPECIFIER_MAT43); + } else if (id == ctx->dict.sampler1D) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER1D); + } else if (id == ctx->dict.sampler2D) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER2D); + } else if (id == ctx->dict.sampler3D) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER3D); + } else if (id == ctx->dict.samplerCube) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLERCUBE); + } else if (id == ctx->dict.sampler1DShadow) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER1DSHADOW); + } else if (id == ctx->dict.sampler2DShadow) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER2DSHADOW); + } else if (id == ctx->dict.sampler2DRect) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER2DRECT); + } else if (id == ctx->dict.sampler2DRectShadow) { + _update(ctx, e, TYPE_SPECIFIER_SAMPLER2DRECTSHADOW); + } else if (_parse_identifier(ctx, &p) == 0) { + _update(ctx, e, TYPE_SPECIFIER_TYPENAME); + *ps = p; + return 0; + } else { + return -1; + } + + _parse_token(ctx, SL_PP_IDENTIFIER, &p); + *ps = p; + return 0; +} + + +static int +_parse_type_specifier_array(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p)) { + return -1; + } + if (_parse_constant_expression(ctx, &p)) { + _error(ctx, "expected constant integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_type_specifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e; + + if (_parse_type_specifier_nonarray(ctx, &p)) { + return -1; + } + + e = _emit(ctx, &p.out, TYPE_SPECIFIER_ARRAY); + if (_parse_type_specifier_array(ctx, &p)) { + _update(ctx, e, TYPE_SPECIFIER_NONARRAY); + } + *ps = p; + return 0; +} + + +static int +_parse_fully_specified_type(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_invariant_qualifier(ctx, &p)) { + _emit(ctx, &p.out, TYPE_VARIANT); + } + if (_parse_centroid_qualifier(ctx, &p)) { + _emit(ctx, &p.out, TYPE_CENTER); + } + if (_parse_type_qualifier(ctx, &p)) { + _emit(ctx, &p.out, TYPE_QUALIFIER_NONE); + } + if (_parse_precision(ctx, &p)) { + _emit(ctx, &p.out, PRECISION_DEFAULT); + } + if (_parse_type_specifier(ctx, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_function_header(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_fully_specified_type(ctx, &p)) { + return -1; + } + if (_parse_function_decl_identifier(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_parameter_qualifier(struct parse_context *ctx, + struct parse_state *ps) +{ + unsigned int e = _emit(ctx, &ps->out, PARAM_QUALIFIER_IN); + + if (_parse_id(ctx, ctx->dict.out, ps) == 0) { + _update(ctx, e, PARAM_QUALIFIER_OUT); + } else if (_parse_id(ctx, ctx->dict.inout, ps) == 0) { + _update(ctx, e, PARAM_QUALIFIER_INOUT); + } else { + _parse_id(ctx, ctx->dict.in, ps); + } + return 0; +} + + +static int +_parse_function_identifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + unsigned int e; + + if (_parse_identifier(ctx, ps)) { + return -1; + } + e = _emit(ctx, &ps->out, FUNCTION_CALL_NONARRAY); + + p = *ps; + if (_parse_token(ctx, SL_PP_LBRACKET, &p)) { + return 0; + } + if (_parse_constant_expression(ctx, &p)) { + _error(ctx, "expected constant integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + _update(ctx, e, FUNCTION_CALL_ARRAY); + *ps = p; + return 0; +} + + +static int +_parse_function_call_header(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_identifier(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_assign_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int op; + + if (_parse_unary_expression(ctx, &p)) { + return -1; + } + + if (_parse_token(ctx, SL_PP_ASSIGN, &p) == 0) { + op = OP_ASSIGN; + } else if (_parse_token(ctx, SL_PP_MULASSIGN, &p) == 0) { + op = OP_MULASSIGN; + } else if (_parse_token(ctx, SL_PP_DIVASSIGN, &p) == 0) { + op = OP_DIVASSIGN; + } else if (_parse_token(ctx, SL_PP_ADDASSIGN, &p) == 0) { + op = OP_ADDASSIGN; + } else if (_parse_token(ctx, SL_PP_SUBASSIGN, &p) == 0) { + op = OP_SUBASSIGN; + } else { + return -1; + } + + if (_parse_assignment_expression(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, op); + + *ps = p; + return 0; +} + + +static int +_parse_assignment_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_assign_expression(ctx, ps) == 0) { + return 0; + } + + if (_parse_conditional_expression(ctx, ps) == 0) { + return 0; + } + + return -1; +} + + +static int +_parse_function_call_header_with_parameters(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_call_header(ctx, &p)) { + return -1; + } + if (_parse_assignment_expression(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + return 0; + } + if (_parse_assignment_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_END); + } +} + + +static int +_parse_function_call_header_no_parameters(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_function_call_header(ctx, ps)) { + return -1; + } + _parse_id(ctx, ctx->dict._void, ps); + return 0; +} + + +static int +_parse_function_call_generic(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_call_header_with_parameters(ctx, &p) == 0) { + if (_parse_token(ctx, SL_PP_RPAREN, &p) == 0) { + *ps = p; + return 0; + } + _error(ctx, "expected `)'"); + return -1; + } + + p = *ps; + if (_parse_function_call_header_no_parameters(ctx, &p) == 0) { + if (_parse_token(ctx, SL_PP_RPAREN, &p) == 0) { + *ps = p; + return 0; + } + _error(ctx, "expected `)'"); + return -1; + } + + return -1; +} + + +static int +_parse_method_call(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_METHOD); + if (_parse_identifier(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_DOT, &p)) { + return -1; + } + if (_parse_function_call_generic(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_regular_function_call(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_CALL); + if (_parse_function_call_generic(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_function_call(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_regular_function_call(ctx, ps) == 0) { + return 0; + } + + if (_parse_method_call(ctx, ps) == 0) { + return 0; + } + + return -1; +} + + +static int +_parse_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_assignment_expression(ctx, &p)) { + return -1; + } + + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + return 0; + } + if (_parse_assignment_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_SEQUENCE); + } +} + + +static int +_parse_postfix_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + + if (_parse_function_call(ctx, ps)) { + if (_parse_primary_expression(ctx, ps)) { + return -1; + } + } + + for (p = *ps;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_INCREMENT, &p) == 0) { + _emit(ctx, &p.out, OP_POSTINCREMENT); + } else if (_parse_token(ctx, SL_PP_DECREMENT, &p) == 0) { + _emit(ctx, &p.out, OP_POSTDECREMENT); + } else if (_parse_token(ctx, SL_PP_LBRACKET, &p) == 0) { + if (_parse_expression(ctx, &p)) { + _error(ctx, "expected an integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + _emit(ctx, &p.out, OP_SUBSCRIPT); + } else if (_parse_token(ctx, SL_PP_DOT, &p) == 0) { + _emit(ctx, &p.out, OP_FIELD); + if (_parse_identifier(ctx, &p)) { + return 0; + } + } else { + return 0; + } + } +} + + +static int +_parse_unary_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + unsigned int op; + + if (_parse_postfix_expression(ctx, ps) == 0) { + return 0; + } + + p = *ps; + if (_parse_token(ctx, SL_PP_INCREMENT, &p) == 0) { + op = OP_PREINCREMENT; + } else if (_parse_token(ctx, SL_PP_DECREMENT, &p) == 0) { + op = OP_PREDECREMENT; + } else if (_parse_token(ctx, SL_PP_PLUS, &p) == 0) { + op = OP_PLUS; + } else if (_parse_token(ctx, SL_PP_MINUS, &p) == 0) { + op = OP_MINUS; + } else if (_parse_token(ctx, SL_PP_NOT, &p) == 0) { + op = OP_NOT; + } else { + return -1; + } + + if (_parse_unary_expression(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, op); + *ps = p; + return 0; +} + + +static int +_parse_multiplicative_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_unary_expression(ctx, &p)) { + return -1; + } + for (;;) { + unsigned int op; + + *ps = p; + if (_parse_token(ctx, SL_PP_STAR, &p) == 0) { + op = OP_MULTIPLY; + } else if (_parse_token(ctx, SL_PP_SLASH, &p) == 0) { + op = OP_DIVIDE; + } else { + return 0; + } + if (_parse_unary_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, op); + } +} + + +static int +_parse_additive_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_multiplicative_expression(ctx, &p)) { + return -1; + } + for (;;) { + unsigned int op; + + *ps = p; + if (_parse_token(ctx, SL_PP_PLUS, &p) == 0) { + op = OP_ADD; + } else if (_parse_token(ctx, SL_PP_MINUS, &p) == 0) { + op = OP_SUBTRACT; + } else { + return 0; + } + if (_parse_multiplicative_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, op); + } +} + + +static int +_parse_relational_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_additive_expression(ctx, &p)) { + return -1; + } + for (;;) { + unsigned int op; + + *ps = p; + if (_parse_token(ctx, SL_PP_LESS, &p) == 0) { + op = OP_LESS; + } else if (_parse_token(ctx, SL_PP_GREATER, &p) == 0) { + op = OP_GREATER; + } else if (_parse_token(ctx, SL_PP_LESSEQUAL, &p) == 0) { + op = OP_LESSEQUAL; + } else if (_parse_token(ctx, SL_PP_GREATEREQUAL, &p) == 0) { + op = OP_GREATEREQUAL; + } else { + return 0; + } + if (_parse_additive_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, op); + } +} + + +static int +_parse_equality_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_relational_expression(ctx, &p)) { + return -1; + } + for (;;) { + unsigned int op; + + *ps = p; + if (_parse_token(ctx, SL_PP_EQUAL, &p) == 0) { + op = OP_EQUAL; + } else if (_parse_token(ctx, SL_PP_NOTEQUAL, &p) == 0) { + op = OP_NOTEQUAL; + } else { + return 0; + } + if (_parse_relational_expression(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, op); + } +} + + +static int +_parse_logical_and_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_equality_expression(ctx, &p)) { + return -1; + } + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_AND, &p)) { + return 0; + } + if (_parse_equality_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_LOGICALAND); + } +} + + +static int +_parse_logical_xor_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_logical_and_expression(ctx, &p)) { + return -1; + } + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_XOR, &p)) { + return 0; + } + if (_parse_logical_and_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_LOGICALXOR); + } +} + + +static int +_parse_logical_or_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_logical_xor_expression(ctx, &p)) { + return -1; + } + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_OR, &p)) { + return 0; + } + if (_parse_logical_xor_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_LOGICALOR); + } +} + + +static int +_parse_conditional_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_logical_or_expression(ctx, &p)) { + return -1; + } + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_QUESTION, &p)) { + return 0; + } + if (_parse_expression(ctx, &p)) { + return 0; + } + if (_parse_token(ctx, SL_PP_COLON, &p)) { + return 0; + } + if (_parse_conditional_expression(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_SELECT); + } +} + + +static int +_parse_constant_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_conditional_expression(ctx, ps)) { + return -1; + } + _emit(ctx, &ps->out, OP_END); + return 0; +} + + +static int +_parse_parameter_declarator_array(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p)) { + return -1; + } + if (_parse_constant_expression(ctx, &p)) { + _error(ctx, "expected constant integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_parameter_declarator(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e; + + if (_parse_type_specifier(ctx, &p)) { + return -1; + } + if (_parse_identifier(ctx, &p)) { + return -1; + } + e = _emit(ctx, &p.out, PARAMETER_ARRAY_PRESENT); + if (_parse_parameter_declarator_array(ctx, &p)) { + _update(ctx, e, PARAMETER_ARRAY_NOT_PRESENT); + } + *ps = p; + return 0; +} + + +static int +_parse_parameter_type_specifier_array(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p)) { + return -1; + } + if (_parse_constant_expression(ctx, &p)) { + _error(ctx, "expected constant integral expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p)) { + _error(ctx, "expected `]'"); + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_parameter_type_specifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e; + + if (_parse_type_specifier(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, '\0'); + + e = _emit(ctx, &p.out, PARAMETER_ARRAY_PRESENT); + if (_parse_parameter_type_specifier_array(ctx, &p)) { + _update(ctx, e, PARAMETER_ARRAY_NOT_PRESENT); + } + *ps = p; + return 0; +} + + +static int +_parse_parameter_declaration(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, PARAMETER_NEXT); + + (void) e; + + if (_parse_type_qualifier(ctx, &p)) { + _emit(ctx, &p.out, TYPE_QUALIFIER_NONE); + } + _parse_parameter_qualifier(ctx, &p); + if (_parse_precision(ctx, &p)) { + _emit(ctx, &p.out, PRECISION_DEFAULT); + } + if (_parse_parameter_declarator(ctx, &p) == 0) { + *ps = p; + return 0; + } + if (_parse_parameter_type_specifier(ctx, &p) == 0) { + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_function_header_with_parameters(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_header(ctx, &p)) { + return -1; + } + if (_parse_parameter_declaration(ctx, &p)) { + return -1; + } + + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + return 0; + } + if (_parse_parameter_declaration(ctx, &p)) { + return 0; + } + } +} + + +static int +_parse_function_declarator(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_function_header_with_parameters(ctx, ps) == 0) { + return 0; + } + + if (_parse_function_header(ctx, ps) == 0) { + return 0; + } + + return -1; +} + + +static int +_parse_function_prototype(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_header(ctx, &p) == 0) { + if (_parse_id(ctx, ctx->dict._void, &p) == 0) { + if (_parse_token(ctx, SL_PP_RPAREN, &p) == 0) { + _emit(ctx, &p.out, PARAMETER_NONE); + *ps = p; + return 0; + } + _error(ctx, "expected `)'"); + return -1; + } + } + + p = *ps; + if (_parse_function_declarator(ctx, &p) == 0) { + if (_parse_token(ctx, SL_PP_RPAREN, &p) == 0) { + _emit(ctx, &p.out, PARAMETER_NONE); + *ps = p; + return 0; + } + _error(ctx, "expected `)'"); + return -1; + } + + return -1; +} + + +static int +_parse_precision(struct parse_context *ctx, + struct parse_state *ps) +{ + int id; + unsigned int precision; + + if (ctx->input[ps->in].token != SL_PP_IDENTIFIER) { + return -1; + } + id = ctx->input[ps->in].data.identifier; + + if (id == ctx->dict.lowp) { + precision = PRECISION_LOW; + } else if (id == ctx->dict.mediump) { + precision = PRECISION_MEDIUM; + } else if (id == ctx->dict.highp) { + precision = PRECISION_HIGH; + } else { + return -1; + } + + _parse_token(ctx, SL_PP_IDENTIFIER, ps); + _emit(ctx, &ps->out, precision); + return 0; +} + + +static int +_parse_prectype(struct parse_context *ctx, + struct parse_state *ps) +{ + int id; + unsigned int type; + + if (ctx->input[ps->in].token != SL_PP_IDENTIFIER) { + return -1; + } + id = ctx->input[ps->in].data.identifier; + + if (id == ctx->dict._int) { + type = TYPE_SPECIFIER_INT; + } else if (id == ctx->dict._float) { + type = TYPE_SPECIFIER_FLOAT; + } else if (id == ctx->dict.sampler1D) { + type = TYPE_SPECIFIER_SAMPLER1D; + } else if (id == ctx->dict.sampler2D) { + type = TYPE_SPECIFIER_SAMPLER2D; + } else if (id == ctx->dict.sampler3D) { + type = TYPE_SPECIFIER_SAMPLER3D; + } else if (id == ctx->dict.samplerCube) { + type = TYPE_SPECIFIER_SAMPLERCUBE; + } else if (id == ctx->dict.sampler1DShadow) { + type = TYPE_SPECIFIER_SAMPLER1DSHADOW; + } else if (id == ctx->dict.sampler2DShadow) { + type = TYPE_SPECIFIER_SAMPLER2DSHADOW; + } else if (id == ctx->dict.sampler2DRect) { + type = TYPE_SPECIFIER_SAMPLER2DRECT; + } else if (id == ctx->dict.sampler2DRectShadow) { + type = TYPE_SPECIFIER_SAMPLER2DRECTSHADOW; + } else { + return -1; + } + + _parse_token(ctx, SL_PP_IDENTIFIER, ps); + _emit(ctx, &ps->out, type); + return 0; +} + + +static int +_parse_precision_stmt(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_id(ctx, ctx->dict.precision, &p)) { + return -1; + } + if (_parse_precision(ctx, &p)) { + return -1; + } + if (_parse_prectype(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_floatconstant(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_PUSH_FLOAT); + if (_parse_float(ctx, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_intconstant(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_PUSH_INT); + if (_parse_uint(ctx, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_boolconstant(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_id(ctx, ctx->dict._false, ps) == 0) { + _emit(ctx, &ps->out, OP_PUSH_BOOL); + _emit(ctx, &ps->out, 2); /* radix */ + _emit(ctx, &ps->out, '0'); + _emit(ctx, &ps->out, '\0'); + return 0; + } + + if (_parse_id(ctx, ctx->dict._true, ps) == 0) { + _emit(ctx, &ps->out, OP_PUSH_BOOL); + _emit(ctx, &ps->out, 2); /* radix */ + _emit(ctx, &ps->out, '1'); + _emit(ctx, &ps->out, '\0'); + return 0; + } + + return -1; +} + + +static int +_parse_variable_identifier(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_PUSH_IDENTIFIER); + if (_parse_identifier(ctx, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_primary_expression(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + + if (_parse_floatconstant(ctx, ps) == 0) { + return 0; + } + if (_parse_boolconstant(ctx, ps) == 0) { + return 0; + } + if (_parse_intconstant(ctx, ps) == 0) { + return 0; + } + if (_parse_variable_identifier(ctx, ps) == 0) { + return 0; + } + + p = *ps; + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + return -1; + } + if (_parse_expression(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_RPAREN, &p)) { + return -1; + } + + *ps = p; + return 0; +} + + +static int +_parse_asm_argument(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_variable_identifier(ctx, ps) == 0) { + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_DOT, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_FIELD); + if (_parse_identifier(ctx, &p)) { + return 0; + } + *ps = p; + return 0; + } + + if (_parse_floatconstant(ctx, ps) == 0) { + return 0; + } + + return -1; +} + + +static int +_parse_asm_arguments(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_asm_argument(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + + for (;;) { + *ps = p; + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + return 0; + } + if (_parse_asm_argument(ctx, &p)) { + return 0; + } + _emit(ctx, &p.out, OP_END); + } +} + + +static int +_parse_asm_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_id(ctx, ctx->dict.___asm, &p)) { + return -1; + } + if (_parse_identifier(ctx, &p)) { + return -1; + } + if (_parse_asm_arguments(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_selection_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_IF); + if (_parse_id(ctx, ctx->dict._if, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + _error(ctx, "expected `('"); + return -1; + } + if (_parse_expression(ctx, &p)) { + _error(ctx, "expected an expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RPAREN, &p)) { + _error(ctx, "expected `)'"); + return -1; + } + _emit(ctx, &p.out, OP_END); + if (_parse_statement(ctx, &p)) { + return -1; + } + + *ps = p; + if (_parse_id(ctx, ctx->dict._else, &p) == 0) { + if (_parse_statement(ctx, &p) == 0) { + *ps = p; + return 0; + } + } + + _emit(ctx, &ps->out, OP_EXPRESSION); + _emit(ctx, &ps->out, OP_PUSH_VOID); + _emit(ctx, &ps->out, OP_END); + return 0; +} + + +static int +_parse_expression_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_expression(ctx, &p)) { + _emit(ctx, &p.out, OP_PUSH_VOID); + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_for_init_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, OP_EXPRESSION); + + if (_parse_expression_statement(ctx, &p) == 0) { + *ps = p; + return 0; + } + + if (_parse_declaration(ctx, &p) == 0) { + _update(ctx, e, OP_DECLARE); + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_initializer(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_assignment_expression(ctx, ps) == 0) { + _emit(ctx, &ps->out, OP_END); + return 0; + } + return -1; +} + + +static int +_parse_condition_initializer(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + _emit(ctx, &p.out, OP_DECLARE); + _emit(ctx, &p.out, DECLARATION_INIT_DECLARATOR_LIST); + if (_parse_fully_specified_type(ctx, &p)) { + return -1; + } + _emit(ctx, &p.out, VARIABLE_IDENTIFIER); + if (_parse_identifier(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_ASSIGN, &p)) { + _error(ctx, "expected `='"); + return -1; + } + _emit(ctx, &p.out, VARIABLE_INITIALIZER); + if (_parse_initializer(ctx, &p)) { + _error(ctx, "expected an initialiser"); + return -1; + } + _emit(ctx, &p.out, DECLARATOR_NONE); + *ps = p; + return 0; +} + + +static int +_parse_condition(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + + if (_parse_condition_initializer(ctx, ps) == 0) { + return 0; + } + + p = *ps; + _emit(ctx, &p.out, OP_EXPRESSION); + if (_parse_expression(ctx, &p) == 0) { + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_for_rest_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_condition(ctx, &p)) { + _emit(ctx, &p.out, OP_EXPRESSION); + _emit(ctx, &p.out, OP_PUSH_BOOL); + _emit(ctx, &p.out, 2); + _emit(ctx, &p.out, '1'); + _emit(ctx, &p.out, '\0'); + _emit(ctx, &p.out, OP_END); + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + if (_parse_expression(ctx, &p)) { + _emit(ctx, &p.out, OP_PUSH_VOID); + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_iteration_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_id(ctx, ctx->dict._while, &p) == 0) { + _emit(ctx, &p.out, OP_WHILE); + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + _error(ctx, "expected `('"); + return -1; + } + if (_parse_condition(ctx, &p)) { + _error(ctx, "expected an expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RPAREN, &p)) { + _error(ctx, "expected `)'"); + return -1; + } + if (_parse_statement(ctx, &p)) { + return -1; + } + *ps = p; + return 0; + } + + if (_parse_id(ctx, ctx->dict._do, &p) == 0) { + _emit(ctx, &p.out, OP_DO); + if (_parse_statement(ctx, &p)) { + return -1; + } + if (_parse_id(ctx, ctx->dict._while, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + _error(ctx, "expected `('"); + return -1; + } + if (_parse_expression(ctx, &p)) { + _error(ctx, "expected an expression"); + return -1; + } + if (_parse_token(ctx, SL_PP_RPAREN, &p)) { + _error(ctx, "expected `)'"); + return -1; + } + _emit(ctx, &p.out, OP_END); + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + _error(ctx, "expected `;'"); + return -1; + } + *ps = p; + return 0; + } + + if (_parse_id(ctx, ctx->dict._for, &p) == 0) { + _emit(ctx, &p.out, OP_FOR); + if (_parse_token(ctx, SL_PP_LPAREN, &p)) { + _error(ctx, "expected `('"); + return -1; + } + if (_parse_for_init_statement(ctx, &p)) { + return -1; + } + if (_parse_for_rest_statement(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_RPAREN, &p)) { + _error(ctx, "expected `)'"); + return -1; + } + if (_parse_statement(ctx, &p)) { + return -1; + } + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_jump_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, 0); + + if (_parse_id(ctx, ctx->dict._continue, &p) == 0) { + _update(ctx, e, OP_CONTINUE); + } else if (_parse_id(ctx, ctx->dict._break, &p) == 0) { + _update(ctx, e, OP_BREAK); + } else if (_parse_id(ctx, ctx->dict._return, &p) == 0) { + _update(ctx, e, OP_RETURN); + if (_parse_expression(ctx, &p)) { + _emit(ctx, &p.out, OP_PUSH_VOID); + } + _emit(ctx, &p.out, OP_END); + } else if (ctx->shader_type == 1 && _parse_id(ctx, ctx->dict.discard, &p) == 0) { + _update(ctx, e, OP_DISCARD); + } else { + return -1; + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_simple_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p; + unsigned int e; + + if (_parse_selection_statement(ctx, ps) == 0) { + return 0; + } + + if (_parse_iteration_statement(ctx, ps) == 0) { + return 0; + } + + if (_parse_jump_statement(ctx, ps) == 0) { + return 0; + } + + p = *ps; + e = _emit(ctx, &p.out, OP_EXPRESSION); + if (_parse_expression_statement(ctx, &p) == 0) { + *ps = p; + return 0; + } + + if (_parse_precision_stmt(ctx, &p) == 0) { + _update(ctx, e, OP_PRECISION); + *ps = p; + return 0; + } + + if (ctx->parsing_builtin && _parse_asm_statement(ctx, &p) == 0) { + _update(ctx, e, OP_ASM); + *ps = p; + return 0; + } + + if (_parse_declaration(ctx, &p) == 0) { + _update(ctx, e, OP_DECLARE); + *ps = p; + return 0; + } + + return -1; +} + + +static int +_parse_compound_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACE, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_BLOCK_BEGIN_NEW_SCOPE); + _parse_statement_list(ctx, &p); + if (_parse_token(ctx, SL_PP_RBRACE, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_statement(struct parse_context *ctx, + struct parse_state *ps) +{ + if (_parse_compound_statement(ctx, ps) == 0) { + return 0; + } + + if (_parse_simple_statement(ctx, ps) == 0) { + return 0; + } + + return -1; +} + + +static int +_parse_statement_list(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_statement(ctx, &p)) { + return -1; + } + + for (;;) { + *ps = p; + if (_parse_statement(ctx, &p)) { + return 0; + } + } +} + + +static int +_parse_compound_statement_no_new_scope(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACE, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_BLOCK_BEGIN_NO_NEW_SCOPE); + _parse_statement_list(ctx, &p); + if (_parse_token(ctx, SL_PP_RBRACE, &p)) { + return -1; + } + _emit(ctx, &p.out, OP_END); + *ps = p; + return 0; +} + + +static int +_parse_function_definition(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_function_prototype(ctx, &p)) { + return -1; + } + if (_parse_compound_statement_no_new_scope(ctx, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_invariant_stmt(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_id(ctx, ctx->dict.invariant, &p)) { + return -1; + } + if (_parse_identifier(ctx, &p)) { + return -1; + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_single_declaration(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e; + + if (_parse_fully_specified_type(ctx, &p)) { + return -1; + } + + e = _emit(ctx, &p.out, VARIABLE_IDENTIFIER); + if (_parse_identifier(ctx, &p)) { + _update(ctx, e, VARIABLE_NONE); + *ps = p; + return 0; + } + + e = _emit(ctx, &p.out, VARIABLE_NONE); + *ps = p; + + if (_parse_token(ctx, SL_PP_ASSIGN, &p) == 0) { + _update(ctx, e, VARIABLE_INITIALIZER); + if (_parse_initializer(ctx, &p) == 0) { + *ps = p; + return 0; + } + _error(ctx, "expected an initialiser"); + return -1; + } + p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p) == 0) { + if (_parse_constant_expression(ctx, &p)) { + _update(ctx, e, VARIABLE_ARRAY_UNKNOWN); + } else { + _update(ctx, e, VARIABLE_ARRAY_EXPLICIT); + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p) == 0) { + *ps = p; + return 0; + } + _error(ctx, "expected `]'"); + return -1; + } + return 0; +} + + +static int +_parse_init_declarator_list(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + + if (_parse_single_declaration(ctx, &p)) { + return -1; + } + + for (;;) { + unsigned int e; + + *ps = p; + if (_parse_token(ctx, SL_PP_COMMA, &p)) { + break; + } + _emit(ctx, &p.out, DECLARATOR_NEXT); + _emit(ctx, &p.out, VARIABLE_IDENTIFIER); + if (_parse_identifier(ctx, &p)) { + break; + } + + e = _emit(ctx, &p.out, VARIABLE_NONE); + *ps = p; + + if (_parse_token(ctx, SL_PP_ASSIGN, &p) == 0) { + if (_parse_initializer(ctx, &p) == 0) { + _update(ctx, e, VARIABLE_INITIALIZER); + *ps = p; + continue; + } + _error(ctx, "expected an initialiser"); + break; + } + p = *ps; + + if (_parse_token(ctx, SL_PP_LBRACKET, &p) == 0) { + unsigned int arr; + + if (_parse_constant_expression(ctx, &p)) { + arr = VARIABLE_ARRAY_UNKNOWN; + } else { + arr = VARIABLE_ARRAY_EXPLICIT; + } + if (_parse_token(ctx, SL_PP_RBRACKET, &p) == 0) { + _update(ctx, e, arr); + *ps = p; + continue; + } + _error(ctx, "expected `]'"); + break; + } + p = *ps; + } + + _emit(ctx, &ps->out, DECLARATOR_NONE); + return 0; +} + + +static int +_parse_declaration(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, DECLARATION_FUNCTION_PROTOTYPE); + + if (_parse_function_prototype(ctx, &p)) { + if (_parse_init_declarator_list(ctx, &p)) { + return -1; + } + _update(ctx, e, DECLARATION_INIT_DECLARATOR_LIST); + } + if (_parse_token(ctx, SL_PP_SEMICOLON, &p)) { + _error(ctx, "expected `;'"); + return -1; + } + *ps = p; + return 0; +} + + +static int +_parse_external_declaration(struct parse_context *ctx, + struct parse_state *ps) +{ + struct parse_state p = *ps; + unsigned int e = _emit(ctx, &p.out, 0); + + if (_parse_precision_stmt(ctx, &p) == 0) { + _update(ctx, e, DEFAULT_PRECISION); + *ps = p; + return 0; + } + + if (_parse_function_definition(ctx, &p) == 0) { + _update(ctx, e, EXTERNAL_FUNCTION_DEFINITION); + *ps = p; + return 0; + } + + if (_parse_invariant_stmt(ctx, &p) == 0) { + _update(ctx, e, INVARIANT_STMT); + *ps = p; + return 0; + } + + if (_parse_declaration(ctx, &p) == 0) { + _update(ctx, e, EXTERNAL_DECLARATION); + *ps = p; + return 0; + } + + _error(ctx, "expected an identifier"); + return -1; +} + + +static int +_parse_translation_unit(struct parse_context *ctx, + struct parse_state *ps) +{ + _emit(ctx, &ps->out, REVISION); + if (_parse_external_declaration(ctx, ps)) { + return -1; + } + while (_parse_external_declaration(ctx, ps) == 0) { + } + _emit(ctx, &ps->out, EXTERNAL_NULL); + if (_parse_token(ctx, SL_PP_EOF, ps)) { + return -1; + } + return 0; +} + + +#define ADD_NAME_STR(CTX, NAME, STR)\ + do {\ + (CTX).dict.NAME = sl_pp_context_add_unique_str((CTX).context, (STR));\ + if ((CTX).dict.NAME == -1) {\ + return -1;\ + }\ + } while (0) + +#define ADD_NAME(CTX, NAME) ADD_NAME_STR(CTX, NAME, #NAME) + + +int +sl_cl_compile(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int shader_type, + unsigned int parsing_builtin, + unsigned char **output, + unsigned int *cboutput, + char *error, + unsigned int cberror) +{ + struct parse_context ctx; + struct parse_state ps; + + ctx.context = context; + ctx.input = input; + + ADD_NAME_STR(ctx, _void, "void"); + ADD_NAME_STR(ctx, _float, "float"); + ADD_NAME_STR(ctx, _int, "int"); + ADD_NAME_STR(ctx, _bool, "bool"); + ADD_NAME(ctx, vec2); + ADD_NAME(ctx, vec3); + ADD_NAME(ctx, vec4); + ADD_NAME(ctx, bvec2); + ADD_NAME(ctx, bvec3); + ADD_NAME(ctx, bvec4); + ADD_NAME(ctx, ivec2); + ADD_NAME(ctx, ivec3); + ADD_NAME(ctx, ivec4); + ADD_NAME(ctx, mat2); + ADD_NAME(ctx, mat3); + ADD_NAME(ctx, mat4); + ADD_NAME(ctx, mat2x3); + ADD_NAME(ctx, mat3x2); + ADD_NAME(ctx, mat2x4); + ADD_NAME(ctx, mat4x2); + ADD_NAME(ctx, mat3x4); + ADD_NAME(ctx, mat4x3); + ADD_NAME(ctx, sampler1D); + ADD_NAME(ctx, sampler2D); + ADD_NAME(ctx, sampler3D); + ADD_NAME(ctx, samplerCube); + ADD_NAME(ctx, sampler1DShadow); + ADD_NAME(ctx, sampler2DShadow); + ADD_NAME(ctx, sampler2DRect); + ADD_NAME(ctx, sampler2DRectShadow); + + ADD_NAME(ctx, invariant); + + ADD_NAME(ctx, centroid); + + ADD_NAME(ctx, precision); + ADD_NAME(ctx, lowp); + ADD_NAME(ctx, mediump); + ADD_NAME(ctx, highp); + + ADD_NAME_STR(ctx, _const, "const"); + ADD_NAME(ctx, attribute); + ADD_NAME(ctx, varying); + ADD_NAME(ctx, uniform); + ADD_NAME(ctx, __fixed_output); + ADD_NAME(ctx, __fixed_input); + + ADD_NAME(ctx, in); + ADD_NAME(ctx, out); + ADD_NAME(ctx, inout); + + ADD_NAME_STR(ctx, _struct, "struct"); + + ADD_NAME(ctx, __constructor); + ADD_NAME(ctx, __operator); + ADD_NAME_STR(ctx, ___asm, "__asm"); + + ADD_NAME_STR(ctx, _if, "if"); + ADD_NAME_STR(ctx, _else, "else"); + ADD_NAME_STR(ctx, _for, "for"); + ADD_NAME_STR(ctx, _while, "while"); + ADD_NAME_STR(ctx, _do, "do"); + + ADD_NAME_STR(ctx, _continue, "continue"); + ADD_NAME_STR(ctx, _break, "break"); + ADD_NAME_STR(ctx, _return, "return"); + ADD_NAME(ctx, discard); + + ADD_NAME_STR(ctx, _false, "false"); + ADD_NAME_STR(ctx, _true, "true"); + + ctx.out_buf = NULL; + ctx.out_cap = 0; + + ctx.shader_type = shader_type; + ctx.parsing_builtin = 1; + + ctx.error[0] = '\0'; + + ps.in = 0; + ps.out = 0; + + if (_parse_translation_unit(&ctx, &ps)) { + strncpy(error, ctx.error, cberror); + return -1; + } + + *output = ctx.out_buf; + *cboutput = ps.out; + return 0; +} diff --git a/src/glsl/cl/sl_cl_parse.h b/src/glsl/cl/sl_cl_parse.h new file mode 100644 index 00000000000..23a0d5fee00 --- /dev/null +++ b/src/glsl/cl/sl_cl_parse.h @@ -0,0 +1,41 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_CL_PARSE_H +#define SL_CL_PARSE_H + +int +sl_cl_compile(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int shader_type, + unsigned int parsing_builtin, + unsigned char **output, + unsigned int *cboutput, + char *error, + unsigned int cberror); + +#endif /* SL_CL_PARSE_H */ diff --git a/src/glsl/pp/Makefile b/src/glsl/pp/Makefile new file mode 100644 index 00000000000..819079f6258 --- /dev/null +++ b/src/glsl/pp/Makefile @@ -0,0 +1,26 @@ +#src/glsl/pp/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBNAME = glslpp + +C_SOURCES = \ + sl_pp_context.c \ + sl_pp_define.c \ + sl_pp_dict.c \ + sl_pp_error.c \ + sl_pp_expression.c \ + sl_pp_extension.c \ + sl_pp_if.c \ + sl_pp_line.c \ + sl_pp_macro.c \ + sl_pp_pragma.c \ + sl_pp_process.c \ + sl_pp_purify.c \ + sl_pp_token.c \ + sl_pp_version.c + +include ../Makefile.template + diff --git a/src/glsl/pp/sl_pp_context.c b/src/glsl/pp/sl_pp_context.c new file mode 100644 index 00000000000..afc1b84d16a --- /dev/null +++ b/src/glsl/pp/sl_pp_context.c @@ -0,0 +1,155 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_public.h" +#include "sl_pp_context.h" + + +struct sl_pp_context * +sl_pp_context_create(void) +{ + struct sl_pp_context *context; + + context = calloc(1, sizeof(struct sl_pp_context)); + if (!context) { + return NULL; + } + + if (sl_pp_dict_init(context)) { + sl_pp_context_destroy(context); + return NULL; + } + + context->getc_buf = malloc(64 * sizeof(char)); + if (!context->getc_buf) { + sl_pp_context_destroy(context); + return NULL; + } + + context->macro_tail = &context->macro; + context->if_ptr = SL_PP_MAX_IF_NESTING; + context->if_value = 1; + memset(context->error_msg, 0, sizeof(context->error_msg)); + context->line = 1; + context->file = 0; + + return context; +} + +void +sl_pp_context_destroy(struct sl_pp_context *context) +{ + if (context) { + free(context->cstr_pool); + sl_pp_macro_free(context->macro); + free(context->getc_buf); + free(context); + } +} + +const char * +sl_pp_context_error_message(const struct sl_pp_context *context) +{ + return context->error_msg; +} + +int +sl_pp_context_add_predefined(struct sl_pp_context *context, + const char *name, + const char *value) +{ + struct sl_pp_predefined pre; + + if (context->num_predefined == SL_PP_MAX_PREDEFINED) { + return -1; + } + + pre.name = sl_pp_context_add_unique_str(context, name); + if (pre.name == -1) { + return -1; + } + + pre.value = sl_pp_context_add_unique_str(context, value); + if (pre.value == -1) { + return -1; + } + + context->predefined[context->num_predefined++] = pre; + return 0; +} + +int +sl_pp_context_add_unique_str(struct sl_pp_context *context, + const char *str) +{ + unsigned int size; + unsigned int offset = 0; + + size = strlen(str) + 1; + + /* Find out if this is a unique string. */ + while (offset < context->cstr_pool_len) { + const char *str2; + unsigned int size2; + + str2 = &context->cstr_pool[offset]; + size2 = strlen(str2) + 1; + if (size == size2 && !memcmp(str, str2, size - 1)) { + return offset; + } + + offset += size2; + } + + if (context->cstr_pool_len + size > context->cstr_pool_max) { + context->cstr_pool_max = (context->cstr_pool_len + size + 0xffff) & ~0xffff; + context->cstr_pool = realloc(context->cstr_pool, context->cstr_pool_max); + } + + if (!context->cstr_pool) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + offset = context->cstr_pool_len; + memcpy(&context->cstr_pool[offset], str, size); + context->cstr_pool_len += size; + + return offset; +} + +const char * +sl_pp_context_cstr(const struct sl_pp_context *context, + int offset) +{ + if (offset == -1) { + return NULL; + } + return &context->cstr_pool[offset]; +} diff --git a/src/glsl/pp/sl_pp_context.h b/src/glsl/pp/sl_pp_context.h new file mode 100644 index 00000000000..d95d29e275c --- /dev/null +++ b/src/glsl/pp/sl_pp_context.h @@ -0,0 +1,85 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_CONTEXT_H +#define SL_PP_CONTEXT_H + +#include "sl_pp_dict.h" +#include "sl_pp_macro.h" +#include "sl_pp_purify.h" + + +#define SL_PP_MAX_IF_NESTING 64 + +#define SL_PP_MAX_ERROR_MSG 1024 + +#define SL_PP_MAX_EXTENSIONS 16 + +#define SL_PP_MAX_PREDEFINED 16 + +struct sl_pp_extension { + int name; /*< VENDOR_extension_name */ + int name_string; /*< GL_VENDOR_extension_name */ +}; + +struct sl_pp_predefined { + int name; + int value; +}; + +struct sl_pp_context { + char *cstr_pool; + unsigned int cstr_pool_max; + unsigned int cstr_pool_len; + struct sl_pp_dict dict; + + struct sl_pp_macro *macro; + struct sl_pp_macro **macro_tail; + + struct sl_pp_extension extensions[SL_PP_MAX_EXTENSIONS]; + unsigned int num_extensions; + + struct sl_pp_predefined predefined[SL_PP_MAX_PREDEFINED]; + unsigned int num_predefined; + + unsigned int if_stack[SL_PP_MAX_IF_NESTING]; + unsigned int if_ptr; + unsigned int if_value; + + char error_msg[SL_PP_MAX_ERROR_MSG]; + + unsigned int line; + unsigned int file; + + struct sl_pp_purify_state pure; + + char *getc_buf; + unsigned int getc_buf_size; + unsigned int getc_buf_capacity; +}; + +#endif /* SL_PP_CONTEXT_H */ diff --git a/src/glsl/pp/sl_pp_define.c b/src/glsl/pp/sl_pp_define.c new file mode 100644 index 00000000000..e004c9f95b9 --- /dev/null +++ b/src/glsl/pp/sl_pp_define.c @@ -0,0 +1,237 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_process.h" +#include "sl_pp_public.h" + + +static void +skip_whitespace(const struct sl_pp_token_info *input, + unsigned int *first, + unsigned int last) +{ + while (*first < last && input[*first].token == SL_PP_WHITESPACE) { + (*first)++; + } +} + + +static int +_parse_formal_args(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *first, + unsigned int last, + struct sl_pp_macro *macro) +{ + struct sl_pp_macro_formal_arg **arg; + + macro->num_args = 0; + + skip_whitespace(input, first, last); + if (*first < last) { + if (input[*first].token == SL_PP_RPAREN) { + (*first)++; + return 0; + } + } else { + strcpy(context->error_msg, "expected either macro formal argument or `)'"); + return -1; + } + + arg = ¯o->arg; + + for (;;) { + if (*first < last && input[*first].token != SL_PP_IDENTIFIER) { + strcpy(context->error_msg, "expected macro formal argument"); + return -1; + } + + *arg = malloc(sizeof(struct sl_pp_macro_formal_arg)); + if (!*arg) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + (**arg).name = input[*first].data.identifier; + (*first)++; + + (**arg).next = NULL; + arg = &(**arg).next; + + macro->num_args++; + + skip_whitespace(input, first, last); + if (*first < last) { + if (input[*first].token == SL_PP_COMMA) { + (*first)++; + skip_whitespace(input, first, last); + } else if (input[*first].token == SL_PP_RPAREN) { + (*first)++; + return 0; + } else { + strcpy(context->error_msg, "expected either `,' or `)'"); + return -1; + } + } else { + strcpy(context->error_msg, "expected either `,' or `)'"); + return -1; + } + } + + /* Should not gete here. */ +} + + +int +sl_pp_process_define(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + int macro_name = -1; + struct sl_pp_macro *macro; + unsigned int i; + unsigned int body_len; + unsigned int j; + + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + macro_name = input[first].data.identifier; + first++; + } + if (macro_name == -1) { + strcpy(context->error_msg, "expected macro name"); + return -1; + } + + /* Check for reserved macro names */ + { + const char *name = sl_pp_context_cstr(context, macro_name); + + if (strstr(name, "__")) { + strcpy(context->error_msg, "macro names containing `__' are reserved"); + return 1; + } + if (name[0] == 'G' && name[1] == 'L' && name[2] == '_') { + strcpy(context->error_msg, "macro names prefixed with `GL_' are reserved"); + return 1; + } + } + + for (macro = context->macro; macro; macro = macro->next) { + if (macro->name == macro_name) { + break; + } + } + + if (!macro) { + macro = sl_pp_macro_new(); + if (!macro) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + *context->macro_tail = macro; + context->macro_tail = ¯o->next; + } else { + sl_pp_macro_reset(macro); + } + + macro->name = macro_name; + + /* + * If there is no whitespace between macro name and left paren, a macro + * formal argument list follows. This is the only place where the presence + * of a whitespace matters and it's the only reason why we are dealing + * with whitespace at this level. + */ + if (first < last && input[first].token == SL_PP_LPAREN) { + first++; + if (_parse_formal_args(context, input, &first, last, macro)) { + return -1; + } + } + + /* Calculate body size, trim out whitespace, make room for EOF. */ + body_len = 1; + for (i = first; i < last; i++) { + if (input[i].token != SL_PP_WHITESPACE) { + body_len++; + } + } + + macro->body = malloc(sizeof(struct sl_pp_token_info) * body_len); + if (!macro->body) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + for (j = 0, i = first; i < last; i++) { + if (input[i].token != SL_PP_WHITESPACE) { + macro->body[j++] = input[i]; + } + } + macro->body[j++].token = SL_PP_EOF; + + return 0; +} + + +int +sl_pp_process_undef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + int macro_name = -1; + struct sl_pp_macro **pmacro; + struct sl_pp_macro *macro; + + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + macro_name = input[first].data.identifier; + } + if (macro_name == -1) { + return 0; + } + + for (pmacro = &context->macro; *pmacro; pmacro = &(**pmacro).next) { + if ((**pmacro).name == macro_name) { + break; + } + } + if (!*pmacro) { + return 0; + } + + macro = *pmacro; + *pmacro = macro->next; + macro->next = NULL; + sl_pp_macro_free(macro); + + return 0; +} diff --git a/src/glsl/pp/sl_pp_dict.c b/src/glsl/pp/sl_pp_dict.c new file mode 100644 index 00000000000..062139e6ac0 --- /dev/null +++ b/src/glsl/pp/sl_pp_dict.c @@ -0,0 +1,85 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include "sl_pp_public.h" +#include "sl_pp_context.h" +#include "sl_pp_dict.h" + + +#define ADD_NAME_STR(CTX, NAME, STR)\ + do {\ + (CTX)->dict.NAME = sl_pp_context_add_unique_str((CTX), (STR));\ + if ((CTX)->dict.NAME == -1) {\ + return -1;\ + }\ + } while (0) + +#define ADD_NAME(CTX, NAME) ADD_NAME_STR(CTX, NAME, #NAME) + + +int +sl_pp_dict_init(struct sl_pp_context *context) +{ + ADD_NAME(context, all); + + ADD_NAME(context, require); + ADD_NAME(context, enable); + ADD_NAME(context, warn); + ADD_NAME(context, disable); + + ADD_NAME(context, defined); + + ADD_NAME_STR(context, ___LINE__, "__LINE__"); + ADD_NAME_STR(context, ___FILE__, "__FILE__"); + ADD_NAME_STR(context, ___VERSION__, "__VERSION__"); + + ADD_NAME(context, optimize); + ADD_NAME(context, debug); + + ADD_NAME(context, off); + ADD_NAME(context, on); + + ADD_NAME(context, define); + ADD_NAME(context, elif); + ADD_NAME_STR(context, _else, "else"); + ADD_NAME(context, endif); + ADD_NAME(context, error); + ADD_NAME(context, extension); + ADD_NAME_STR(context, _if, "if"); + ADD_NAME(context, ifdef); + ADD_NAME(context, ifndef); + ADD_NAME(context, line); + ADD_NAME(context, pragma); + ADD_NAME(context, undef); + + ADD_NAME(context, version); + + ADD_NAME_STR(context, _0, "0"); + ADD_NAME_STR(context, _1, "1"); + + return 0; +} diff --git a/src/glsl/pp/sl_pp_dict.h b/src/glsl/pp/sl_pp_dict.h new file mode 100644 index 00000000000..875217bd309 --- /dev/null +++ b/src/glsl/pp/sl_pp_dict.h @@ -0,0 +1,77 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_DICT_H +#define SL_PP_DICT_H + + +struct sl_pp_context; + +struct sl_pp_dict { + int all; + + int require; + int enable; + int warn; + int disable; + + int defined; + + int ___LINE__; + int ___FILE__; + int ___VERSION__; + + int optimize; + int debug; + + int off; + int on; + + int define; + int elif; + int _else; + int endif; + int error; + int extension; + int _if; + int ifdef; + int ifndef; + int line; + int pragma; + int undef; + + int version; + + int _0; + int _1; +}; + + +int +sl_pp_dict_init(struct sl_pp_context *context); + +#endif /* SL_PP_DICT_H */ diff --git a/src/glsl/pp/sl_pp_error.c b/src/glsl/pp/sl_pp_error.c new file mode 100644 index 00000000000..a9eeff98ba5 --- /dev/null +++ b/src/glsl/pp/sl_pp_error.c @@ -0,0 +1,269 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_process.h" +#include "sl_pp_public.h" + + +void +sl_pp_process_error(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + unsigned int out_len = 0; + unsigned int i; + + for (i = first; i < last; i++) { + const char *s = NULL; + char buf[2]; + + switch (input[i].token) { + case SL_PP_WHITESPACE: + s = " "; + break; + + case SL_PP_NEWLINE: + s = "\n"; + break; + + case SL_PP_HASH: + s = "#"; + break; + + case SL_PP_COMMA: + s = ","; + break; + + case SL_PP_SEMICOLON: + s = ";"; + break; + + case SL_PP_LBRACE: + s = "{"; + break; + + case SL_PP_RBRACE: + s = "}"; + break; + + case SL_PP_LPAREN: + s = "("; + break; + + case SL_PP_RPAREN: + s = ")"; + break; + + case SL_PP_LBRACKET: + s = "["; + break; + + case SL_PP_RBRACKET: + s = "]"; + break; + + case SL_PP_DOT: + s = "."; + break; + + case SL_PP_INCREMENT: + s = "++"; + break; + + case SL_PP_ADDASSIGN: + s = "+="; + break; + + case SL_PP_PLUS: + s = "+"; + break; + + case SL_PP_DECREMENT: + s = "--"; + break; + + case SL_PP_SUBASSIGN: + s = "-="; + break; + + case SL_PP_MINUS: + s = "-"; + break; + + case SL_PP_BITNOT: + s = "~"; + break; + + case SL_PP_NOTEQUAL: + s = "!="; + break; + + case SL_PP_NOT: + s = "!"; + break; + + case SL_PP_MULASSIGN: + s = "*="; + break; + + case SL_PP_STAR: + s = "*"; + break; + + case SL_PP_DIVASSIGN: + s = "/="; + break; + + case SL_PP_SLASH: + s = "/"; + break; + + case SL_PP_MODASSIGN: + s = "%="; + break; + + case SL_PP_MODULO: + s = "%"; + break; + + case SL_PP_LSHIFTASSIGN: + s = "<<="; + break; + + case SL_PP_LSHIFT: + s = "<<"; + break; + + case SL_PP_LESSEQUAL: + s = "<="; + break; + + case SL_PP_LESS: + s = "<"; + break; + + case SL_PP_RSHIFTASSIGN: + s = ">>="; + break; + + case SL_PP_RSHIFT: + s = ">>"; + break; + + case SL_PP_GREATEREQUAL: + s = ">="; + break; + + case SL_PP_GREATER: + s = ">"; + break; + + case SL_PP_EQUAL: + s = "=="; + break; + + case SL_PP_ASSIGN: + s = "="; + break; + + case SL_PP_AND: + s = "&&"; + break; + + case SL_PP_BITANDASSIGN: + s = "&="; + break; + + case SL_PP_BITAND: + s = "&"; + break; + + case SL_PP_XOR: + s = "^^"; + break; + + case SL_PP_BITXORASSIGN: + s = "^="; + break; + + case SL_PP_BITXOR: + s = "^"; + break; + + case SL_PP_OR: + s = "||"; + break; + + case SL_PP_BITORASSIGN: + s = "|="; + break; + + case SL_PP_BITOR: + s = "|"; + break; + + case SL_PP_QUESTION: + s = "?"; + break; + + case SL_PP_COLON: + s = ":"; + break; + + case SL_PP_IDENTIFIER: + s = sl_pp_context_cstr(context, input[i].data.identifier); + break; + + case SL_PP_UINT: + s = sl_pp_context_cstr(context, input[i].data._uint); + break; + + case SL_PP_FLOAT: + s = sl_pp_context_cstr(context, input[i].data._float); + break; + + case SL_PP_OTHER: + buf[0] = input[i].data.other; + buf[1] = '\0'; + s = buf; + break; + + default: + strcpy(context->error_msg, "internal error"); + return; + } + + while (*s != '\0' && out_len < sizeof(context->error_msg) - 1) { + context->error_msg[out_len++] = *s++; + } + } + + context->error_msg[out_len] = '\0'; +} diff --git a/src/glsl/pp/sl_pp_expression.c b/src/glsl/pp/sl_pp_expression.c new file mode 100644 index 00000000000..ec904787dd7 --- /dev/null +++ b/src/glsl/pp/sl_pp_expression.c @@ -0,0 +1,411 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_expression.h" +#include "sl_pp_public.h" + + +struct parse_context { + struct sl_pp_context *context; + const struct sl_pp_token_info *input; +}; + +static int +_parse_or(struct parse_context *ctx, + int *result); + +static int +_parse_primary(struct parse_context *ctx, + int *result) +{ + if (ctx->input->token == SL_PP_UINT) { + *result = atoi(sl_pp_context_cstr(ctx->context, ctx->input->data._uint)); + ctx->input++; + } else { + if (ctx->input->token != SL_PP_LPAREN) { + strcpy(ctx->context->error_msg, "expected `('"); + return -1; + } + ctx->input++; + if (_parse_or(ctx, result)) { + return -1; + } + if (ctx->input->token != SL_PP_RPAREN) { + strcpy(ctx->context->error_msg, "expected `)'"); + return -1; + } + ctx->input++; + } + return 0; +} + +static int +_parse_unary(struct parse_context *ctx, + int *result) +{ + if (!_parse_primary(ctx, result)) { + return 0; + } + + switch (ctx->input->token) { + case SL_PP_PLUS: + ctx->input++; + if (_parse_unary(ctx, result)) { + return -1; + } + *result = +*result; + break; + + case SL_PP_MINUS: + ctx->input++; + if (_parse_unary(ctx, result)) { + return -1; + } + *result = -*result; + break; + + case SL_PP_NOT: + ctx->input++; + if (_parse_unary(ctx, result)) { + return -1; + } + *result = !*result; + break; + + case SL_PP_BITNOT: + ctx->input++; + if (_parse_unary(ctx, result)) { + return -1; + } + *result = ~*result; + break; + + default: + return -1; + } + + return 0; +} + +static int +_parse_multiplicative(struct parse_context *ctx, + int *result) +{ + if (_parse_unary(ctx, result)) { + return -1; + } + for (;;) { + int right; + + switch (ctx->input->token) { + case SL_PP_STAR: + ctx->input++; + if (_parse_unary(ctx, &right)) { + return -1; + } + *result = *result * right; + break; + + case SL_PP_SLASH: + ctx->input++; + if (_parse_unary(ctx, &right)) { + return -1; + } + *result = *result / right; + break; + + case SL_PP_MODULO: + ctx->input++; + if (_parse_unary(ctx, &right)) { + return -1; + } + *result = *result % right; + break; + + default: + return 0; + } + } +} + +static int +_parse_additive(struct parse_context *ctx, + int *result) +{ + if (_parse_multiplicative(ctx, result)) { + return -1; + } + for (;;) { + int right; + + switch (ctx->input->token) { + case SL_PP_PLUS: + ctx->input++; + if (_parse_multiplicative(ctx, &right)) { + return -1; + } + *result = *result + right; + break; + + case SL_PP_MINUS: + ctx->input++; + if (_parse_multiplicative(ctx, &right)) { + return -1; + } + *result = *result - right; + break; + + default: + return 0; + } + } +} + +static int +_parse_shift(struct parse_context *ctx, + int *result) +{ + if (_parse_additive(ctx, result)) { + return -1; + } + for (;;) { + int right; + + switch (ctx->input->token) { + case SL_PP_LSHIFT: + ctx->input++; + if (_parse_additive(ctx, &right)) { + return -1; + } + *result = *result << right; + break; + + case SL_PP_RSHIFT: + ctx->input++; + if (_parse_additive(ctx, &right)) { + return -1; + } + *result = *result >> right; + break; + + default: + return 0; + } + } +} + +static int +_parse_relational(struct parse_context *ctx, + int *result) +{ + if (_parse_shift(ctx, result)) { + return -1; + } + for (;;) { + int right; + + switch (ctx->input->token) { + case SL_PP_LESSEQUAL: + ctx->input++; + if (_parse_shift(ctx, &right)) { + return -1; + } + *result = *result <= right; + break; + + case SL_PP_GREATEREQUAL: + ctx->input++; + if (_parse_shift(ctx, &right)) { + return -1; + } + *result = *result >= right; + break; + + case SL_PP_LESS: + ctx->input++; + if (_parse_shift(ctx, &right)) { + return -1; + } + *result = *result < right; + break; + + case SL_PP_GREATER: + ctx->input++; + if (_parse_shift(ctx, &right)) { + return -1; + } + *result = *result > right; + break; + + default: + return 0; + } + } +} + +static int +_parse_equality(struct parse_context *ctx, + int *result) +{ + if (_parse_relational(ctx, result)) { + return -1; + } + for (;;) { + int right; + + switch (ctx->input->token) { + case SL_PP_EQUAL: + ctx->input++; + if (_parse_relational(ctx, &right)) { + return -1; + } + *result = *result == right; + break; + + case SL_PP_NOTEQUAL: + ctx->input++; + if (_parse_relational(ctx, &right)) { + return -1; + } + *result = *result != right; + break; + + default: + return 0; + } + } +} + +static int +_parse_bitand(struct parse_context *ctx, + int *result) +{ + if (_parse_equality(ctx, result)) { + return -1; + } + while (ctx->input->token == SL_PP_BITAND) { + int right; + + ctx->input++; + if (_parse_equality(ctx, &right)) { + return -1; + } + *result = *result & right; + } + return 0; +} + +static int +_parse_xor(struct parse_context *ctx, + int *result) +{ + if (_parse_bitand(ctx, result)) { + return -1; + } + while (ctx->input->token == SL_PP_XOR) { + int right; + + ctx->input++; + if (_parse_bitand(ctx, &right)) { + return -1; + } + *result = *result ^ right; + } + return 0; +} + +static int +_parse_bitor(struct parse_context *ctx, + int *result) +{ + if (_parse_xor(ctx, result)) { + return -1; + } + while (ctx->input->token == SL_PP_BITOR) { + int right; + + ctx->input++; + if (_parse_xor(ctx, &right)) { + return -1; + } + *result = *result | right; + } + return 0; +} + +static int +_parse_and(struct parse_context *ctx, + int *result) +{ + if (_parse_bitor(ctx, result)) { + return -1; + } + while (ctx->input->token == SL_PP_AND) { + int right; + + ctx->input++; + if (_parse_bitor(ctx, &right)) { + return -1; + } + *result = *result && right; + } + return 0; +} + +static int +_parse_or(struct parse_context *ctx, + int *result) +{ + if (_parse_and(ctx, result)) { + return -1; + } + while (ctx->input->token == SL_PP_OR) { + int right; + + ctx->input++; + if (_parse_and(ctx, &right)) { + return -1; + } + *result = *result || right; + } + return 0; +} + +int +sl_pp_execute_expression(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + int *result) +{ + struct parse_context ctx; + + ctx.context = context; + ctx.input = input; + + return _parse_or(&ctx, result); +} diff --git a/src/glsl/pp/sl_pp_expression.h b/src/glsl/pp/sl_pp_expression.h new file mode 100644 index 00000000000..377d5b4cbd9 --- /dev/null +++ b/src/glsl/pp/sl_pp_expression.h @@ -0,0 +1,40 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_EXPRESSION_H +#define SL_PP_EXPRESSION_H + +#include "sl_pp_context.h" +#include "sl_pp_token.h" + + +int +sl_pp_execute_expression(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + int *result); + +#endif /* SL_PP_EXPRESSION_H */ diff --git a/src/glsl/pp/sl_pp_extension.c b/src/glsl/pp/sl_pp_extension.c new file mode 100644 index 00000000000..67b24404d4d --- /dev/null +++ b/src/glsl/pp/sl_pp_extension.c @@ -0,0 +1,170 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_process.h" +#include "sl_pp_public.h" + + +int +sl_pp_context_add_extension(struct sl_pp_context *context, + const char *name, + const char *name_string) +{ + struct sl_pp_extension ext; + + if (context->num_extensions == SL_PP_MAX_EXTENSIONS) { + return -1; + } + + ext.name = sl_pp_context_add_unique_str(context, name); + if (ext.name == -1) { + return -1; + } + + ext.name_string = sl_pp_context_add_unique_str(context, name_string); + if (ext.name_string == -1) { + return -1; + } + + context->extensions[context->num_extensions++] = ext; + return 0; +} + +int +sl_pp_process_extension(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *state) +{ + int extension_name = -1; + int behavior = -1; + struct sl_pp_token_info out; + + /* Grab the extension name. */ + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + extension_name = input[first].data.identifier; + first++; + } + if (extension_name == -1) { + strcpy(context->error_msg, "expected identifier after `#extension'"); + return -1; + } + + /* Make sure the extension is supported. */ + if (extension_name == context->dict.all) { + out.data.extension = extension_name; + } else { + unsigned int i; + + out.data.extension = -1; + for (i = 0; i < context->num_extensions; i++) { + if (extension_name == context->extensions[i].name_string) { + out.data.extension = extension_name; + break; + } + } + } + + /* Grab the colon separating the extension name and behavior. */ + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + if (first < last && input[first].token == SL_PP_COLON) { + first++; + } else { + strcpy(context->error_msg, "expected `:' after extension name"); + return -1; + } + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + + /* Grab the behavior name. */ + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + behavior = input[first].data.identifier; + first++; + } + if (behavior == -1) { + strcpy(context->error_msg, "expected identifier after `:'"); + return -1; + } + + if (behavior == context->dict.require) { + if (out.data.extension == -1) { + strcpy(context->error_msg, "the required extension is not supported"); + return -1; + } + if (out.data.extension == context->dict.all) { + strcpy(context->error_msg, "invalid behavior for `all' extension: `require'"); + return -1; + } + out.token = SL_PP_EXTENSION_REQUIRE; + } else if (behavior == context->dict.enable) { + if (out.data.extension == -1) { + /* Warning: the extension cannot be enabled. */ + return 0; + } + if (out.data.extension == context->dict.all) { + strcpy(context->error_msg, "invalid behavior for `all' extension: `enable'"); + return -1; + } + out.token = SL_PP_EXTENSION_ENABLE; + } else if (behavior == context->dict.warn) { + if (out.data.extension == -1) { + /* Warning: the extension is not supported. */ + return 0; + } + out.token = SL_PP_EXTENSION_WARN; + } else if (behavior == context->dict.disable) { + if (out.data.extension == -1) { + /* Warning: the extension is not supported. */ + return 0; + } + out.token = SL_PP_EXTENSION_DISABLE; + } else { + strcpy(context->error_msg, "unrecognised behavior name"); + return -1; + } + + /* Grab the end of line. */ + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + if (first < last) { + strcpy(context->error_msg, "expected end of line after behavior name"); + return -1; + } + + if (sl_pp_process_out(state, &out)) { + return -1; + } + + return 0; +} diff --git a/src/glsl/pp/sl_pp_if.c b/src/glsl/pp/sl_pp_if.c new file mode 100644 index 00000000000..6610bc69f3c --- /dev/null +++ b/src/glsl/pp/sl_pp_if.c @@ -0,0 +1,349 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_expression.h" +#include "sl_pp_process.h" + + +static void +skip_whitespace(const struct sl_pp_token_info *input, + unsigned int *pi) +{ + while (input[*pi].token == SL_PP_WHITESPACE) { + (*pi)++; + } +} + +static int +_parse_defined(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *pi, + struct sl_pp_process_state *state) +{ + int parens = 0; + int macro_name; + struct sl_pp_macro *macro; + int defined = 0; + struct sl_pp_token_info result; + + skip_whitespace(input, pi); + if (input[*pi].token == SL_PP_LPAREN) { + (*pi)++; + skip_whitespace(input, pi); + parens = 1; + } + + if (input[*pi].token != SL_PP_IDENTIFIER) { + strcpy(context->error_msg, "expected an identifier"); + return -1; + } + + macro_name = input[*pi].data.identifier; + for (macro = context->macro; macro; macro = macro->next) { + if (macro->name == macro_name) { + defined = 1; + break; + } + } + (*pi)++; + + if (parens) { + skip_whitespace(input, pi); + if (input[*pi].token != SL_PP_RPAREN) { + strcpy(context->error_msg, "expected `)'"); + return -1; + } + (*pi)++; + } + + result.token = SL_PP_UINT; + result.data._uint = (defined ? context->dict._1 : context->dict._0); + + if (sl_pp_process_out(state, &result)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + return 0; +} + +static unsigned int +_evaluate_if_stack(struct sl_pp_context *context) +{ + unsigned int i; + + for (i = context->if_ptr; i < SL_PP_MAX_IF_NESTING; i++) { + if (!(context->if_stack[i] & 1)) { + return 0; + } + } + return 1; +} + +static int +_parse_if(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + unsigned int i; + struct sl_pp_process_state state; + struct sl_pp_token_info eof; + int result; + + if (!context->if_ptr) { + strcpy(context->error_msg, "`#if' nesting too deep"); + return -1; + } + + memset(&state, 0, sizeof(state)); + for (i = first; i < last;) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_IDENTIFIER: + if (input[i].data.identifier == context->dict.defined) { + i++; + if (_parse_defined(context, input, &i, &state)) { + free(state.out); + return -1; + } + } else { + if (sl_pp_macro_expand(context, input, &i, NULL, &state, sl_pp_macro_expand_unknown_to_0)) { + free(state.out); + return -1; + } + } + break; + + default: + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(state.out); + return -1; + } + i++; + } + } + + eof.token = SL_PP_EOF; + if (sl_pp_process_out(&state, &eof)) { + strcpy(context->error_msg, "out of memory"); + free(state.out); + return -1; + } + + if (sl_pp_execute_expression(context, state.out, &result)) { + free(state.out); + return -1; + } + + free(state.out); + + context->if_ptr--; + context->if_stack[context->if_ptr] = result ? 1 : 0; + context->if_value = _evaluate_if_stack(context); + + return 0; +} + +static int +_parse_else(struct sl_pp_context *context) +{ + if (context->if_ptr == SL_PP_MAX_IF_NESTING) { + strcpy(context->error_msg, "no matching `#if'"); + return -1; + } + + /* Bit b1 indicates we already went through #else. */ + if (context->if_stack[context->if_ptr] & 2) { + strcpy(context->error_msg, "no matching `#if'"); + return -1; + } + + /* Invert current condition value and mark that we are in the #else block. */ + context->if_stack[context->if_ptr] = (1 - (context->if_stack[context->if_ptr] & 1)) | 2; + context->if_value = _evaluate_if_stack(context); + + return 0; +} + +int +sl_pp_process_if(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + return _parse_if(context, input, first, last); +} + +int +sl_pp_process_ifdef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + unsigned int i; + + if (!context->if_ptr) { + strcpy(context->error_msg, "`#if' nesting too deep"); + return -1; + } + + for (i = first; i < last; i++) { + switch (input[i].token) { + case SL_PP_IDENTIFIER: + { + struct sl_pp_macro *macro; + int macro_name = input[i].data.identifier; + int defined = 0; + + for (macro = context->macro; macro; macro = macro->next) { + if (macro->name == macro_name) { + defined = 1; + break; + } + } + + context->if_ptr--; + context->if_stack[context->if_ptr] = defined ? 1 : 0; + context->if_value = _evaluate_if_stack(context); + } + return 0; + + case SL_PP_WHITESPACE: + break; + + default: + strcpy(context->error_msg, "expected an identifier"); + return -1; + } + } + + strcpy(context->error_msg, "expected an identifier"); + return -1; +} + +int +sl_pp_process_ifndef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + unsigned int i; + + if (!context->if_ptr) { + strcpy(context->error_msg, "`#if' nesting too deep"); + return -1; + } + + for (i = first; i < last; i++) { + switch (input[i].token) { + case SL_PP_IDENTIFIER: + { + struct sl_pp_macro *macro; + int macro_name = input[i].data.identifier; + int defined = 0; + + for (macro = context->macro; macro; macro = macro->next) { + if (macro->name == macro_name) { + defined = 1; + break; + } + } + + context->if_ptr--; + context->if_stack[context->if_ptr] = defined ? 0 : 1; + context->if_value = _evaluate_if_stack(context); + } + return 0; + + case SL_PP_WHITESPACE: + break; + + default: + strcpy(context->error_msg, "expected an identifier"); + return -1; + } + } + + strcpy(context->error_msg, "expected an identifier"); + return -1; +} + +int +sl_pp_process_elif(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + if (_parse_else(context)) { + return -1; + } + + if (context->if_stack[context->if_ptr] & 1) { + context->if_ptr++; + if (_parse_if(context, input, first, last)) { + return -1; + } + } + + /* We are still in the #if block. */ + context->if_stack[context->if_ptr] = context->if_stack[context->if_ptr] & ~2; + + return 0; +} + +int +sl_pp_process_else(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + return _parse_else(context); +} + +int +sl_pp_process_endif(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last) +{ + if (context->if_ptr == SL_PP_MAX_IF_NESTING) { + strcpy(context->error_msg, "no matching `#if'"); + return -1; + } + + context->if_ptr++; + context->if_value = _evaluate_if_stack(context); + + return 0; +} diff --git a/src/glsl/pp/sl_pp_line.c b/src/glsl/pp/sl_pp_line.c new file mode 100644 index 00000000000..ed5acc697ce --- /dev/null +++ b/src/glsl/pp/sl_pp_line.c @@ -0,0 +1,121 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_public.h" +#include "sl_pp_process.h" + + +int +sl_pp_process_line(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *pstate) +{ + unsigned int i; + struct sl_pp_process_state state; + int line_number = -1; + int file_number = -1; + unsigned int line; + unsigned int file; + + memset(&state, 0, sizeof(state)); + for (i = first; i < last;) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_IDENTIFIER: + if (sl_pp_macro_expand(context, input, &i, NULL, &state, sl_pp_macro_expand_normal)) { + free(state.out); + return -1; + } + break; + + default: + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(state.out); + return -1; + } + i++; + } + } + + if (state.out_len > 0 && state.out[0].token == SL_PP_UINT) { + line_number = state.out[0].data._uint; + } else { + strcpy(context->error_msg, "expected a number after `#line'"); + free(state.out); + return -1; + } + + if (state.out_len > 1) { + if (state.out[1].token == SL_PP_UINT) { + file_number = state.out[1].data._uint; + } else { + strcpy(context->error_msg, "expected a number after line number"); + free(state.out); + return -1; + } + + if (state.out_len > 2) { + strcpy(context->error_msg, "expected an end of line after file number"); + free(state.out); + return -1; + } + } + + free(state.out); + + line = atoi(sl_pp_context_cstr(context, line_number)); + if (file_number != -1) { + file = atoi(sl_pp_context_cstr(context, file_number)); + } else { + file = context->file; + } + + if (context->line != line || context->file != file) { + struct sl_pp_token_info ti; + + ti.token = SL_PP_LINE; + ti.data.line.lineno = line; + ti.data.line.fileno = file; + if (sl_pp_process_out(pstate, &ti)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + context->line = line; + context->file = file; + } + + return 0; +} diff --git a/src/glsl/pp/sl_pp_macro.c b/src/glsl/pp/sl_pp_macro.c new file mode 100644 index 00000000000..08b44c7cbe4 --- /dev/null +++ b/src/glsl/pp/sl_pp_macro.c @@ -0,0 +1,397 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include "sl_pp_public.h" +#include "sl_pp_macro.h" +#include "sl_pp_process.h" + + +static void +_macro_init(struct sl_pp_macro *macro) +{ + macro->name = -1; + macro->num_args = -1; + macro->arg = NULL; + macro->body = NULL; +} + +struct sl_pp_macro * +sl_pp_macro_new(void) +{ + struct sl_pp_macro *macro; + + macro = calloc(1, sizeof(struct sl_pp_macro)); + if (macro) { + _macro_init(macro); + } + return macro; +} + +static void +_macro_destroy(struct sl_pp_macro *macro) +{ + struct sl_pp_macro_formal_arg *arg = macro->arg; + + while (arg) { + struct sl_pp_macro_formal_arg *next_arg = arg->next; + + free(arg); + arg = next_arg; + } + + free(macro->body); +} + +void +sl_pp_macro_free(struct sl_pp_macro *macro) +{ + while (macro) { + struct sl_pp_macro *next_macro = macro->next; + + _macro_destroy(macro); + free(macro); + macro = next_macro; + } +} + +void +sl_pp_macro_reset(struct sl_pp_macro *macro) +{ + _macro_destroy(macro); + _macro_init(macro); +} + +static void +skip_whitespace(const struct sl_pp_token_info *input, + unsigned int *pi) +{ + while (input[*pi].token == SL_PP_WHITESPACE) { + (*pi)++; + } +} + +static int +_out_number(struct sl_pp_context *context, + struct sl_pp_process_state *state, + unsigned int number) +{ + char buf[32]; + struct sl_pp_token_info ti; + + sprintf(buf, "%u", number); + + ti.token = SL_PP_UINT; + ti.data._uint = sl_pp_context_add_unique_str(context, buf); + if (sl_pp_process_out(state, &ti)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + return 0; +} + +int +sl_pp_macro_expand(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *pi, + struct sl_pp_macro *local, + struct sl_pp_process_state *state, + enum sl_pp_macro_expand_behaviour behaviour) +{ + int mute = (behaviour == sl_pp_macro_expand_mute); + int macro_name; + struct sl_pp_macro *macro = NULL; + struct sl_pp_macro *actual_arg = NULL; + unsigned int j; + + if (input[*pi].token != SL_PP_IDENTIFIER) { + strcpy(context->error_msg, "expected an identifier"); + return -1; + } + + macro_name = input[*pi].data.identifier; + + /* First look for predefined macros. + */ + + if (macro_name == context->dict.___LINE__) { + if (!mute && _out_number(context, state, context->line)) { + return -1; + } + (*pi)++; + return 0; + } + if (macro_name == context->dict.___FILE__) { + if (!mute && _out_number(context, state, context->file)) { + return -1; + } + (*pi)++; + return 0; + } + if (macro_name == context->dict.___VERSION__) { + if (!mute && _out_number(context, state, 110)) { + return -1; + } + (*pi)++; + return 0; + } + + for (j = 0; j < context->num_predefined; j++) { + if (macro_name == context->predefined[j].name) { + if (!mute) { + struct sl_pp_token_info ti; + + ti.token = SL_PP_UINT; + ti.data._uint = context->predefined[j].value; + if (sl_pp_process_out(state, &ti)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } + (*pi)++; + return 0; + } + } + + /* Replace extension names with 1. + */ + for (j = 0; j < context->num_extensions; j++) { + if (macro_name == context->extensions[j].name) { + if (!mute && _out_number(context, state, 1)) { + return -1; + } + (*pi)++; + return 0; + } + } + + /* TODO: For FEATURE_es2_glsl, expand to 1 the following symbols. + * GL_ES + * GL_FRAGMENT_PRECISION_HIGH + */ + + if (local) { + for (macro = local; macro; macro = macro->next) { + if (macro->name == macro_name) { + break; + } + } + } + + if (!macro) { + for (macro = context->macro; macro; macro = macro->next) { + if (macro->name == macro_name) { + break; + } + } + } + + if (!macro) { + if (behaviour == sl_pp_macro_expand_unknown_to_0) { + if (_out_number(context, state, 0)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } else if (!mute) { + if (sl_pp_process_out(state, &input[*pi])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } + (*pi)++; + return 0; + } + + (*pi)++; + + if (macro->num_args >= 0) { + skip_whitespace(input, pi); + if (input[*pi].token != SL_PP_LPAREN) { + strcpy(context->error_msg, "expected `('"); + return -1; + } + (*pi)++; + skip_whitespace(input, pi); + } + + if (macro->num_args > 0) { + struct sl_pp_macro_formal_arg *formal_arg = macro->arg; + struct sl_pp_macro **pmacro = &actual_arg; + + for (j = 0; j < (unsigned int)macro->num_args; j++) { + struct sl_pp_process_state arg_state; + unsigned int i; + int done = 0; + unsigned int paren_nesting = 0; + struct sl_pp_token_info eof; + + memset(&arg_state, 0, sizeof(arg_state)); + + for (i = *pi; !done;) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_COMMA: + if (!paren_nesting) { + if (j < (unsigned int)macro->num_args - 1) { + done = 1; + i++; + } else { + strcpy(context->error_msg, "too many actual macro arguments"); + return -1; + } + } else { + if (sl_pp_process_out(&arg_state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + i++; + } + break; + + case SL_PP_LPAREN: + paren_nesting++; + if (sl_pp_process_out(&arg_state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + i++; + break; + + case SL_PP_RPAREN: + if (!paren_nesting) { + if (j == (unsigned int)macro->num_args - 1) { + done = 1; + i++; + } else { + strcpy(context->error_msg, "too few actual macro arguments"); + return -1; + } + } else { + paren_nesting--; + if (sl_pp_process_out(&arg_state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + i++; + } + break; + + case SL_PP_IDENTIFIER: + if (sl_pp_macro_expand(context, input, &i, local, &arg_state, sl_pp_macro_expand_normal)) { + free(arg_state.out); + return -1; + } + break; + + case SL_PP_EOF: + strcpy(context->error_msg, "too few actual macro arguments"); + return -1; + + default: + if (sl_pp_process_out(&arg_state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + i++; + } + } + + (*pi) = i; + + eof.token = SL_PP_EOF; + if (sl_pp_process_out(&arg_state, &eof)) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + + *pmacro = sl_pp_macro_new(); + if (!*pmacro) { + strcpy(context->error_msg, "out of memory"); + free(arg_state.out); + return -1; + } + + (**pmacro).name = formal_arg->name; + (**pmacro).body = arg_state.out; + + formal_arg = formal_arg->next; + pmacro = &(**pmacro).next; + } + } + + /* Right paren for non-empty argument list has already been eaten. */ + if (macro->num_args == 0) { + skip_whitespace(input, pi); + if (input[*pi].token != SL_PP_RPAREN) { + strcpy(context->error_msg, "expected `)'"); + return -1; + } + (*pi)++; + } + + for (j = 0;;) { + switch (macro->body[j].token) { + case SL_PP_NEWLINE: + if (sl_pp_process_out(state, ¯o->body[j])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + j++; + break; + + case SL_PP_IDENTIFIER: + if (sl_pp_macro_expand(context, macro->body, &j, actual_arg, state, behaviour)) { + return -1; + } + break; + + case SL_PP_EOF: + sl_pp_macro_free(actual_arg); + return 0; + + default: + if (!mute) { + if (sl_pp_process_out(state, ¯o->body[j])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } + j++; + } + } +} diff --git a/src/glsl/pp/sl_pp_macro.h b/src/glsl/pp/sl_pp_macro.h new file mode 100644 index 00000000000..3ad3438236a --- /dev/null +++ b/src/glsl/pp/sl_pp_macro.h @@ -0,0 +1,73 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_MACRO_H +#define SL_PP_MACRO_H + +#include "sl_pp_token.h" + + +struct sl_pp_context; +struct sl_pp_process_state; + +struct sl_pp_macro_formal_arg { + int name; + struct sl_pp_macro_formal_arg *next; +}; + +struct sl_pp_macro { + int name; + int num_args; /* -1 means no args, 0 means `()' */ + struct sl_pp_macro_formal_arg *arg; + struct sl_pp_token_info *body; + struct sl_pp_macro *next; +}; + +struct sl_pp_macro * +sl_pp_macro_new(void); + +void +sl_pp_macro_free(struct sl_pp_macro *macro); + +void +sl_pp_macro_reset(struct sl_pp_macro *macro); + +enum sl_pp_macro_expand_behaviour { + sl_pp_macro_expand_normal, + sl_pp_macro_expand_mute, + sl_pp_macro_expand_unknown_to_0 +}; + +int +sl_pp_macro_expand(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *pi, + struct sl_pp_macro *local, + struct sl_pp_process_state *state, + enum sl_pp_macro_expand_behaviour behaviour); + +#endif /* SL_PP_MACRO_H */ diff --git a/src/glsl/pp/sl_pp_pragma.c b/src/glsl/pp/sl_pp_pragma.c new file mode 100644 index 00000000000..489eb17b8eb --- /dev/null +++ b/src/glsl/pp/sl_pp_pragma.c @@ -0,0 +1,108 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_process.h" + + +int +sl_pp_process_pragma(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *state) +{ + int pragma_name = -1; + struct sl_pp_token_info out; + int arg_name = -1; + + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + pragma_name = input[first].data.identifier; + first++; + } + if (pragma_name == -1) { + return 0; + } + + if (pragma_name == context->dict.optimize) { + out.token = SL_PP_PRAGMA_OPTIMIZE; + } else if (pragma_name == context->dict.debug) { + out.token = SL_PP_PRAGMA_DEBUG; + } else { + return 0; + } + + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + + if (first < last && input[first].token == SL_PP_LPAREN) { + first++; + } else { + return 0; + } + + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + + if (first < last && input[first].token == SL_PP_IDENTIFIER) { + arg_name = input[first].data.identifier; + first++; + } + if (arg_name == -1) { + return 0; + } + + if (arg_name == context->dict.off) { + out.data.pragma = 0; + } else if (arg_name == context->dict.on) { + out.data.pragma = 1; + } else { + return 0; + } + + while (first < last && input[first].token == SL_PP_WHITESPACE) { + first++; + } + + if (first < last && input[first].token == SL_PP_RPAREN) { + first++; + } else { + return 0; + } + + /* Ignore the tokens that follow. */ + + if (sl_pp_process_out(state, &out)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + return 0; +} diff --git a/src/glsl/pp/sl_pp_process.c b/src/glsl/pp/sl_pp_process.c new file mode 100644 index 00000000000..e2adc2a0215 --- /dev/null +++ b/src/glsl/pp/sl_pp_process.c @@ -0,0 +1,286 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_process.h" +#include "sl_pp_public.h" + + +static void +skip_whitespace(const struct sl_pp_token_info *input, + unsigned int *pi) +{ + while (input[*pi].token == SL_PP_WHITESPACE) { + (*pi)++; + } +} + +int +sl_pp_process_out(struct sl_pp_process_state *state, + const struct sl_pp_token_info *token) +{ + if (state->out_len >= state->out_max) { + unsigned int new_max = state->out_max; + + if (new_max < 0x100) { + new_max = 0x100; + } else if (new_max < 0x10000) { + new_max *= 2; + } else { + new_max += 0x10000; + } + + state->out = realloc(state->out, new_max * sizeof(struct sl_pp_token_info)); + if (!state->out) { + return -1; + } + state->out_max = new_max; + } + + state->out[state->out_len++] = *token; + return 0; +} + +int +sl_pp_process(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + struct sl_pp_token_info **output) +{ + unsigned int i = 0; + int found_eof = 0; + struct sl_pp_process_state state; + + memset(&state, 0, sizeof(state)); + + if (context->line > 1) { + struct sl_pp_token_info ti; + + ti.token = SL_PP_LINE; + ti.data.line.lineno = context->line - 1; + ti.data.line.fileno = context->file; + if (sl_pp_process_out(&state, &ti)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + + ti.token = SL_PP_NEWLINE; + if (sl_pp_process_out(&state, &ti)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } + + while (!found_eof) { + skip_whitespace(input, &i); + if (input[i].token == SL_PP_HASH) { + i++; + skip_whitespace(input, &i); + switch (input[i].token) { + case SL_PP_IDENTIFIER: + { + int name; + int found_eol = 0; + unsigned int first; + unsigned int last; + struct sl_pp_token_info endof; + + /* Directive name. */ + name = input[i].data.identifier; + i++; + skip_whitespace(input, &i); + + first = i; + + while (!found_eol) { + switch (input[i].token) { + case SL_PP_NEWLINE: + /* Preserve newline just for the sake of line numbering. */ + endof = input[i]; + i++; + found_eol = 1; + break; + + case SL_PP_EOF: + endof = input[i]; + i++; + found_eof = 1; + found_eol = 1; + break; + + default: + i++; + } + } + + last = i - 1; + + if (name == context->dict._if) { + if (sl_pp_process_if(context, input, first, last)) { + return -1; + } + } else if (name == context->dict.ifdef) { + if (sl_pp_process_ifdef(context, input, first, last)) { + return -1; + } + } else if (name == context->dict.ifndef) { + if (sl_pp_process_ifndef(context, input, first, last)) { + return -1; + } + } else if (name == context->dict.elif) { + if (sl_pp_process_elif(context, input, first, last)) { + return -1; + } + } else if (name == context->dict._else) { + if (sl_pp_process_else(context, input, first, last)) { + return -1; + } + } else if (name == context->dict.endif) { + if (sl_pp_process_endif(context, input, first, last)) { + return -1; + } + } else if (context->if_value) { + if (name == context->dict.define) { + if (sl_pp_process_define(context, input, first, last)) { + return -1; + } + } else if (name == context->dict.error) { + sl_pp_process_error(context, input, first, last); + return -1; + } else if (name == context->dict.extension) { + if (sl_pp_process_extension(context, input, first, last, &state)) { + return -1; + } + } else if (name == context->dict.line) { + if (sl_pp_process_line(context, input, first, last, &state)) { + return -1; + } + } else if (name == context->dict.pragma) { + if (sl_pp_process_pragma(context, input, first, last, &state)) { + return -1; + } + } else if (name == context->dict.undef) { + if (sl_pp_process_undef(context, input, first, last)) { + return -1; + } + } else { + strcpy(context->error_msg, "unrecognised directive name"); + return -1; + } + } + + if (sl_pp_process_out(&state, &endof)) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + context->line++; + } + break; + + case SL_PP_NEWLINE: + /* Empty directive. */ + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + context->line++; + i++; + break; + + case SL_PP_EOF: + /* Empty directive. */ + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + i++; + found_eof = 1; + break; + + default: + strcpy(context->error_msg, "expected a directive name"); + return -1; + } + } else { + int found_eol = 0; + + while (!found_eol) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + /* Drop whitespace all together at this point. */ + i++; + break; + + case SL_PP_NEWLINE: + /* Preserve newline just for the sake of line numbering. */ + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + context->line++; + i++; + found_eol = 1; + break; + + case SL_PP_EOF: + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + i++; + found_eof = 1; + found_eol = 1; + break; + + case SL_PP_IDENTIFIER: + if (sl_pp_macro_expand(context, input, &i, NULL, &state, + context->if_value ? sl_pp_macro_expand_normal : sl_pp_macro_expand_mute)) { + return -1; + } + break; + + default: + if (context->if_value) { + if (sl_pp_process_out(&state, &input[i])) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + } + i++; + } + } + } + } + + if (context->if_ptr != SL_PP_MAX_IF_NESTING) { + strcpy(context->error_msg, "expected `#endif' directive"); + return -1; + } + + *output = state.out; + return 0; +} diff --git a/src/glsl/pp/sl_pp_process.h b/src/glsl/pp/sl_pp_process.h new file mode 100644 index 00000000000..24311bab603 --- /dev/null +++ b/src/glsl/pp/sl_pp_process.h @@ -0,0 +1,121 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_PROCESS_H +#define SL_PP_PROCESS_H + +#include "sl_pp_context.h" +#include "sl_pp_macro.h" +#include "sl_pp_token.h" + + +struct sl_pp_process_state { + struct sl_pp_token_info *out; + unsigned int out_len; + unsigned int out_max; +}; + +int +sl_pp_process_define(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_undef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_if(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_ifdef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_ifndef(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_elif(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_else(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_endif(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +void +sl_pp_process_error(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last); + +int +sl_pp_process_pragma(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *state); + +int +sl_pp_process_extension(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *state); + +int +sl_pp_process_line(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int first, + unsigned int last, + struct sl_pp_process_state *state); + +int +sl_pp_process_out(struct sl_pp_process_state *state, + const struct sl_pp_token_info *token); + +#endif /* SL_PP_PROCESS_H */ diff --git a/src/glsl/pp/sl_pp_public.h b/src/glsl/pp/sl_pp_public.h new file mode 100644 index 00000000000..076903649cd --- /dev/null +++ b/src/glsl/pp/sl_pp_public.h @@ -0,0 +1,77 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_PUBLIC_H +#define SL_PP_PUBLIC_H + + +struct sl_pp_context; + + +#include "sl_pp_purify.h" +#include "sl_pp_token.h" + + +struct sl_pp_context * +sl_pp_context_create(void); + +void +sl_pp_context_destroy(struct sl_pp_context *context); + +const char * +sl_pp_context_error_message(const struct sl_pp_context *context); + +int +sl_pp_context_add_extension(struct sl_pp_context *context, + const char *name, + const char *name_string); + +int +sl_pp_context_add_predefined(struct sl_pp_context *context, + const char *name, + const char *value); + +int +sl_pp_context_add_unique_str(struct sl_pp_context *context, + const char *str); + +const char * +sl_pp_context_cstr(const struct sl_pp_context *context, + int offset); + +int +sl_pp_version(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *version, + unsigned int *tokens_eaten); + +int +sl_pp_process(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + struct sl_pp_token_info **output); + +#endif /* SL_PP_PUBLIC_H */ diff --git a/src/glsl/pp/sl_pp_purify.c b/src/glsl/pp/sl_pp_purify.c new file mode 100644 index 00000000000..b50f8192517 --- /dev/null +++ b/src/glsl/pp/sl_pp_purify.c @@ -0,0 +1,302 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <stdarg.h> +#include <stdio.h> +#include "sl_pp_purify.h" + + +/* + * Preprocessor purifier performs the following tasks. + * - Convert all variants of newlines into a Unix newline. + * - Merge continued lines into a single long line. + * - Remove line comments and replace block comments with whitespace. + */ + + +static unsigned int +_purify_newline(const char *input, + char *out, + unsigned int *current_line) +{ + if (input[0] == '\n') { + *out = '\n'; + (*current_line)++; + if (input[1] == '\r') { + /* + * The GLSL spec is not explicit about whether this + * combination is a valid newline or not. + * Let's assume it is acceptable. + */ + return 2; + } + return 1; + } + if (input[0] == '\r') { + *out = '\n'; + (*current_line)++; + if (input[1] == '\n') { + return 2; + } + return 1; + } + *out = input[0]; + return 1; +} + + +static unsigned int +_purify_backslash(const char *input, + char *out, + unsigned int *current_line) +{ + unsigned int eaten = 0; + + for (;;) { + if (input[0] == '\\') { + char next; + unsigned int next_eaten; + unsigned int next_line = *current_line; + + eaten++; + input++; + + next_eaten = _purify_newline(input, &next, &next_line); + if (next == '\n') { + /* + * If this is really a line continuation sequence, eat + * it and do not exit the loop. + */ + eaten += next_eaten; + input += next_eaten; + *current_line = next_line; + } else { + /* + * It is an error to put anything between a backslash + * and a newline and still expect it to behave like a line + * continuation sequence. + * Even if it is an innocent whitespace. + */ + *out = '\\'; + break; + } + } else { + eaten += _purify_newline(input, out, current_line); + break; + } + } + return eaten; +} + + +static void +_report_error(char *buf, + unsigned int cbbuf, + const char *msg, + ...) +{ + va_list args; + + va_start(args, msg); + vsnprintf(buf, cbbuf, msg, args); + va_end(args); +} + + +void +sl_pp_purify_state_init(struct sl_pp_purify_state *state, + const char *input, + const struct sl_pp_purify_options *options) +{ + state->options = *options; + state->input = input; + state->current_line = 1; + state->inside_c_comment = 0; +} + + +unsigned int +_purify_comment(struct sl_pp_purify_state *state, + char *output, + unsigned int *current_line, + char *errormsg, + unsigned int cberrormsg) +{ + for (;;) { + unsigned int eaten; + char next; + + eaten = _purify_backslash(state->input, &next, current_line); + state->input += eaten; + while (next == '*') { + eaten = _purify_backslash(state->input, &next, current_line); + state->input += eaten; + if (next == '/') { + *output = ' '; + state->inside_c_comment = 0; + return 1; + } + } + if (next == '\n') { + *output = '\n'; + state->inside_c_comment = 1; + return 1; + } + if (next == '\0') { + _report_error(errormsg, cberrormsg, "expected `*/' but end of translation unit found"); + return 0; + } + } +} + + +unsigned int +sl_pp_purify_getc(struct sl_pp_purify_state *state, + char *output, + unsigned int *current_line, + char *errormsg, + unsigned int cberrormsg) +{ + unsigned int eaten; + + if (state->inside_c_comment) { + return _purify_comment(state, output, current_line, errormsg, cberrormsg); + } + + eaten = _purify_backslash(state->input, output, current_line); + state->input += eaten; + if (*output == '/') { + char next; + unsigned int next_line = *current_line; + + eaten = _purify_backslash(state->input, &next, &next_line); + if (next == '/') { + state->input += eaten; + *current_line = next_line; + + /* Replace a line comment with either a newline or nil. */ + for (;;) { + eaten = _purify_backslash(state->input, &next, current_line); + state->input += eaten; + if (next == '\n' || next == '\0') { + *output = next; + return eaten; + } + } + } else if (next == '*') { + state->input += eaten; + *current_line = next_line; + + return _purify_comment(state, output, current_line, errormsg, cberrormsg); + } + } + return eaten; +} + + +struct out_buf { + char *out; + unsigned int len; + unsigned int capacity; + unsigned int current_line; + char *errormsg; + unsigned int cberrormsg; +}; + + +static int +_out_buf_putc(struct out_buf *obuf, + char c) +{ + if (obuf->len >= obuf->capacity) { + unsigned int new_max = obuf->capacity; + + if (new_max < 0x100) { + new_max = 0x100; + } else if (new_max < 0x10000) { + new_max *= 2; + } else { + new_max += 0x10000; + } + + obuf->out = realloc(obuf->out, new_max); + if (!obuf->out) { + _report_error(obuf->errormsg, obuf->cberrormsg, "out of memory"); + return -1; + } + obuf->capacity = new_max; + } + + obuf->out[obuf->len++] = c; + + return 0; +} + + +int +sl_pp_purify(const char *input, + const struct sl_pp_purify_options *options, + char **output, + char *errormsg, + unsigned int cberrormsg, + unsigned int *errorline) +{ + struct out_buf obuf; + struct sl_pp_purify_state state; + + obuf.out = NULL; + obuf.len = 0; + obuf.capacity = 0; + obuf.current_line = 1; + obuf.errormsg = errormsg; + obuf.cberrormsg = cberrormsg; + + sl_pp_purify_state_init(&state, input, options); + + for (;;) { + unsigned int eaten; + char c; + + eaten = sl_pp_purify_getc(&state, &c, &obuf.current_line, errormsg, cberrormsg); + if (!eaten) { + *errorline = obuf.current_line; + return -1; + } + if (_out_buf_putc(&obuf, c)) { + *errorline = obuf.current_line; + return -1; + } + + if (c == '\0') { + break; + } + } + + *output = obuf.out; + return 0; +} diff --git a/src/glsl/pp/sl_pp_purify.h b/src/glsl/pp/sl_pp_purify.h new file mode 100644 index 00000000000..c0f55cbfd89 --- /dev/null +++ b/src/glsl/pp/sl_pp_purify.h @@ -0,0 +1,63 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_PURIFY_H +#define SL_PP_PURIFY_H + +struct sl_pp_purify_options { + unsigned int preserve_columns:1; + unsigned int tab_width:4; +}; + +int +sl_pp_purify(const char *input, + const struct sl_pp_purify_options *options, + char **output, + char *errormsg, + unsigned int cberrormsg, + unsigned int *errorline); + +struct sl_pp_purify_state { + struct sl_pp_purify_options options; + const char *input; + unsigned int current_line; + unsigned int inside_c_comment:1; +}; + +void +sl_pp_purify_state_init(struct sl_pp_purify_state *state, + const char *input, + const struct sl_pp_purify_options *options); + +unsigned int +sl_pp_purify_getc(struct sl_pp_purify_state *state, + char *output, + unsigned int *current_line, + char *errormsg, + unsigned int cberrormsg); + +#endif /* SL_PP_PURIFY_H */ diff --git a/src/glsl/pp/sl_pp_token.c b/src/glsl/pp/sl_pp_token.c new file mode 100644 index 00000000000..e9a60b6c508 --- /dev/null +++ b/src/glsl/pp/sl_pp_token.c @@ -0,0 +1,859 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <assert.h> +#include <stdlib.h> +#include <string.h> +#include "sl_pp_public.h" +#include "sl_pp_context.h" +#include "sl_pp_token.h" + + +#define PURE_ERROR 256 + +static int +_pure_getc(struct sl_pp_context *context) +{ + char c; + unsigned int current_line; + + if (context->getc_buf_size) { + return context->getc_buf[--context->getc_buf_size]; + } + + if (sl_pp_purify_getc(&context->pure, &c, ¤t_line, context->error_msg, sizeof(context->error_msg)) == 0) { + return PURE_ERROR; + } + return c; +} + + +static void +_pure_ungetc(struct sl_pp_context *context, + int c) +{ + assert(c != PURE_ERROR); + + if (context->getc_buf_size == context->getc_buf_capacity) { + context->getc_buf_capacity += 64; + context->getc_buf = realloc(context->getc_buf, context->getc_buf_capacity * sizeof(char)); + assert(context->getc_buf); + } + + context->getc_buf[context->getc_buf_size++] = (char)c; +} + + +struct lookahead_state { + char buf[256]; + unsigned int pos; + struct sl_pp_context *context; +}; + + +static void +_lookahead_init(struct lookahead_state *lookahead, + struct sl_pp_context *context) +{ + lookahead->pos = 0; + lookahead->context = context; +} + + +static unsigned int +_lookahead_tell(const struct lookahead_state *lookahead) +{ + return lookahead->pos; +} + + +static const void * +_lookahead_buf(const struct lookahead_state *lookahead) +{ + return lookahead->buf; +} + + +static void +_lookahead_revert(struct lookahead_state *lookahead, + unsigned int pos) +{ + assert(pos <= lookahead->pos); + + while (lookahead->pos > pos) { + _pure_ungetc(lookahead->context, lookahead->buf[--lookahead->pos]); + } +} + + +static int +_lookahead_getc(struct lookahead_state *lookahead) +{ + int c; + + assert(lookahead->pos < sizeof(lookahead->buf) / sizeof(lookahead->buf[0])); + + c = _pure_getc(lookahead->context); + if (c != PURE_ERROR) { + lookahead->buf[lookahead->pos++] = (char)c; + } + return c; +} + + +static int +_is_identifier_char(char c) +{ + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; +} + + +static int +_tokenise_identifier(struct sl_pp_context *context, + struct sl_pp_token_info *out) +{ + int c; + char identifier[256]; /* XXX: Remove this artifical limit. */ + unsigned int i = 0; + + out->token = SL_PP_IDENTIFIER; + out->data.identifier = -1; + + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + identifier[i++] = (char)c; + for (;;) { + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + + if (_is_identifier_char((char)c)) { + if (i >= sizeof(identifier) / sizeof(char) - 1) { + strcpy(context->error_msg, "out of memory"); + _pure_ungetc(context, c); + while (i) { + _pure_ungetc(context, identifier[--i]); + } + return -1; + } + identifier[i++] = (char)c; + } else { + _pure_ungetc(context, c); + break; + } + } + identifier[i] = '\0'; + + out->data.identifier = sl_pp_context_add_unique_str(context, identifier); + if (out->data.identifier == -1) { + while (i) { + _pure_ungetc(context, identifier[--i]); + } + return -1; + } + + return 0; +} + + +/* + * Return the number of consecutive decimal digits in the input stream. + */ +static unsigned int +_parse_float_digits(struct lookahead_state *lookahead) +{ + unsigned int eaten; + + for (eaten = 0;; eaten++) { + unsigned int pos = _lookahead_tell(lookahead); + char c = _lookahead_getc(lookahead); + + if (c < '0' || c > '9') { + _lookahead_revert(lookahead, pos); + break; + } + } + return eaten; +} + + +/* + * Try to match one of the following patterns for the fractional part + * of a floating point number. + * + * digits . [digits] + * . digits + * + * Return 0 if the pattern could not be matched, otherwise the number + * of eaten characters from the input stream. + */ +static unsigned int +_parse_float_frac(struct lookahead_state *lookahead) +{ + unsigned int pos; + int c; + unsigned int eaten; + + pos = _lookahead_tell(lookahead); + c = _lookahead_getc(lookahead); + if (c == '.') { + eaten = _parse_float_digits(lookahead); + if (eaten) { + return eaten + 1; + } + _lookahead_revert(lookahead, pos); + return 0; + } + + _lookahead_revert(lookahead, pos); + eaten = _parse_float_digits(lookahead); + if (eaten) { + c = _lookahead_getc(lookahead); + if (c == '.') { + return eaten + 1 + _parse_float_digits(lookahead); + } + } + + _lookahead_revert(lookahead, pos); + return 0; +} + + +/* + * Try to match the following pattern for the exponential part + * of a floating point number. + * + * (e|E) [(+|-)] digits + * + * Return 0 if the pattern could not be matched, otherwise the number + * of eaten characters from the input stream. + */ +static unsigned int +_parse_float_exp(struct lookahead_state *lookahead) +{ + unsigned int pos, pos2; + int c; + unsigned int eaten, digits; + + pos = _lookahead_tell(lookahead); + c = _lookahead_getc(lookahead); + if (c != 'e' && c != 'E') { + _lookahead_revert(lookahead, pos); + return 0; + } + + pos2 = _lookahead_tell(lookahead); + c = _lookahead_getc(lookahead); + if (c == '-' || c == '+') { + eaten = 2; + } else { + _lookahead_revert(lookahead, pos2); + eaten = 1; + } + + digits = _parse_float_digits(lookahead); + if (!digits) { + _lookahead_revert(lookahead, pos); + return 0; + } + + return eaten + digits; +} + + +/* + * Try to match one of the following patterns for a floating point number. + * + * fract [exp] [(f|F)] + * digits exp [(f|F)] + * + * Return 0 if the pattern could not be matched, otherwise the number + * of eaten characters from the input stream. + */ +static unsigned int +_parse_float(struct lookahead_state *lookahead) +{ + unsigned int eaten; + + eaten = _parse_float_frac(lookahead); + if (eaten) { + unsigned int pos; + int c; + + eaten += _parse_float_exp(lookahead); + + pos = _lookahead_tell(lookahead); + c = _lookahead_getc(lookahead); + if (c == 'f' || c == 'F') { + eaten++; + } else { + _lookahead_revert(lookahead, pos); + } + + return eaten; + } + + eaten = _parse_float_digits(lookahead); + if (eaten) { + unsigned int exponent; + + exponent = _parse_float_exp(lookahead); + if (exponent) { + unsigned int pos; + int c; + + eaten += exponent; + + pos = _lookahead_tell(lookahead); + c = _lookahead_getc(lookahead); + if (c == 'f' || c == 'F') { + eaten++; + } else { + _lookahead_revert(lookahead, pos); + } + + return eaten; + } + } + + _lookahead_revert(lookahead, 0); + return 0; +} + + +static unsigned int +_parse_hex(struct lookahead_state *lookahead) +{ + int c; + unsigned int n; + + c = _lookahead_getc(lookahead); + if (c != '0') { + _lookahead_revert(lookahead, 0); + return 0; + } + + c = _lookahead_getc(lookahead); + if (c != 'x' && c != 'X') { + _lookahead_revert(lookahead, 0); + return 0; + } + + for (n = 2;;) { + unsigned int pos = _lookahead_tell(lookahead); + + c = _lookahead_getc(lookahead); + if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) { + n++; + } else { + _lookahead_revert(lookahead, pos); + break; + } + } + + if (n > 2) { + return n; + } + + _lookahead_revert(lookahead, 0); + return 0; +} + + +static unsigned int +_parse_oct(struct lookahead_state *lookahead) +{ + int c; + unsigned int n; + + c = _lookahead_getc(lookahead); + if (c != '0') { + _lookahead_revert(lookahead, 0); + return 0; + } + + for (n = 1;;) { + unsigned int pos = _lookahead_tell(lookahead); + + c = _lookahead_getc(lookahead); + if ((c >= '0' && c <= '7')) { + n++; + } else { + _lookahead_revert(lookahead, pos); + break; + } + } + + return n; +} + + +static unsigned int +_parse_dec(struct lookahead_state *lookahead) +{ + unsigned int n = 0; + + for (;;) { + unsigned int pos = _lookahead_tell(lookahead); + int c = _lookahead_getc(lookahead); + + if ((c >= '0' && c <= '9')) { + n++; + } else { + _lookahead_revert(lookahead, pos); + break; + } + } + + return n; +} + + +static int +_tokenise_number(struct sl_pp_context *context, + struct sl_pp_token_info *out) +{ + struct lookahead_state lookahead; + unsigned int eaten; + unsigned int is_float = 0; + unsigned int pos; + int c; + char number[256]; /* XXX: Remove this artifical limit. */ + + _lookahead_init(&lookahead, context); + + eaten = _parse_float(&lookahead); + if (!eaten) { + eaten = _parse_hex(&lookahead); + if (!eaten) { + eaten = _parse_oct(&lookahead); + if (!eaten) { + eaten = _parse_dec(&lookahead); + } + } + } else { + is_float = 1; + } + + if (!eaten) { + strcpy(context->error_msg, "expected a number"); + return -1; + } + + pos = _lookahead_tell(&lookahead); + c = _lookahead_getc(&lookahead); + _lookahead_revert(&lookahead, pos); + + if (_is_identifier_char(c)) { + strcpy(context->error_msg, "expected a number"); + _lookahead_revert(&lookahead, 0); + return -1; + } + + if (eaten > sizeof(number) - 1) { + strcpy(context->error_msg, "out of memory"); + _lookahead_revert(&lookahead, 0); + return -1; + } + + assert(_lookahead_tell(&lookahead) == eaten); + + memcpy(number, _lookahead_buf(&lookahead), eaten); + number[eaten] = '\0'; + + if (is_float) { + out->token = SL_PP_FLOAT; + out->data._float = sl_pp_context_add_unique_str(context, number); + if (out->data._float == -1) { + _lookahead_revert(&lookahead, 0); + return -1; + } + } else { + out->token = SL_PP_UINT; + out->data._uint = sl_pp_context_add_unique_str(context, number); + if (out->data._uint == -1) { + _lookahead_revert(&lookahead, 0); + return -1; + } + } + + return 0; +} + + +static int +sl_pp_token_get(struct sl_pp_context *context, + struct sl_pp_token_info *out) +{ + int c = _pure_getc(context); + + switch (c) { + case ' ': + case '\t': + out->token = SL_PP_WHITESPACE; + break; + + case '\n': + out->token = SL_PP_NEWLINE; + break; + + case '#': + out->token = SL_PP_HASH; + break; + + case ',': + out->token = SL_PP_COMMA; + break; + + case ';': + out->token = SL_PP_SEMICOLON; + break; + + case '{': + out->token = SL_PP_LBRACE; + break; + + case '}': + out->token = SL_PP_RBRACE; + break; + + case '(': + out->token = SL_PP_LPAREN; + break; + + case ')': + out->token = SL_PP_RPAREN; + break; + + case '[': + out->token = SL_PP_LBRACKET; + break; + + case ']': + out->token = SL_PP_RBRACKET; + break; + + case '.': + { + int c2 = _pure_getc(context); + + if (c2 == PURE_ERROR) { + return -1; + } + if (c2 >= '0' && c2 <= '9') { + _pure_ungetc(context, c2); + _pure_ungetc(context, c); + if (_tokenise_number(context, out)) { + return -1; + } + } else { + _pure_ungetc(context, c2); + out->token = SL_PP_DOT; + } + } + break; + + case '+': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '+') { + out->token = SL_PP_INCREMENT; + } else if (c == '=') { + out->token = SL_PP_ADDASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_PLUS; + } + break; + + case '-': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '-') { + out->token = SL_PP_DECREMENT; + } else if (c == '=') { + out->token = SL_PP_SUBASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_MINUS; + } + break; + + case '~': + out->token = SL_PP_BITNOT; + break; + + case '!': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_NOTEQUAL; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_NOT; + } + break; + + case '*': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_MULASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_STAR; + } + break; + + case '/': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_DIVASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_SLASH; + } + break; + + case '%': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_MODASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_MODULO; + } + break; + + case '<': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '<') { + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_LSHIFTASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_LSHIFT; + } + } else if (c == '=') { + out->token = SL_PP_LESSEQUAL; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_LESS; + } + break; + + case '>': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '>') { + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_RSHIFTASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_RSHIFT; + } + } else if (c == '=') { + out->token = SL_PP_GREATEREQUAL; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_GREATER; + } + break; + + case '=': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '=') { + out->token = SL_PP_EQUAL; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_ASSIGN; + } + break; + + case '&': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '&') { + out->token = SL_PP_AND; + } else if (c == '=') { + out->token = SL_PP_BITANDASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_BITAND; + } + break; + + case '^': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '^') { + out->token = SL_PP_XOR; + } else if (c == '=') { + out->token = SL_PP_BITXORASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_BITXOR; + } + break; + + case '|': + c = _pure_getc(context); + if (c == PURE_ERROR) { + return -1; + } + if (c == '|') { + out->token = SL_PP_OR; + } else if (c == '=') { + out->token = SL_PP_BITORASSIGN; + } else { + _pure_ungetc(context, c); + out->token = SL_PP_BITOR; + } + break; + + case '?': + out->token = SL_PP_QUESTION; + break; + + case ':': + out->token = SL_PP_COLON; + break; + + case '\0': + out->token = SL_PP_EOF; + break; + + case PURE_ERROR: + return -1; + + default: + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_') { + _pure_ungetc(context, c); + if (_tokenise_identifier(context, out)) { + return -1; + } + } else if (c >= '0' && c <= '9') { + _pure_ungetc(context, c); + if (_tokenise_number(context, out)) { + return -1; + } + } else { + out->data.other = c; + out->token = SL_PP_OTHER; + } + } + + return 0; +} + + +int +sl_pp_tokenise(struct sl_pp_context *context, + const char *input, + const struct sl_pp_purify_options *options, + struct sl_pp_token_info **output) +{ + struct sl_pp_token_info *out = NULL; + unsigned int out_len = 0; + unsigned int out_max = 0; + + sl_pp_purify_state_init(&context->pure, input, options); + + for (;;) { + struct sl_pp_token_info info; + + if (sl_pp_token_get(context, &info)) { + free(out); + return -1; + } + + if (out_len >= out_max) { + unsigned int new_max = out_max; + + if (new_max < 0x100) { + new_max = 0x100; + } else if (new_max < 0x10000) { + new_max *= 2; + } else { + new_max += 0x10000; + } + + out = realloc(out, new_max * sizeof(struct sl_pp_token_info)); + if (!out) { + strcpy(context->error_msg, "out of memory"); + return -1; + } + out_max = new_max; + } + + out[out_len++] = info; + + if (info.token == SL_PP_EOF) { + break; + } + } + + *output = out; + return 0; +} diff --git a/src/glsl/pp/sl_pp_token.h b/src/glsl/pp/sl_pp_token.h new file mode 100644 index 00000000000..ba9834a9f24 --- /dev/null +++ b/src/glsl/pp/sl_pp_token.h @@ -0,0 +1,131 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef SL_PP_TOKEN_H +#define SL_PP_TOKEN_H + + +struct sl_pp_context; + +enum sl_pp_token { + SL_PP_WHITESPACE, + SL_PP_NEWLINE, + SL_PP_HASH, /* # */ + + SL_PP_COMMA, /* , */ + SL_PP_SEMICOLON, /* ; */ + SL_PP_LBRACE, /* { */ + SL_PP_RBRACE, /* } */ + SL_PP_LPAREN, /* ( */ + SL_PP_RPAREN, /* ) */ + SL_PP_LBRACKET, /* [ */ + SL_PP_RBRACKET, /* ] */ + SL_PP_DOT, /* . */ + SL_PP_INCREMENT, /* ++ */ + SL_PP_ADDASSIGN, /* += */ + SL_PP_PLUS, /* + */ + SL_PP_DECREMENT, /* -- */ + SL_PP_SUBASSIGN, /* -= */ + SL_PP_MINUS, /* - */ + SL_PP_BITNOT, /* ~ */ + SL_PP_NOTEQUAL, /* != */ + SL_PP_NOT, /* ! */ + SL_PP_MULASSIGN, /* *= */ + SL_PP_STAR, /* * */ + SL_PP_DIVASSIGN, /* /= */ + SL_PP_SLASH, /* / */ + SL_PP_MODASSIGN, /* %= */ + SL_PP_MODULO, /* % */ + SL_PP_LSHIFTASSIGN, /* <<= */ + SL_PP_LSHIFT, /* << */ + SL_PP_LESSEQUAL, /* <= */ + SL_PP_LESS, /* < */ + SL_PP_RSHIFTASSIGN, /* >>= */ + SL_PP_RSHIFT, /* >> */ + SL_PP_GREATEREQUAL, /* >= */ + SL_PP_GREATER, /* > */ + SL_PP_EQUAL, /* == */ + SL_PP_ASSIGN, /* = */ + SL_PP_AND, /* && */ + SL_PP_BITANDASSIGN, /* &= */ + SL_PP_BITAND, /* & */ + SL_PP_XOR, /* ^^ */ + SL_PP_BITXORASSIGN, /* ^= */ + SL_PP_BITXOR, /* ^ */ + SL_PP_OR, /* || */ + SL_PP_BITORASSIGN, /* |= */ + SL_PP_BITOR, /* | */ + SL_PP_QUESTION, /* ? */ + SL_PP_COLON, /* : */ + + SL_PP_IDENTIFIER, + + SL_PP_UINT, + SL_PP_FLOAT, + + SL_PP_OTHER, + + SL_PP_PRAGMA_OPTIMIZE, + SL_PP_PRAGMA_DEBUG, + + SL_PP_EXTENSION_REQUIRE, + SL_PP_EXTENSION_ENABLE, + SL_PP_EXTENSION_WARN, + SL_PP_EXTENSION_DISABLE, + + SL_PP_LINE, + + SL_PP_EOF +}; + +union sl_pp_token_data { + int identifier; + int _uint; + int _float; + char other; + int pragma; + int extension; + struct { + unsigned int lineno: 24; + unsigned int fileno: 8; + } line; +}; + +struct sl_pp_token_info { + enum sl_pp_token token; + union sl_pp_token_data data; +}; + +struct sl_pp_purify_options; + +int +sl_pp_tokenise(struct sl_pp_context *context, + const char *input, + const struct sl_pp_purify_options *options, + struct sl_pp_token_info **output); + +#endif /* SL_PP_TOKEN_H */ diff --git a/src/glsl/pp/sl_pp_version.c b/src/glsl/pp/sl_pp_version.c new file mode 100644 index 00000000000..db06523749c --- /dev/null +++ b/src/glsl/pp/sl_pp_version.c @@ -0,0 +1,140 @@ +/************************************************************************** + * + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "sl_pp_public.h" +#include "sl_pp_context.h" + + +int +sl_pp_version(struct sl_pp_context *context, + const struct sl_pp_token_info *input, + unsigned int *version, + unsigned int *tokens_eaten) +{ + unsigned int i = 0; + unsigned int line = context->line; + + /* Default values if `#version' is not present. */ + *version = 110; + *tokens_eaten = 0; + + /* There can be multiple `#version' directives present. + * Accept the value of the last one. + */ + for (;;) { + int found_hash = 0; + int found_version = 0; + int found_number = 0; + int found_end = 0; + + /* Skip whitespace and newlines and seek for hash. */ + while (!found_hash) { + switch (input[i].token) { + case SL_PP_NEWLINE: + line++; + /* pass thru */ + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_HASH: + i++; + found_hash = 1; + break; + + default: + return 0; + } + } + + /* Skip whitespace and seek for `version'. */ + while (!found_version) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_IDENTIFIER: + if (input[i].data.identifier != context->dict.version) { + return 0; + } + i++; + found_version = 1; + break; + + default: + return 0; + } + } + + /* Skip whitespace and seek for version number. */ + while (!found_number) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_UINT: + *version = atoi(sl_pp_context_cstr(context, input[i].data._uint)); + i++; + found_number = 1; + break; + + default: + strcpy(context->error_msg, "expected version number after `#version'"); + return -1; + } + } + + /* Skip whitespace and seek for either newline or eof. */ + while (!found_end) { + switch (input[i].token) { + case SL_PP_WHITESPACE: + i++; + break; + + case SL_PP_NEWLINE: + line++; + /* pass thru */ + case SL_PP_EOF: + i++; + *tokens_eaten = i; + context->line = line; + found_end = 1; + break; + + default: + strcpy(context->error_msg, "expected end of line after version number"); + return -1; + } + } + } + + /* Should not get here. */ +} diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 6f58ad61617..a815f46b4a1 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -18,11 +18,10 @@ include sources.mak - -# Default: build dependencies, then asm_subdirs, then convenience -# libs (.a) and finally the device drivers: -default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ - driver_subdirs +# Default: build dependencies, then asm_subdirs, GLSL built-in lib, +# then convenience libs (.a) and finally the device drivers: +default: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \ + libglapi.a driver_subdirs @@ -30,12 +29,12 @@ default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ # Helper libraries used by many drivers: # Make archive of core mesa object files -libmesa.a: $(MESA_OBJECTS) - @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) +libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) # Make archive of subset of core mesa object files for gallium -libmesagallium.a: $(MESA_GALLIUM_OBJECTS) - @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) # Make archive of gl* API dispatcher functions only libglapi.a: $(GLAPI_OBJECTS) @@ -60,6 +59,12 @@ asm_subdirs: ###################################################################### +# GLSL built-in library +glsl_builtin: + (cd shader/slang/library && $(MAKE)) || exit 1 ; + + +###################################################################### # Dependency generation depend: $(ALL_SOURCES) @@ -152,6 +157,7 @@ clean: -rm -f depend depend.bak libmesa.a libglapi.a -rm -f drivers/*/*.o -rm -f *.pc + -rm -f shader/slang/library/*_gc.h -@cd drivers/dri && $(MAKE) clean -@cd drivers/x11 && $(MAKE) clean -@cd drivers/osmesa && $(MAKE) clean diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw index 097c390a83e..e894c6277d1 100644 --- a/src/mesa/Makefile.mgw +++ b/src/mesa/Makefile.mgw @@ -218,7 +218,6 @@ clean: -$(call UNLINK,vbo/*.o) -$(call UNLINK,shader/*.o) -$(call UNLINK,shader/slang/*.o) - -$(call UNLINK,shader/grammar/*.o) -$(call UNLINK,sparc/*.o) -$(call UNLINK,ppc/*.o) -$(call UNLINK,swrast/*.o) diff --git a/src/mesa/SConscript b/src/mesa/SConscript index ca4a9afce5c..f4e0b98570d 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -189,7 +189,6 @@ if env['platform'] != 'winddk': 'shader/arbprogparse.c', 'shader/arbprogram.c', 'shader/atifragshader.c', - 'shader/grammar/grammar_mesa.c', 'shader/hash_table.c', 'shader/lex.yy.c', 'shader/nvfragparse.c', @@ -227,7 +226,6 @@ if env['platform'] != 'winddk': 'shader/slang/slang_link.c', 'shader/slang/slang_log.c', 'shader/slang/slang_mem.c', - 'shader/slang/slang_preprocess.c', 'shader/slang/slang_print.c', 'shader/slang/slang_simplify.c', 'shader/slang/slang_storage.c', @@ -338,7 +336,9 @@ if env['platform'] != 'winddk': # Add the dir containing the generated header (somewhere inside the # build dir) to the include path env.Append(CPPPATH = [matypes[0].dir]) - + + SConscript('shader/slang/library/SConscript') + # # Libraries # diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index dd732b6666b..a09be71020e 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -56,7 +56,6 @@ having three separate program parameter arrays. #include "main/context.h" #include "main/macros.h" #include "main/mtypes.h" -#include "shader/grammar/grammar_mesa.h" #include "arbprogparse.h" #include "program.h" #include "programopt.h" diff --git a/src/mesa/shader/descrip.mms b/src/mesa/shader/descrip.mms index 19bafd48302..59730020d0c 100644 --- a/src/mesa/shader/descrip.mms +++ b/src/mesa/shader/descrip.mms @@ -16,7 +16,7 @@ VPATH = RCS -INCDIR = [---.include],[.grammar],[-.main],[-.glapi],[.slang] +INCDIR = [---.include],[-.main],[-.glapi],[.slang] LIBDIR = [---.lib] CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1,"__extension__=")/name=(as_is,short)/float=ieee/ieee=denorm @@ -64,8 +64,6 @@ all : $(MMS)$(MMSQUALIFIERS) $(LIBDIR)$(GL_LIB) set def [.slang] $(MMS)$(MMSQUALIFIERS) - set def [-.grammar] - $(MMS)$(MMSQUALIFIERS) set def [-] # Make the library diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c deleted file mode 100644 index a9775961d3a..00000000000 --- a/src/mesa/shader/grammar/grammar.c +++ /dev/null @@ -1,3178 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file grammar.c - * syntax parsing engine - * \author Michal Krol - */ - -#ifndef GRAMMAR_PORT_BUILD -#error Do not build this file directly, build your grammar_XXX.c instead, which includes this file -#endif - -/* -*/ - -/* - INTRODUCTION - ------------ - - The task is to check the syntax of an input string. Input string is a stream of ASCII - characters terminated with a null-character ('\0'). Checking it using C language is - difficult and hard to implement without bugs. It is hard to maintain and make changes when - the syntax changes. - - This is because of a high redundancy of the C code. Large blocks of code are duplicated with - only small changes. Even use of macros does not solve the problem because macros cannot - erase the complexity of the problem. - - The resolution is to create a new language that will be highly oriented to our task. Once - we describe a particular syntax, we are done. We can then focus on the code that implements - the language. The size and complexity of it is relatively small than the code that directly - checks the syntax. - - First, we must implement our new language. Here, the language is implemented in C, but it - could also be implemented in any other language. The code is listed below. We must take - a good care that it is bug free. This is simple because the code is simple and clean. - - Next, we must describe the syntax of our new language in itself. Once created and checked - manually that it is correct, we can use it to check another scripts. - - Note that our new language loading code does not have to check the syntax. It is because we - assume that the script describing itself is correct, and other scripts can be syntactically - checked by the former script. The loading code must only do semantic checking which leads us to - simple resolving references. - - THE LANGUAGE - ------------ - - Here I will describe the syntax of the new language (further called "Synek"). It is mainly a - sequence of declarations terminated by a semicolon. The declaration consists of a symbol, - which is an identifier, and its definition. A definition is in turn a sequence of specifiers - connected with ".and" or ".or" operator. These operators cannot be mixed together in a one - definition. Specifier can be a symbol, string, character, character range or a special - keyword ".true" or ".false". - - On the very beginning of the script there is a declaration of a root symbol and is in the form: - .syntax <root_symbol>; - The <root_symbol> must be on of the symbols in declaration sequence. The syntax is correct if - the root symbol evaluates to true. A symbol evaluates to true if the definition associated with - the symbol evaluates to true. Definition evaluation depends on the operator used to connect - specifiers in the definition. If ".and" operator is used, definition evaluates to true if and - only if all the specifiers evaluate to true. If ".or" operator is used, definition evalutes to - true if any of the specifiers evaluates to true. If definition contains only one specifier, - it is evaluated as if it was connected with ".true" keyword by ".and" operator. - - If specifier is a ".true" keyword, it always evaluates to true. - - If specifier is a ".false" keyword, it always evaluates to false. Specifier evaluates to false - when it does not evaluate to true. - - Character range specifier is in the form: - '<first_character>' - '<second_character>' - If specifier is a character range, it evaluates to true if character in the stream is greater - or equal to <first_character> and less or equal to <second_character>. In that situation - the stream pointer is advanced to point to next character in the stream. All C-style escape - sequences are supported although trigraph sequences are not. The comparisions are performed - on 8-bit unsigned integers. - - Character specifier is in the form: - '<single_character>' - It evaluates to true if the following character range specifier evaluates to true: - '<single_character>' - '<single_character>' - - String specifier is in the form: - "<string>" - Let N be the number of characters in <string>. Let <string>[i] designate i-th character in - <string>. Then the string specifier evaluates to true if and only if for i in the range [0, N) - the following character specifier evaluates to true: - '<string>[i]' - If <string>[i] is a quotation mark, '<string>[i]' is replaced with '\<string>[i]'. - - Symbol specifier can be optionally preceded by a ".loop" keyword in the form: - .loop <symbol> (1) - where <symbol> is defined as follows: - <symbol> <definition>; (2) - Construction (1) is replaced by the following code: - <symbol$1> - and declaration (2) is replaced by the following: - <symbol$1> <symbol$2> .or .true; - <symbol$2> <symbol> .and <symbol$1>; - <symbol> <definition>; - - Synek supports also a register mechanizm. User can, in its SYN file, declare a number of - registers that can be accessed in the syn body. Each reg has its name and a default value. - The register is one byte wide. The C code can change the default value by calling - grammar_set_reg8() with grammar id, register name and a new value. As we know, each rule is - a sequence of specifiers joined with .and or .or operator. And now each specifier can be - prefixed with a condition expression in a form ".if (<reg_name> <operator> <hex_literal>)" - where <operator> can be == or !=. If the condition evaluates to false, the specifier - evaluates to .false. Otherwise it evalutes to the specifier. - - ESCAPE SEQUENCES - ---------------- - - Synek supports all escape sequences in character specifiers. The mapping table is listed below. - All occurences of the characters in the first column are replaced with the corresponding - character in the second column. - - Escape sequence Represents - ------------------------------------------------------------------------------------------------ - \a Bell (alert) - \b Backspace - \f Formfeed - \n New line - \r Carriage return - \t Horizontal tab - \v Vertical tab - \' Single quotation mark - \" Double quotation mark - \\ Backslash - \? Literal question mark - \ooo ASCII character in octal notation - \xhhh ASCII character in hexadecimal notation - ------------------------------------------------------------------------------------------------ - - RAISING ERRORS - -------------- - - Any specifier can be followed by a special construction that is executed when the specifier - evaluates to false. The construction is in the form: - .error <ERROR_TEXT> - <ERROR_TEXT> is an identifier declared earlier by error text declaration. The declaration is - in the form: - .errtext <ERROR_TEXT> "<error_desc>" - When specifier evaluates to false and this construction is present, parsing is stopped - immediately and <error_desc> is returned as a result of parsing. The error position is also - returned and it is meant as an offset from the beggining of the stream to the character that - was valid so far. Example: - - (**** syntax script ****) - - .syntax program; - .errtext MISSING_SEMICOLON "missing ';'" - program declaration .and .loop space .and ';' .error MISSING_SEMICOLON .and - .loop space .and '\0'; - declaration "declare" .and .loop space .and identifier; - space ' '; - - (**** sample code ****) - - declare foo , - - In the example above checking the sample code will result in error message "missing ';'" and - error position 12. The sample code is not correct. Note the presence of '\0' specifier to - assure that there is no code after semicolon - only spaces. - <error_desc> can optionally contain identifier surrounded by dollar signs $. In such a case, - the identifier and dollar signs are replaced by a string retrieved by invoking symbol with - the identifier name. The starting position is the error position. The lenght of the resulting - string is the position after invoking the symbol. - - PRODUCTION - ---------- - - Synek not only checks the syntax but it can also produce (emit) bytes associated with specifiers - that evaluate to true. That is, every specifier and optional error construction can be followed - by a number of emit constructions that are in the form: - .emit <parameter> - <paramater> can be a HEX number, identifier, a star * or a dollar $. HEX number is preceded by - 0x or 0X. If <parameter> is an identifier, it must be earlier declared by emit code declaration - in the form: - .emtcode <identifier> <hex_number> - - When given specifier evaluates to true, all emits associated with the specifier are output - in order they were declared. A star means that last-read character should be output instead - of constant value. Example: - - (**** syntax script ****) - - .syntax foobar; - .emtcode WORD_FOO 0x01 - .emtcode WORD_BAR 0x02 - foobar FOO .emit WORD_FOO .or BAR .emit WORD_BAR .or .true .emit 0x00; - FOO "foo" .and SPACE; - BAR "bar" .and SPACE; - SPACE ' ' .or '\0'; - - (**** sample text 1 ****) - - foo - - (**** sample text 2 ****) - - foobar - - For both samples the result will be one-element array. For first sample text it will be - value 1, for second - 0. Note that every text will be accepted because of presence of - .true as an alternative. - - Another example: - - (**** syntax script ****) - - .syntax declaration; - .emtcode VARIABLE 0x01 - declaration "declare" .and .loop space .and - identifier .emit VARIABLE .and (1) - .true .emit 0x00 .and (2) - .loop space .and ';'; - space ' ' .or '\t'; - identifier .loop id_char .emit *; (3) - id_char 'a'-'z' .or 'A'-'Z' .or '_'; - - (**** sample code ****) - - declare fubar; - - In specifier (1) symbol <identifier> is followed by .emit VARIABLE. If it evaluates to - true, VARIABLE constant and then production of the symbol is output. Specifier (2) is used - to terminate the string with null to signal when the string ends. Specifier (3) outputs - all characters that make declared identifier. The result of sample code will be the - following array: - { 1, 'f', 'u', 'b', 'a', 'r', 0 } - - If .emit is followed by dollar $, it means that current position should be output. Current - position is a 32-bit unsigned integer distance from the very beginning of the parsed string to - first character consumed by the specifier associated with the .emit instruction. Current - position is stored in the output buffer in Little-Endian convention (the lowest byte comes - first). -*/ - -#include <stdio.h> - -static void mem_free (void **); - -/* - internal error messages -*/ -static const byte *OUT_OF_MEMORY = (byte *) "internal error 1001: out of physical memory"; -static const byte *UNRESOLVED_REFERENCE = (byte *) "internal error 1002: unresolved reference '$'"; -static const byte *INVALID_GRAMMAR_ID = (byte *) "internal error 1003: invalid grammar object"; -static const byte *INVALID_REGISTER_NAME = (byte *) "internal error 1004: invalid register name: '$'"; -/*static const byte *DUPLICATE_IDENTIFIER = (byte *) "internal error 1005: identifier '$' already defined";*/ -static const byte *UNREFERENCED_IDENTIFIER =(byte *) "internal error 1006: unreferenced identifier '$'"; - -static const byte *error_message = NULL; /* points to one of the error messages above */ -static byte *error_param = NULL; /* this is inserted into error_message in place of $ */ -static int error_position = -1; - -static byte *unknown = (byte *) "???"; - -static void clear_last_error (void) -{ - /* reset error message */ - error_message = NULL; - - /* free error parameter - if error_param is a "???" don't free it - it's static */ - if (error_param != unknown) - mem_free ((void **) (void *) &error_param); - else - error_param = NULL; - - /* reset error position */ - error_position = -1; -} - -static void set_last_error (const byte *msg, byte *param, int pos) -{ - /* error message can be set only once */ - if (error_message != NULL) - { - mem_free ((void **) (void *) ¶m); - return; - } - - error_message = msg; - - /* if param is NULL, set error_param to unknown ("???") */ - /* note: do not try to strdup the "???" - it may be that we are here because of */ - /* out of memory error so strdup can fail */ - if (param != NULL) - error_param = param; - else - error_param = unknown; - - error_position = pos; -} - -/* - memory management routines -*/ -static void *mem_alloc (size_t size) -{ - void *ptr = grammar_alloc_malloc (size); - if (ptr == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return ptr; -} - -static void *mem_copy (void *dst, const void *src, size_t size) -{ - return grammar_memory_copy (dst, src, size); -} - -static void mem_free (void **ptr) -{ - grammar_alloc_free (*ptr); - *ptr = NULL; -} - -static void *mem_realloc (void *ptr, size_t old_size, size_t new_size) -{ - void *ptr2 = grammar_alloc_realloc (ptr, old_size, new_size); - if (ptr2 == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return ptr2; -} - -static byte *str_copy_n (byte *dst, const byte *src, size_t max_len) -{ - return grammar_string_copy_n (dst, src, max_len); -} - -static byte *str_duplicate (const byte *str) -{ - byte *new_str = grammar_string_duplicate (str); - if (new_str == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return new_str; -} - -static int str_equal (const byte *str1, const byte *str2) -{ - return grammar_string_compare (str1, str2) == 0; -} - -static int str_equal_n (const byte *str1, const byte *str2, unsigned int n) -{ - return grammar_string_compare_n (str1, str2, n) == 0; -} - -static int -str_length (const byte *str) -{ - return (int) (grammar_string_length (str)); -} - -/* - useful macros -*/ -#define GRAMMAR_IMPLEMENT_LIST_APPEND(_Ty)\ - static void _Ty##_append (_Ty **x, _Ty *nx) {\ - while (*x) x = &(**x).next;\ - *x = nx;\ - } - -/* - string to byte map typedef -*/ -typedef struct map_byte_ -{ - byte *key; - byte data; - struct map_byte_ *next; -} map_byte; - -static void map_byte_create (map_byte **ma) -{ - *ma = (map_byte *) mem_alloc (sizeof (map_byte)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = '\0'; - (**ma).next = NULL; - } -} - -static void map_byte_destroy (map_byte **ma) -{ - if (*ma) - { - map_byte_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_byte) - -/* - searches the map for the specified key, - returns pointer to the element with the specified key if it exists - returns NULL otherwise -*/ -static map_byte *map_byte_locate (map_byte **ma, const byte *key) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - return *ma; - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return NULL; -} - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the key is matched, - returns 1 otherwise -*/ -static int map_byte_find (map_byte **ma, const byte *key, byte *data) -{ - map_byte *found = map_byte_locate (ma, key); - if (found != NULL) - { - *data = found->data; - - return 0; - } - - return 1; -} - -/* - regbyte context typedef - - Each regbyte consists of its name and a default value. These are static and created at - grammar script compile-time, for example the following line: - .regbyte vertex_blend 0x00 - adds a new regbyte named "vertex_blend" to the static list and initializes it to 0. - When the script is executed, this regbyte can be accessed by name for read and write. When a - particular regbyte is written, a new regbyte_ctx entry is added to the top of the regbyte_ctx - stack. The new entry contains information abot which regbyte it references and its new value. - When a given regbyte is accessed for read, the stack is searched top-down to find an - entry that references the regbyte. The first matching entry is used to return the current - value it holds. If no entry is found, the default value is returned. -*/ -typedef struct regbyte_ctx_ -{ - map_byte *m_regbyte; - byte m_current_value; - struct regbyte_ctx_ *m_prev; -} regbyte_ctx; - -static void regbyte_ctx_create (regbyte_ctx **re) -{ - *re = (regbyte_ctx *) mem_alloc (sizeof (regbyte_ctx)); - if (*re) - { - (**re).m_regbyte = NULL; - (**re).m_prev = NULL; - } -} - -static void regbyte_ctx_destroy (regbyte_ctx **re) -{ - if (*re) - { - mem_free ((void **) re); - } -} - -static byte regbyte_ctx_extract (regbyte_ctx **re, map_byte *reg) -{ - /* first lookup in the register stack */ - while (*re != NULL) - { - if ((**re).m_regbyte == reg) - return (**re).m_current_value; - - re = &(**re).m_prev; - } - - /* if not found - return the default value */ - return reg->data; -} - -/* - emit type typedef -*/ -typedef enum emit_type_ -{ - et_byte, /* explicit number */ - et_stream, /* eaten character */ - et_position /* current position */ -} emit_type; - -/* - emit destination typedef -*/ -typedef enum emit_dest_ -{ - ed_output, /* write to the output buffer */ - ed_regbyte /* write a particular regbyte */ -} emit_dest; - -/* - emit typedef -*/ -typedef struct emit_ -{ - emit_dest m_emit_dest; - emit_type m_emit_type; /* ed_output */ - byte m_byte; /* et_byte */ - map_byte *m_regbyte; /* ed_regbyte */ - byte *m_regname; /* ed_regbyte - temporary */ - struct emit_ *m_next; -} emit; - -static void emit_create (emit **em) -{ - *em = (emit *) mem_alloc (sizeof (emit)); - if (*em) - { - (**em).m_emit_dest = ed_output; - (**em).m_emit_type = et_byte; - (**em).m_byte = '\0'; - (**em).m_regbyte = NULL; - (**em).m_regname = NULL; - (**em).m_next = NULL; - } -} - -static void emit_destroy (emit **em) -{ - if (*em) - { - emit_destroy (&(**em).m_next); - mem_free ((void **) &(**em).m_regname); - mem_free ((void **) em); - } -} - -static unsigned int emit_size (emit *_E) -{ - unsigned int n = 0; - - while (_E != NULL) - { - if (_E->m_emit_dest == ed_output) - { - if (_E->m_emit_type == et_position) - n += 4; /* position is a 32-bit unsigned integer */ - else - n++; - } - _E = _E->m_next; - } - - return n; -} - -static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx **_Ctx) -{ - while (_E != NULL) - { - if (_E->m_emit_dest == ed_output) - { - if (_E->m_emit_type == et_byte) - *_P++ = _E->m_byte; - else if (_E->m_emit_type == et_stream) - *_P++ = c; - else /* _Em->type == et_position */ - { - *_P++ = (byte) (_Pos); - *_P++ = (byte) (_Pos >> 8); - *_P++ = (byte) (_Pos >> 16); - *_P++ = (byte) (_Pos >> 24); - } - } - else - { - regbyte_ctx *new_rbc; - regbyte_ctx_create (&new_rbc); - if (new_rbc == NULL) - return 1; - - new_rbc->m_prev = *_Ctx; - new_rbc->m_regbyte = _E->m_regbyte; - *_Ctx = new_rbc; - - if (_E->m_emit_type == et_byte) - new_rbc->m_current_value = _E->m_byte; - else if (_E->m_emit_type == et_stream) - new_rbc->m_current_value = c; - } - - _E = _E->m_next; - } - - return 0; -} - -/* - error typedef -*/ -typedef struct error_ -{ - byte *m_text; - byte *m_token_name; - struct rule_ *m_token; -} error; - -static void error_create (error **er) -{ - *er = (error *) mem_alloc (sizeof (error)); - if (*er) - { - (**er).m_text = NULL; - (**er).m_token_name = NULL; - (**er).m_token = NULL; - } -} - -static void error_destroy (error **er) -{ - if (*er) - { - mem_free ((void **) &(**er).m_text); - mem_free ((void **) &(**er).m_token_name); - mem_free ((void **) er); - } -} - -struct dict_; - -static byte * -error_get_token (error *, struct dict_ *, const byte *, int); - -/* - condition operand type typedef -*/ -typedef enum cond_oper_type_ -{ - cot_byte, /* constant 8-bit unsigned integer */ - cot_regbyte /* pointer to byte register containing the current value */ -} cond_oper_type; - -/* - condition operand typedef -*/ -typedef struct cond_oper_ -{ - cond_oper_type m_type; - byte m_byte; /* cot_byte */ - map_byte *m_regbyte; /* cot_regbyte */ - byte *m_regname; /* cot_regbyte - temporary */ -} cond_oper; - -/* - condition type typedef -*/ -typedef enum cond_type_ -{ - ct_equal, - ct_not_equal -} cond_type; - -/* - condition typedef -*/ -typedef struct cond_ -{ - cond_type m_type; - cond_oper m_operands[2]; -} cond; - -static void cond_create (cond **co) -{ - *co = (cond *) mem_alloc (sizeof (cond)); - if (*co) - { - (**co).m_operands[0].m_regname = NULL; - (**co).m_operands[1].m_regname = NULL; - } -} - -static void cond_destroy (cond **co) -{ - if (*co) - { - mem_free ((void **) &(**co).m_operands[0].m_regname); - mem_free ((void **) &(**co).m_operands[1].m_regname); - mem_free ((void **) co); - } -} - -/* - specifier type typedef -*/ -typedef enum spec_type_ -{ - st_false, - st_true, - st_byte, - st_byte_range, - st_string, - st_identifier, - st_identifier_loop, - st_debug -} spec_type; - -/* - specifier typedef -*/ -typedef struct spec_ -{ - spec_type m_spec_type; - byte m_byte[2]; /* st_byte, st_byte_range */ - byte *m_string; /* st_string */ - struct rule_ *m_rule; /* st_identifier, st_identifier_loop */ - emit *m_emits; - error *m_errtext; - cond *m_cond; - struct spec_ *next; -} spec; - -static void spec_create (spec **sp) -{ - *sp = (spec *) mem_alloc (sizeof (spec)); - if (*sp) - { - (**sp).m_spec_type = st_false; - (**sp).m_byte[0] = '\0'; - (**sp).m_byte[1] = '\0'; - (**sp).m_string = NULL; - (**sp).m_rule = NULL; - (**sp).m_emits = NULL; - (**sp).m_errtext = NULL; - (**sp).m_cond = NULL; - (**sp).next = NULL; - } -} - -static void spec_destroy (spec **sp) -{ - if (*sp) - { - spec_destroy (&(**sp).next); - emit_destroy (&(**sp).m_emits); - error_destroy (&(**sp).m_errtext); - mem_free ((void **) &(**sp).m_string); - cond_destroy (&(**sp).m_cond); - mem_free ((void **) sp); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(spec) - -/* - operator typedef -*/ -typedef enum oper_ -{ - op_none, - op_and, - op_or -} oper; - -/* - rule typedef -*/ -typedef struct rule_ -{ - oper m_oper; - spec *m_specs; - struct rule_ *next; - int m_referenced; -} rule; - -static void rule_create (rule **ru) -{ - *ru = (rule *) mem_alloc (sizeof (rule)); - if (*ru) - { - (**ru).m_oper = op_none; - (**ru).m_specs = NULL; - (**ru).next = NULL; - (**ru).m_referenced = 0; - } -} - -static void rule_destroy (rule **ru) -{ - if (*ru) - { - rule_destroy (&(**ru).next); - spec_destroy (&(**ru).m_specs); - mem_free ((void **) ru); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(rule) - -/* - returns unique grammar id -*/ -static grammar next_valid_grammar_id (void) -{ - static grammar id = 0; - - return ++id; -} - -/* - dictionary typedef -*/ -typedef struct dict_ -{ - rule *m_rulez; - rule *m_syntax; - rule *m_string; - map_byte *m_regbytes; - grammar m_id; - struct dict_ *next; -} dict; - -static void dict_create (dict **di) -{ - *di = (dict *) mem_alloc (sizeof (dict)); - if (*di) - { - (**di).m_rulez = NULL; - (**di).m_syntax = NULL; - (**di).m_string = NULL; - (**di).m_regbytes = NULL; - (**di).m_id = next_valid_grammar_id (); - (**di).next = NULL; - } -} - -static void dict_destroy (dict **di) -{ - if (*di) - { - rule_destroy (&(**di).m_rulez); - map_byte_destroy (&(**di).m_regbytes); - mem_free ((void **) di); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(dict) - -static void dict_find (dict **di, grammar key, dict **data) -{ - while (*di) - { - if ((**di).m_id == key) - { - *data = *di; - return; - } - - di = &(**di).next; - } - - *data = NULL; -} - -static dict *g_dicts = NULL; - -/* - byte array typedef -*/ -typedef struct barray_ -{ - byte *data; - unsigned int len; -} barray; - -static void barray_create (barray **ba) -{ - *ba = (barray *) mem_alloc (sizeof (barray)); - if (*ba) - { - (**ba).data = NULL; - (**ba).len = 0; - } -} - -static void barray_destroy (barray **ba) -{ - if (*ba) - { - mem_free ((void **) &(**ba).data); - mem_free ((void **) ba); - } -} - -/* - reallocates byte array to requested size, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_resize (barray **ba, unsigned int nlen) -{ - byte *new_pointer; - - if (nlen == 0) - { - mem_free ((void **) &(**ba).data); - (**ba).data = NULL; - (**ba).len = 0; - - return 0; - } - else - { - new_pointer = (byte *) mem_realloc ((**ba).data, (**ba).len * sizeof (byte), - nlen * sizeof (byte)); - if (new_pointer) - { - (**ba).data = new_pointer; - (**ba).len = nlen; - - return 0; - } - } - - return 1; -} - -/* - adds byte array pointed by *nb to the end of array pointed by *ba, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_append (barray **ba, barray **nb) -{ - const unsigned int len = (**ba).len; - - if (barray_resize (ba, (**ba).len + (**nb).len)) - return 1; - - mem_copy ((**ba).data + len, (**nb).data, (**nb).len); - - return 0; -} - -/* - adds emit chain pointed by em to the end of array pointed by *ba, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte_ctx **rbc) -{ - unsigned int count = emit_size (em); - - if (barray_resize (ba, (**ba).len + count)) - return 1; - - return emit_push (em, (**ba).data + ((**ba).len - count), c, pos, rbc); -} - -/* - byte pool typedef -*/ -typedef struct bytepool_ -{ - byte *_F; - unsigned int _Siz; -} bytepool; - -static void bytepool_destroy (bytepool **by) -{ - if (*by != NULL) - { - mem_free ((void **) &(**by)._F); - mem_free ((void **) by); - } -} - -static void bytepool_create (bytepool **by, int len) -{ - *by = (bytepool *) (mem_alloc (sizeof (bytepool))); - if (*by != NULL) - { - (**by)._F = (byte *) (mem_alloc (sizeof (byte) * len)); - (**by)._Siz = len; - - if ((**by)._F == NULL) - bytepool_destroy (by); - } -} - -static int bytepool_reserve (bytepool *by, unsigned int n) -{ - byte *_P; - - if (n <= by->_Siz) - return 0; - - /* byte pool can only grow and at least by doubling its size */ - n = n >= by->_Siz * 2 ? n : by->_Siz * 2; - - /* reallocate the memory and adjust pointers to the new memory location */ - _P = (byte *) (mem_realloc (by->_F, sizeof (byte) * by->_Siz, sizeof (byte) * n)); - if (_P != NULL) - { - by->_F = _P; - by->_Siz = n; - return 0; - } - - return 1; -} - -/* - string to string map typedef -*/ -typedef struct map_str_ -{ - byte *key; - byte *data; - struct map_str_ *next; -} map_str; - -static void map_str_create (map_str **ma) -{ - *ma = (map_str *) mem_alloc (sizeof (map_str)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = NULL; - (**ma).next = NULL; - } -} - -static void map_str_destroy (map_str **ma) -{ - if (*ma) - { - map_str_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) &(**ma).data); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_str) - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the key is matched, - returns 1 otherwise -*/ -static int map_str_find (map_str **ma, const byte *key, byte **data) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - { - *data = str_duplicate ((**ma).data); - if (*data == NULL) - return 1; - - return 0; - } - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return 1; -} - -/* - string to rule map typedef -*/ -typedef struct map_rule_ -{ - byte *key; - rule *data; - struct map_rule_ *next; -} map_rule; - -static void map_rule_create (map_rule **ma) -{ - *ma = (map_rule *) mem_alloc (sizeof (map_rule)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = NULL; - (**ma).next = NULL; - } -} - -static void map_rule_destroy (map_rule **ma) -{ - if (*ma) - { - map_rule_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_rule) - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the is matched, - returns 1 otherwise -*/ -static int map_rule_find (map_rule **ma, const byte *key, rule **data) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - { - *data = (**ma).data; - - return 0; - } - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return 1; -} - -/* - returns 1 if given character is a white space, - returns 0 otherwise -*/ -static int is_space (byte c) -{ - return c == ' ' || c == '\t' || c == '\n' || c == '\r'; -} - -/* - advances text pointer by 1 if character pointed by *text is a space, - returns 1 if a space has been eaten, - returns 0 otherwise -*/ -static int eat_space (const byte **text) -{ - if (is_space (**text)) - { - (*text)++; - - return 1; - } - - return 0; -} - -/* - returns 1 if text points to C-style comment start string, - returns 0 otherwise -*/ -static int is_comment_start (const byte *text) -{ - return text[0] == '/' && text[1] == '*'; -} - -/* - advances text pointer to first character after C-style comment block - if any, - returns 1 if C-style comment block has been encountered and eaten, - returns 0 otherwise -*/ -static int eat_comment (const byte **text) -{ - if (is_comment_start (*text)) - { - /* *text points to comment block - skip two characters to enter comment body */ - *text += 2; - /* skip any character except consecutive '*' and '/' */ - while (!((*text)[0] == '*' && (*text)[1] == '/')) - (*text)++; - /* skip those two terminating characters */ - *text += 2; - - return 1; - } - - return 0; -} - -/* - advances text pointer to first character that is neither space nor C-style comment block -*/ -static void eat_spaces (const byte **text) -{ - while (eat_space (text) || eat_comment (text)) - ; -} - -/* - resizes string pointed by *ptr to successfully add character c to the end of the string, - returns 0 on success, - returns 1 otherwise -*/ -static int string_grow (byte **ptr, unsigned int *len, byte c) -{ - /* reallocate the string in 16-byte increments */ - if ((*len & 0x0F) == 0x0F || *ptr == NULL) - { - byte *tmp = (byte *) mem_realloc (*ptr, ((*len + 1) & ~0x0F) * sizeof (byte), - ((*len + 1 + 0x10) & ~0x0F) * sizeof (byte)); - if (tmp == NULL) - return 1; - - *ptr = tmp; - } - - if (c) - { - /* append given character */ - (*ptr)[*len] = c; - (*len)++; - } - (*ptr)[*len] = '\0'; - - return 0; -} - -/* - returns 1 if given character is a valid identifier character a-z, A-Z, 0-9 or _ - returns 0 otherwise -*/ -static int is_identifier (byte c) -{ - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; -} - -/* - copies characters from *text to *id until non-identifier character is encountered, - assumes that *id points to NULL object - caller is responsible for later freeing the string, - text pointer is advanced to point past the copied identifier, - returns 0 if identifier was successfully copied, - returns 1 otherwise -*/ -static int get_identifier (const byte **text, byte **id) -{ - const byte *t = *text; - byte *p = NULL; - unsigned int len = 0; - - if (string_grow (&p, &len, '\0')) - return 1; - - /* loop while next character in buffer is valid for identifiers */ - while (is_identifier (*t)) - { - if (string_grow (&p, &len, *t++)) - { - mem_free ((void **) (void *) &p); - return 1; - } - } - - *text = t; - *id = p; - - return 0; -} - -/* - converts sequence of DEC digits pointed by *text until non-DEC digit is encountered, - advances text pointer past the converted sequence, - returns the converted value -*/ -static unsigned int dec_convert (const byte **text) -{ - unsigned int value = 0; - - while (**text >= '0' && **text <= '9') - { - value = value * 10 + **text - '0'; - (*text)++; - } - - return value; -} - -/* - returns 1 if given character is HEX digit 0-9, A-F or a-f, - returns 0 otherwise -*/ -static int is_hex (byte c) -{ - return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} - -/* - returns value of passed character as if it was HEX digit -*/ -static unsigned int hex2dec (byte c) -{ - if (c >= '0' && c <= '9') - return c - '0'; - if (c >= 'A' && c <= 'F') - return c - 'A' + 10; - return c - 'a' + 10; -} - -/* - converts sequence of HEX digits pointed by *text until non-HEX digit is encountered, - advances text pointer past the converted sequence, - returns the converted value -*/ -static unsigned int hex_convert (const byte **text) -{ - unsigned int value = 0; - - while (is_hex (**text)) - { - value = value * 0x10 + hex2dec (**text); - (*text)++; - } - - return value; -} - -/* - returns 1 if given character is OCT digit 0-7, - returns 0 otherwise -*/ -static int is_oct (byte c) -{ - return c >= '0' && c <= '7'; -} - -/* - returns value of passed character as if it was OCT digit -*/ -static int oct2dec (byte c) -{ - return c - '0'; -} - -static byte get_escape_sequence (const byte **text) -{ - int value = 0; - - /* skip '\' character */ - (*text)++; - - switch (*(*text)++) - { - case '\'': - return '\''; - case '"': - return '\"'; - case '?': - return '\?'; - case '\\': - return '\\'; - case 'a': - return '\a'; - case 'b': - return '\b'; - case 'f': - return '\f'; - case 'n': - return '\n'; - case 'r': - return '\r'; - case 't': - return '\t'; - case 'v': - return '\v'; - case 'x': - return (byte) hex_convert (text); - } - - (*text)--; - if (is_oct (**text)) - { - value = oct2dec (*(*text)++); - if (is_oct (**text)) - { - value = value * 010 + oct2dec (*(*text)++); - if (is_oct (**text)) - value = value * 010 + oct2dec (*(*text)++); - } - } - - return (byte) value; -} - -/* - copies characters from *text to *str until " or ' character is encountered, - assumes that *str points to NULL object - caller is responsible for later freeing the string, - assumes that *text points to " or ' character that starts the string, - text pointer is advanced to point past the " or ' character, - returns 0 if string was successfully copied, - returns 1 otherwise -*/ -static int get_string (const byte **text, byte **str) -{ - const byte *t = *text; - byte *p = NULL; - unsigned int len = 0; - byte term_char; - - if (string_grow (&p, &len, '\0')) - return 1; - - /* read " or ' character that starts the string */ - term_char = *t++; - /* while next character is not the terminating character */ - while (*t && *t != term_char) - { - byte c; - - if (*t == '\\') - c = get_escape_sequence (&t); - else - c = *t++; - - if (string_grow (&p, &len, c)) - { - mem_free ((void **) (void *) &p); - return 1; - } - } - /* skip " or ' character that ends the string */ - t++; - - *text = t; - *str = p; - return 0; -} - -/* - gets emit code, the syntax is: - ".emtcode" " " <symbol> " " (("0x" | "0X") <hex_value>) | <dec_value> | <character> - assumes that *text already points to <symbol>, - returns 0 if emit code is successfully read, - returns 1 otherwise -*/ -static int get_emtcode (const byte **text, map_byte **ma) -{ - const byte *t = *text; - map_byte *m = NULL; - - map_byte_create (&m); - if (m == NULL) - return 1; - - if (get_identifier (&t, &m->key)) - { - map_byte_destroy (&m); - return 1; - } - eat_spaces (&t); - - if (*t == '\'') - { - byte *c; - - if (get_string (&t, &c)) - { - map_byte_destroy (&m); - return 1; - } - - m->data = (byte) c[0]; - mem_free ((void **) (void *) &c); - } - else if (t[0] == '0' && (t[1] == 'x' || t[1] == 'X')) - { - /* skip HEX "0x" or "0X" prefix */ - t += 2; - m->data = (byte) hex_convert (&t); - } - else - { - m->data = (byte) dec_convert (&t); - } - - eat_spaces (&t); - - *text = t; - *ma = m; - return 0; -} - -/* - gets regbyte declaration, the syntax is: - ".regbyte" " " <symbol> " " (("0x" | "0X") <hex_value>) | <dec_value> | <character> - assumes that *text already points to <symbol>, - returns 0 if regbyte is successfully read, - returns 1 otherwise -*/ -static int get_regbyte (const byte **text, map_byte **ma) -{ - /* pass it to the emtcode parser as it has the same syntax starting at <symbol> */ - return get_emtcode (text, ma); -} - -/* - returns 0 on success, - returns 1 otherwise -*/ -static int get_errtext (const byte **text, map_str **ma) -{ - const byte *t = *text; - map_str *m = NULL; - - map_str_create (&m); - if (m == NULL) - return 1; - - if (get_identifier (&t, &m->key)) - { - map_str_destroy (&m); - return 1; - } - eat_spaces (&t); - - if (get_string (&t, &m->data)) - { - map_str_destroy (&m); - return 1; - } - eat_spaces (&t); - - *text = t; - *ma = m; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_error (const byte **text, error **er, map_str *maps) -{ - const byte *t = *text; - byte *temp = NULL; - - if (*t != '.') - return 0; - - t++; - if (get_identifier (&t, &temp)) - return 1; - eat_spaces (&t); - - if (!str_equal ((byte *) "error", temp)) - { - mem_free ((void **) (void *) &temp); - return 0; - } - - mem_free ((void **) (void *) &temp); - - error_create (er); - if (*er == NULL) - return 1; - - if (*t == '\"') - { - if (get_string (&t, &(**er).m_text)) - { - error_destroy (er); - return 1; - } - eat_spaces (&t); - } - else - { - if (get_identifier (&t, &temp)) - { - error_destroy (er); - return 1; - } - eat_spaces (&t); - - if (map_str_find (&maps, temp, &(**er).m_text)) - { - mem_free ((void **) (void *) &temp); - error_destroy (er); - return 1; - } - - mem_free ((void **) (void *) &temp); - } - - /* try to extract "token" from "...$token$..." */ - { - byte *processed = NULL; - unsigned int len = 0; - int i = 0; - - if (string_grow (&processed, &len, '\0')) - { - error_destroy (er); - return 1; - } - - while (i < str_length ((**er).m_text)) - { - /* check if the dollar sign is repeated - if so skip it */ - if ((**er).m_text[i] == '$' && (**er).m_text[i + 1] == '$') - { - if (string_grow (&processed, &len, '$')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i += 2; - } - else if ((**er).m_text[i] != '$') - { - if (string_grow (&processed, &len, (**er).m_text[i])) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i++; - } - else - { - if (string_grow (&processed, &len, '$')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - { - /* length of token being extracted */ - unsigned int tlen = 0; - - if (string_grow (&(**er).m_token_name, &tlen, '\0')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - /* skip the dollar sign */ - i++; - - while ((**er).m_text[i] != '$') - { - if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i])) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i++; - } - - /* skip the dollar sign */ - i++; - } - } - } - - mem_free ((void **) &(**er).m_text); - (**er).m_text = processed; - } - - *text = t; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_emits (const byte **text, emit **em, map_byte *mapb) -{ - const byte *t = *text; - byte *temp = NULL; - emit *e = NULL; - emit_dest dest; - - if (*t != '.') - return 0; - - t++; - if (get_identifier (&t, &temp)) - return 1; - eat_spaces (&t); - - /* .emit */ - if (str_equal ((byte *) "emit", temp)) - dest = ed_output; - /* .load */ - else if (str_equal ((byte *) "load", temp)) - dest = ed_regbyte; - else - { - mem_free ((void **) (void *) &temp); - return 0; - } - - mem_free ((void **) (void *) &temp); - - emit_create (&e); - if (e == NULL) - return 1; - - e->m_emit_dest = dest; - - if (dest == ed_regbyte) - { - if (get_identifier (&t, &e->m_regname)) - { - emit_destroy (&e); - return 1; - } - eat_spaces (&t); - } - - /* 0xNN */ - if (*t == '0' && (t[1] == 'x' || t[1] == 'X')) - { - t += 2; - e->m_byte = (byte) hex_convert (&t); - - e->m_emit_type = et_byte; - } - /* NNN */ - else if (*t >= '0' && *t <= '9') - { - e->m_byte = (byte) dec_convert (&t); - - e->m_emit_type = et_byte; - } - /* * */ - else if (*t == '*') - { - t++; - - e->m_emit_type = et_stream; - } - /* $ */ - else if (*t == '$') - { - t++; - - e->m_emit_type = et_position; - } - /* 'c' */ - else if (*t == '\'') - { - if (get_string (&t, &temp)) - { - emit_destroy (&e); - return 1; - } - e->m_byte = (byte) temp[0]; - - mem_free ((void **) (void *) &temp); - - e->m_emit_type = et_byte; - } - else - { - if (get_identifier (&t, &temp)) - { - emit_destroy (&e); - return 1; - } - - if (map_byte_find (&mapb, temp, &e->m_byte)) - { - mem_free ((void **) (void *) &temp); - emit_destroy (&e); - return 1; - } - - mem_free ((void **) (void *) &temp); - - e->m_emit_type = et_byte; - } - - eat_spaces (&t); - - if (get_emits (&t, &e->m_next, mapb)) - { - emit_destroy (&e); - return 1; - } - - *text = t; - *em = e; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb) -{ - const byte *t = *text; - spec *s = NULL; - - spec_create (&s); - if (s == NULL) - return 1; - - /* first - read optional .if statement */ - if (*t == '.') - { - const byte *u = t; - byte *keyword = NULL; - - /* skip the dot */ - u++; - - if (get_identifier (&u, &keyword)) - { - spec_destroy (&s); - return 1; - } - - /* .if */ - if (str_equal ((byte *) "if", keyword)) - { - cond_create (&s->m_cond); - if (s->m_cond == NULL) - { - spec_destroy (&s); - return 1; - } - - /* skip the left paren */ - eat_spaces (&u); - u++; - - /* get the left operand */ - eat_spaces (&u); - if (get_identifier (&u, &s->m_cond->m_operands[0].m_regname)) - { - spec_destroy (&s); - return 1; - } - s->m_cond->m_operands[0].m_type = cot_regbyte; - - /* get the operator (!= or ==) */ - eat_spaces (&u); - if (*u == '!') - s->m_cond->m_type = ct_not_equal; - else - s->m_cond->m_type = ct_equal; - u += 2; - eat_spaces (&u); - - if (u[0] == '0' && (u[1] == 'x' || u[1] == 'X')) - { - /* skip the 0x prefix */ - u += 2; - - /* get the right operand */ - s->m_cond->m_operands[1].m_byte = hex_convert (&u); - s->m_cond->m_operands[1].m_type = cot_byte; - } - else /*if (*u >= '0' && *u <= '9')*/ - { - /* get the right operand */ - s->m_cond->m_operands[1].m_byte = dec_convert (&u); - s->m_cond->m_operands[1].m_type = cot_byte; - } - - /* skip the right paren */ - eat_spaces (&u); - u++; - - eat_spaces (&u); - - t = u; - } - - mem_free ((void **) (void *) &keyword); - } - - if (*t == '\'') - { - byte *temp = NULL; - - if (get_string (&t, &temp)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - if (*t == '-') - { - byte *temp2 = NULL; - - /* skip the '-' character */ - t++; - eat_spaces (&t); - - if (get_string (&t, &temp2)) - { - mem_free ((void **) (void *) &temp); - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_byte_range; - s->m_byte[0] = *temp; - s->m_byte[1] = *temp2; - - mem_free ((void **) (void *) &temp2); - } - else - { - s->m_spec_type = st_byte; - *s->m_byte = *temp; - } - - mem_free ((void **) (void *) &temp); - } - else if (*t == '"') - { - if (get_string (&t, &s->m_string)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_string; - } - else if (*t == '.') - { - byte *keyword = NULL; - - /* skip the dot */ - t++; - - if (get_identifier (&t, &keyword)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - /* .true */ - if (str_equal ((byte *) "true", keyword)) - { - s->m_spec_type = st_true; - } - /* .false */ - else if (str_equal ((byte *) "false", keyword)) - { - s->m_spec_type = st_false; - } - /* .debug */ - else if (str_equal ((byte *) "debug", keyword)) - { - s->m_spec_type = st_debug; - } - /* .loop */ - else if (str_equal ((byte *) "loop", keyword)) - { - if (get_identifier (&t, &s->m_string)) - { - mem_free ((void **) (void *) &keyword); - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_identifier_loop; - } - mem_free ((void **) (void *) &keyword); - } - else - { - if (get_identifier (&t, &s->m_string)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_identifier; - } - - if (get_error (&t, &s->m_errtext, maps)) - { - spec_destroy (&s); - return 1; - } - - if (get_emits (&t, &s->m_emits, mapb)) - { - spec_destroy (&s); - return 1; - } - - *text = t; - *sp = s; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_rule (const byte **text, rule **ru, map_str *maps, map_byte *mapb) -{ - const byte *t = *text; - rule *r = NULL; - - rule_create (&r); - if (r == NULL) - return 1; - - if (get_spec (&t, &r->m_specs, maps, mapb)) - { - rule_destroy (&r); - return 1; - } - - while (*t != ';') - { - byte *op = NULL; - spec *sp = NULL; - - /* skip the dot that precedes "and" or "or" */ - t++; - - /* read "and" or "or" keyword */ - if (get_identifier (&t, &op)) - { - rule_destroy (&r); - return 1; - } - eat_spaces (&t); - - if (r->m_oper == op_none) - { - /* .and */ - if (str_equal ((byte *) "and", op)) - r->m_oper = op_and; - /* .or */ - else - r->m_oper = op_or; - } - - mem_free ((void **) (void *) &op); - - if (get_spec (&t, &sp, maps, mapb)) - { - rule_destroy (&r); - return 1; - } - - spec_append (&r->m_specs, sp); - } - - /* skip the semicolon */ - t++; - eat_spaces (&t); - - *text = t; - *ru = r; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int update_dependency (map_rule *mapr, byte *symbol, rule **ru) -{ - if (map_rule_find (&mapr, symbol, ru)) - return 1; - - (**ru).m_referenced = 1; - - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int update_dependencies (dict *di, map_rule *mapr, byte **syntax_symbol, - byte **string_symbol, map_byte *regbytes) -{ - rule *rulez = di->m_rulez; - - /* update dependecies for the root and lexer symbols */ - if (update_dependency (mapr, *syntax_symbol, &di->m_syntax) || - (*string_symbol != NULL && update_dependency (mapr, *string_symbol, &di->m_string))) - return 1; - - mem_free ((void **) syntax_symbol); - mem_free ((void **) string_symbol); - - /* update dependecies for the rest of the rules */ - while (rulez) - { - spec *sp = rulez->m_specs; - - /* iterate through all the specifiers */ - while (sp) - { - /* update dependency for identifier */ - if (sp->m_spec_type == st_identifier || sp->m_spec_type == st_identifier_loop) - { - if (update_dependency (mapr, sp->m_string, &sp->m_rule)) - return 1; - - mem_free ((void **) &sp->m_string); - } - - /* some errtexts reference to a rule */ - if (sp->m_errtext && sp->m_errtext->m_token_name) - { - if (update_dependency (mapr, sp->m_errtext->m_token_name, &sp->m_errtext->m_token)) - return 1; - - mem_free ((void **) &sp->m_errtext->m_token_name); - } - - /* update dependency for condition */ - if (sp->m_cond) - { - int i; - for (i = 0; i < 2; i++) - if (sp->m_cond->m_operands[i].m_type == cot_regbyte) - { - sp->m_cond->m_operands[i].m_regbyte = map_byte_locate (®bytes, - sp->m_cond->m_operands[i].m_regname); - - if (sp->m_cond->m_operands[i].m_regbyte == NULL) - return 1; - - mem_free ((void **) &sp->m_cond->m_operands[i].m_regname); - } - } - - /* update dependency for all .load instructions */ - if (sp->m_emits) - { - emit *em = sp->m_emits; - while (em != NULL) - { - if (em->m_emit_dest == ed_regbyte) - { - em->m_regbyte = map_byte_locate (®bytes, em->m_regname); - - if (em->m_regbyte == NULL) - return 1; - - mem_free ((void **) &em->m_regname); - } - - em = em->m_next; - } - } - - sp = sp->next; - } - - rulez = rulez->next; - } - - /* check for unreferenced symbols */ - rulez = di->m_rulez; - while (rulez != NULL) - { - if (!rulez->m_referenced) - { - map_rule *ma = mapr; - while (ma) - { - if (ma->data == rulez) - { - set_last_error (UNREFERENCED_IDENTIFIER, str_duplicate (ma->key), -1); - return 1; - } - ma = ma->next; - } - } - rulez = rulez->next; - } - - return 0; -} - -static int satisfies_condition (cond *co, regbyte_ctx *ctx) -{ - byte values[2]; - int i; - - if (co == NULL) - return 1; - - for (i = 0; i < 2; i++) - switch (co->m_operands[i].m_type) - { - case cot_byte: - values[i] = co->m_operands[i].m_byte; - break; - case cot_regbyte: - values[i] = regbyte_ctx_extract (&ctx, co->m_operands[i].m_regbyte); - break; - } - - switch (co->m_type) - { - case ct_equal: - return values[0] == values[1]; - case ct_not_equal: - return values[0] != values[1]; - } - - return 0; -} - -static void free_regbyte_ctx_stack (regbyte_ctx *top, regbyte_ctx *limit) -{ - while (top != limit) - { - regbyte_ctx *rbc = top->m_prev; - regbyte_ctx_destroy (&top); - top = rbc; - } -} - -typedef enum match_result_ -{ - mr_not_matched, /* the examined string does not match */ - mr_matched, /* the examined string matches */ - mr_error_raised, /* mr_not_matched + error has been raised */ - mr_dont_emit, /* used by identifier loops only */ - mr_internal_error /* an internal error has occured such as out of memory */ -} match_result; - -/* - * This function does the main job. It parses the text and generates output data. - */ -static match_result -match (dict *di, const byte *text, int *index, rule *ru, barray **ba, int filtering_string, - regbyte_ctx **rbc) -{ - int ind = *index; - match_result status = mr_not_matched; - spec *sp = ru->m_specs; - regbyte_ctx *ctx = *rbc; - - /* for every specifier in the rule */ - while (sp) - { - int i, len, save_ind = ind; - barray *array = NULL; - - if (satisfies_condition (sp->m_cond, ctx)) - { - switch (sp->m_spec_type) - { - case st_identifier: - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - status = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx); - - if (status == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - break; - case st_string: - len = str_length (sp->m_string); - - /* prefilter the stream */ - if (!filtering_string && di->m_string) - { - barray *ba; - int filter_index = 0; - match_result result; - regbyte_ctx *null_ctx = NULL; - - barray_create (&ba); - if (ba == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - result = match (di, text + ind, &filter_index, di->m_string, &ba, 1, &null_ctx); - - if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&ba); - return mr_internal_error; - } - - if (result != mr_matched) - { - barray_destroy (&ba); - status = mr_not_matched; - break; - } - - barray_destroy (&ba); - - if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len)) - { - status = mr_not_matched; - break; - } - - status = mr_matched; - ind += len; - } - else - { - status = mr_matched; - for (i = 0; status == mr_matched && i < len; i++) - if (text[ind + i] != sp->m_string[i]) - status = mr_not_matched; - - if (status == mr_matched) - ind += len; - } - break; - case st_byte: - status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_byte_range: - status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ? - mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_true: - status = mr_matched; - break; - case st_false: - status = mr_not_matched; - break; - case st_debug: - status = ru->m_oper == op_and ? mr_matched : mr_not_matched; - break; - case st_identifier_loop: - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - status = mr_dont_emit; - for (;;) - { - match_result result; - - save_ind = ind; - result = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx); - - if (result == mr_error_raised) - { - status = result; - break; - } - else if (result == mr_matched) - { - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx) || - barray_append (ba, &array)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - barray_destroy (&array); - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - else if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - else - break; - } - break; - } - } - else - { - status = mr_not_matched; - } - - if (status == mr_error_raised) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - - return mr_error_raised; - } - - if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - - if (sp->m_errtext) - { - set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text, - ind), ind); - - return mr_error_raised; - } - - return mr_not_matched; - } - - if (status == mr_matched) - { - if (sp->m_emits) - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - - if (array) - if (barray_append (ba, &array)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - } - - barray_destroy (&array); - - /* if the rule operator is a logical or, we pick up the first matching specifier */ - if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - return mr_matched; - } - - sp = sp->next; - } - - /* everything went fine - all specifiers match up */ - if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - return mr_matched; - } - - free_regbyte_ctx_stack (ctx, *rbc); - return mr_not_matched; -} - -static match_result -fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool *_BP, - int filtering_string, regbyte_ctx **rbc) -{ - int ind = *index; - int _P = filtering_string ? 0 : *_PP; - int _P2; - match_result status = mr_not_matched; - spec *sp = ru->m_specs; - regbyte_ctx *ctx = *rbc; - - /* for every specifier in the rule */ - while (sp) - { - int i, len, save_ind = ind; - - _P2 = _P + (sp->m_emits ? emit_size (sp->m_emits) : 0); - if (bytepool_reserve (_BP, _P2)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - if (satisfies_condition (sp->m_cond, ctx)) - { - switch (sp->m_spec_type) - { - case st_identifier: - status = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx); - - if (status == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - break; - case st_string: - len = str_length (sp->m_string); - - /* prefilter the stream */ - if (!filtering_string && di->m_string) - { - int filter_index = 0; - match_result result; - regbyte_ctx *null_ctx = NULL; - - result = fast_match (di, text + ind, &filter_index, di->m_string, NULL, _BP, 1, &null_ctx); - - if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - if (result != mr_matched) - { - status = mr_not_matched; - break; - } - - if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len)) - { - status = mr_not_matched; - break; - } - - status = mr_matched; - ind += len; - } - else - { - status = mr_matched; - for (i = 0; status == mr_matched && i < len; i++) - if (text[ind + i] != sp->m_string[i]) - status = mr_not_matched; - - if (status == mr_matched) - ind += len; - } - break; - case st_byte: - status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_byte_range: - status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ? - mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_true: - status = mr_matched; - break; - case st_false: - status = mr_not_matched; - break; - case st_debug: - status = ru->m_oper == op_and ? mr_matched : mr_not_matched; - break; - case st_identifier_loop: - status = mr_dont_emit; - for (;;) - { - match_result result; - - save_ind = ind; - result = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx); - - if (result == mr_error_raised) - { - status = result; - break; - } - else if (result == mr_matched) - { - if (!filtering_string) - { - if (sp->m_emits != NULL) - { - if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - - _P = _P2; - _P2 += sp->m_emits ? emit_size (sp->m_emits) : 0; - if (bytepool_reserve (_BP, _P2)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - } - else if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - else - break; - } - break; - } - } - else - { - status = mr_not_matched; - } - - if (status == mr_error_raised) - { - free_regbyte_ctx_stack (ctx, *rbc); - - return mr_error_raised; - } - - if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit) - { - free_regbyte_ctx_stack (ctx, *rbc); - - if (sp->m_errtext) - { - set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text, - ind), ind); - - return mr_error_raised; - } - - return mr_not_matched; - } - - if (status == mr_matched) - { - if (sp->m_emits != NULL) { - const byte ch = (ind <= 0) ? 0 : text[ind - 1]; - if (emit_push (sp->m_emits, _BP->_F + _P, ch, save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - } - _P = _P2; - } - - /* if the rule operator is a logical or, we pick up the first matching specifier */ - if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - if (!filtering_string) - *_PP = _P; - return mr_matched; - } - - sp = sp->next; - } - - /* everything went fine - all specifiers match up */ - if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - if (!filtering_string) - *_PP = _P; - return mr_matched; - } - - free_regbyte_ctx_stack (ctx, *rbc); - return mr_not_matched; -} - -static byte * -error_get_token (error *er, dict *di, const byte *text, int ind) -{ - byte *str = NULL; - - if (er->m_token) - { - barray *ba; - int filter_index = 0; - regbyte_ctx *ctx = NULL; - - barray_create (&ba); - if (ba != NULL) - { - if (match (di, text + ind, &filter_index, er->m_token, &ba, 0, &ctx) == mr_matched && - filter_index) - { - str = (byte *) mem_alloc (filter_index + 1); - if (str != NULL) - { - str_copy_n (str, text + ind, filter_index); - str[filter_index] = '\0'; - } - } - barray_destroy (&ba); - } - } - - return str; -} - -typedef struct grammar_load_state_ -{ - dict *di; - byte *syntax_symbol; - byte *string_symbol; - map_str *maps; - map_byte *mapb; - map_rule *mapr; -} grammar_load_state; - -static void grammar_load_state_create (grammar_load_state **gr) -{ - *gr = (grammar_load_state *) mem_alloc (sizeof (grammar_load_state)); - if (*gr) - { - (**gr).di = NULL; - (**gr).syntax_symbol = NULL; - (**gr).string_symbol = NULL; - (**gr).maps = NULL; - (**gr).mapb = NULL; - (**gr).mapr = NULL; - } -} - -static void grammar_load_state_destroy (grammar_load_state **gr) -{ - if (*gr) - { - dict_destroy (&(**gr).di); - mem_free ((void **) &(**gr).syntax_symbol); - mem_free ((void **) &(**gr).string_symbol); - map_str_destroy (&(**gr).maps); - map_byte_destroy (&(**gr).mapb); - map_rule_destroy (&(**gr).mapr); - mem_free ((void **) gr); - } -} - - -static void error_msg(int line, const char *msg) -{ - fprintf(stderr, "Error in grammar_load_from_text() at line %d: %s\n", line, msg); -} - - -/* - the API -*/ -grammar grammar_load_from_text (const byte *text) -{ - grammar_load_state *g = NULL; - grammar id = 0; - - clear_last_error (); - - grammar_load_state_create (&g); - if (g == NULL) { - error_msg(__LINE__, ""); - return 0; - } - - dict_create (&g->di); - if (g->di == NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - eat_spaces (&text); - - /* skip ".syntax" keyword */ - text += 7; - eat_spaces (&text); - - /* retrieve root symbol */ - if (get_identifier (&text, &g->syntax_symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - eat_spaces (&text); - - /* skip semicolon */ - text++; - eat_spaces (&text); - - while (*text) - { - byte *symbol = NULL; - int is_dot = *text == '.'; - - if (is_dot) - text++; - - if (get_identifier (&text, &symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - eat_spaces (&text); - - /* .emtcode */ - if (is_dot && str_equal (symbol, (byte *) "emtcode")) - { - map_byte *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_emtcode (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_byte_append (&g->mapb, ma); - } - /* .regbyte */ - else if (is_dot && str_equal (symbol, (byte *) "regbyte")) - { - map_byte *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_regbyte (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_byte_append (&g->di->m_regbytes, ma); - } - /* .errtext */ - else if (is_dot && str_equal (symbol, (byte *) "errtext")) - { - map_str *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_errtext (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_str_append (&g->maps, ma); - } - /* .string */ - else if (is_dot && str_equal (symbol, (byte *) "string")) - { - mem_free ((void **) (void *) &symbol); - - if (g->di->m_string != NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - if (get_identifier (&text, &g->string_symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - /* skip semicolon */ - eat_spaces (&text); - text++; - eat_spaces (&text); - } - else - { - rule *ru = NULL; - map_rule *ma = NULL; - - if (get_rule (&text, &ru, g->maps, g->mapb)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - rule_append (&g->di->m_rulez, ru); - - /* if a rule consist of only one specifier, give it an ".and" operator */ - if (ru->m_oper == op_none) - ru->m_oper = op_and; - - map_rule_create (&ma); - if (ma == NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - ma->key = symbol; - ma->data = ru; - map_rule_append (&g->mapr, ma); - } - } - - if (update_dependencies (g->di, g->mapr, &g->syntax_symbol, &g->string_symbol, - g->di->m_regbytes)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, "update_dependencies() failed"); - return 0; - } - - dict_append (&g_dicts, g->di); - id = g->di->m_id; - g->di = NULL; - - grammar_load_state_destroy (&g); - - return id; -} - -int grammar_set_reg8 (grammar id, const byte *name, byte value) -{ - dict *di = NULL; - map_byte *reg = NULL; - - clear_last_error (); - - dict_find (&g_dicts, id, &di); - if (di == NULL) - { - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; - } - - reg = map_byte_locate (&di->m_regbytes, name); - if (reg == NULL) - { - set_last_error (INVALID_REGISTER_NAME, str_duplicate (name), -1); - return 0; - } - - reg->data = value; - return 1; -} - -/* - internal checking function used by both grammar_check and grammar_fast_check functions -*/ -static int _grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size, int use_fast_path) -{ - dict *di = NULL; - int index = 0; - - clear_last_error (); - - dict_find (&g_dicts, id, &di); - if (di == NULL) - { - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; - } - - *prod = NULL; - *size = 0; - - if (use_fast_path) - { - regbyte_ctx *rbc = NULL; - bytepool *bp = NULL; - int _P = 0; - - bytepool_create (&bp, estimate_prod_size); - if (bp == NULL) - return 0; - - if (fast_match (di, text, &index, di->m_syntax, &_P, bp, 0, &rbc) != mr_matched) - { - bytepool_destroy (&bp); - free_regbyte_ctx_stack (rbc, NULL); - return 0; - } - - free_regbyte_ctx_stack (rbc, NULL); - - *prod = bp->_F; - *size = _P; - bp->_F = NULL; - bytepool_destroy (&bp); - } - else - { - regbyte_ctx *rbc = NULL; - barray *ba = NULL; - - barray_create (&ba); - if (ba == NULL) - return 0; - - if (match (di, text, &index, di->m_syntax, &ba, 0, &rbc) != mr_matched) - { - barray_destroy (&ba); - free_regbyte_ctx_stack (rbc, NULL); - return 0; - } - - free_regbyte_ctx_stack (rbc, NULL); - - *prod = (byte *) mem_alloc (ba->len * sizeof (byte)); - if (*prod == NULL) - { - barray_destroy (&ba); - return 0; - } - - mem_copy (*prod, ba->data, ba->len * sizeof (byte)); - *size = ba->len; - barray_destroy (&ba); - } - - return 1; -} - -int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size) -{ - return _grammar_check (id, text, prod, size, 0, 0); -} - -int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size) -{ - return _grammar_check (id, text, prod, size, estimate_prod_size, 1); -} - -int grammar_destroy (grammar id) -{ - dict **di = &g_dicts; - - clear_last_error (); - - while (*di != NULL) - { - if ((**di).m_id == id) - { - dict *tmp = *di; - *di = (**di).next; - dict_destroy (&tmp); - return 1; - } - - di = &(**di).next; - } - - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; -} - -static void append_character (const char x, byte *text, int *dots_made, int *len, int size) -{ - if (*dots_made == 0) - { - if (*len < size - 1) - { - text[(*len)++] = x; - text[*len] = '\0'; - } - else - { - int i; - for (i = 0; i < 3; i++) - if (--(*len) >= 0) - text[*len] = '.'; - *dots_made = 1; - } - } -} - -void grammar_get_last_error (byte *text, unsigned int size, int *pos) -{ - int len = 0, dots_made = 0; - const byte *p = error_message; - - *text = '\0'; - - if (p) - { - while (*p) - { - if (*p == '$') - { - const byte *r = error_param; - - while (*r) - { - append_character (*r++, text, &dots_made, &len, (int) size); - } - - p++; - } - else - { - append_character (*p++, text, &dots_made, &len, size); - } - } - } - - *pos = error_position; -} diff --git a/src/mesa/shader/grammar/grammar.h b/src/mesa/shader/grammar/grammar.h deleted file mode 100644 index 591e38aefa6..00000000000 --- a/src/mesa/shader/grammar/grammar.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.2 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef GRAMMAR_H -#define GRAMMAR_H - - -#ifndef GRAMMAR_PORT_INCLUDE -#error Do not include this file directly, include your grammar_XXX.h instead -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -void grammar_alloc_free (void *); -void *grammar_alloc_malloc (size_t); -void *grammar_alloc_realloc (void *, size_t, size_t); -void *grammar_memory_copy (void *, const void *, size_t); -int grammar_string_compare (const byte *, const byte *); -int grammar_string_compare_n (const byte *, const byte *, size_t); -byte *grammar_string_copy (byte *, const byte *); -byte *grammar_string_copy_n (byte *, const byte *, size_t); -byte *grammar_string_duplicate (const byte *); -unsigned int grammar_string_length (const byte *); - -/* - loads grammar script from null-terminated ASCII <text> - returns unique grammar id to grammar object - returns 0 if an error occurs (call grammar_get_last_error to retrieve the error text) -*/ -grammar grammar_load_from_text (const byte *text); - -/* - sets a new <value> to a register <name> for grammar <id> - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success -*/ -int grammar_set_reg8 (grammar id, const byte *name, byte value); - -/* - this function is obsolete, use only for debugging purposes - - checks if a null-terminated <text> matches given grammar <id> - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success, the <prod> points to newly allocated buffer with production and <size> - is filled with the production size - call grammar_alloc_free to free the memory block pointed by <prod> -*/ -int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size); - -/* - does the same what grammar_check does but much more (approx. 4 times) faster - use this function instead of grammar_check - <estimate_prod_size> is a hint - the initial production buffer size will be of this size, - but if more room is needed it will be safely resized; set it to 0x1000 or so -*/ -int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size); - -/* - destroys grammar object identified by <id> - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success -*/ -int grammar_destroy (grammar id); - -/* - retrieves last grammar error reported either by grammar_load_from_text, grammar_check - or grammar_destroy - the user allocated <text> buffer receives error description, <pos> points to error position, - <size> is the size of the text buffer to fill in - it must be at least 4 bytes long, -*/ -void grammar_get_last_error (byte *text, unsigned int size, int *pos); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/src/mesa/shader/grammar/grammar.syn b/src/mesa/shader/grammar/grammar.syn deleted file mode 100644 index 5d99f65bfce..00000000000 --- a/src/mesa/shader/grammar/grammar.syn +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.2 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /** - * \file grammar.syn - * syntax of .syn script - used to validate other syntax files - * \author Michal Krol - */ - -.syntax grammar; - -/* declaration */ -.emtcode DECLARATION_END 0 -.emtcode DECLARATION_EMITCODE 1 -.emtcode DECLARATION_ERRORTEXT 2 -.emtcode DECLARATION_REGBYTE 3 -.emtcode DECLARATION_LEXER 4 -.emtcode DECLARATION_RULE 5 - -/* specifier */ -.emtcode SPECIFIER_END 0 -.emtcode SPECIFIER_AND_TAG 1 -.emtcode SPECIFIER_OR_TAG 2 -.emtcode SPECIFIER_CHARACTER_RANGE 3 -.emtcode SPECIFIER_CHARACTER 4 -.emtcode SPECIFIER_STRING 5 -.emtcode SPECIFIER_IDENTIFIER 6 -.emtcode SPECIFIER_TRUE 7 -.emtcode SPECIFIER_FALSE 8 -.emtcode SPECIFIER_DEBUG 9 - -/* identifier */ -.emtcode IDENTIFIER_SIMPLE 0 -.emtcode IDENTIFIER_LOOP 1 - -/* error */ -.emtcode ERROR_NOT_PRESENT 0 -.emtcode ERROR_PRESENT 1 - -/* emit */ -.emtcode EMIT_NULL 0 -.emtcode EMIT_INTEGER 1 -.emtcode EMIT_IDENTIFIER 2 -.emtcode EMIT_CHARACTER 3 -.emtcode EMIT_LAST_CHARACTER 4 -.emtcode EMIT_CURRENT_POSITION 5 - -.errtext INVALID_GRAMMAR "internal error 2001: invalid grammar script" -.errtext SYNTAX_EXPECTED "internal error 2002: '.syntax' keyword expected" -.errtext IDENTIFIER_EXPECTED "internal error 2003: identifier expected" -.errtext MISSING_SEMICOLON "internal error 2004: missing ';'" -.errtext INTEGER_EXPECTED "internal error 2005: integer value expected" -.errtext STRING_EXPECTED "internal error 2006: string expected" - -/* - <grammar> ::= ".syntax" <identifier> ";" <declaration_list> -*/ -grammar - grammar_1 .error INVALID_GRAMMAR; -grammar_1 - optional_space .and ".syntax" .error SYNTAX_EXPECTED .and space .and identifier .and - semicolon .and declaration_list .and optional_space .and '\0' .emit DECLARATION_END; - -/* - <optional_space> ::= <space> - | "" -*/ -optional_space - space .or .true; - -/* - <space> ::= <single_space> <single_space>* -*/ -space - single_space .and .loop single_space; - -/* - <single_space> ::= <white_char> - | <comment_block> -*/ -single_space - white_char .or comment_block; - -/* - <white_char> ::= " " - | "\t" - | "\n" - | "\r" -*/ -white_char - ' ' .or '\t' .or '\n' .or '\r'; - -/* - <comment_block> ::= "/" "*" <comment_rest> -*/ -comment_block - '/' .and '*' .and comment_rest; - -/* - <comment_rest> ::= <comment_char_no_star>* <comment_end> - | <comment_char_no_star>* "*" <comment_rest> -*/ -comment_rest - .loop comment_char_no_star .and comment_rest_1; -comment_rest_1 - comment_end .or comment_rest_2; -comment_rest_2 - '*' .and comment_rest; - -/* - <comment_char_no_star> ::= All ASCII characters except "*" and "\0" -*/ -comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -/* - <comment_end> ::= "*" "/" -*/ -comment_end - '*' .and '/'; - -/* - <identifier> ::= <identifier> -*/ -identifier - identifier_ne .error IDENTIFIER_EXPECTED; - -/* - <identifier_ne> ::= <first_idchar> <follow_idchar>* -*/ -identifier_ne - first_idchar .emit * .and .loop follow_idchar .emit * .and .true .emit '\0'; - -/* - <first_idchar> ::= "a"-"z" - | "A"-"Z" - | "_" -*/ -first_idchar - 'a'-'z' .or 'A'-'Z' .or '_'; - -/* - <follow_idchar> ::= <first_idchar> - | <digit_dec> -*/ -follow_idchar - first_idchar .or digit_dec; - -/* - <digit_dec> ::= "0"-"9" -*/ -digit_dec - '0'-'9'; - -/* - <semicolon> ::= ";" -*/ -semicolon - optional_space .and ';' .error MISSING_SEMICOLON .and optional_space; - -/* - <declaration_list> ::= <declaration> - | <declaration_list> <declaration> -*/ -declaration_list - declaration .and .loop declaration; - -/* - <declaration> ::= <emitcode_definition> - | <errortext_definition> - | <lexer_definition> - | <rule_definition> -*/ -declaration - emitcode_definition .emit DECLARATION_EMITCODE .or - errortext_definition .emit DECLARATION_ERRORTEXT .or - regbyte_definition .emit DECLARATION_REGBYTE .or - lexer_definition .emit DECLARATION_LEXER .or - rule_definition .emit DECLARATION_RULE; - -/* - <emitcode_definition> ::= ".emtcode" <identifier> <integer> -*/ -emitcode_definition - ".emtcode" .and space .and identifier .and space .and integer .and space_or_null; - -/* - <integer> ::= <integer_ne> -*/ -integer - integer_ne .error INTEGER_EXPECTED; - -/* - <integer_ne> ::= <hex_integer> - | <dec_integer> -*/ -integer_ne - hex_integer .emit 0x10 .or dec_integer .emit 10; - -/* - <hex_integer> :: <hex_prefix> <digit_hex> <digit_hex>* -*/ -hex_integer - hex_prefix .and digit_hex .emit * .and .loop digit_hex .emit * .and .true .emit '\0'; - -/* - <hex_prefix> ::= "0x" - | "0X" -*/ -hex_prefix - '0' .and hex_prefix_1; -hex_prefix_1 - 'x' .or 'X'; - -/* - <digit_hex> ::= "0"-"9" - | "a"-"f" - | "A"-"F" -*/ -digit_hex - '0'-'9' .or 'a'-'f' .or 'A'-'F'; - -/* - <dec_integer> :: <digit_dec> <digit_dec>* -*/ -dec_integer - digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -/* - <space_or_null> ::= <space> - | "\0" -*/ -space_or_null - space .or '\0'; - -/* - <errortext_definition> ::= ".errtext" <identifier> <string> -*/ -errortext_definition - ".errtext" .and space .and identifier .and space .and string .and space_or_null; - -/* - <string> ::= <string_ne> -*/ -string - string_ne .error STRING_EXPECTED; - -/* - <string_ne> ::= "\"" <string_char_double_quotes> "\"" -*/ -string_ne - '"' .and .loop string_char_double_quotes .and '"' .emit '\0'; - -/* - <string_char_double_quotes> ::= <escape_sequence> - | <string_char> - | "\'" -*/ -string_char_double_quotes - escape_sequence .or string_char .emit * .or '\'' .emit *; - -/* - <string_char> ::= All ASCII characters except "\'", "\"", "\n", "\r", - "\0" and "\\" -*/ -string_char - '\x5D'-'\xFF' .or '\x28'-'\x5B' .or '\x23'-'\x26' .or '\x0E'-'\x21' .or '\x0B'-'\x0C' .or - '\x01'-'\x09'; - -/* - <escape_sequence> ::= "\\" <escape_code> -*/ -escape_sequence - '\\' .emit * .and escape_code; - -/* - <escape_code> ::= <simple_escape_code> - | <hex_escape_code> - | <oct_escape_code> -*/ -escape_code - simple_escape_code .emit * .or hex_escape_code .or oct_escape_code; - -/* - <simple_escape_code> ::= "\'" - | "\"" - | "?" - | "\\" - | "a" - | "b" - | "f" - | "n" - | "r" - | "t" - | "v" -*/ -simple_escape_code - '\'' .or '"' .or '?' .or '\\' .or 'a' .or 'b' .or 'f' .or 'n' .or 'r' .or 't' .or 'v'; - -/* - <hex_escape_code> ::= "x" <digit_hex> <digit_hex>* -*/ -hex_escape_code - 'x' .emit * .and digit_hex .emit * .and .loop digit_hex .emit *; - -/* - <oct_escape_code> ::= <digit_oct> <optional_digit_oct> <optional_digit_oct> -*/ -oct_escape_code - digit_oct .emit * .and optional_digit_oct .and optional_digit_oct; - -/* - <digit_oct> ::= "0"-"7" -*/ -digit_oct - '0'-'7'; - -/* - <optional_digit_oct> ::= <digit_oct> - | "" -*/ -optional_digit_oct - digit_oct .emit * .or .true; - -/* - <regbyte_definition> ::= ".regbyte" <identifier> <integer> -*/ -regbyte_definition - ".regbyte" .and space .and identifier .and space .and integer .and space_or_null; - -/* - <lexer_definition> ::= ".string" <identifier> ";" -*/ -lexer_definition - ".string" .and space .and identifier .and semicolon; - -/* - <rule_definition> ::= <identifier_ne> <definition> -*/ -rule_definition - identifier_ne .and space .and definition; - -/* - <definition> ::= <specifier> <optional_specifiers_and_or> ";" -*/ -definition - specifier .and optional_specifiers_and_or .and semicolon .emit SPECIFIER_END; - -/* - <optional_specifiers_and_or> ::= <and_specifiers> - | <or_specifiers> - | "" -*/ -optional_specifiers_and_or - and_specifiers .emit SPECIFIER_AND_TAG .or or_specifiers .emit SPECIFIER_OR_TAG .or .true; - -/* - <specifier> ::= <specifier_condition> <specifier_rule> -*/ -specifier - specifier_condition .and optional_space .and specifier_rule; - -/* - <specifier_condition> ::= ".if" "(" <left_operand> <operator> <right_operand> ")" -*/ -specifier_condition - specifier_condition_1 .or .true; -specifier_condition_1 - ".if" .and optional_space .and '(' .and optional_space .and left_operand .and operator .and - right_operand .and optional_space .and ')'; - -/* - <left_operand> ::= <identifier> -*/ -left_operand - identifier; - -/* - <operator> ::= "!=" - | "==" -*/ -operator - operator_1 .or operator_2; -operator_1 - optional_space .and '!' .and '=' .and optional_space; -operator_2 - optional_space .and '=' .and '=' .and optional_space; - -/* - <right_operand> ::= <integer> -*/ -right_operand - integer; - -/* - <specifier_rule> ::= <character_range> <optional_error> <emit>* - | <character> <optional_error> <emit>* - | <string> <optional_error> <emit>* - | ".true" <optional_error> <emit>* - | ".false" <optional_error> <emit>* - | ".debug" <optional_error> <emit>* - | <advanced_identifier> <optional_error> <emit>* -*/ -specifier_rule - specifier_rule_1 .and optional_error .and .loop emit .and .true .emit EMIT_NULL; -specifier_rule_1 - character_range .emit SPECIFIER_CHARACTER_RANGE .or - character .emit SPECIFIER_CHARACTER .or - string_ne .emit SPECIFIER_STRING .or - ".true" .emit SPECIFIER_TRUE .or - ".false" .emit SPECIFIER_FALSE .or - ".debug" .emit SPECIFIER_DEBUG .or - advanced_identifier .emit SPECIFIER_IDENTIFIER; - -/* - <character> ::= "\'" <string_char_single_quotes "\'" -*/ -character - '\'' .and string_char_single_quotes .and '\'' .emit '\0'; - -/* - <string_char_single_quotes> ::= <escape_sequence> - | <string_char> - | "\"" -*/ -string_char_single_quotes - escape_sequence .or string_char .emit * .or '"' .emit *; - -/* - <character_range> ::= <character> "-" <character> -*/ -character_range - character .and optional_space .and '-' .and optional_space .and character; - -/* - <advanced_identifier> ::= <optional_loop> <identifier> -*/ -advanced_identifier - optional_loop .and identifier; - -/* - <optional_loop> ::= ".loop" - | "" -*/ -optional_loop - optional_loop_1 .emit IDENTIFIER_LOOP .or .true .emit IDENTIFIER_SIMPLE; -optional_loop_1 - ".loop" .and space; - -/* - <optional_error> ::= <error> - | "" -*/ -optional_error - error .emit ERROR_PRESENT .or .true .emit ERROR_NOT_PRESENT; - -/* - <error> :: ".error" <identifier> -*/ -error - space .and ".error" .and space .and identifier; - -/* - <emit> ::= <emit_output> - | <emit_regbyte> -*/ -emit - emit_output .or emit_regbyte; - -/* - <emit_output> ::= ".emit" <emit_param> -*/ -emit_output - space .and ".emit" .and space .and emit_param; - -/* - <emit_param> ::= <integer> - | <identifier> - | <character> - | "*" - | "$" -*/ -emit_param - integer_ne .emit EMIT_INTEGER .or - identifier_ne .emit EMIT_IDENTIFIER .or - character .emit EMIT_CHARACTER .or - '*' .emit EMIT_LAST_CHARACTER .or - '$' .emit EMIT_CURRENT_POSITION; - -/* - <emit_regbyte> ::= ".load" <identifier> <emit_param> -*/ -emit_regbyte - space .and ".load" .and space .and identifier .and space .and emit_param; - -/* - <and_specifiers> ::= <and_specifier> <and_specifier>* -*/ -and_specifiers - and_specifier .and .loop and_specifier; - -/* - <or_specifiers> ::= <or_specifier> <or_specifier>* -*/ -or_specifiers - or_specifier .and .loop or_specifier; - -/* - <and_specifier> ::= ".and" <specifier> -*/ -and_specifier - space .and ".and" .and space .and specifier; - -/* - <or_specifier> ::= ".or" <specifier> -*/ -or_specifier - space .and ".or" .and space .and specifier; - - -.string __string_filter; - -/* - <__string_filter> ::= <__first_identifier_char> <__next_identifier_char>* -*/ -__string_filter - __first_identifier_char .and .loop __next_identifier_char; - -/* - <__first_identifier_char> ::= "a"-"z" - | "A"-"Z" - | "_" - | "." -*/ -__first_identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '.'; - -/* - <__next_identifier_char> ::= "a"-"z" - | "A"-"Z" - | "_" - | "0"-"9" -*/ -__next_identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9'; - diff --git a/src/mesa/shader/grammar/grammar_crt.c b/src/mesa/shader/grammar/grammar_crt.c deleted file mode 100644 index d2c95d1c8e7..00000000000 --- a/src/mesa/shader/grammar/grammar_crt.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "grammar_crt.h" - -#define GRAMMAR_PORT_BUILD 1 -#include "grammar.c" -#undef GRAMMAR_PORT_BUILD - - -void grammar_alloc_free (void *ptr) -{ - free (ptr); -} - -void *grammar_alloc_malloc (size_t size) -{ - return malloc (size); -} - -void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) -{ - return realloc (ptr, size); -} - -void *grammar_memory_copy (void *dst, const void * src, size_t size) -{ - return memcpy (dst, src, size); -} - -int grammar_string_compare (const byte *str1, const byte *str2) -{ - return strcmp ((const char *) str1, (const char *) str2); -} - -int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) -{ - return strncmp ((const char *) str1, (const char *) str2, n); -} - -byte *grammar_string_copy (byte *dst, const byte *src) -{ - return (byte *) strcpy ((char *) dst, (const char *) src); -} - -byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) -{ - return (byte *) strncpy ((char *) dst, (const char *) src, n); -} - -unsigned int grammar_string_length (const byte *str) -{ - return strlen ((const char *) str); -} - -byte *grammar_string_duplicate (const byte *src) -{ - const unsigned int size = grammar_string_length (src); - byte *str = grammar_alloc_malloc (size + 1); - if (str != NULL) - { - grammar_memory_copy (str, src, size); - str[size] = '\0'; - } - return str; -} - diff --git a/src/mesa/shader/grammar/grammar_crt.h b/src/mesa/shader/grammar/grammar_crt.h deleted file mode 100644 index 492711e96ae..00000000000 --- a/src/mesa/shader/grammar/grammar_crt.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GRAMMAR_CRT_H -#define GRAMMAR_CRT_H - - -#include <stdlib.h> -#include <malloc.h> -#include <string.h> - - -typedef unsigned long grammar; -typedef unsigned char byte; - - -#define GRAMMAR_PORT_INCLUDE 1 -#include "grammar.h" -#undef GRAMMAR_PORT_INCLUDE - - -#endif - diff --git a/src/mesa/shader/grammar/grammar_mesa.c b/src/mesa/shader/grammar/grammar_mesa.c deleted file mode 100644 index eb962505bfe..00000000000 --- a/src/mesa/shader/grammar/grammar_mesa.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file grammar_mesa.c - * mesa3d port to syntax parsing engine - * \author Michal Krol - */ - -#include "grammar_mesa.h" - -#define GRAMMAR_PORT_BUILD 1 -#include "grammar.c" -#undef GRAMMAR_PORT_BUILD - - -void grammar_alloc_free (void *ptr) -{ - _mesa_free (ptr); -} - -void *grammar_alloc_malloc (size_t size) -{ - return _mesa_malloc (size); -} - -void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) -{ - return _mesa_realloc (ptr, old_size, size); -} - -void *grammar_memory_copy (void *dst, const void * src, size_t size) -{ - return _mesa_memcpy (dst, src, size); -} - -int grammar_string_compare (const byte *str1, const byte *str2) -{ - return _mesa_strcmp ((const char *) str1, (const char *) str2); -} - -int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) -{ - return _mesa_strncmp ((const char *) str1, (const char *) str2, n); -} - -byte *grammar_string_copy (byte *dst, const byte *src) -{ - return (byte *) _mesa_strcpy ((char *) dst, (const char *) src); -} - -byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) -{ - return (byte *) _mesa_strncpy ((char *) dst, (const char *) src, n); -} - -byte *grammar_string_duplicate (const byte *src) -{ - return (byte *) _mesa_strdup ((const char *) src); -} - -unsigned int grammar_string_length (const byte *str) -{ - return (unsigned int)_mesa_strlen ((const char *) str); -} - diff --git a/src/mesa/shader/grammar/grammar_mesa.h b/src/mesa/shader/grammar/grammar_mesa.h deleted file mode 100644 index 6c92c5812da..00000000000 --- a/src/mesa/shader/grammar/grammar_mesa.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef GRAMMAR_MESA_H -#define GRAMMAR_MESA_H - - -#include "main/imports.h" -/* NOTE: include Mesa 3-D specific headers here */ - - -typedef GLuint grammar; -typedef GLubyte byte; - - -#define GRAMMAR_PORT_INCLUDE 1 -#include "grammar.h" -#undef GRAMMAR_PORT_INCLUDE - - -#endif - diff --git a/src/mesa/shader/grammar/grammar_syn.h b/src/mesa/shader/grammar/grammar_syn.h deleted file mode 100644 index 840a1ab62c2..00000000000 --- a/src/mesa/shader/grammar/grammar_syn.h +++ /dev/null @@ -1,202 +0,0 @@ -".syntax grammar;\n" -".emtcode DECLARATION_END 0\n" -".emtcode DECLARATION_EMITCODE 1\n" -".emtcode DECLARATION_ERRORTEXT 2\n" -".emtcode DECLARATION_REGBYTE 3\n" -".emtcode DECLARATION_LEXER 4\n" -".emtcode DECLARATION_RULE 5\n" -".emtcode SPECIFIER_END 0\n" -".emtcode SPECIFIER_AND_TAG 1\n" -".emtcode SPECIFIER_OR_TAG 2\n" -".emtcode SPECIFIER_CHARACTER_RANGE 3\n" -".emtcode SPECIFIER_CHARACTER 4\n" -".emtcode SPECIFIER_STRING 5\n" -".emtcode SPECIFIER_IDENTIFIER 6\n" -".emtcode SPECIFIER_TRUE 7\n" -".emtcode SPECIFIER_FALSE 8\n" -".emtcode SPECIFIER_DEBUG 9\n" -".emtcode IDENTIFIER_SIMPLE 0\n" -".emtcode IDENTIFIER_LOOP 1\n" -".emtcode ERROR_NOT_PRESENT 0\n" -".emtcode ERROR_PRESENT 1\n" -".emtcode EMIT_NULL 0\n" -".emtcode EMIT_INTEGER 1\n" -".emtcode EMIT_IDENTIFIER 2\n" -".emtcode EMIT_CHARACTER 3\n" -".emtcode EMIT_LAST_CHARACTER 4\n" -".emtcode EMIT_CURRENT_POSITION 5\n" -".errtext INVALID_GRAMMAR \"internal error 2001: invalid grammar script\"\n" -".errtext SYNTAX_EXPECTED \"internal error 2002: '.syntax' keyword expected\"\n" -".errtext IDENTIFIER_EXPECTED \"internal error 2003: identifier expected\"\n" -".errtext MISSING_SEMICOLON \"internal error 2004: missing ';'\"\n" -".errtext INTEGER_EXPECTED \"internal error 2005: integer value expected\"\n" -".errtext STRING_EXPECTED \"internal error 2006: string expected\"\n" -"grammar\n" -" grammar_1 .error INVALID_GRAMMAR;\n" -"grammar_1\n" -" optional_space .and \".syntax\" .error SYNTAX_EXPECTED .and space .and identifier .and\n" -" semicolon .and declaration_list .and optional_space .and '\\0' .emit DECLARATION_END;\n" -"optional_space\n" -" space .or .true;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" white_char .or comment_block;\n" -"white_char\n" -" ' ' .or '\\t' .or '\\n' .or '\\r';\n" -"comment_block\n" -" '/' .and '*' .and comment_rest;\n" -"comment_rest\n" -" .loop comment_char_no_star .and comment_rest_1;\n" -"comment_rest_1\n" -" comment_end .or comment_rest_2;\n" -"comment_rest_2\n" -" '*' .and comment_rest;\n" -"comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"comment_end\n" -" '*' .and '/';\n" -"identifier\n" -" identifier_ne .error IDENTIFIER_EXPECTED;\n" -"identifier_ne\n" -" first_idchar .emit * .and .loop follow_idchar .emit * .and .true .emit '\\0';\n" -"first_idchar\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"follow_idchar\n" -" first_idchar .or digit_dec;\n" -"digit_dec\n" -" '0'-'9';\n" -"semicolon\n" -" optional_space .and ';' .error MISSING_SEMICOLON .and optional_space;\n" -"declaration_list\n" -" declaration .and .loop declaration;\n" -"declaration\n" -" emitcode_definition .emit DECLARATION_EMITCODE .or\n" -" errortext_definition .emit DECLARATION_ERRORTEXT .or\n" -" regbyte_definition .emit DECLARATION_REGBYTE .or\n" -" lexer_definition .emit DECLARATION_LEXER .or\n" -" rule_definition .emit DECLARATION_RULE;\n" -"emitcode_definition\n" -" \".emtcode\" .and space .and identifier .and space .and integer .and space_or_null;\n" -"integer\n" -" integer_ne .error INTEGER_EXPECTED;\n" -"integer_ne\n" -" hex_integer .emit 0x10 .or dec_integer .emit 10;\n" -"hex_integer\n" -" hex_prefix .and digit_hex .emit * .and .loop digit_hex .emit * .and .true .emit '\\0';\n" -"hex_prefix\n" -" '0' .and hex_prefix_1;\n" -"hex_prefix_1\n" -" 'x' .or 'X';\n" -"digit_hex\n" -" '0'-'9' .or 'a'-'f' .or 'A'-'F';\n" -"dec_integer\n" -" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"space_or_null\n" -" space .or '\\0';\n" -"errortext_definition\n" -" \".errtext\" .and space .and identifier .and space .and string .and space_or_null;\n" -"string\n" -" string_ne .error STRING_EXPECTED;\n" -"string_ne\n" -" '\"' .and .loop string_char_double_quotes .and '\"' .emit '\\0';\n" -"string_char_double_quotes\n" -" escape_sequence .or string_char .emit * .or '\\'' .emit *;\n" -"string_char\n" -" '\\x5D'-'\\xFF' .or '\\x28'-'\\x5B' .or '\\x23'-'\\x26' .or '\\x0E'-'\\x21' .or '\\x0B'-'\\x0C' .or\n" -" '\\x01'-'\\x09';\n" -"escape_sequence\n" -" '\\\\' .emit * .and escape_code;\n" -"escape_code\n" -" simple_escape_code .emit * .or hex_escape_code .or oct_escape_code;\n" -"simple_escape_code\n" -" '\\'' .or '\"' .or '?' .or '\\\\' .or 'a' .or 'b' .or 'f' .or 'n' .or 'r' .or 't' .or 'v';\n" -"hex_escape_code\n" -" 'x' .emit * .and digit_hex .emit * .and .loop digit_hex .emit *;\n" -"oct_escape_code\n" -" digit_oct .emit * .and optional_digit_oct .and optional_digit_oct;\n" -"digit_oct\n" -" '0'-'7';\n" -"optional_digit_oct\n" -" digit_oct .emit * .or .true;\n" -"regbyte_definition\n" -" \".regbyte\" .and space .and identifier .and space .and integer .and space_or_null;\n" -"lexer_definition\n" -" \".string\" .and space .and identifier .and semicolon;\n" -"rule_definition\n" -" identifier_ne .and space .and definition;\n" -"definition\n" -" specifier .and optional_specifiers_and_or .and semicolon .emit SPECIFIER_END;\n" -"optional_specifiers_and_or\n" -" and_specifiers .emit SPECIFIER_AND_TAG .or or_specifiers .emit SPECIFIER_OR_TAG .or .true;\n" -"specifier\n" -" specifier_condition .and optional_space .and specifier_rule;\n" -"specifier_condition\n" -" specifier_condition_1 .or .true;\n" -"specifier_condition_1\n" -" \".if\" .and optional_space .and '(' .and optional_space .and left_operand .and operator .and\n" -" right_operand .and optional_space .and ')';\n" -"left_operand\n" -" identifier;\n" -"operator\n" -" operator_1 .or operator_2;\n" -"operator_1\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"operator_2\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"right_operand\n" -" integer;\n" -"specifier_rule\n" -" specifier_rule_1 .and optional_error .and .loop emit .and .true .emit EMIT_NULL;\n" -"specifier_rule_1\n" -" character_range .emit SPECIFIER_CHARACTER_RANGE .or\n" -" character .emit SPECIFIER_CHARACTER .or\n" -" string_ne .emit SPECIFIER_STRING .or\n" -" \".true\" .emit SPECIFIER_TRUE .or\n" -" \".false\" .emit SPECIFIER_FALSE .or\n" -" \".debug\" .emit SPECIFIER_DEBUG .or\n" -" advanced_identifier .emit SPECIFIER_IDENTIFIER;\n" -"character\n" -" '\\'' .and string_char_single_quotes .and '\\'' .emit '\\0';\n" -"string_char_single_quotes\n" -" escape_sequence .or string_char .emit * .or '\"' .emit *;\n" -"character_range\n" -" character .and optional_space .and '-' .and optional_space .and character;\n" -"advanced_identifier\n" -" optional_loop .and identifier;\n" -"optional_loop\n" -" optional_loop_1 .emit IDENTIFIER_LOOP .or .true .emit IDENTIFIER_SIMPLE;\n" -"optional_loop_1\n" -" \".loop\" .and space;\n" -"optional_error\n" -" error .emit ERROR_PRESENT .or .true .emit ERROR_NOT_PRESENT;\n" -"error\n" -" space .and \".error\" .and space .and identifier;\n" -"emit\n" -" emit_output .or emit_regbyte;\n" -"emit_output\n" -" space .and \".emit\" .and space .and emit_param;\n" -"emit_param\n" -" integer_ne .emit EMIT_INTEGER .or\n" -" identifier_ne .emit EMIT_IDENTIFIER .or\n" -" character .emit EMIT_CHARACTER .or\n" -" '*' .emit EMIT_LAST_CHARACTER .or\n" -" '$' .emit EMIT_CURRENT_POSITION;\n" -"emit_regbyte\n" -" space .and \".load\" .and space .and identifier .and space .and emit_param;\n" -"and_specifiers\n" -" and_specifier .and .loop and_specifier;\n" -"or_specifiers\n" -" or_specifier .and .loop or_specifier;\n" -"and_specifier\n" -" space .and \".and\" .and space .and specifier;\n" -"or_specifier\n" -" space .and \".or\" .and space .and specifier;\n" -".string __string_filter;\n" -"__string_filter\n" -" __first_identifier_char .and .loop __next_identifier_char;\n" -"__first_identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '.';\n" -"__next_identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n" -"" diff --git a/src/mesa/shader/slang/descrip.mms b/src/mesa/shader/slang/descrip.mms index 6eefbcf5bdd..674b786ac08 100644 --- a/src/mesa/shader/slang/descrip.mms +++ b/src/mesa/shader/slang/descrip.mms @@ -17,12 +17,12 @@ VPATH = RCS -INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-.grammar],[-] +INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-] LIBDIR = [----.lib] CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm SOURCES = \ - slang_compile.c,slang_preprocess.c + slang_compile.c OBJECTS = slang_builtin.obj,slang_codegen.obj,slang_compile.obj,\ slang_compile_function.obj,slang_compile_operation.obj,\ @@ -59,7 +59,6 @@ slang_library_noise.obj : slang_library_noise.c slang_link.obj : slang_link.c slang_log.obj : slang_log.c slang_mem.obj : slang_mem.c -slang_preprocess.obj : slang_preprocess.c slang_print.obj : slang_print.c slang_simplify.obj : slang_simplify.c slang_storage.obj : slang_storage.c diff --git a/src/mesa/shader/slang/library/Makefile b/src/mesa/shader/slang/library/Makefile index 0e03fac2ee1..c6964512bfe 100644 --- a/src/mesa/shader/slang/library/Makefile +++ b/src/mesa/shader/slang/library/Makefile @@ -4,9 +4,7 @@ TOP = ../../../../.. include $(TOP)/configs/current -INCDIR = $(TOP)/include - -LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) +GLSL_CL = $(TOP)/src/glsl/apps/compile # # targets @@ -14,42 +12,14 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) .PHONY: default clean -default: syntax builtin +default: builtin clean: - -rm -f syn_to_c gc_to_bin *_syn.h *_gc.h - -syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h + -rm -f *_gc.h builtin: builtin_110 builtin_120 # -# executables -# - -syn_to_c: syn_to_c.c - $(CC) syn_to_c.c -o syn_to_c - -gc_to_bin: gc_to_bin.c slang_shader_syn.h - $(CC) gc_to_bin.c -o gc_to_bin - -# -# syntax scripts -# - -slang_pp_directives_syn.h: syn_to_c slang_pp_directives.syn - ./syn_to_c slang_pp_directives.syn > slang_pp_directives_syn.h - -slang_pp_expression_syn.h: syn_to_c slang_pp_expression.syn - ./syn_to_c slang_pp_expression.syn > slang_pp_expression_syn.h - -slang_shader_syn.h: syn_to_c slang_shader.syn - ./syn_to_c slang_shader.syn > slang_shader_syn.h - -slang_pp_version_syn.h: syn_to_c slang_pp_version.syn - ./syn_to_c slang_pp_version.syn > slang_pp_version_syn.h - -# # builtin library sources # @@ -58,24 +28,24 @@ builtin_110: slang_common_builtin_gc.h slang_core_gc.h slang_fragment_builtin_gc builtin_120: slang_120_core_gc.h slang_builtin_120_common_gc.h slang_builtin_120_fragment_gc.h -slang_120_core_gc.h: gc_to_bin slang_120_core.gc - ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h +slang_120_core_gc.h: slang_120_core.gc + $(GLSL_CL) fragment slang_120_core.gc slang_120_core_gc.h -slang_builtin_120_common_gc.h: gc_to_bin slang_builtin_120_common.gc - ./gc_to_bin 1 slang_builtin_120_common.gc slang_builtin_120_common_gc.h +slang_builtin_120_common_gc.h: slang_builtin_120_common.gc + $(GLSL_CL) fragment slang_builtin_120_common.gc slang_builtin_120_common_gc.h -slang_builtin_120_fragment_gc.h: gc_to_bin slang_builtin_120_fragment.gc - ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h +slang_builtin_120_fragment_gc.h: slang_builtin_120_fragment.gc + $(GLSL_CL) fragment slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h -slang_common_builtin_gc.h: gc_to_bin slang_common_builtin.gc - ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h +slang_common_builtin_gc.h: slang_common_builtin.gc + $(GLSL_CL) fragment slang_common_builtin.gc slang_common_builtin_gc.h -slang_core_gc.h: gc_to_bin slang_core.gc - ./gc_to_bin 1 slang_core.gc slang_core_gc.h +slang_core_gc.h: slang_core.gc + $(GLSL_CL) fragment slang_core.gc slang_core_gc.h -slang_fragment_builtin_gc.h: gc_to_bin slang_fragment_builtin.gc - ./gc_to_bin 1 slang_fragment_builtin.gc slang_fragment_builtin_gc.h +slang_fragment_builtin_gc.h: slang_fragment_builtin.gc + $(GLSL_CL) fragment slang_fragment_builtin.gc slang_fragment_builtin_gc.h -slang_vertex_builtin_gc.h: gc_to_bin slang_vertex_builtin.gc - ./gc_to_bin 2 slang_vertex_builtin.gc slang_vertex_builtin_gc.h +slang_vertex_builtin_gc.h: slang_vertex_builtin.gc + $(GLSL_CL) vertex slang_vertex_builtin.gc slang_vertex_builtin_gc.h diff --git a/src/mesa/shader/slang/library/SConscript b/src/mesa/shader/slang/library/SConscript new file mode 100644 index 00000000000..ef131146be5 --- /dev/null +++ b/src/mesa/shader/slang/library/SConscript @@ -0,0 +1,52 @@ +####################################################################### +# SConscript for GLSL builtin library + +Import('*') + +env = env.Clone() + +# See also http://www.scons.org/wiki/UsingCodeGenerators + +def glsl_compile_emitter(target, source, env): + env.Depends(target, glsl_compile) + return (target, source) + +bld_frag = Builder( + action = glsl_compile[0].abspath + ' fragment $SOURCE $TARGET', + emitter = glsl_compile_emitter, + suffix = '.gc', + src_suffix = '_gc.h') + +bld_vert = Builder( + action = glsl_compile[0].abspath + ' vertex $SOURCE $TARGET', + emitter = glsl_compile_emitter, + suffix = '.gc', + src_suffix = '_gc.h') + +env['BUILDERS']['bld_frag'] = bld_frag +env['BUILDERS']['bld_vert'] = bld_vert + +# Generate GLSL builtin library binaries +env.bld_frag( + '#src/mesa/shader/slang/library/slang_core_gc.h', + '#src/mesa/shader/slang/library/slang_core.gc') +env.bld_frag( + '#src/mesa/shader/slang/library/slang_common_builtin_gc.h', + '#src/mesa/shader/slang/library/slang_common_builtin.gc') +env.bld_frag( + '#src/mesa/shader/slang/library/slang_fragment_builtin_gc.h', + '#src/mesa/shader/slang/library/slang_fragment_builtin.gc') +env.bld_vert( + '#src/mesa/shader/slang/library/slang_vertex_builtin_gc.h', + '#src/mesa/shader/slang/library/slang_vertex_builtin.gc') + +# Generate GLSL 1.20 builtin library binaries +env.bld_frag( + '#src/mesa/shader/slang/library/slang_120_core_gc.h', + '#src/mesa/shader/slang/library/slang_120_core.gc') +env.bld_frag( + '#src/mesa/shader/slang/library/slang_builtin_120_common_gc.h', + '#src/mesa/shader/slang/library/slang_builtin_120_common.gc') +env.bld_frag( + '#src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h', + '#src/mesa/shader/slang/library/slang_builtin_120_fragment.gc') diff --git a/src/mesa/shader/slang/library/gc_to_bin.c b/src/mesa/shader/slang/library/gc_to_bin.c deleted file mode 100644 index 8aef7b54124..00000000000 --- a/src/mesa/shader/slang/library/gc_to_bin.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "../../grammar/grammar_crt.h" -#include "../../grammar/grammar_crt.c" -#include <stdlib.h> -#include <stdio.h> - -static const char *slang_shader_syn = -#include "slang_shader_syn.h" -; - -static int gc_to_bin (grammar id, const char *in, const char *out) -{ - FILE *f; - byte *source, *prod; - unsigned int size, i, line = 0; - - printf ("Precompiling %s\n", in); - - f = fopen (in, "r"); - if (f == NULL) - return 1; - fseek (f, 0, SEEK_END); - size = ftell (f); - fseek (f, 0, SEEK_SET); - source = (byte *) grammar_alloc_malloc (size + 1); - source[fread (source, 1, size, f)] = '\0'; - fclose (f); - - if (!grammar_fast_check (id, source, &prod, &size, 65536)) - { - grammar_alloc_free (source); - return 1; - } - - f = fopen (out, "w"); - fprintf (f, "\n"); - fprintf (f, "/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */\n"); - fprintf (f, "/* %s */\n", in); - fprintf (f, "\n"); - for (i = 0; i < size; i++) - { - unsigned int a; - if (prod[i] < 10) - a = 1; - else if (prod[i] < 100) - a = 2; - else - a = 3; - if (i < size - 1) - a++; - if (line + a >= 100) - { - fprintf (f, "\n"); - line = 0; - } - line += a; - fprintf (f, "%d", prod[i]); - if (i < size - 1) - fprintf (f, ","); - } - fprintf (f, "\n"); - fclose (f); - grammar_alloc_free (prod); - return 0; -} - -int main (int argc, char *argv[]) -{ - grammar id; - - id = grammar_load_from_text ((const byte *) slang_shader_syn); - if (id == 0) { - fprintf(stderr, "Error loading grammar from text\n"); - return 1; - } - grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1); - grammar_set_reg8 (id, (const byte *) "shader_type", atoi (argv[1])); - if (gc_to_bin (id, argv[2], argv[3])) { - fprintf(stderr, "Error in gc_to_bin %s %s\n", argv[2], argv[3]); - grammar_destroy (id); - return 1; - } - grammar_destroy (id); - return 0; -} - diff --git a/src/mesa/shader/slang/library/slang_120_core_gc.h b/src/mesa/shader/slang/library/slang_120_core_gc.h deleted file mode 100644 index 1fdbddf7c3e..00000000000 --- a/src/mesa/shader/slang/library/slang_120_core_gc.h +++ /dev/null @@ -1,764 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_120_core.gc */ - -5,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0, -1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0, -18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -11,0,99,48,0,0,1,1,0,0,11,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0, -0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0, -1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51, -49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, -0,18,102,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,59,119,0,18,102,51,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0, -0,28,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0, -0,0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0, -0,28,0,1,1,1,0,0,1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0, -0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0, -28,0,1,1,1,0,0,12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95, -0,0,27,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9, -0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,5,0,105,0,0,0, -1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,1,0,98,0,0,0,1, -3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,10,0,99,48,0,0,1, -1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0, -0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0,1,1,0,0,9,0,102,48,49,0,0, -1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51,49,0,0,1,1,0,0,9,0,102,48, -50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,50,50,0,0,1,1,0,0,9,0,102,51,50,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, -122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,102,51,48,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119, -0,18,102,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,59,119,0,18,102,51,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17, -48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2, -90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,1,0,98,0,0,0,1,3, -2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,12,0,99,48,0,0,1, -1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0, -0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0, -1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120, -0,18,102,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0, -18,102,49,51,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,58,109,97,116,52,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,16,10,52,0,0,17,48,0,48, -0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,5,0, -105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,1,0, -98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,10, -0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,1,1,0,0,10,0,99,51,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,48,48,0,0,1, -1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49, -0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102, -50,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,1,1,0,0,9,0,102,50,51,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,102,49,51,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,122,0,18,102,50,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,5,0,105,0,0,0, -1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,1,0,98,0,0,0,1, -3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,11,0,99,48,0,0,1, -1,0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,1,1,0,0,11,0,99,51,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1, -90,95,0,0,13,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0, -18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0, -18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16, -10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57, -59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121, -0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0, -1,90,95,0,0,13,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0, -0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0, -26,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,26, -0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109, -0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,31,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16, -10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59, -120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57, -59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0, -57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48, -0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17, -48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0, -0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0, -0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,0,20,0,0,1, -90,95,0,0,28,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90, -95,0,0,28,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52, -0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,15,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,0,18, -109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109, -0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0, -28,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17, -48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10, -49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0, -16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57, -59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0, -20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57, -59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0, -57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,29,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0, -18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0, -0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1, -1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,27,0,1,1,1, -0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8, -48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,14, -0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57, -0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,30,0,109,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120, -0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59, -121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,20,0,0,1,90,95,0,0, -27,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0, -18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121, -0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16, -10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0, -1,90,95,0,0,27,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0, -0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16, -10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0, -1,90,95,0,0,27,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0, -57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95, -0,0,14,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0, -14,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0, -16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0, -0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57, -59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122, -0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0, -18,109,0,16,10,50,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,26,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0, -57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,28,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0, -18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90, -95,0,0,14,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18, -109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0, -17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0, -0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,13,0,109,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18, -109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0, -30,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,30, -0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109, -0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1, -0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0, -0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0, -18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10, -49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1, -0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0, -0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0, -16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0, -20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17, -48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -30,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18, -109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0, -0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,29, -0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,31,0, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57, -59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109, -0,16,10,51,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16, -10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109,0,16,10,51,0,57,59,120,121, -0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18, -109,0,16,10,50,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0, -30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0, -57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48, -0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120, -121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0, -0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,31,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,15,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120, -121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122,0,0,18, -109,0,16,10,51,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10, -49,0,57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -31,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18, -109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50, -0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1, -0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0, -0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,26,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16, -10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0, -20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18, -109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -31,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18, -109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17, -48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1, -0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0, -0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,15,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,30,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0, -57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1, -90,95,0,0,15,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0, -18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0, -57,0,17,48,0,0,0,0,18,109,0,16,10,51,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,28,0, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109, -0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0, -0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48, -0,0,0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0, -14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0, -17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48, -0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0, -18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,27,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0, -0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17, -49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95, -0,0,15,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109, -0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0, -17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1, -90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2, -0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1, -90,95,0,0,0,0,2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2, -0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27,0,109,0,0,1,1,0,0, -27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,90,95,0,0,0,0,2, -2,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0, -9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, -57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90, -95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90,95,0,0,0,0,2,4,1, -0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1, -0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0, -0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0, -0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0, -31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9, -18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,26,0,109,0,0,1, -1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20, -0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0, -16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0, -18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59, -119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59, -121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121, -0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,48,46,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0, -48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59, -121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10, -50,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0, -16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0, -18,109,0,16,10,50,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18, -118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,29,0,109, -0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109, -0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122, -0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48, -18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57, -59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,0,1,90,95,0,0,11,0,2, -21,1,1,0,0,31,0,109,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, -48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51, -0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16, -8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18, -109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18, -118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,48,46,20,0,0,1,90,95,0,0,27,0,2,21,1, -1,0,0,13,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0, -16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50, -0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0, -13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1, -90,95,0,0,14,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,29,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1, -0,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0, -16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0, -28,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18, -110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16, -10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20, -0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,27,0,109,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90, -95,0,0,29,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, -0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110, -0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21, -1,1,0,0,14,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18, -110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16, -10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0, -57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30, -0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110, -0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48, -20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,28,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0, -0,27,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18, -110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,31,0, -109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0, -16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0, -57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0, -1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0, -28,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,30,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,0,0,2, -3,1,0,2,0,26,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,95,0,0, -0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90, -95,0,0,0,0,2,3,1,0,2,0,27,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, -48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18,109,0,18, -110,0,48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18, -109,0,18,110,0,48,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,27,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10, -50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10, -51,0,57,0,0,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20, -0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0, -20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90, -95,0,0,11,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0, -0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18, -109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1, -0,2,0,27,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49, -0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0, -1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0, -9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10, -50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0, -21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0, -2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27, -0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18, -97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,30,0,109,0,0,1,1,0,0, -9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109, -0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57, -18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1, -0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18, -109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,3,1,0,2, -0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0, -57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,27,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, -23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18, -97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0, -9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109, -0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0, -26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0, -1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0, -9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10, -50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0, -24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,31,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0, -16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0, -26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1, -1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,27,0, -2,26,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0, -110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0, -0,1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116, -52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58, -109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0, -0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0, -110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0, -0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0, -109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1, -0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57, -18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0, -26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,90, -95,0,0,28,0,2,22,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0, -0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50, -0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0, -109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,49,0,0,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0, -0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0, -110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109, -97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, -1,90,95,0,0,28,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1, -1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18, -98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0, -0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110, -0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,27,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18, -109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1, -1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0, -57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0, -30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0, -1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18, -109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0, -46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,29,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,29, -0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90, -95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109, -0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46, -0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0, -110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90, -95,0,0,26,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0, -18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0, -26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47, -0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0, -110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16, -10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109, -97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0, -1,90,95,0,0,27,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10, -50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58, -109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18, -97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0, -0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18, -98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,1,1, -0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10, -49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0, -1,90,95,0,0,29,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49, -0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1, -90,95,0,0,31,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,26, -0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90, -95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0, -28,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0, -0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48, -20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,90,95,0,0,29,0,2,21,1, -1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0, -1,90,95,0,0,29,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0, -0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,0,1,90,95,0,0,26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,28,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,28, -0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,28,0,2,22, -1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18, -98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0, -48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,30,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0, -57,48,20,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0, -57,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,31, -0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,27, -1,1,0,0,26,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10, -49,0,57,54,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0, -0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109, -0,16,10,50,0,57,54,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,0,1,8,58,109,97,116,51,120, -52,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1, -90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57, -54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1, -90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57, -54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1, -90,95,0,0,0,0,2,25,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, -49,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,27,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109, -0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,30,0,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95, -0,0,0,0,2,25,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, -18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,31,0,109, -0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9, -18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0, -16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,27,0,109,0,0,0,1,9, -18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,90,95,0, -0,0,0,2,24,1,0,2,0,30,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, -18,109,0,16,10,50,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0, -0,1,90,95,0,0,0,0,2,24,1,0,2,0,31,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0, -57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h b/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h deleted file mode 100644 index c397b9f0fad..00000000000 --- a/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h +++ /dev/null @@ -1,108 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_builtin_120_common.gc */ - -5,1,90,95,0,0,26,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,26,0,109,0,0,1, -0,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,28,0,0,109,97,116,114, -105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,28,0,109,0,0,1,0,0,0,28,0,110,0,0,0,1,8,58,109,97, -116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,27,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,0,27,0,109,0,0,1,0,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,30,0,0,109,97,116,114,105,120,67,111,109,112,77, -117,108,116,0,1,0,0,0,30,0,109,0,0,1,0,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109, -0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,29,0,0,109,97,116,114,105,120,67,111, -109,112,77,117,108,116,0,1,0,0,0,29,0,109,0,0,1,0,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,48,0,0,0,0,1,90,95,0,0,31,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,31, -0,109,0,0,1,0,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0,0,13,0,0,111, -117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58,109, -97,116,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18, -99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,14, -0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8, -58,109,97,116,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48, -0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0, -18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0, -48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95, -0,0,15,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,12,0,114,0, -0,0,1,8,58,109,97,116,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59, -120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0, -59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0, -59,121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18, -99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18, -114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48, -0,18,99,0,59,122,0,18,114,0,59,119,0,48,0,18,99,0,59,119,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0, -0,26,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,10,0,114,0,0, -0,1,8,58,109,97,116,50,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114, -0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18, -99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,27, -0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8, -58,109,97,116,51,120,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59, -120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0, -59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,28,0,0, -111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58, -109,97,116,50,120,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120, -0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59, -120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59, -121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,29,0,0,111,117,116,101,114,80, -114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0, -18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0, -48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59, -121,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0,0,30,0,0,111,117,116,101,114,80,114,111,100,117,99, -116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,99,0,59,120,0, -18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0, -48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59, -121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,119,0,18,114,0,59, -121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0, -59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,31,0,0, -111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58, -109,97,116,52,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120, -0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59, -121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59, -122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0, -59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,0,18,99,0,59,122,0,18,114,0, -59,119,0,48,0,0,0,0,1,90,95,0,0,13,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,13,0,109,0,0,0, -1,8,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109, -0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,0,0,0,1,90,95,0,0,14,0,0,116,114,97, -110,115,112,111,115,101,0,1,0,0,0,14,0,109,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59, -120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57, -59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0, -57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,0,0,0,1,90,95,0, -0,15,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,15,0,109,0,0,0,1,8,58,109,97,116,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0, -18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0, -0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122, -0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59, -122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,18,109,0,16,10,50,0,57, -59,119,0,0,18,109,0,16,10,51,0,57,59,119,0,0,0,0,0,1,90,95,0,0,26,0,0,116,114,97,110,115,112,111, -115,101,0,1,0,0,0,27,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0, -18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0, -0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,0,0,1,90,95,0,0,27,0,0,116, -114,97,110,115,112,111,115,101,0,1,0,0,0,26,0,109,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0, -16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109, -0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,0,0, -0,1,90,95,0,0,28,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,29,0,109,0,0,0,1,8,58,109,97,116, -50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50, -0,57,59,120,0,0,18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10, -49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,0,0,0,1,90, -95,0,0,29,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,28,0,109,0,0,0,1,8,58,109,97,116,52,120, -50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57, -59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,0,0,0,1,90,95,0,0,30, -0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,31,0,109,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0, -18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0, -0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122, -0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59, -122,0,0,0,0,0,1,90,95,0,0,31,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,30,0,109,0,0,0,1,8, -58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18, -109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0, -18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0, -0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119, -0,0,18,109,0,16,10,50,0,57,59,119,0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h b/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h deleted file mode 100644 index add3b5aeaa9..00000000000 --- a/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h +++ /dev/null @@ -1,5 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_builtin_120_fragment.gc */ - -5,2,2,90,95,3,0,10,0,1,103,108,95,80,111,105,110,116,67,111,111,114,100,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h deleted file mode 100644 index 3c3666e4ea2..00000000000 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ /dev/null @@ -1,880 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_common_builtin.gc */ - -5,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,76,105,103,104,116,115,0,2,16,10,56,0,0,0,2,2,90,95,1,0, -5,0,1,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,2,16,10,54,0,0,0,2,2,90,95,1,0,5, -0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,85,110,105,116,115,0,2,16,10,56,0,0,0,2,2,90, -95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,2,16,10,56,0, -0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,65,116,116,114,105,98,115,0,2, -16,10,49,54,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,85,110,105,102, -111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,53,49,50,0,0,0,2,2,90,95,1,0,5,0,1, -103,108,95,77,97,120,86,97,114,121,105,110,103,70,108,111,97,116,115,0,2,16,10,51,50,0,0,0,2,2,90, -95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,84,101,120,116,117,114,101,73,109,97,103, -101,85,110,105,116,115,0,2,16,8,48,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,67,111,109,98, -105,110,101,100,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,10,50,0,0,0, -2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105, -116,115,0,2,16,10,50,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,70,114,97,103,109,101,110,116, -85,110,105,102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,54,52,0,0,0,2,2,90,95, -1,0,5,0,1,103,108,95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,2,16,10,49,0,0,0,2,2,90, -95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97, -116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105, -120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95, -4,0,14,0,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103, -108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2, -2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110, -118,101,114,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114, -111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,15, -0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111, -115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114, -105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108, -86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112, -111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120, -84,114,97,110,115,112,111,115,101,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111, -111,114,100,115,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116, -114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0, -1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115, -101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86, -105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101, -84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101, -77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103,108, -95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,9,0,1,103,108, -95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,90,95,0,0,24,103,108,95,68,101,112,116,104,82, -97,110,103,101,80,97,114,97,109,101,116,101,114,115,0,9,0,110,101,97,114,0,0,0,1,9,0,102,97,114,0, -0,0,1,9,0,100,105,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,68,101,112,116,104,82,97,110, -103,101,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101, -0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,67,108,105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120, -67,108,105,112,80,108,97,110,101,115,0,0,0,2,2,90,95,0,0,24,103,108,95,80,111,105,110,116,80,97, -114,97,109,101,116,101,114,115,0,9,0,115,105,122,101,0,0,0,1,9,0,115,105,122,101,77,105,110,0,0,0, -1,9,0,115,105,122,101,77,97,120,0,0,0,1,9,0,102,97,100,101,84,104,114,101,115,104,111,108,100,83, -105,122,101,0,0,0,1,9,0,100,105,115,116,97,110,99,101,67,111,110,115,116,97,110,116,65,116,116,101, -110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,76,105,110,101,97,114,65,116, -116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,81,117,97,100,114,97, -116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,80, -111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,80,111,105,110,116,0,0,0,2,2, -90,95,0,0,24,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,12,0, -101,109,105,115,115,105,111,110,0,0,0,1,12,0,97,109,98,105,101,110,116,0,0,0,1,12,0,100,105,102, -102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,9,0,115,104,105,110,105,110,101, -115,115,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109, -101,116,101,114,115,0,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,90, -95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103, -108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104, -116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,12,0,97,109,98,105,101,110,116,0, -0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,12,0,112, -111,115,105,116,105,111,110,0,0,0,1,12,0,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,0,115,112, -111,116,68,105,114,101,99,116,105,111,110,0,0,0,1,9,0,115,112,111,116,67,111,115,67,117,116,111, -102,102,0,0,0,1,9,0,99,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0, -1,9,0,108,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,113,117,97,100, -114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,115,112,111,116,69,120,112, -111,110,101,110,116,0,0,0,1,9,0,115,112,111,116,67,117,116,111,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0, -25,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,0,1, -103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116, -115,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101, -116,101,114,115,0,12,0,97,109,98,105,101,110,116,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105, -103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,76,105,103, -104,116,77,111,100,101,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108, -80,114,111,100,117,99,116,115,0,12,0,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,0,2,2,90,95, -4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0,1,103, -108,95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2, -2,90,95,4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0, -1,103,108,95,66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2, -2,90,95,0,0,24,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,0,97,109,98,105, -101,110,116,0,0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0, -0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,0,1,103, -108,95,70,114,111,110,116,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120, -76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99, -116,115,0,0,1,103,108,95,66,97,99,107,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108, -95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,84,101,120,116,117,114, -101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97, -103,101,85,110,105,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,83,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12, -0,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114, -101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,82,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12, -0,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114, -101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97, -110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2, -90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120, -84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106, -101,99,116,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111, -114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18, -103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,0,0,24,103, -108,95,70,111,103,80,97,114,97,109,101,116,101,114,115,0,12,0,99,111,108,111,114,0,0,0,1,9,0,100, -101,110,115,105,116,121,0,0,0,1,9,0,115,116,97,114,116,0,0,0,1,9,0,101,110,100,0,0,0,1,9,0,115,99, -97,108,101,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,70,111,103,80,97,114,97,109,101,116,101,114, -115,0,0,1,103,108,95,70,111,103,0,0,0,1,90,95,0,0,9,0,0,114,97,100,105,97,110,115,0,1,1,0,0,9,0, -100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0, -0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,100,101,103,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,114,97,100,105,97,110,115,0,1,1,0,0,10,0,100, -101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0, -49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,114,97, -100,105,97,110,115,0,1,1,0,0,11,0,100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49, -53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59, -120,120,120,0,0,0,0,1,90,95,0,0,12,0,0,114,97,100,105,97,110,115,0,1,1,0,0,12,0,100,101,103,0,0,0, -1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,100,101,103,0, -0,18,99,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,100,101,103,114,101,101,115,0,1,1,0,0,9,0, -114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0, -0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,114,97,100,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,100,101,103,114,101,101,115,0,1,1,0,0,10,0,114, -97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49, -0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,100,101,103, -114,101,101,115,0,1,1,0,0,11,0,114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0, -17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120, -120,120,0,0,0,0,1,90,95,0,0,12,0,0,100,101,103,114,101,101,115,0,1,1,0,0,12,0,114,97,100,0,0,0,1,3, -2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99, -0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,115,105,110,0,1,1,0,0,9,0,114,97,100,105,97,110,115, -0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100, -105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,115,105,110,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0, -0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, -97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,115, -105,110,0,1,1,0,0,11,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108, -111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97, -110,115,0,59,121,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0, -59,122,0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,115,105,110,0,1,1,0,0, -12,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115, -105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0, -0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, -97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,99,111, -115,0,1,1,0,0,9,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,99, -111,115,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0, -4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,99,111,115,0,1,1,0,0,11,0,114,97,100, -105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,115, -105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0, -0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0, -18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,99,111,115,0,1,1,0,0,12,0,114,97, -100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111, -115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59, -121,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122, -0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0, -18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95, -0,0,9,0,0,116,97,110,0,1,1,0,0,9,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,115, -105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,9,0,1,99,0,2,58,99,111,115,0,0,18,97,110, -103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,10,0,0,116,97,110,0,1,1,0,0,10,0,97, -110,103,108,101,0,0,0,1,3,2,90,95,1,0,10,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0, -0,0,0,3,2,90,95,1,0,10,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18, -99,0,49,0,0,1,90,95,0,0,11,0,0,116,97,110,0,1,1,0,0,11,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0, -11,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,11,0,1,99,0,2,58, -99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,12,0,0,116,97, -110,0,1,1,0,0,12,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,12,0,1,115,0,2,58,115,105,110,0,0,18, -97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,12,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0, -0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,9,0,0,97,115,105,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2, -90,95,1,0,9,0,1,97,48,0,2,17,49,0,53,55,48,55,50,56,56,0,0,0,0,3,2,90,95,1,0,9,0,1,97,49,0,2,17,48, -0,50,49,50,49,49,52,52,0,0,54,0,0,3,2,90,95,1,0,9,0,1,97,50,0,2,17,48,0,48,55,52,50,54,49,48,0,0,0, -0,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,53,0,0,48, -0,0,3,2,90,95,1,0,9,0,1,121,0,2,58,97,98,115,0,0,18,120,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108, -0,18,104,97,108,102,80,105,0,58,115,113,114,116,0,0,17,49,0,48,0,0,18,121,0,47,0,0,18,97,48,0,18, -121,0,18,97,49,0,18,97,50,0,18,121,0,48,46,48,46,48,47,58,115,105,103,110,0,0,18,120,0,0,0,48,20,0, -0,1,90,95,0,0,10,0,0,97,115,105,110,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,115,105,110,0,1,1,0, -0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59, -120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0, -20,0,0,1,90,95,0,0,12,0,0,97,115,105,110,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0, -58,97,115,105,110,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,99,111,115,0,1,1,0,0,9,0, -120,0,0,0,1,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0, -53,0,0,48,0,0,9,18,95,95,114,101,116,86,97,108,0,18,104,97,108,102,80,105,0,58,97,115,105,110,0,0, -18,120,0,0,0,47,20,0,0,1,90,95,0,0,10,0,0,97,99,111,115,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97, -99,111,115,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,111,115, -0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18, -118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,99,111,115,0,0,18,118,0, -59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,99,111,115,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,122,0,58,97,99,111,115,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,58,97,99,111,115,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0, -9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,97,115,105,110,0,0,18,120,0,58,105,110,118, -101,114,115,101,115,113,114,116,0,0,18,120,0,18,120,0,48,17,49,0,48,0,0,46,0,0,48,0,0,20,0,0,1,90, -95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95, -120,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,121,95,111,118,101,114, -95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118, -101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0, -0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0, -58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97, -116,97,110,0,1,1,0,0,12,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95, -120,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,121,95, -111,118,101,114,95,120,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0,9,0,121,0,0, -1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,10,58,97,98,115,0,0,18,120,0,0,0,17,49,0,48, -0,45,52,0,41,0,2,9,18,114,0,58,97,116,97,110,0,0,18,121,0,18,120,0,49,0,0,20,0,10,18,120,0,17,48,0, -48,0,0,40,0,2,9,18,114,0,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,51,0,49,52,49,53,57,51,0, -0,48,46,20,0,0,9,14,0,0,2,9,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,49,0,53,55,48,55,57,54, -53,0,0,48,20,0,0,8,18,114,0,0,0,1,90,95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10, -0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0,59,120,0,0, -18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,117, -0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,117,0,0, -1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0, -59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110, -0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,116,97, -110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -97,116,97,110,0,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,121,0,58,97,116,97,110,0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,117,0,59,119,0,0,18,118,0,59,119,0, -0,0,20,0,0,1,90,95,0,0,9,0,0,112,111,119,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,102,108,111, -97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95, -0,0,10,0,0,112,111,119,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,102,108,111,97,116,95,112, -111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0, -0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -97,0,59,121,0,0,18,98,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,112,111,119,0,1,1,0,0,11,0,97,0,0,1,1,0, -0,11,0,98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0, -18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111, -97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18, -98,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,112,111,119,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4, -102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86, -97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,112,111,119, -101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18,98,0,59,122,0,0,0,4, -102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,97,0,59, -119,0,0,18,98,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,101,120,112,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0, -0,9,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120, -112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,0,0,1,90,95,0,0,10,0,0,101,120,112,0,1,1,0, -0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0, -4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59, -120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -116,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1, -116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50, -0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101, -120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97, -116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,0,1,90, -95,0,0,12,0,0,101,120,112,0,1,1,0,0,12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,18,97,0,17,49,0, -52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114, -101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112, -50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,116,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,108,111, -103,50,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86, -97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,108,111,103,50,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108, -111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4, -102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121, -0,0,0,0,1,90,95,0,0,11,0,0,108,111,103,50,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95,108, -111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97, -116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102, -108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0, -0,0,1,90,95,0,0,12,0,0,108,111,103,50,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108,111,97,116,95,108,111, -103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95, -108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111, -97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,4,102, -108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,59,119,0,0, -0,0,1,90,95,0,0,9,0,0,108,111,103,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54, -57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,120,0,0,0,18,99,0,48,0,0,1,90,95,0,0,10, -0,0,108,111,103,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49, -56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,11,0,0,108,111,103,0, -1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8, -58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,12,0,0,108,111,103,0,1,1,0,0,12,0, -118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103, -50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,9,0,0,101,120,112,50,0,1,1,0,0,9,0,97,0,0,0,1,4,102, -108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10, -0,0,101,120,112,50,0,1,1,0,0,10,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95, -95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,50,0,1, -1,0,0,11,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97, -108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101, -116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,101,120,112,50,0,1,1,0,0,12,0, -97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121, -0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0, -59,122,0,0,18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86, -97,108,0,59,119,0,0,18,97,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,115,113,114,116,0,1,1,0,0,9,0,120,0,0, -0,1,3,2,90,95,1,0,9,0,1,110,120,0,2,18,120,0,54,0,0,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97, -116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,0,18, -114,0,0,0,4,118,101,99,52,95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,10,0,0,115,113,114,116,0,1,1,0,0,10,0,120,0,0,0,1,3,2,90,95,1, -0,10,0,1,110,120,0,2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0, -0,0,3,2,90,95,0,0,10,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18, -120,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,18,114,0,59,120,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,0,4,118,101,99,52,95,99,109,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0, -11,0,0,115,113,114,116,0,1,1,0,0,11,0,120,0,0,0,1,3,2,90,95,1,0,11,0,1,110,120,0,2,18,120,0,54,0,1, -1,122,101,114,111,0,2,58,118,101,99,51,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0,11,0,1,114,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, -18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,118,101,99,52, -95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0, -0,0,0,1,90,95,0,0,12,0,0,115,113,114,116,0,1,1,0,0,12,0,120,0,0,0,1,3,2,90,95,1,0,12,0,1,110,120,0, -2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0, -12,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,115,113,0,18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,59,119,0,0,18,120,0,59,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, -18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,114,0,59,119,0,0,18,114,0,59,119,0,0,0,4,118,101,99,52,95,99,109,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,9, -0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,105, -110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,111,97,116,95,114,115, -113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,90,95,0,0,11,0, -0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97, -116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108, -111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1, -90,95,0,0,12,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108, -111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0, -0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59, -122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118, -0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,9,0,120,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,17,49,0,48,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,114,109,97,108, -105,122,101,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,105,110,118,101,114,115,101, -115,113,114,116,0,0,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,115,0,0,0, -0,1,90,95,0,0,11,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,9, -0,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118,0,0,0, -4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,116,109,112,0,0,0,0,1,90,95,0,0,12,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,12,0,118,0, -0,0,1,3,2,90,95,0,0,9,0,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0,18, -118,0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,116,109,112,0,0,0,0,1,90,95,0,0,9,0,0,97,98,115,0,1,1,0,0,9,0,97,0,0,0,1,4, -118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0, -97,98,115,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,97,98,115,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99, -52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12, -0,0,97,98,115,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,115,105,103,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9, -0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,120,0,0,17,48,0,48,0,0,0, -0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90,95,0, -0,10,0,0,115,105,103,110,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,112,0,0,1,1,110,0,0,0,4, -118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99, -52,95,115,103,116,0,18,110,0,59,120,121,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0, -0,1,90,95,0,0,11,0,0,115,105,103,110,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,11,0,1,112,0,0,1,1, -110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0, -0,4,118,101,99,52,95,115,103,116,0,18,110,0,59,120,121,122,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -112,0,0,18,110,0,0,0,0,1,90,95,0,0,12,0,0,115,105,103,110,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0, -12,0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,118,0,0,17,48,0,48,0,0, -0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90, -95,0,0,9,0,0,102,108,111,111,114,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,108,111,111,114,0,1,1,0,0, -10,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,102,108,111,111,114,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101, -99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1, -90,95,0,0,12,0,0,102,108,111,111,114,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111, -114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,99,101,105,108,0,1,1,0,0, -9,0,97,0,0,0,1,3,2,90,95,0,0,9,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0, -18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,10,0,0,99, -101,105,108,0,1,1,0,0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52, -95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18, -98,0,54,20,0,0,1,90,95,0,0,11,0,0,99,101,105,108,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,98, -0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,90,95,0,0,12,0,0,99,101,105,108,0,1,1,0,0, -12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114, -0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,9,0,0,102, -114,97,99,116,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,114,97,99,116,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101, -99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0, -11,0,0,102,114,97,99,116,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12,0,0,102,114,97,99,116,0,1,1,0, -0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0, -0,0,1,90,95,0,0,9,0,0,109,111,100,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1, -111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,108,111,111,114,0, -0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,10,0,0,109,111,100,0, -1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110, -101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1, -1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101, -114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12,0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,9,0,98,0, -0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98, -0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90, -95,0,0,10,0,0,109,111,100,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,111, -110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114, -66,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118, -101,114,66,0,59,121,0,0,18,98,0,59,121,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58, -102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0, -11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,111,110,101, -79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102, -108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12, -0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,111,110,101,79, -118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79, -118,101,114,66,0,59,119,0,0,18,98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98, -0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90, -95,0,0,9,0,0,109,105,110,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105, -110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109,105,110,0, -1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,0, -109,105,110,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0, -0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52, -95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109, -105,110,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,105,110,0,1,1,0, -0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97, -0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,109,97,120,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4, -118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0, -1,90,95,0,0,11,0,0,109,97,120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109, -97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59, -120,121,122,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4, -118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,97, -120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0, -12,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108, -0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,99,108,97,109,112,0,1,1,0,0,9,0,118,97,108,0,0,1,1,0, -0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108, -97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18, -109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97,108,0,0,1, -1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99, -108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0, -18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0,118,97,108,0,0, -1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95, -99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108, -0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0,0,12,0,118,97,108, -0,0,1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52, -95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97, -108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97, -108,0,0,1,1,0,0,10,0,109,105,110,86,97,108,0,0,1,1,0,0,10,0,109,97,120,86,97,108,0,0,0,1,4,118,101, -99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110, -86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0, -118,97,108,0,0,1,1,0,0,11,0,109,105,110,86,97,108,0,0,1,1,0,0,11,0,109,97,120,86,97,108,0,0,0,1,4, -118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109, -105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0, -0,12,0,118,97,108,0,0,1,1,0,0,12,0,109,105,110,86,97,108,0,0,1,1,0,0,12,0,109,97,120,86,97,108,0,0, -0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18, -109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,9,0,0,109,105,120,0,1,1,0,0, -9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,109,105,120,0,1,1, -0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,11,0,0,109,105,120, -0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112, -0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,12,0,0,109, -105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108, -114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0, -0,109,105,120,0,1,1,0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52, -95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0, -0,11,0,0,109,105,120,0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101, -99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90, -95,0,0,12,0,0,109,105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,12,0,97,0,0,0,1,4, -118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0, -0,0,1,90,95,0,0,9,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,9,0,120,0,0,0,1,4, -118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0, -0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,10,0,101,100,103,101,0,0,1,1,0,0,10,0,120,0,0,0, -1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0,0,18, -101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116,101,112,0,1,1,0,0,11,0,101,100,103,101,0,0,1,1, -0,0,11,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,12,0, -101,100,103,101,0,0,1,1,0,0,12,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116, -86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,9, -0,101,100,103,101,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116, -101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90, -95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101, -99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1, -90,95,0,0,9,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0, -0,9,0,101,100,103,101,49,0,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,116,0,2,58,99,108,97,109, -112,0,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49, -0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18, -116,0,48,47,48,0,0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,10,0,101, -100,103,101,48,0,0,1,1,0,0,10,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0, -1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, -101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, -0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116, -101,112,0,1,1,0,0,11,0,101,100,103,101,48,0,0,1,1,0,0,11,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118, -0,0,0,1,3,2,90,95,0,0,11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47, -18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8, -18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115, -109,111,111,116,104,115,116,101,112,0,1,1,0,0,12,0,101,100,103,101,48,0,0,1,1,0,0,12,0,101,100,103, -101,49,0,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0, -18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0, -0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0, -0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0, -1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,58,99,108, -97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0, -47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0, -0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0, -101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0, -11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49, -0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48, -17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115,109,111,111,116,104,115, -116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,12,0, -118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0, -47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0, -8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,9,0,0,108, -101,110,103,116,104,0,1,1,0,0,9,0,120,0,0,0,1,8,58,97,98,115,0,0,18,120,0,0,0,0,0,1,90,95,0,0,9,0, -0,108,101,110,103,116,104,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9, -0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90, -95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0, -4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1, -0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0, -18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0, -100,105,115,116,97,110,99,101,0,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,3,2,90,95,1,0,9,0,1, -100,0,2,18,120,0,18,121,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0, -18,100,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,10,0,118,0,0,1,1,0,0, -10,0,117,0,0,0,1,3,2,90,95,1,0,10,0,1,100,50,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116, -86,97,108,0,58,108,101,110,103,116,104,0,0,18,100,50,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115, -116,97,110,99,101,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,3,2,90,95,1,0,11,0,1,100,51,0,2, -18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0,18,100, -51,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,12,0,118,0,0,1,1,0,0,12, -0,117,0,0,0,1,3,2,90,95,1,0,12,0,1,100,52,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,108,101,110,103,116,104,0,0,18,100,52,0,0,0,20,0,0,1,90,95,0,0,11,0,0,99,114,111,115, -115,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,51,95,99,114,111,115,115,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,9,0,0,102,97, -99,101,102,111,114,119,97,114,100,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,114,101, -102,0,0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, -2,90,95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0, -0,0,8,58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,10,0,0,102,97,99,101, -102,111,114,119,97,114,100,0,1,1,0,0,10,0,78,0,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,114,101,102,0, -0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90, -95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8, -58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,11,0,0,102,97,99,101,102, -111,114,119,97,114,100,0,1,1,0,0,11,0,78,0,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,114,101,102,0,0,0, -1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0, -0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58, -109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,12,0,0,102,97,99,101,102,111, -114,119,97,114,100,0,1,1,0,0,12,0,78,0,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,114,101,102,0,0,0,1,3, -2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9, -0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109, -105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,9,0,0,114,101,102,108,101,99,116,0, -1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18, -73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,10,0,0,114,101,102,108,101,99,116,0,1,1,0,0,10,0,73,0,0, -1,1,0,0,10,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78, -0,48,47,0,0,1,90,95,0,0,11,0,0,114,101,102,108,101,99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0, -0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90, -95,0,0,12,0,0,114,101,102,108,101,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,0,0,0,1,8,18,73,0, -17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,9,0,0,114, -101,102,114,97,99,116,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2, -90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90, -95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95, -100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,9,0,1,114,101, -116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,17,48,0,48,0,0, -20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111, -116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97, -108,0,0,0,1,90,95,0,0,10,0,0,114,101,102,114,97,99,116,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,0,0,1, -1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0, -18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97, -0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0, -3,2,90,95,0,0,10,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116, -118,97,108,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116, -97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0, -0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,11,0,0,114,101,102,114,97, -99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0, -1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1, -107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95, -105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,11,0,1,114,101,116,118,97,108,0, -0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,58,118,101,99,51,0,0,17,48,0,48, -0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95, -100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116, -118,97,108,0,0,0,1,90,95,0,0,12,0,0,114,101,102,114,97,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0, -78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111, -116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18, -101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47, -48,47,0,0,3,2,90,95,0,0,12,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18, -114,101,116,118,97,108,0,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108, -0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116, -0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,13,0,0,109,97, -116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,13,0,109,0,0,1,0,0,0,13,0,110,0,0,0,1,8,58, -109,97,116,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,14,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,0,14,0,109,0,0,1,0,0,0,14,0,110,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,15,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108, -116,0,1,0,0,0,15,0,109,0,0,1,0,0,0,15,0,110,0,0,0,1,8,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0, -0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99, -52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90, -95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118, -101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0, -0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0, -1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4, -118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0, -1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0, -18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0, -118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118, -0,0,0,0,1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1, -1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97, -108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115, -84,104,97,110,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95, -115,108,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,108, -101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118, -101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, -0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0, -7,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1, -1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86, -97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84,104,97,110,0, -1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0, -103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2, -0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,59,120,121,0,0, -18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,7, -0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104, -97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84, -104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0, -0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0, -11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, -0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113, -117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95, -95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101, -114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52, -95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95, -0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0, -7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117, -97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114, -101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,10, -0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,11,0,117, -0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,12,0,117, -0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0, -18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0, -118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118, -0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118, -0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101, -99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52, -95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118,0,0,0,1,4,118,101,99,52, -95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0, -110,111,116,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95, -115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0, -0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, -1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90, -95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101, -99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0, -1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, -0,1,90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18, -118,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118, -0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4, -118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0, -0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59, -120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,3,0,118,0,0,0,1,3,2,90,95,0,0, -9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59, -120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115, -117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110, -121,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100, -0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99, -52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,119,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0, -1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0, -0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,3, -0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,112,114,111,100,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0, -4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0, -48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114, -111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,118,0, -59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, -111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52, -95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1, -90,95,0,0,2,0,0,110,111,116,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,0,110,111, -116,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,0,1,1,0,0,4,0,118,0, -0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0, -0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0,16,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,95,112, -114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, -114,100,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114, -111,106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4, -118,101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116, -117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0, -0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101, -50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100, -0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0,0,0,1,90, -95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108, -101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95, -112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0,115,97,109, -112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,51, -100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97, -109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95, -51,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0, -0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, -116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0, -0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115, -97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120, -95,49,100,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111, -106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118, -101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0, -0,115,104,97,100,111,119,50,68,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111, -111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,115,104,97,100,111,119,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0, -0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111, -106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0, -0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116, -0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99, -52,95,116,101,120,95,114,101,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101, -99,116,80,114,111,106,0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114, -100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,22, -0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116, -101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50, -68,82,101,99,116,0,1,1,0,0,23,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0, -0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,115,104,97,100,111,119,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0, -0,115,104,97,100,111,119,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,23,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116, -95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0, -0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116,86,97,108, -0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,10,0,120,0,0,0,1,4,102,108, -111,97,116,95,110,111,105,115,101,50,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0, -0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,11,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115, -101,51,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101, -49,0,1,1,0,0,12,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,95,95,114,101, -116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,9,0,120,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0, -46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51, -52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0, -11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120, -0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58, -118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,0,1, -90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0,0,17,55, -0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111, -105,115,101,51,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111, -105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105, -115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122, -0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110, -111,105,115,101,51,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, -111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111, -105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118, -101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110, -111,105,115,101,51,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, -111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111, -105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51, -0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49, -0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0, -0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111,105,115,101,51,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57, -0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53, -0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,0, -1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,17,50,51,0,53, -52,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57, -0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110, -111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0, -46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58, -118,101,99,50,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0, -110,111,105,115,101,52,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110, -111,105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17, -51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101, -49,0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0, -0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120, -0,58,118,101,99,51,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0, -0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0, -0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53,0,52,55,0,0, -0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,50, -51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,20, -0,0,0 diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h deleted file mode 100644 index b3d3e87cf42..00000000000 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ /dev/null @@ -1,869 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_core.gc */ - -5,1,90,95,0,0,5,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,5,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,98,0,20,0,0,1,90,95,0,0,5,0,1,1,1,0,0,5,0,105,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,105,0,20,0,0,1,90,95,0,0,1,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95, -115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,102, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,18,98,0,20,0,0,1,90,95,0,0,9,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118, -101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,9,0,1,1,1,0,0,1,0,98,0,0, -0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0, -0,0,1,90,95,0,0,9,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,20,0,0,1, -90,95,0,0,10,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0,1,90,95,0,0,10,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,102,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116, -111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0, -10,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,2,0,98,0,0,0,1,4,105,118, -101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0, -0,0,1,90,95,0,0,10,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,12,0,118, -0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0, -122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,90,95,0, -0,11,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101, -99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0, -0,0,1,90,95,0,0,11,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,3,0,98,0, -0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,109,111, -118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,0,0,1,90,95,0,0,12,0,1,1, -1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,122,0,0,1,1,0,0,9,0,119,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,18,119,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,5,0,105,0,0,0,1, -4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0, -0,1,90,95,0,0,12,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,4,0,98,0,0,0,1,4,105,118, -101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0, -0,12,0,1,1,1,0,0,8,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114, -101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,11,0,118,51,0,0,1,1,0,0,9,0,102,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,119,0,18,102,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,10,0,118,50,0,0,1,1,0,0,9,0,102,49, -0,0,1,1,0,0,9,0,102,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,118,50,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,122,0,18,102,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,18,102,50,0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,1,1,0,0,5,0,106,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106, -0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,9,0,102,0,0,0,1,4, -118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -102,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0, -105,0,0,1,1,0,0,5,0,106,0,0,1,1,0,0,5,0,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18, -105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,122,0,18,107,0,20,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109, -111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,0,0,1,90,95,0,0,7,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99, -52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95, -0,0,8,0,1,1,1,0,0,5,0,120,0,0,1,1,0,0,5,0,121,0,0,1,1,0,0,5,0,122,0,0,1,1,0,0,5,0,119,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0, -18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,119,0,18,119,0,20,0,0,1,90,95,0,0,8,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109, -111,118,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,9,0,102, -0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18, -102,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,49,0,0,1,1, -0,0,1,0,98,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,49,0,0,1,1,0,0,5, -0,105,50,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -105,49,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -121,0,0,18,105,50,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99, -52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0, -2,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,17,48,0,48,0,0,0,0, -0,1,90,95,0,0,2,0,1,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,6,0,118,0,0,0, -1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,90, -95,0,0,3,0,1,1,1,0,0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,17,48,0,48,0,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,17,48,0, -48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111,118, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0, -9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90, -95,0,0,3,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,7,0,118,0,0,0,1, -4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51, -0,0,1,1,0,0,1,0,98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18, -98,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,98,52,0,20,0,0,1,90,95,0,0,4,0,1,1,1,0, -0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,1,1,0,0,9,0,102,52,0,0,0,1,3,2,90, -95,1,0,9,0,1,122,101,114,111,0,2,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,18,122,101,114,111,0,0,0,4,118,101,99,52,95,115,110, -101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,18,122,101,114,111,0,0,0,4,118,101, -99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51,0,0,18,122,101,114, -111,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,102,52,0, -0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111, -118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,98,0,0,0,0,1,90,95,0,0,4,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,119,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,105,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4, -0,1,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,9,0,109,48,48,0,0,1, -1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,48,49,0,0,1,1,0,0,9,0,109,49,49,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18, -109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1, -90,95,0,0,13,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0, -18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109, -97,116,50,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,1,0,98,0,0, -0,1,8,58,109,97,116,50,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0, -0,10,0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,14,0,1,1, -1,0,0,9,0,109,48,48,0,0,1,1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,48,49, -0,0,1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,48,50,0,0,1,1,0,0,9,0,109, -49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0, -18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109, -50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,9,0,102,0,0,0,1,3,2, -90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,118,0,59,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118, -0,59,121,121,120,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97,116,51,0,0,58,102, -108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,1,0,98,0,0,0,1,8,58,109,97,116, -51,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,11,0,99,48,0,0,1,1, -0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9,0,109,48,48,0,0,1,1,0, -0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,51,48,0,0,1,1,0,0,9,0,109,48,49,0,0, -1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,51,49,0,0,1,1,0,0,9,0,109,48, -50,0,0,1,1,0,0,9,0,109,49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,1,1,0,0,9,0,109,51,50,0,0,1,1,0,0,9,0, -109,48,51,0,0,1,1,0,0,9,0,109,49,51,0,0,1,1,0,0,9,0,109,50,51,0,0,1,1,0,0,9,0,109,51,51,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,109,51, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,109,49, -51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50,51,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9, -0,102,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,118,0,59,121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,118,0,59,121,121,121,120,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97, -116,52,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0,1,0,98,0,0,0, -1,8,58,109,97,116,52,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0, -12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,1,1,0,0,12,0,99,51,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,5,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0, -0,5,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, -98,0,0,0,0,1,90,95,0,0,5,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -5,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,22,1,1,0,0,5,0, -97,0,0,1,1,0,0,5,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,98,73,110,118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,97,0,0,1,1, -0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, -98,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -6,0,2,21,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,6,0, -97,0,0,1,1,0,0,6,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105, -118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0, -97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0, -1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,22, -1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95, -105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0, -8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, -0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0, -1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,22, -1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,98,73,110,118,0,59,119,0,0,18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118, -101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,2,26,1,1,0,0,9,0,97, -0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, -90,95,0,0,9,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,22, -1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,90,95,0, -0,10,0,2,26,1,1,0,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10, -0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,10,0, -118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0, -118,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0,11,0,118,0,0,1, -1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117, -0,0,0,1,3,2,90,95,0,0,11,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, -117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,119,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27, -1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0, -0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0,0,12,0,118,0,0,1,1,0,0,12, -0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, -0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,10, -0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,26,1,1, -0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,9,0,97,0, -0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10, -0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1, -0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2, -21,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,105,110,118,85,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0, -18,105,110,118,85,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0, -0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, -66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0, -0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0, -11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,9,0, -97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,27, -1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95, -0,0,11,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121, -122,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59, -120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,3, -2,90,95,0,0,11,0,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, -0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,97,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,22,1, -1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18, -105,110,118,66,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0, -2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0, -0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0, -12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0, -0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,105,110,118,85,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,105,110,118,85,0,0,0,0,1,90,95,0,0,12,0,2,22, -1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0, -6,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118, -101,99,50,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,46,20, -0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118, -0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18, -98,0,0,0,47,20,0,0,1,90,95,0,0,6,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,6,0,2,21,1, -1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118, -101,99,50,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90, -95,0,0,6,0,2,22,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0, -0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0, -46,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,5, -0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97, -0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,7,0, -2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101, -99,51,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,48,20,0,0,1, -90,95,0,0,7,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90,95,0,0,7,0,2,22,1,1,0,0,7,0,118,0,0,1, -1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0, -0,0,49,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0, -0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99, -52,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0, -8,0,2,27,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58, -105,118,101,99,52,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0, -117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,48,20, -0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,5,0,97, -0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0, -0,18,117,0,49,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,5,0,2, -27,1,1,0,0,5,0,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,97,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52,95,110, -101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0, -0,7,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,0, -1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0, -0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,2,27, -1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0, -0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0, -0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,54,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54, -20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,90,95,0,0,9,0,0, -100,111,116,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -18,98,0,48,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121, -0,48,46,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118, -101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -9,0,0,100,111,116,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,1,1,0,2,0,5,0,97,0,0, -1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0,2,2,1,0,2,0, -5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0, -2,3,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90, -95,0,0,5,0,2,4,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97, -0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0, -18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0, -0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6,0,118,0,0, -1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1, -0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, -95,0,0,7,0,2,2,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8, -18,118,0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0, -18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9, -18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0, -8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8, -0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118, -0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -49,20,0,8,18,118,0,0,0,1,90,95,0,0,9,0,2,1,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18, -97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,2,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9, -18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0, -98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2, -0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, -95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0, -8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18, -118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0, -0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0, -0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2, -2,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0, -0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -48,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118, -0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0, -117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2,0,12,0, -118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0, -18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2, -1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0, -0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0, -18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6, -0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,49,20,0, -8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0, -58,105,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,2,1,0,2,0,7,0,118,0, -0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,47,20,0,8,18,118, -0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0, -0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1, -90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99, -52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0, -0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18, -97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,1, -1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0, -46,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0, -18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0, -118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58, -118,101,99,50,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0,0,1,1, -0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1, -90,95,0,0,11,0,2,2,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -51,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97, -0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,11, -0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0, -0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18, -118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2, -0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,47,20,0, -8,18,118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118, -0,58,118,101,99,52,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0, -0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0, -0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2, -27,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109, -0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,0,48, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0, -57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,0,48,46,20,0,0,1,90,95, -0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0, -0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,0,48,46,18,109, -0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,0,48,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57, -59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,10,50,0,57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121, -121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,0,48,46,20,0,0,1,90, -95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,15,0,2,26, -1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0, -15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109, -0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121, -121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,122,0,48,46,18,109, -0,16,10,51,0,57,18,110,0,16,8,48,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,120,0,48,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16, -10,49,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,49,0,57,59,119,119,119, -119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,10,50,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121, -121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,122,0,48,46,18,109,0,16, -10,51,0,57,18,110,0,16,10,50,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,51,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,51,0,57,59,120,120,120,120,0,48,18,109,0,16, -10,49,0,57,18,110,0,16,10,51,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10, -51,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,59,119,119,119, -119,0,48,46,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, -49,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0, -0,1,90,95,0,0,13,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0, -0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1, -90,95,0,0,13,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0, -0,13,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,90,95,0,0,14,0,2, -26,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, -0,57,46,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,9,0,97,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0, -57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95, -0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0, -1,90,95,0,0,14,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,90,95,0,0,15,0,2,26,1,1,0, -0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1, -90,95,0,0,15,0,2,26,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51, -0,57,18,98,0,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1, -0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,90,95,0,0,15,0,2, -21,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20, -0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98, -0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,90,95,0,0,10,0,2, -21,1,1,0,0,13,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, -48,0,57,18,118,0,59,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,0,48,46,20,0,0,1,90,95, -0,0,10,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,11,0,2, -21,1,1,0,0,14,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, -48,0,57,18,118,0,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,0,48,46,18,109, -0,16,10,50,0,57,18,118,0,59,122,122,122,0,48,46,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0, -1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0, -18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18, -118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116, -0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0, -0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120, -120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18, -118,0,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,118,0,59,119,119,119,119,0,48,46,20,0,0, -1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0, -0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,13, -0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0, -13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18, -109,0,0,0,1,90,95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0, -0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2, -0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9, -18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,8,18,109,0,0,0,1,90, -95,0,0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0, -0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,109,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20, -0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10, -0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, -95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118, -101,99,50,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, -95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118, -101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0, -47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,8,18,109,0,0,0,1,90,95,0, -0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99, -51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0, -1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,8,18,109,0,0, -0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,118,0,2,58, -118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,118,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,46,20,0,8, -18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1, -118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118, -0,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90, -95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51, -0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0, -0,1,3,2,90,95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10, -0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0, -11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,14,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,118,0,18,118,0, -18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,5,0,2,25,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,25,1,0,2,0,6,0, -118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,7,0,2,25,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0, -58,105,118,101,99,51,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,90,95,0,0,8,0,2,25,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49, -0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,25,1,0,2,0,9,0, -97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20, -0,0,1,90,95,0,0,10,0,2,25,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49, -0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,25,1,0, -2,0,11,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,12,0,2,25,1,0,2,0,12,0,118,0,0,0,1,9,18,118, -0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,0,1,90,95,0,0,13,0,2,25,1,0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0, -20,0,0,1,90,95,0,0,14,0,2,25,1,0,2,0,14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, -118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -90,95,0,0,15,0,2,25,1,0,2,0,15,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90, -95,0,0,5,0,2,24,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,24,1,0,2,0,6,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90, -95,0,0,7,0,2,24,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,8,0,2,24,1,0,2,0,8,0,118, -0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,24,1,0,2,0,9,0,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, -48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,10,0,2,24,1,0,2,0,10, -0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,24,1,0,2,0,11,0,118,0,0,0,1,9,18,118,0,18, -118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,0,1,90,95,0,0,12,0,2,24,1,0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,13,0,2,24,1, -0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48, -0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,14,0,2,24,1,0,2,0, -14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0, -0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,2,24,1,0,2,0,15,0,109, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20, -0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,5,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,6,0,118,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16, -10,49,0,0,0,47,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,7,0,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0, -16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,8,0,118,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0, -0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,9,0,97, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0, -1,90,95,0,0,10,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47, -20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0, -0,47,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,90,95,0,0,13,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,13,0,109,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, -118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, -118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,15,0,0,95,95, -112,111,115,116,68,101,99,114,0,1,0,2,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20, -0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9, -18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1, -90,95,0,0,9,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,9,0,97,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,10,0,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,11,0,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,12,0, -0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0, -5,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116, -73,110,99,114,0,1,0,2,0,6,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118, -0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,0,7,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, -118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,0,8,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9, -18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,13,0,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,0,13,0,109,0,0,0,1,3,2,90,95,0,0,13,0,1,110,0,2,18,109,0,0,0,9, -18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18, -110,0,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,14,0,109,0,0,0,1,3,2,90, -95,0,0,14,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51, -0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0, -0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0, -17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,15,0,0,95,95,112,111,115,116,73,110,99,114,0, -1,0,2,0,15,0,109,0,0,0,1,3,2,90,95,0,0,15,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0, -0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0, -0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,40,0,0,1,90,95, -0,0,1,0,2,16,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,90,95,0,0,1,0,2,16,1,1, -0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97, -116,0,0,18,98,0,0,0,41,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90, -95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111, -97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,43,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,9, -0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,5,0,97,0,0,1, -1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0, -42,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,9,0,102,0,0,0,1,4,102,108,111, -97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,5,0,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,90,95,0,0,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,0,1,0,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, -18,98,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,10,0,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,11,0,118,0, -0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0, -0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,12,0,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,0,6,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,0,7,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116, -77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,0,8,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, -118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0, -0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,2,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69, -83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0, -0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,3,0,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,0,4,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,13,0,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116, -77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,14,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,0,18,109,0,16,10,50,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, -15,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,51,0,57,0,0,0, -0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,16,0,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, -17,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,18,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,19,0,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -0,20,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,21,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h deleted file mode 100644 index c5a1cce2a49..00000000000 --- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ /dev/null @@ -1,110 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_fragment_builtin.gc */ - -5,2,2,90,95,6,0,12,0,1,103,108,95,70,114,97,103,67,111,111,114,100,0,0,0,2,2,90,95,6,0,1,0,1,103, -108,95,70,114,111,110,116,70,97,99,105,110,103,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103, -67,111,108,111,114,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103,68,97,116,97,0,3,18,103,108, -95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,0,0,2,2,90,95,5,0,9,0,1,103,108,95,70,114, -97,103,68,101,112,116,104,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95, -3,0,12,0,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0, -1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101, -67,111,111,114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111, -114,100,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112, -108,101,114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0, -12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0, -20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120, -95,49,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111, -106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0, -98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114, -100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112, -99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95, -98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111, -111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0, -16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115, -0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0, -18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114, -100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114, -0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99, -111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120, -121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1, -0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111, -111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0, -49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101, -120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114, -111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0, -9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111, -114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20, -0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95, -50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0, -115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0, -1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0, -18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97, -115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116, -101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0, -12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111, -114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121, -122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97, -115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116, -101,120,116,117,114,101,67,117,98,101,0,1,1,0,0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0, -99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100, -52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111, -111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,99,117,98,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0, -0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0, -0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99, -111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20, -0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95, -49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, -109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119, -49,68,80,114,111,106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100, -0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49, -20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111, -111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105, -97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,0,1,1,0, -0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97, -115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120, -121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20, -0,4,118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90, -95,0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1, -112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99, -111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4, -118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114, -101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,9,0,0,100,70,100,120,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100, -120,0,1,1,0,0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,120,0,1,1,0,0,11, -0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,112,0,59,120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,120,0,1,1,0,0,12,0,112,0,0,0,1,4, -118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0, -100,70,100,121,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100,121,0,1,1,0, -0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,121,0,1,1,0,0,11,0,112,0,0,0,1, -4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59, -120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,121,0,1,1,0,0,12,0,112,0,0,0,1,4,118,101,99, -52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0,102,119, -105,100,116,104,0,1,1,0,0,9,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0, -0,58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,10,0,0,102,119,105, -100,116,104,0,1,1,0,0,10,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0, -58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,11,0,0,102,119,105,100, -116,104,0,1,1,0,0,11,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97, -98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,12,0,0,102,119,105,100,116, -104,0,1,1,0,0,12,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97,98, -115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_pp_directives.syn b/src/mesa/shader/slang/library/slang_pp_directives.syn deleted file mode 100644 index b51d168cc03..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_directives.syn +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_pp_directives.syn - * slang preprocessor directives parser - * \author Michal Krol - */ - -.syntax source; - -/* - * This syntax script preprocesses a GLSL shader. - * It is assumed, that the #version directive has been parsed. Separate pass for parsing - * version gives better control on behavior depending on the version number given. - * - * The output is a source string with comments and directives removed. White spaces and comments - * are replaced with on or more spaces. All new-lines are preserved and converted to Linux format. - * Directives are escaped with a null character. The end of the source string is marked by - * two consecutive null characters. The consumer is responsible for executing the escaped - * directives, removing dead portions of code and expanding macros. - */ - -.emtcode ESCAPE_TOKEN 0 - -/* - * The TOKEN_* symbols follow the ESCAPE_TOKEN. - * - * NOTE: - * There is no TOKEN_IFDEF and neither is TOKEN_IFNDEF. They are handled with TOKEN_IF and - * operator defined. - * The "#ifdef SYMBOL" is replaced with "#if defined SYMBOL" - * The "#ifndef SYMBOL" is replaced with "#if !defined SYMBOL" - */ -.emtcode TOKEN_END 0 -.emtcode TOKEN_DEFINE 1 -.emtcode TOKEN_UNDEF 2 -.emtcode TOKEN_IF 3 -.emtcode TOKEN_ELSE 4 -.emtcode TOKEN_ELIF 5 -.emtcode TOKEN_ENDIF 6 -.emtcode TOKEN_ERROR 7 -.emtcode TOKEN_PRAGMA 8 -.emtcode TOKEN_EXTENSION 9 -.emtcode TOKEN_LINE 10 - -/* - * The PARAM_* symbols follow the TOKEN_DEFINE. - */ -.emtcode PARAM_END 0 -.emtcode PARAM_PARAMETER 1 - -/* - * The BEHAVIOR_* symbols follow the TOKEN_EXTENSION. - */ -.emtcode BEHAVIOR_REQUIRE 1 -.emtcode BEHAVIOR_ENABLE 2 -.emtcode BEHAVIOR_WARN 3 -.emtcode BEHAVIOR_DISABLE 4 - -/* - * The PRAGMA_* symbols follow TOKEN_PRAGMA - */ -.emtcode PRAGMA_NO_PARAM 0 -.emtcode PRAGMA_PARAM 1 - -source - optional_directive .and .loop source_element .and '\0' .emit ESCAPE_TOKEN .emit TOKEN_END; - -source_element - c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest .and .true .emit ' '; - -c_style_comment_rest - .loop c_style_comment_body .and c_style_comment_end; - -c_style_comment_body - c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar; - -c_style_comment_char_nostar - new_line .or '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_char_star_noslashstar - '*' .and c_style_comment_char_star_noslashstar_1; -c_style_comment_char_star_noslashstar_1 - c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar; - -c_style_comment_char_noslashstar - new_line .or '\x30'-'\xFF' .or '\x01'-'\x29' .or '\x2B'-'\x2E'; - -c_style_comment_end - '*' .and .loop c_style_comment_char_star .and '/'; - -c_style_comment_char_star - '*'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line_directive; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line_directive - new_line .and optional_directive; - -new_line - generic_new_line .emit '\n'; - -generic_new_line - carriage_return_line_feed .or line_feed_carriage_return .or '\n' .or '\r'; - -carriage_return_line_feed - '\r' .and '\n'; - -line_feed_carriage_return - '\n' .and '\r'; - -optional_directive - directive .emit ESCAPE_TOKEN .or .true; - -directive - dir_define .emit TOKEN_DEFINE .or - dir_undef .emit TOKEN_UNDEF .or - dir_if .emit TOKEN_IF .or - dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd' - .emit ' ' .or - dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' - .emit 'd' .emit ' ' .or - dir_else .emit TOKEN_ELSE .or - dir_elif .emit TOKEN_ELIF .or - dir_endif .emit TOKEN_ENDIF .or - dir_ext .emit TOKEN_EXTENSION .or - dir_pragma .emit TOKEN_PRAGMA .or - dir_line .emit TOKEN_LINE; - -dir_define - optional_space .and '#' .and optional_space .and "define" .and symbol .and opt_parameters .and - definition; - -dir_undef - optional_space .and '#' .and optional_space .and "undef" .and symbol; - -dir_if - optional_space .and '#' .and optional_space .and "if" .and expression; - -dir_ifdef - optional_space .and '#' .and optional_space .and "ifdef" .and symbol; - -dir_ifndef - optional_space .and '#' .and optional_space .and "ifndef" .and symbol; - -dir_else - optional_space .and '#' .and optional_space .and "else"; - -dir_elif - optional_space .and '#' .and optional_space .and "elif" .and expression; - -dir_endif - optional_space .and '#' .and optional_space .and "endif"; - -dir_ext - optional_space .and '#' .and optional_space .and "extension" .and space .and extension_name .and - optional_space .and ':' .and optional_space .and extension_behavior; - -dir_line - optional_space .and '#' .and optional_space .and "line" .and expression; - -dir_pragma - optional_space .and '#' .and optional_space .and "pragma" .and symbol .and opt_pragma_param; - - -opt_pragma_param - pragma_param .or .true .emit PRAGMA_NO_PARAM; - -pragma_param - optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')'; - -symbol_no_space - symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -symbol - space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -opt_parameters - parameters .or .true .emit PARAM_END; - -parameters - '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END; -parameters_1 - parameters_2 .or .true; -parameters_2 - parameter .emit PARAM_PARAMETER .and .loop parameters_3; -parameters_3 - optional_space .and ',' .and parameter .emit PARAM_PARAMETER; - -parameter - optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and - .true .emit '\0'; - -definition - .loop definition_character .emit * .and .true .emit '\0'; - -definition_character - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -expression - expression_element .and .loop expression_element .and .true .emit '\0'; - -expression_element - expression_character .emit *; - -expression_character - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -extension_name - symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -extension_behavior - "require" .emit BEHAVIOR_REQUIRE .or - "enable" .emit BEHAVIOR_ENABLE .or - "warn" .emit BEHAVIOR_WARN .or - "disable" .emit BEHAVIOR_DISABLE; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - ' ' .or '\t'; - -source_token - space .emit ' ' .or complex_token .or source_token_1; -source_token_1 - simple_token .emit ' ' .and .true .emit ' '; - -/* - * All possible tokens. - */ - -complex_token - identifier .or number; - -simple_token - increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or - addto .or subtractfrom .or multiplyto .or divideto .or other; - -identifier - identifier_char1 .emit * .and .loop identifier_char2 .emit *; -identifier_char1 - 'a'-'z' .or 'A'-'Z' .or '_'; -identifier_char2 - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - -number - float .or integer; - -digit_oct - '0'-'7'; - -digit_dec - '0'-'9'; - -digit_hex - '0'-'9' .or 'A'-'F' .or 'a'-'f'; - -float - float_1 .or float_2; -float_1 - float_fractional_constant .and float_optional_exponent_part; -float_2 - float_digit_sequence .and float_exponent_part; - -float_fractional_constant - float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3; -float_fractional_constant_1 - float_digit_sequence .and '.' .emit '.' .and float_digit_sequence; -float_fractional_constant_2 - float_digit_sequence .and '.' .emit '.'; -float_fractional_constant_3 - '.' .emit '.' .and float_digit_sequence; - -float_optional_exponent_part - float_exponent_part .or .true; - -float_digit_sequence - digit_dec .emit * .and .loop digit_dec .emit *; - -float_exponent_part - float_exponent_part_1 .or float_exponent_part_2; -float_exponent_part_1 - 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence; -float_exponent_part_2 - 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence; - -float_optional_sign - '+' .emit '+' .or '-' .emit '-' .or .true; - -integer - integer_hex .or integer_oct .or integer_dec; - -integer_hex - '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and - .loop digit_hex .emit *; -integer_hex_1 - 'x' .or 'X'; - -integer_oct - '0' .emit '0' .and .loop digit_oct .emit *; - -integer_dec - digit_dec .emit * .and .loop digit_dec .emit *; - -increment - '+' .emit * .and '+' .emit *; - -decrement - '-' .emit * .and '-' .emit *; - -lequal - '<' .emit * .and '=' .emit *; - -gequal - '>' .emit * .and '=' .emit *; - -equal - '=' .emit * .and '=' .emit *; - -nequal - '!' .emit * .and '=' .emit *; - -and - '&' .emit * .and '&' .emit *; - -xor - '^' .emit * .and '^' .emit *; - -or - '|' .emit * .and '|' .emit *; - -addto - '+' .emit * .and '=' .emit *; - -subtractfrom - '-' .emit * .and '=' .emit *; - -multiplyto - '*' .emit * .and '=' .emit *; - -divideto - '/' .emit * .and '=' .emit *; - -/* - * All characters except '\0' and '#'. - */ -other - '\x24'-'\xFF' .emit * .or '\x01'-'\x22' .emit *; - -symbol_character - 'A'-'Z' .or 'a'-'z' .or '_'; - -symbol_character2 - 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_'; - -.string string_lexer; - -string_lexer - lex_first_identifier_character .and .loop lex_next_identifier_character; - -lex_first_identifier_character - 'a'-'z' .or 'A'-'Z' .or '_'; - -lex_next_identifier_character - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - diff --git a/src/mesa/shader/slang/library/slang_pp_directives_syn.h b/src/mesa/shader/slang/library/slang_pp_directives_syn.h deleted file mode 100644 index 430f8d8217c..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_directives_syn.h +++ /dev/null @@ -1,250 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax source;\n" -".emtcode ESCAPE_TOKEN 0\n" -".emtcode TOKEN_END 0\n" -".emtcode TOKEN_DEFINE 1\n" -".emtcode TOKEN_UNDEF 2\n" -".emtcode TOKEN_IF 3\n" -".emtcode TOKEN_ELSE 4\n" -".emtcode TOKEN_ELIF 5\n" -".emtcode TOKEN_ENDIF 6\n" -".emtcode TOKEN_ERROR 7\n" -".emtcode TOKEN_PRAGMA 8\n" -".emtcode TOKEN_EXTENSION 9\n" -".emtcode TOKEN_LINE 10\n" -".emtcode PARAM_END 0\n" -".emtcode PARAM_PARAMETER 1\n" -".emtcode BEHAVIOR_REQUIRE 1\n" -".emtcode BEHAVIOR_ENABLE 2\n" -".emtcode BEHAVIOR_WARN 3\n" -".emtcode BEHAVIOR_DISABLE 4\n" -".emtcode PRAGMA_NO_PARAM 0\n" -".emtcode PRAGMA_PARAM 1\n" -"source\n" -" optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END;\n" -"source_element\n" -" c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token;\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest .and .true .emit ' ';\n" -"c_style_comment_rest\n" -" .loop c_style_comment_body .and c_style_comment_end;\n" -"c_style_comment_body\n" -" c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar;\n" -"c_style_comment_char_nostar\n" -" new_line .or '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_char_star_noslashstar\n" -" '*' .and c_style_comment_char_star_noslashstar_1;\n" -"c_style_comment_char_star_noslashstar_1\n" -" c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar;\n" -"c_style_comment_char_noslashstar\n" -" new_line .or '\\x30'-'\\xFF' .or '\\x01'-'\\x29' .or '\\x2B'-'\\x2E';\n" -"c_style_comment_end\n" -" '*' .and .loop c_style_comment_char_star .and '/';\n" -"c_style_comment_char_star\n" -" '*';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line_directive;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"new_line_directive\n" -" new_line .and optional_directive;\n" -"new_line\n" -" generic_new_line .emit '\\n';\n" -"generic_new_line\n" -" carriage_return_line_feed .or line_feed_carriage_return .or '\\n' .or '\\r';\n" -"carriage_return_line_feed\n" -" '\\r' .and '\\n';\n" -"line_feed_carriage_return\n" -" '\\n' .and '\\r';\n" -"optional_directive\n" -" directive .emit ESCAPE_TOKEN .or .true;\n" -"directive\n" -" dir_define .emit TOKEN_DEFINE .or\n" -" dir_undef .emit TOKEN_UNDEF .or\n" -" dir_if .emit TOKEN_IF .or\n" -" dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd'\n" -" .emit ' ' .or\n" -" dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e'\n" -" .emit 'd' .emit ' ' .or\n" -" dir_else .emit TOKEN_ELSE .or\n" -" dir_elif .emit TOKEN_ELIF .or\n" -" dir_endif .emit TOKEN_ENDIF .or\n" -" dir_ext .emit TOKEN_EXTENSION .or\n" -" dir_pragma .emit TOKEN_PRAGMA .or\n" -" dir_line .emit TOKEN_LINE;\n" -"dir_define\n" -" optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and\n" -" definition;\n" -"dir_undef\n" -" optional_space .and '#' .and optional_space .and \"undef\" .and symbol;\n" -"dir_if\n" -" optional_space .and '#' .and optional_space .and \"if\" .and expression;\n" -"dir_ifdef\n" -" optional_space .and '#' .and optional_space .and \"ifdef\" .and symbol;\n" -"dir_ifndef\n" -" optional_space .and '#' .and optional_space .and \"ifndef\" .and symbol;\n" -"dir_else\n" -" optional_space .and '#' .and optional_space .and \"else\";\n" -"dir_elif\n" -" optional_space .and '#' .and optional_space .and \"elif\" .and expression;\n" -"dir_endif\n" -" optional_space .and '#' .and optional_space .and \"endif\";\n" -"dir_ext\n" -" optional_space .and '#' .and optional_space .and \"extension\" .and space .and extension_name .and\n" -" optional_space .and ':' .and optional_space .and extension_behavior;\n" -"dir_line\n" -" optional_space .and '#' .and optional_space .and \"line\" .and expression;\n" -"dir_pragma\n" -" optional_space .and '#' .and optional_space .and \"pragma\" .and symbol .and opt_pragma_param;\n" -"opt_pragma_param\n" -" pragma_param .or .true .emit PRAGMA_NO_PARAM;\n" -"pragma_param\n" -" optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';\n" -"symbol_no_space\n" -" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"symbol\n" -" space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"opt_parameters\n" -" parameters .or .true .emit PARAM_END;\n" -"parameters\n" -" '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END;\n" -"parameters_1\n" -" parameters_2 .or .true;\n" -"parameters_2\n" -" parameter .emit PARAM_PARAMETER .and .loop parameters_3;\n" -"parameters_3\n" -" optional_space .and ',' .and parameter .emit PARAM_PARAMETER;\n" -"parameter\n" -" optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and\n" -" .true .emit '\\0';\n" -"definition\n" -" .loop definition_character .emit * .and .true .emit '\\0';\n" -"definition_character\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"expression\n" -" expression_element .and .loop expression_element .and .true .emit '\\0';\n" -"expression_element\n" -" expression_character .emit *;\n" -"expression_character\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"extension_name\n" -" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"extension_behavior\n" -" \"require\" .emit BEHAVIOR_REQUIRE .or\n" -" \"enable\" .emit BEHAVIOR_ENABLE .or\n" -" \"warn\" .emit BEHAVIOR_WARN .or\n" -" \"disable\" .emit BEHAVIOR_DISABLE;\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"source_token\n" -" space .emit ' ' .or complex_token .or source_token_1;\n" -"source_token_1\n" -" simple_token .emit ' ' .and .true .emit ' ';\n" -"complex_token\n" -" identifier .or number;\n" -"simple_token\n" -" increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or\n" -" addto .or subtractfrom .or multiplyto .or divideto .or other;\n" -"identifier\n" -" identifier_char1 .emit * .and .loop identifier_char2 .emit *;\n" -"identifier_char1\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"identifier_char2\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"number\n" -" float .or integer;\n" -"digit_oct\n" -" '0'-'7';\n" -"digit_dec\n" -" '0'-'9';\n" -"digit_hex\n" -" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n" -"float\n" -" float_1 .or float_2;\n" -"float_1\n" -" float_fractional_constant .and float_optional_exponent_part;\n" -"float_2\n" -" float_digit_sequence .and float_exponent_part;\n" -"float_fractional_constant\n" -" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n" -"float_fractional_constant_1\n" -" float_digit_sequence .and '.' .emit '.' .and float_digit_sequence;\n" -"float_fractional_constant_2\n" -" float_digit_sequence .and '.' .emit '.';\n" -"float_fractional_constant_3\n" -" '.' .emit '.' .and float_digit_sequence;\n" -"float_optional_exponent_part\n" -" float_exponent_part .or .true;\n" -"float_digit_sequence\n" -" digit_dec .emit * .and .loop digit_dec .emit *;\n" -"float_exponent_part\n" -" float_exponent_part_1 .or float_exponent_part_2;\n" -"float_exponent_part_1\n" -" 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence;\n" -"float_exponent_part_2\n" -" 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence;\n" -"float_optional_sign\n" -" '+' .emit '+' .or '-' .emit '-' .or .true;\n" -"integer\n" -" integer_hex .or integer_oct .or integer_dec;\n" -"integer_hex\n" -" '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and\n" -" .loop digit_hex .emit *;\n" -"integer_hex_1\n" -" 'x' .or 'X';\n" -"integer_oct\n" -" '0' .emit '0' .and .loop digit_oct .emit *;\n" -"integer_dec\n" -" digit_dec .emit * .and .loop digit_dec .emit *;\n" -"increment\n" -" '+' .emit * .and '+' .emit *;\n" -"decrement\n" -" '-' .emit * .and '-' .emit *;\n" -"lequal\n" -" '<' .emit * .and '=' .emit *;\n" -"gequal\n" -" '>' .emit * .and '=' .emit *;\n" -"equal\n" -" '=' .emit * .and '=' .emit *;\n" -"nequal\n" -" '!' .emit * .and '=' .emit *;\n" -"and\n" -" '&' .emit * .and '&' .emit *;\n" -"xor\n" -" '^' .emit * .and '^' .emit *;\n" -"or\n" -" '|' .emit * .and '|' .emit *;\n" -"addto\n" -" '+' .emit * .and '=' .emit *;\n" -"subtractfrom\n" -" '-' .emit * .and '=' .emit *;\n" -"multiplyto\n" -" '*' .emit * .and '=' .emit *;\n" -"divideto\n" -" '/' .emit * .and '=' .emit *;\n" -"other\n" -" '\\x24'-'\\xFF' .emit * .or '\\x01'-'\\x22' .emit *;\n" -"symbol_character\n" -" 'A'-'Z' .or 'a'-'z' .or '_';\n" -"symbol_character2\n" -" 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_';\n" -".string string_lexer;\n" -"string_lexer\n" -" lex_first_identifier_character .and .loop lex_next_identifier_character;\n" -"lex_first_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"lex_next_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"" diff --git a/src/mesa/shader/slang/library/slang_pp_expression.syn b/src/mesa/shader/slang/library/slang_pp_expression.syn deleted file mode 100644 index bfdb220bf5c..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_expression.syn +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_pp_expression.syn - * slang preprocessor expression parser - * \author Michal Krol - */ - -/* - * Parses one or two (optional) expressions on literal integer constants. Those expressions come - * from #if #elif and #line directives. The preprocessor already parsed those directives and - * expanded the expression (expressions). All occurences of the operator "defined" are already - * replaced with either "0" or "1" literals. - */ - -.syntax expression; - -/* - * Those separate individual expressions. - * For #if/#elif case it is: EXP_EXPRESSION ... EXP_END - * For #line case it may be: EXP_EXPRESSION ... EXP_EXPRESSION ... EXP_END - */ -.emtcode EXP_END 0 -.emtcode EXP_EXPRESSION 1 - -.emtcode OP_END 0 -.emtcode OP_PUSHINT 1 -.emtcode OP_LOGICALOR 2 -.emtcode OP_LOGICALAND 3 -.emtcode OP_OR 4 -.emtcode OP_XOR 5 -.emtcode OP_AND 6 -.emtcode OP_EQUAL 7 -.emtcode OP_NOTEQUAL 8 -.emtcode OP_LESSEQUAL 9 -.emtcode OP_GREATEREQUAL 10 -.emtcode OP_LESS 11 -.emtcode OP_GREATER 12 -.emtcode OP_LEFTSHIFT 13 -.emtcode OP_RIGHTSHIFT 14 -.emtcode OP_ADD 15 -.emtcode OP_SUBTRACT 16 -.emtcode OP_MULTIPLY 17 -.emtcode OP_DIVIDE 18 -.emtcode OP_MODULUS 19 -.emtcode OP_PLUS 20 -.emtcode OP_MINUS 21 -.emtcode OP_NEGATE 22 -.emtcode OP_COMPLEMENT 23 - -expression - first_expression .and optional_second_expression .and optional_space .and '\0' .emit EXP_END; - -first_expression - optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END; - -optional_second_expression - second_expression .or .true; - -second_expression - space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END; - -logical_or_expression - logical_and_expression .and .loop logical_or_expression_1; -logical_or_expression_1 - barbar .and logical_and_expression .and .true .emit OP_LOGICALOR; - -logical_and_expression - or_expression .and .loop logical_and_expression_1; -logical_and_expression_1 - ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND; - -or_expression - xor_expression .and .loop or_expression_1; -or_expression_1 - bar .and xor_expression .and .true .emit OP_OR; - -xor_expression - and_expression .and .loop xor_expression_1; -xor_expression_1 - caret .and and_expression .and .true .emit OP_XOR; - -and_expression - equality_expression .and .loop and_expression_1; -and_expression_1 - ampersand .and equality_expression .and .true .emit OP_AND; - -equality_expression - relational_expression .and .loop equality_expression_1; -equality_expression_1 - equality_expression_2 .or equality_expression_3; -equality_expression_2 - equalsequals .and relational_expression .and .true .emit OP_EQUAL; -equality_expression_3 - bangequals .and relational_expression .and .true .emit OP_NOTEQUAL; - -relational_expression - shift_expression .and .loop relational_expression_1; -relational_expression_1 - relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or - relational_expression_5; -relational_expression_2 - lessequals .and shift_expression .and .true .emit OP_LESSEQUAL; -relational_expression_3 - greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL; -relational_expression_4 - less .and shift_expression .and .true .emit OP_LESS; -relational_expression_5 - greater .and shift_expression .and .true .emit OP_GREATER; - -shift_expression - additive_expression .and .loop shift_expression_1; -shift_expression_1 - shift_expression_2 .or shift_expression_3; -shift_expression_2 - lessless .and additive_expression .and .true .emit OP_LEFTSHIFT; -shift_expression_3 - greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT; - -additive_expression - multiplicative_expression .and .loop additive_expression_1; -additive_expression_1 - additive_expression_2 .or additive_expression_3; -additive_expression_2 - plus .and multiplicative_expression .and .true .emit OP_ADD; -additive_expression_3 - dash .and multiplicative_expression .and .true .emit OP_SUBTRACT; - -multiplicative_expression - unary_expression .and .loop multiplicative_expression_1; -multiplicative_expression_1 - multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4; -multiplicative_expression_2 - star .and unary_expression .and .true .emit OP_MULTIPLY; -multiplicative_expression_3 - slash .and unary_expression .and .true .emit OP_DIVIDE; -multiplicative_expression_4 - percent .and unary_expression .and .true .emit OP_MODULUS; - -unary_expression - primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or - unary_expression_4; -unary_expression_1 - plus .and unary_expression .and .true .emit OP_PLUS; -unary_expression_2 - dash .and unary_expression .and .true .emit OP_MINUS; -unary_expression_3 - bang .and unary_expression .and .true .emit OP_NEGATE; -unary_expression_4 - tilda .and unary_expression .and .true .emit OP_COMPLEMENT; - -primary_expression - intconstant .or primary_expression_1; -primary_expression_1 - lparen .and logical_or_expression .and rparen; - -intconstant - integer .emit OP_PUSHINT; - -integer - integer_dec; - -integer_dec - digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -digit_dec - '0'-'9'; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - ' ' .or '\t'; - -ampersand - optional_space .and '&' .and optional_space; - -ampersandampersand - optional_space .and '&' .and '&' .and optional_space; - -bang - optional_space .and '!' .and optional_space; - -bangequals - optional_space .and '!' .and '=' .and optional_space; - -bar - optional_space .and '|' .and optional_space; - -barbar - optional_space .and '|' .and '|' .and optional_space; - -caret - optional_space .and '^' .and optional_space; - -dash - optional_space .and '-' .and optional_space; - -equalsequals - optional_space .and '=' .and '=' .and optional_space; - -greater - optional_space .and '>' .and optional_space; - -greaterequals - optional_space .and '>' .and '=' .and optional_space; - -greatergreater - optional_space .and '>' .and '>' .and optional_space; - -less - optional_space .and '<' .and optional_space; - -lessequals - optional_space .and '<' .and '=' .and optional_space; - -lessless - optional_space .and '<' .and '<' .and optional_space; - -lparen - optional_space .and '(' .and optional_space; - -percent - optional_space .and '%' .and optional_space; - -plus - optional_space .and '+' .and optional_space; - -rparen - optional_space .and ')' .and optional_space; - -slash - optional_space .and '/' .and optional_space; - -star - optional_space .and '*' .and optional_space; - -tilda - optional_space .and '~' .and optional_space; - diff --git a/src/mesa/shader/slang/library/slang_pp_expression_syn.h b/src/mesa/shader/slang/library/slang_pp_expression_syn.h deleted file mode 100644 index f3e9ef6b229..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_expression_syn.h +++ /dev/null @@ -1,179 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax expression;\n" -".emtcode EXP_END 0\n" -".emtcode EXP_EXPRESSION 1\n" -".emtcode OP_END 0\n" -".emtcode OP_PUSHINT 1\n" -".emtcode OP_LOGICALOR 2\n" -".emtcode OP_LOGICALAND 3\n" -".emtcode OP_OR 4\n" -".emtcode OP_XOR 5\n" -".emtcode OP_AND 6\n" -".emtcode OP_EQUAL 7\n" -".emtcode OP_NOTEQUAL 8\n" -".emtcode OP_LESSEQUAL 9\n" -".emtcode OP_GREATEREQUAL 10\n" -".emtcode OP_LESS 11\n" -".emtcode OP_GREATER 12\n" -".emtcode OP_LEFTSHIFT 13\n" -".emtcode OP_RIGHTSHIFT 14\n" -".emtcode OP_ADD 15\n" -".emtcode OP_SUBTRACT 16\n" -".emtcode OP_MULTIPLY 17\n" -".emtcode OP_DIVIDE 18\n" -".emtcode OP_MODULUS 19\n" -".emtcode OP_PLUS 20\n" -".emtcode OP_MINUS 21\n" -".emtcode OP_NEGATE 22\n" -".emtcode OP_COMPLEMENT 23\n" -"expression\n" -" first_expression .and optional_second_expression .and optional_space .and '\\0' .emit EXP_END;\n" -"first_expression\n" -" optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n" -"optional_second_expression\n" -" second_expression .or .true;\n" -"second_expression\n" -" space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n" -"logical_or_expression\n" -" logical_and_expression .and .loop logical_or_expression_1;\n" -"logical_or_expression_1\n" -" barbar .and logical_and_expression .and .true .emit OP_LOGICALOR;\n" -"logical_and_expression\n" -" or_expression .and .loop logical_and_expression_1;\n" -"logical_and_expression_1\n" -" ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND;\n" -"or_expression\n" -" xor_expression .and .loop or_expression_1;\n" -"or_expression_1\n" -" bar .and xor_expression .and .true .emit OP_OR;\n" -"xor_expression\n" -" and_expression .and .loop xor_expression_1;\n" -"xor_expression_1\n" -" caret .and and_expression .and .true .emit OP_XOR;\n" -"and_expression\n" -" equality_expression .and .loop and_expression_1;\n" -"and_expression_1\n" -" ampersand .and equality_expression .and .true .emit OP_AND;\n" -"equality_expression\n" -" relational_expression .and .loop equality_expression_1;\n" -"equality_expression_1\n" -" equality_expression_2 .or equality_expression_3;\n" -"equality_expression_2\n" -" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n" -"equality_expression_3\n" -" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n" -"relational_expression\n" -" shift_expression .and .loop relational_expression_1;\n" -"relational_expression_1\n" -" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n" -" relational_expression_5;\n" -"relational_expression_2\n" -" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n" -"relational_expression_3\n" -" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n" -"relational_expression_4\n" -" less .and shift_expression .and .true .emit OP_LESS;\n" -"relational_expression_5\n" -" greater .and shift_expression .and .true .emit OP_GREATER;\n" -"shift_expression\n" -" additive_expression .and .loop shift_expression_1;\n" -"shift_expression_1\n" -" shift_expression_2 .or shift_expression_3;\n" -"shift_expression_2\n" -" lessless .and additive_expression .and .true .emit OP_LEFTSHIFT;\n" -"shift_expression_3\n" -" greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT;\n" -"additive_expression\n" -" multiplicative_expression .and .loop additive_expression_1;\n" -"additive_expression_1\n" -" additive_expression_2 .or additive_expression_3;\n" -"additive_expression_2\n" -" plus .and multiplicative_expression .and .true .emit OP_ADD;\n" -"additive_expression_3\n" -" dash .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n" -"multiplicative_expression\n" -" unary_expression .and .loop multiplicative_expression_1;\n" -"multiplicative_expression_1\n" -" multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4;\n" -"multiplicative_expression_2\n" -" star .and unary_expression .and .true .emit OP_MULTIPLY;\n" -"multiplicative_expression_3\n" -" slash .and unary_expression .and .true .emit OP_DIVIDE;\n" -"multiplicative_expression_4\n" -" percent .and unary_expression .and .true .emit OP_MODULUS;\n" -"unary_expression\n" -" primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n" -" unary_expression_4;\n" -"unary_expression_1\n" -" plus .and unary_expression .and .true .emit OP_PLUS;\n" -"unary_expression_2\n" -" dash .and unary_expression .and .true .emit OP_MINUS;\n" -"unary_expression_3\n" -" bang .and unary_expression .and .true .emit OP_NEGATE;\n" -"unary_expression_4\n" -" tilda .and unary_expression .and .true .emit OP_COMPLEMENT;\n" -"primary_expression\n" -" intconstant .or primary_expression_1;\n" -"primary_expression_1\n" -" lparen .and logical_or_expression .and rparen;\n" -"intconstant\n" -" integer .emit OP_PUSHINT;\n" -"integer\n" -" integer_dec;\n" -"integer_dec\n" -" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"digit_dec\n" -" '0'-'9';\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"ampersand\n" -" optional_space .and '&' .and optional_space;\n" -"ampersandampersand\n" -" optional_space .and '&' .and '&' .and optional_space;\n" -"bang\n" -" optional_space .and '!' .and optional_space;\n" -"bangequals\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"bar\n" -" optional_space .and '|' .and optional_space;\n" -"barbar\n" -" optional_space .and '|' .and '|' .and optional_space;\n" -"caret\n" -" optional_space .and '^' .and optional_space;\n" -"dash\n" -" optional_space .and '-' .and optional_space;\n" -"equalsequals\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"greater\n" -" optional_space .and '>' .and optional_space;\n" -"greaterequals\n" -" optional_space .and '>' .and '=' .and optional_space;\n" -"greatergreater\n" -" optional_space .and '>' .and '>' .and optional_space;\n" -"less\n" -" optional_space .and '<' .and optional_space;\n" -"lessequals\n" -" optional_space .and '<' .and '=' .and optional_space;\n" -"lessless\n" -" optional_space .and '<' .and '<' .and optional_space;\n" -"lparen\n" -" optional_space .and '(' .and optional_space;\n" -"percent\n" -" optional_space .and '%' .and optional_space;\n" -"plus\n" -" optional_space .and '+' .and optional_space;\n" -"rparen\n" -" optional_space .and ')' .and optional_space;\n" -"slash\n" -" optional_space .and '/' .and optional_space;\n" -"star\n" -" optional_space .and '*' .and optional_space;\n" -"tilda\n" -" optional_space .and '~' .and optional_space;\n" -"" diff --git a/src/mesa/shader/slang/library/slang_pp_version.syn b/src/mesa/shader/slang/library/slang_pp_version.syn deleted file mode 100644 index 3fe1a57ba2c..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_version.syn +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_pp_version.syn - * slang #version directive syntax - * \author Michal Krol - */ - -.syntax version_directive; - -version_directive - version_directive_1; -version_directive_1 - prior_optional_spaces .and optional_version_directive .and .true .emit $; - -optional_version_directive - version_directive_body .or .true .emit 10 .emit 1; - -version_directive_body - '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and - new_line; - -version_number - version_number_100 .or version_number_110 .or version_number_120; - -version_number_100 - leading_zeroes .and "100" .emit 0 .emit 1; - -version_number_110 - leading_zeroes .and "110" .emit 10 .emit 1; - -version_number_120 - leading_zeroes .and "120" .emit 20 .emit 1; - -leading_zeroes - .loop zero; - -zero - '0'; - -space - single_space .and .loop single_space; - -optional_space - .loop single_space; - -single_space - ' ' .or '\t'; - -prior_optional_spaces - .loop prior_space; - -prior_space - c_style_comment_block .or cpp_style_comment_block .or space .or new_line; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -.string __string_filter; - -__string_filter - .loop __identifier_char; - -__identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9'; - diff --git a/src/mesa/shader/slang/library/slang_pp_version_syn.h b/src/mesa/shader/slang/library/slang_pp_version_syn.h deleted file mode 100644 index 54aee3ff282..00000000000 --- a/src/mesa/shader/slang/library/slang_pp_version_syn.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax version_directive;\n" -"version_directive\n" -" version_directive_1;\n" -"version_directive_1\n" -" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n" -"optional_version_directive\n" -" version_directive_body .or .true .emit 10 .emit 1;\n" -"version_directive_body\n" -" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n" -" new_line;\n" -"version_number\n" -" version_number_100 .or version_number_110 .or version_number_120;\n" -"version_number_100\n" -" leading_zeroes .and \"100\" .emit 0 .emit 1;\n" -"version_number_110\n" -" leading_zeroes .and \"110\" .emit 10 .emit 1;\n" -"version_number_120\n" -" leading_zeroes .and \"120\" .emit 20 .emit 1;\n" -"leading_zeroes\n" -" .loop zero;\n" -"zero\n" -" '0';\n" -"space\n" -" single_space .and .loop single_space;\n" -"optional_space\n" -" .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"prior_optional_spaces\n" -" .loop prior_space;\n" -"prior_space\n" -" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest;\n" -"c_style_comment_rest\n" -" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n" -"c_style_comment_rest_1\n" -" c_style_comment_end .or c_style_comment_rest_2;\n" -"c_style_comment_rest_2\n" -" '*' .and c_style_comment_rest;\n" -"c_style_comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_end\n" -" '*' .and '/';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"new_line\n" -" cr_lf .or lf_cr .or '\\n' .or '\\r';\n" -"cr_lf\n" -" '\\r' .and '\\n';\n" -"lf_cr\n" -" '\\n' .and '\\r';\n" -".string __string_filter;\n" -"__string_filter\n" -" .loop __identifier_char;\n" -"__identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n" -"" diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn deleted file mode 100644 index cc5c70a02f8..00000000000 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ /dev/null @@ -1,1716 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. - * Copyright (C) 2008 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * \file slang_shader.syn - * slang vertex/fragment shader syntax - * \author Michal Krol - */ - -/* - * usage: - * syn2c slang_shader.syn > slang_shader_syn.h - * - * when modifying or extending this file, several things must be taken into - * consideration: - * - * - when adding new operators that were marked as reserved in the - * initial specification, one must only uncomment particular lines of - * code that refer to operators being added; - * - * - when adding new shader targets, one must reserve a new value for - * shader_type register and use it in .if constructs for symbols that - * are exclusive for that shader; - * - * - some symbols mimic output of other symbols - the best example is - * the "for" construct: expression "for (foo(); ; bar())" is seen as - * "for (foo(); true; bar())" by the output processor - hence, special - * care must be taken when rearranging output of essential symbols; - * - * - order of single-quoted tokens does matter in alternatives - so do not - * parse "<" operator before "<<" and "<<" before "<<="; - * - * - all double-quoted tokens are internally preprocessed to eliminate - * problems with parsing strings that are prefixes of other strings, - * like "sampler1D" and "sampler1DShadow"; - */ - -.syntax translation_unit; - -/* revision number - increment after each change affecting emitted output */ -.emtcode REVISION 5 - -/* external declaration (or precision or invariant stmt) */ -.emtcode EXTERNAL_NULL 0 -.emtcode EXTERNAL_FUNCTION_DEFINITION 1 -.emtcode EXTERNAL_DECLARATION 2 -.emtcode DEFAULT_PRECISION 3 -.emtcode INVARIANT_STMT 4 - -/* precision */ -.emtcode PRECISION_DEFAULT 0 -.emtcode PRECISION_LOW 1 -.emtcode PRECISION_MEDIUM 2 -.emtcode PRECISION_HIGH 3 - -/* declaration */ -.emtcode DECLARATION_FUNCTION_PROTOTYPE 1 -.emtcode DECLARATION_INIT_DECLARATOR_LIST 2 - -/* function type */ -.emtcode FUNCTION_ORDINARY 0 -.emtcode FUNCTION_CONSTRUCTOR 1 -.emtcode FUNCTION_OPERATOR 2 - -/* function call type */ -.emtcode FUNCTION_CALL_NONARRAY 0 -.emtcode FUNCTION_CALL_ARRAY 1 - -/* operator type */ -.emtcode OPERATOR_ADDASSIGN 1 -.emtcode OPERATOR_SUBASSIGN 2 -.emtcode OPERATOR_MULASSIGN 3 -.emtcode OPERATOR_DIVASSIGN 4 -/*.emtcode OPERATOR_MODASSIGN 5*/ -/*.emtcode OPERATOR_LSHASSIGN 6*/ -/*.emtcode OPERATOR_RSHASSIGN 7*/ -/*.emtcode OPERATOR_ORASSIGN 8*/ -/*.emtcode OPERATOR_XORASSIGN 9*/ -/*.emtcode OPERATOR_ANDASSIGN 10*/ -.emtcode OPERATOR_LOGICALXOR 11 -/*.emtcode OPERATOR_BITOR 12*/ -/*.emtcode OPERATOR_BITXOR 13*/ -/*.emtcode OPERATOR_BITAND 14*/ -.emtcode OPERATOR_LESS 15 -.emtcode OPERATOR_GREATER 16 -.emtcode OPERATOR_LESSEQUAL 17 -.emtcode OPERATOR_GREATEREQUAL 18 -/*.emtcode OPERATOR_LSHIFT 19*/ -/*.emtcode OPERATOR_RSHIFT 20*/ -.emtcode OPERATOR_MULTIPLY 21 -.emtcode OPERATOR_DIVIDE 22 -/*.emtcode OPERATOR_MODULUS 23*/ -.emtcode OPERATOR_INCREMENT 24 -.emtcode OPERATOR_DECREMENT 25 -.emtcode OPERATOR_PLUS 26 -.emtcode OPERATOR_MINUS 27 -/*.emtcode OPERATOR_COMPLEMENT 28*/ -.emtcode OPERATOR_NOT 29 - -/* init declarator list */ -.emtcode DECLARATOR_NONE 0 -.emtcode DECLARATOR_NEXT 1 - -/* variable declaration */ -.emtcode VARIABLE_NONE 0 -.emtcode VARIABLE_IDENTIFIER 1 -.emtcode VARIABLE_INITIALIZER 2 -.emtcode VARIABLE_ARRAY_EXPLICIT 3 -.emtcode VARIABLE_ARRAY_UNKNOWN 4 - -/* type qualifier */ -.emtcode TYPE_QUALIFIER_NONE 0 -.emtcode TYPE_QUALIFIER_CONST 1 -.emtcode TYPE_QUALIFIER_ATTRIBUTE 2 -.emtcode TYPE_QUALIFIER_VARYING 3 -.emtcode TYPE_QUALIFIER_UNIFORM 4 -.emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5 -.emtcode TYPE_QUALIFIER_FIXEDINPUT 6 - -/* invariant qualifier */ -.emtcode TYPE_VARIANT 90 -.emtcode TYPE_INVARIANT 91 - -/* centroid qualifier */ -.emtcode TYPE_CENTER 95 -.emtcode TYPE_CENTROID 96 - -/* type specifier */ -.emtcode TYPE_SPECIFIER_VOID 0 -.emtcode TYPE_SPECIFIER_BOOL 1 -.emtcode TYPE_SPECIFIER_BVEC2 2 -.emtcode TYPE_SPECIFIER_BVEC3 3 -.emtcode TYPE_SPECIFIER_BVEC4 4 -.emtcode TYPE_SPECIFIER_INT 5 -.emtcode TYPE_SPECIFIER_IVEC2 6 -.emtcode TYPE_SPECIFIER_IVEC3 7 -.emtcode TYPE_SPECIFIER_IVEC4 8 -.emtcode TYPE_SPECIFIER_FLOAT 9 -.emtcode TYPE_SPECIFIER_VEC2 10 -.emtcode TYPE_SPECIFIER_VEC3 11 -.emtcode TYPE_SPECIFIER_VEC4 12 -.emtcode TYPE_SPECIFIER_MAT2 13 -.emtcode TYPE_SPECIFIER_MAT3 14 -.emtcode TYPE_SPECIFIER_MAT4 15 -.emtcode TYPE_SPECIFIER_SAMPLER1D 16 -.emtcode TYPE_SPECIFIER_SAMPLER2D 17 -.emtcode TYPE_SPECIFIER_SAMPLER3D 18 -.emtcode TYPE_SPECIFIER_SAMPLERCUBE 19 -.emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20 -.emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21 -.emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22 -.emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 -.emtcode TYPE_SPECIFIER_STRUCT 24 -.emtcode TYPE_SPECIFIER_TYPENAME 25 - -/* OpenGL 2.1 */ -.emtcode TYPE_SPECIFIER_MAT23 26 -.emtcode TYPE_SPECIFIER_MAT32 27 -.emtcode TYPE_SPECIFIER_MAT24 28 -.emtcode TYPE_SPECIFIER_MAT42 29 -.emtcode TYPE_SPECIFIER_MAT34 30 -.emtcode TYPE_SPECIFIER_MAT43 31 - -/* type specifier array */ -.emtcode TYPE_SPECIFIER_NONARRAY 0 -.emtcode TYPE_SPECIFIER_ARRAY 1 - -/* structure field */ -.emtcode FIELD_NONE 0 -.emtcode FIELD_NEXT 1 -.emtcode FIELD_ARRAY 2 - -/* operation */ -.emtcode OP_END 0 -.emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 -.emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2 -.emtcode OP_DECLARE 3 -.emtcode OP_ASM 4 -.emtcode OP_BREAK 5 -.emtcode OP_CONTINUE 6 -.emtcode OP_DISCARD 7 -.emtcode OP_RETURN 8 -.emtcode OP_EXPRESSION 9 -.emtcode OP_IF 10 -.emtcode OP_WHILE 11 -.emtcode OP_DO 12 -.emtcode OP_FOR 13 -.emtcode OP_PUSH_VOID 14 -.emtcode OP_PUSH_BOOL 15 -.emtcode OP_PUSH_INT 16 -.emtcode OP_PUSH_FLOAT 17 -.emtcode OP_PUSH_IDENTIFIER 18 -.emtcode OP_SEQUENCE 19 -.emtcode OP_ASSIGN 20 -.emtcode OP_ADDASSIGN 21 -.emtcode OP_SUBASSIGN 22 -.emtcode OP_MULASSIGN 23 -.emtcode OP_DIVASSIGN 24 -/*.emtcode OP_MODASSIGN 25*/ -/*.emtcode OP_LSHASSIGN 26*/ -/*.emtcode OP_RSHASSIGN 27*/ -/*.emtcode OP_ORASSIGN 28*/ -/*.emtcode OP_XORASSIGN 29*/ -/*.emtcode OP_ANDASSIGN 30*/ -.emtcode OP_SELECT 31 -.emtcode OP_LOGICALOR 32 -.emtcode OP_LOGICALXOR 33 -.emtcode OP_LOGICALAND 34 -/*.emtcode OP_BITOR 35*/ -/*.emtcode OP_BITXOR 36*/ -/*.emtcode OP_BITAND 37*/ -.emtcode OP_EQUAL 38 -.emtcode OP_NOTEQUAL 39 -.emtcode OP_LESS 40 -.emtcode OP_GREATER 41 -.emtcode OP_LESSEQUAL 42 -.emtcode OP_GREATEREQUAL 43 -/*.emtcode OP_LSHIFT 44*/ -/*.emtcode OP_RSHIFT 45*/ -.emtcode OP_ADD 46 -.emtcode OP_SUBTRACT 47 -.emtcode OP_MULTIPLY 48 -.emtcode OP_DIVIDE 49 -/*.emtcode OP_MODULUS 50*/ -.emtcode OP_PREINCREMENT 51 -.emtcode OP_PREDECREMENT 52 -.emtcode OP_PLUS 53 -.emtcode OP_MINUS 54 -/*.emtcode OP_COMPLEMENT 55*/ -.emtcode OP_NOT 56 -.emtcode OP_SUBSCRIPT 57 -.emtcode OP_CALL 58 -.emtcode OP_FIELD 59 -.emtcode OP_POSTINCREMENT 60 -.emtcode OP_POSTDECREMENT 61 -.emtcode OP_PRECISION 62 -.emtcode OP_METHOD 63 - -/* parameter qualifier */ -.emtcode PARAM_QUALIFIER_IN 0 -.emtcode PARAM_QUALIFIER_OUT 1 -.emtcode PARAM_QUALIFIER_INOUT 2 - -/* function parameter */ -.emtcode PARAMETER_NONE 0 -.emtcode PARAMETER_NEXT 1 - -/* function parameter array presence */ -.emtcode PARAMETER_ARRAY_NOT_PRESENT 0 -.emtcode PARAMETER_ARRAY_PRESENT 1 - -/* INVALID_EXTERNAL_DECLARATION seems to be reported when there's */ -/* any syntax errors... */ -.errtext INVALID_EXTERNAL_DECLARATION "2001: Syntax error." -.errtext INVALID_OPERATOR_OVERRIDE "2002: Invalid operator override." -.errtext LBRACE_EXPECTED "2003: '{' expected but '$err_token$' found." -.errtext LPAREN_EXPECTED "2004: '(' expected but '$err_token$' found." -.errtext RPAREN_EXPECTED "2005: ')' expected but '$err_token$' found." -.errtext INVALID_PRECISION "2006: Invalid precision specifier '$err_token$'." -.errtext INVALID_PRECISION_TYPE "2007: Invalid precision type '$err_token$'." - - -/* - * tells whether the shader that is being parsed is a built-in shader or not - * 0 - normal behaviour - * 1 - accepts constructor and operator definitions and __asm statements - * the implementation will set it to 1 when compiling internal built-in shaders - */ -.regbyte parsing_builtin 0 - -/* - * holds the type of the shader being parsed; possible values are - * listed below. - * FRAGMENT_SHADER 1 - * VERTEX_SHADER 2 - * shader type is set by the caller before parsing - */ -.regbyte shader_type 0 - -/* - * <variable_identifier> ::= <identifier> - */ -variable_identifier - identifier .emit OP_PUSH_IDENTIFIER; - -/* - * <primary_expression> ::= <variable_identifier> - * | <intconstant> - * | <floatconstant> - * | <boolconstant> - * | "(" <expression> ")" - */ -primary_expression - floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1; -primary_expression_1 - lparen .and expression .and rparen; - -/* - * <postfix_expression> ::= <primary_expression> - * | <postfix_expression> "[" <integer_expression> "]" - * | <function_call> - * | <postfix_expression> "." <field_selection> - * | <postfix_expression> "++" - * | <postfix_expression> "--" - */ -postfix_expression - postfix_expression_1 .and .loop postfix_expression_2; -postfix_expression_1 - function_call .or primary_expression; -postfix_expression_2 - postfix_expression_3 .or postfix_expression_4 .or - plusplus .emit OP_POSTINCREMENT .or - minusminus .emit OP_POSTDECREMENT; -postfix_expression_3 - lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT; -postfix_expression_4 - dot .and field_selection .emit OP_FIELD; - -/* - * <integer_expression> ::= <expression> - */ -integer_expression - expression; - -/* - * <function_call> ::= <function_call_generic> - */ -function_call - function_call_or_method; - -/* - * <function_call_or_method> ::= <regular_function_call> - * | <postfix_expression> "." <function_call_generic> - */ -function_call_or_method - regular_function_call .or method_call; - -/* - * <method_call> ::= <identifier> "." <function_call_generic> - */ -method_call - identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END; - -/* - * <regular_function_call> ::= <function_call_generic> - */ -regular_function_call - function_call_generic .emit OP_CALL .and .true .emit OP_END; - -/* - * <function_call_generic> ::= <function_call_header_with_parameters> ")" - * | <function_call_header_no_parameters> ")" - */ -function_call_generic - function_call_generic_1 .or function_call_generic_2; -function_call_generic_1 - function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED; -function_call_generic_2 - function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED; - -/* - * <function_call_header_no_parameters>::= <function_call_header> "void" - * | <function_call_header> - */ -function_call_header_no_parameters - function_call_header .and function_call_header_no_parameters_1; -function_call_header_no_parameters_1 - "void" .or .true; - -/* - * <function_call_header_with_parameters> ::= <function_call_header> <assignment_expression> - * | <function_call_header_with_parameters> "," <assignment_expression> - */ -function_call_header_with_parameters - function_call_header .and assignment_expression .and .true .emit OP_END .and - .loop function_call_header_with_parameters_1; -function_call_header_with_parameters_1 - comma .and assignment_expression .and .true .emit OP_END; - -/* - * <function_call_header> ::= <function_identifier> "(" - */ -function_call_header - function_identifier .and lparen; - -/* - * <function_identifier> ::= <constructor_identifier> - * | <identifier> - * | <type_specifier> - * - * note: <constructor_identifier> and <type_specifier> have been deleted - */ -function_identifier - identifier .and function_identifier_opt_array; -function_identifier_opt_array - function_identifier_array .emit FUNCTION_CALL_ARRAY .or - .true .emit FUNCTION_CALL_NONARRAY; -function_identifier_array - lbracket .and constant_expression .and rbracket; - -/* - * <unary_expression> ::= <postfix_expression> - * | "++" <unary_expression> - * | "--" <unary_expression> - * | <unary_operator> <unary_expression> - * - * <unary_operator> ::= "+" - * | "-" - * | "!" - * | "~" // reserved - */ -unary_expression - postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or - unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/; -unary_expression_1 - plusplus .and unary_expression .and .true .emit OP_PREINCREMENT; -unary_expression_2 - minusminus .and unary_expression .and .true .emit OP_PREDECREMENT; -unary_expression_3 - plus .and unary_expression .and .true .emit OP_PLUS; -unary_expression_4 - minus .and unary_expression .and .true .emit OP_MINUS; -unary_expression_5 - bang .and unary_expression .and .true .emit OP_NOT; -/*unary_expression_6 - tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*/ - -/* - * <multiplicative_expression> ::= <unary_expression> - * | <multiplicative_expression> "*" <unary_expression> - * | <multiplicative_expression> "/" <unary_expression> - * | <multiplicative_expression> "%" <unary_expression> // reserved - */ -multiplicative_expression - unary_expression .and .loop multiplicative_expression_1; -multiplicative_expression_1 - multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/; -multiplicative_expression_2 - star .and unary_expression .and .true .emit OP_MULTIPLY; -multiplicative_expression_3 - slash .and unary_expression .and .true .emit OP_DIVIDE; -/*multiplicative_expression_4 - percent .and unary_expression .and .true .emit OP_MODULUS;*/ - -/* - * <additive_expression> ::= <multiplicative_expression> - * | <additive_expression> "+" <multiplicative_expression> - * | <additive_expression> "-" <multiplicative_expression> - */ -additive_expression - multiplicative_expression .and .loop additive_expression_1; -additive_expression_1 - additive_expression_2 .or additive_expression_3; -additive_expression_2 - plus .and multiplicative_expression .and .true .emit OP_ADD; -additive_expression_3 - minus .and multiplicative_expression .and .true .emit OP_SUBTRACT; - -/* - * <shift_expression> ::= <additive_expression> - * | <shift_expression> "<<" <additive_expression> // reserved - * | <shift_expression> ">>" <additive_expression> // reserved - */ -shift_expression - additive_expression/* .and .loop shift_expression_1*/; -/*shift_expression_1 - shift_expression_2 .or shift_expression_3;*/ -/*shift_expression_2 - lessless .and additive_expression .and .true .emit OP_LSHIFT;*/ -/*shift_expression_3 - greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*/ - -/* - * <relational_expression> ::= <shift_expression> - * | <relational_expression> "<" <shift_expression> - * | <relational_expression> ">" <shift_expression> - * | <relational_expression> "<=" <shift_expression> - * | <relational_expression> ">=" <shift_expression> - */ -relational_expression - shift_expression .and .loop relational_expression_1; -relational_expression_1 - relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or - relational_expression_5; -relational_expression_2 - lessequals .and shift_expression .and .true .emit OP_LESSEQUAL; -relational_expression_3 - greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL; -relational_expression_4 - less .and shift_expression .and .true .emit OP_LESS; -relational_expression_5 - greater .and shift_expression .and .true .emit OP_GREATER; - -/* - * <equality_expression> ::= <relational_expression> - * | <equality_expression> "==" <relational_expression> - * | <equality_expression> "!=" <relational_expression> - */ -equality_expression - relational_expression .and .loop equality_expression_1; -equality_expression_1 - equality_expression_2 .or equality_expression_3; -equality_expression_2 - equalsequals .and relational_expression .and .true .emit OP_EQUAL; -equality_expression_3 - bangequals .and relational_expression .and .true .emit OP_NOTEQUAL; - -/* - * <and_expression> ::= <equality_expression> - * | <and_expression> "&" <equality_expression> // reserved - */ -and_expression - equality_expression/* .and .loop and_expression_1*/; -/*and_expression_1 - ampersand .and equality_expression .and .true .emit OP_BITAND;*/ - -/* - * <exclusive_or_expression> ::= <and_expression> - * | <exclusive_or_expression> "^" <and_expression> // reserved - */ -exclusive_or_expression - and_expression/* .and .loop exclusive_or_expression_1*/; -/*exclusive_or_expression_1 - caret .and and_expression .and .true .emit OP_BITXOR;*/ - -/* - * <inclusive_or_expression> ::= <exclusive_or_expression> - * | <inclusive_or_expression> "|" <exclusive_or_expression> // reserved - */ -inclusive_or_expression - exclusive_or_expression/* .and .loop inclusive_or_expression_1*/; -/*inclusive_or_expression_1 - bar .and exclusive_or_expression .and .true .emit OP_BITOR;*/ - -/* - * <logical_and_expression> ::= <inclusive_or_expression> - * | <logical_and_expression> "&&" <inclusive_or_expression> - */ -logical_and_expression - inclusive_or_expression .and .loop logical_and_expression_1; -logical_and_expression_1 - ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND; - -/* - * <logical_xor_expression> ::= <logical_and_expression> - * | <logical_xor_expression> "^^" <logical_and_expression> - */ -logical_xor_expression - logical_and_expression .and .loop logical_xor_expression_1; -logical_xor_expression_1 - caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR; - -/* - * <logical_or_expression> ::= <logical_xor_expression> - * | <logical_or_expression> "||" <logical_xor_expression> - */ -logical_or_expression - logical_xor_expression .and .loop logical_or_expression_1; -logical_or_expression_1 - barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR; - -/* - * <conditional_expression> ::= <logical_or_expression> - * | <logical_or_expression> "?" <expression> ":" <conditional_expression> - */ -conditional_expression - logical_or_expression .and .loop conditional_expression_1; -conditional_expression_1 - question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT; - -/* - * <assignment_expression> ::= <conditional_expression> - * | <unary_expression> <assignment_operator> <assignment_expression> - * - * <assignment_operator> ::= "=" - * | "*=" - * | "/=" - * | "+=" - * | "-=" - * | "%=" // reserved - * | "<<=" // reserved - * | ">>=" // reserved - * | "&=" // reserved - * | "^=" // reserved - * | "|=" // reserved - */ -assignment_expression - assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or - assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or - assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or - assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression; -assignment_expression_1 - unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN; -assignment_expression_2 - unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN; -assignment_expression_3 - unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN; -assignment_expression_4 - unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN; -assignment_expression_5 - unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN; -/*assignment_expression_6 - unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*/ -/*assignment_expression_7 - unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*/ -/*assignment_expression_8 - unary_expression .and greatergreaterequals .and assignment_expression .and - .true .emit OP_RSHASSIGN;*/ -/*assignment_expression_9 - unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*/ -/*assignment_expression_10 - unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*/ -/*assignment_expression_11 - unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*/ - -/* - * <expression> ::= <assignment_expression> - * | <expression> "," <assignment_expression> - */ -expression - assignment_expression .and .loop expression_1; -expression_1 - comma .and assignment_expression .and .true .emit OP_SEQUENCE; - -/* - * <constant_expression> ::= <conditional_expression> - */ -constant_expression - conditional_expression .and .true .emit OP_END; - -/* - * <declaration> ::= <function_prototype> ";" - * | <init_declarator_list> ";" - */ -declaration - declaration_1 .or declaration_2; -declaration_1 - function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon; -declaration_2 - init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon; - -/* - * <function_prototype> ::= <function_header> "void" ")" - * | <function_declarator> ")" - */ -function_prototype - function_prototype_1 .or function_prototype_2; -function_prototype_1 - function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE; -function_prototype_2 - function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE; - -/* - * <function_declarator> ::= <function_header> - * | <function_header_with_parameters> - */ -function_declarator - function_header_with_parameters .or function_header; - -/* - * <function_header_with_parameters> ::= <function_header> <parameter_declaration> - * | <function_header_with_parameters> "," - * <parameter_declaration> - */ -function_header_with_parameters - function_header .and parameter_declaration .and .loop function_header_with_parameters_1; -function_header_with_parameters_1 - comma .and parameter_declaration; - -/* - * <function_header> ::= <fully_specified_type> <identifier> "(" - */ -function_header - function_header_nospace .or function_header_space; -function_header_space - fully_specified_type_space .and space .and function_decl_identifier .and lparen; -function_header_nospace - fully_specified_type_nospace .and function_decl_identifier .and lparen; - -/* - * <function_decl_identifier> ::= "__constructor" - * | <__operator> - * | <identifier> - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator and constructor prototypes and definitions - */ -function_decl_identifier - .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or - .if (parsing_builtin != 0) "__constructor" .emit FUNCTION_CONSTRUCTOR .or - identifier .emit FUNCTION_ORDINARY; - -/* - * <__operator> ::= "__operator" <overriden_op> - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator prototypes and definitions - */ -__operator - "__operator" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE; - -/* - * <overriden_op> ::= "=" - * | "+=" - * | "-=" - * | "*=" - * | "/=" - * | "%=" // reserved - * | "<<=" // reserved - * | ">>=" // reserved - * | "&=" // reserved - * | "^=" // reserved - * | "|=" // reserved - * | "^^" - * | "|" // reserved - * | "^" // reserved - * | "&" // reserved - * | "==" - * | "!=" - * | "<" - * | ">" - * | "<=" - * | ">=" - * | "<<" // reserved - * | ">>" // reserved - * | "*" - * | "/" - * | "%" // reserved - * | "++" - * | "--" - * | "+" - * | "-" - * | "~" // reserved - * | "!" - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator prototypes and definitions - */ -overriden_operator - plusplus .emit OPERATOR_INCREMENT .or - plusequals .emit OPERATOR_ADDASSIGN .or - plus .emit OPERATOR_PLUS .or - minusminus .emit OPERATOR_DECREMENT .or - minusequals .emit OPERATOR_SUBASSIGN .or - minus .emit OPERATOR_MINUS .or - bang .emit OPERATOR_NOT .or - starequals .emit OPERATOR_MULASSIGN .or - star .emit OPERATOR_MULTIPLY .or - slashequals .emit OPERATOR_DIVASSIGN .or - slash .emit OPERATOR_DIVIDE .or - lessequals .emit OPERATOR_LESSEQUAL .or - /*lesslessequals .emit OPERATOR_LSHASSIGN .or*/ - /*lessless .emit OPERATOR_LSHIFT .or*/ - less .emit OPERATOR_LESS .or - greaterequals .emit OPERATOR_GREATEREQUAL .or - /*greatergreaterequals .emit OPERATOR_RSHASSIGN .or*/ - /*greatergreater .emit OPERATOR_RSHIFT .or*/ - greater .emit OPERATOR_GREATER .or - /*percentequals .emit OPERATOR_MODASSIGN .or*/ - /*percent .emit OPERATOR_MODULUS .or*/ - /*ampersandequals .emit OPERATOR_ANDASSIGN */ - /*ampersand .emit OPERATOR_BITAND .or*/ - /*barequals .emit OPERATOR_ORASSIGN .or*/ - /*bar .emit OPERATOR_BITOR .or*/ - /*tilde .emit OPERATOR_COMPLEMENT .or*/ - /*caretequals .emit OPERATOR_XORASSIGN .or*/ - caretcaret .emit OPERATOR_LOGICALXOR /*.or - caret .emit OPERATOR_BITXOR*/; - -/* - * <parameter_declarator> ::= <type_specifier> <identifier> - * | <type_specifier> <identifier> "[" <constant_expression> "]" - */ -parameter_declarator - parameter_declarator_nospace .or parameter_declarator_space; -parameter_declarator_nospace - type_specifier_nospace .and identifier .and parameter_declarator_1; -parameter_declarator_space - type_specifier_space .and space .and identifier .and parameter_declarator_1; -parameter_declarator_1 - parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or - .true .emit PARAMETER_ARRAY_NOT_PRESENT; -parameter_declarator_2 - lbracket .and constant_expression .and rbracket; - -/* - * <parameter_declaration> ::= <type_qualifier> <parameter_qualifier> - * <precision> <parameter_declarator> - * | <type_qualifier> <parameter_qualifier> - * <precision> <parameter_type_specifier> - * | <type_qualifier> <parameter_qualifier> - * <parameter_declarator> - * | <type_qualifier> <parameter_qualifier> - * <parameter_type_specifier> - * | <parameter_qualifier> <precision> - * <parameter_declarator> - * | <parameter_qualifier> <precision> - * <parameter_type_specifier> - * | <parameter_qualifier> <parameter_declarator> - * | <parameter_qualifier> <parameter_type_specifier> - */ -parameter_declaration - parameter_declaration_1 .emit PARAMETER_NEXT; -parameter_declaration_1 - parameter_declaration_2 .or parameter_declaration_3; -parameter_declaration_2 - type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4; -parameter_declaration_3 - parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4; -parameter_declaration_4 - parameter_declaration_optprec .and parameter_declaration_rest; -parameter_declaration_optprec - parameter_declaration_prec .or .true .emit PRECISION_DEFAULT; -parameter_declaration_prec - precision .and space; -parameter_declaration_rest - parameter_declarator .or parameter_type_specifier; - -/* - * <parameter_qualifier> ::= "in" - * | "out" - * | "inout" - * | "" - */ -parameter_qualifier - parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN; -parameter_qualifier_1 - parameter_qualifier_2 .and space; -parameter_qualifier_2 - "in" .emit PARAM_QUALIFIER_IN .or - "out" .emit PARAM_QUALIFIER_OUT .or - "inout" .emit PARAM_QUALIFIER_INOUT; - -/* - * <parameter_type_specifier> ::= <type_specifier> - * | <type_specifier> "[" <constant_expression> "]" - */ -parameter_type_specifier - parameter_type_specifier_1 .and .true .emit '\0' .and parameter_type_specifier_2; -parameter_type_specifier_1 - type_specifier_nospace .or type_specifier_space; -parameter_type_specifier_2 - parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or - .true .emit PARAMETER_ARRAY_NOT_PRESENT; -parameter_type_specifier_3 - lbracket .and constant_expression .and rbracket; - -/* - * <init_declarator_list> ::= <single_declaration> - * | <init_declarator_list> "," <identifier> - * | <init_declarator_list> "," <identifier> "[" "]" - * | <init_declarator_list> "," <identifier> "[" <constant_expression> "]" - * | <init_declarator_list> "," <identifier> "=" <initializer> - */ -init_declarator_list - single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and - .true .emit DECLARATOR_NONE; -init_declarator_list_1 - comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2; -init_declarator_list_2 - init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE; -init_declarator_list_3 - equals .and initializer .emit VARIABLE_INITIALIZER; -init_declarator_list_4 - lbracket .and init_declarator_list_5 .and rbracket; -init_declarator_list_5 - constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN; - -/* - * <single_declaration> ::= <fully_specified_type> - * | <fully_specified_type> <identifier> - * | <fully_specified_type> <identifier> "[" "]" - * | <fully_specified_type> <identifier> "[" <constant_expression> "]" - * | <fully_specified_type> <identifier> "=" <initializer> - */ -single_declaration - single_declaration_nospace .or single_declaration_space; -single_declaration_space - fully_specified_type_space .and single_declaration_space_1; -single_declaration_nospace - fully_specified_type_nospace .and single_declaration_nospace_1; -single_declaration_space_1 - single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE; -single_declaration_nospace_1 - single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE; -single_declaration_space_2 - space .and identifier .and single_declaration_3; -single_declaration_nospace_2 - identifier .and single_declaration_3; -single_declaration_3 - single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE; -single_declaration_4 - equals .and initializer .emit VARIABLE_INITIALIZER; -single_declaration_5 - lbracket .and single_declaration_6 .and rbracket; -single_declaration_6 - constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN; - -/* - * <fully_specified_type> ::= <opt_invariant> <opt_centroid> <opt_qualifer> <opt_precision> <type_specifier> - * - * Example: "invariant varying highp vec3" - */ -fully_specified_type_space - fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space; -fully_specified_type_nospace - fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace; -fully_specified_type_optinvariant - fully_specified_type_invariant .or .true .emit TYPE_VARIANT; -fully_specified_type_invariant - invariant_qualifier .and space; -fully_specified_type_optcentroid - fully_specified_type_centroid .or .true .emit TYPE_CENTER; -fully_specified_type_centroid - centroid_qualifier .and space; -fully_specified_type_optqual - fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE; -fully_specified_type_qual - type_qualifier .and space; -fully_specified_type_optprec - fully_specified_type_prec .or .true .emit PRECISION_DEFAULT; -fully_specified_type_prec - precision .and space; - -/* - * <invariant_qualifier> ::= "invariant" - */ -invariant_qualifier - "invariant" .emit TYPE_INVARIANT; - -centroid_qualifier - "centroid" .emit TYPE_CENTROID; - - -/* - * <type_qualifier> ::= "const" - * | "attribute" // Vertex only. - * | "varying" - * | "uniform" - * | "__fixed_output" - * | "__fixed_input" - * - * note: this is an extension to the standard language specification, - * normally slang disallows __fixed_output and __fixed_input type qualifiers - */ -type_qualifier - "const" .emit TYPE_QUALIFIER_CONST .or - .if (shader_type == 2) "attribute" .emit TYPE_QUALIFIER_ATTRIBUTE .or - "varying" .emit TYPE_QUALIFIER_VARYING .or - "uniform" .emit TYPE_QUALIFIER_UNIFORM .or - .if (parsing_builtin != 0) "__fixed_output" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or - .if (parsing_builtin != 0) "__fixed_input" .emit TYPE_QUALIFIER_FIXEDINPUT; - -/* - * <type_specifier_nonarray> ::= "void" - * | "float" - * | "int" - * | "bool" - * | "vec2" - * | "vec3" - * | "vec4" - * | "bvec2" - * | "bvec3" - * | "bvec4" - * | "ivec2" - * | "ivec3" - * | "ivec4" - * | "mat2" - * | "mat3" - * | "mat4" - * | "mat2x3" - * | "mat3x2" - * | "mat2x4" - * | "mat4x2" - * | "mat3x4" - * | "mat4x3" - * | "sampler1D" - * | "sampler2D" - * | "sampler3D" - * | "samplerCube" - * | "sampler1DShadow" - * | "sampler2DShadow" - * | "sampler2DRect" - * | "sampler2DRectShadow" - * | <struct_specifier> - * | <type_name> - */ -type_specifier_nonarray_space - "void" .emit TYPE_SPECIFIER_VOID .or - "float" .emit TYPE_SPECIFIER_FLOAT .or - "int" .emit TYPE_SPECIFIER_INT .or - "bool" .emit TYPE_SPECIFIER_BOOL .or - "vec2" .emit TYPE_SPECIFIER_VEC2 .or - "vec3" .emit TYPE_SPECIFIER_VEC3 .or - "vec4" .emit TYPE_SPECIFIER_VEC4 .or - "bvec2" .emit TYPE_SPECIFIER_BVEC2 .or - "bvec3" .emit TYPE_SPECIFIER_BVEC3 .or - "bvec4" .emit TYPE_SPECIFIER_BVEC4 .or - "ivec2" .emit TYPE_SPECIFIER_IVEC2 .or - "ivec3" .emit TYPE_SPECIFIER_IVEC3 .or - "ivec4" .emit TYPE_SPECIFIER_IVEC4 .or - "mat2" .emit TYPE_SPECIFIER_MAT2 .or - "mat3" .emit TYPE_SPECIFIER_MAT3 .or - "mat4" .emit TYPE_SPECIFIER_MAT4 .or - "mat2x3" .emit TYPE_SPECIFIER_MAT23 .or - "mat3x2" .emit TYPE_SPECIFIER_MAT32 .or - "mat2x4" .emit TYPE_SPECIFIER_MAT24 .or - "mat4x2" .emit TYPE_SPECIFIER_MAT42 .or - "mat3x4" .emit TYPE_SPECIFIER_MAT34 .or - "mat4x3" .emit TYPE_SPECIFIER_MAT43 .or - "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or - "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or - "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or - "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or - "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or - "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or - "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or - "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or - type_name .emit TYPE_SPECIFIER_TYPENAME; -type_specifier_nonarray_nospace - struct_specifier .emit TYPE_SPECIFIER_STRUCT; -type_specifier_nonarray - type_specifier_nonarray_nospace .or type_specifier_nonarray_space; - -/* - * <type_specifier> ::= <type_specifier_nonarray> - * | <type_specifier_nonarray> "[" <constant_expression> "]" - */ -type_specifier_space - type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY; -type_specifier_nospace - type_specifier_nospace_array .or type_specifier_nospace_1; -type_specifier_nospace_1 - type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY; -type_specifier_nospace_array - type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket; - -/* - * <struct_specifier> ::= "struct" <identifier> "{" <struct_declaration_list> "}" - * | "struct" "{" <struct_declaration_list> "}" - */ -struct_specifier - "struct" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and - struct_declaration_list .and rbrace .emit FIELD_NONE; -struct_specifier_1 - struct_specifier_2 .or .true .emit '\0'; -struct_specifier_2 - space .and identifier; - -/* - * <struct_declaration_list> ::= <struct_declaration> - * | <struct_declaration_list> <struct_declaration> - */ -struct_declaration_list - struct_declaration .and .loop struct_declaration .emit FIELD_NEXT; - -/* - * <struct_declaration> ::= <type_specifier> <struct_declarator_list> ";" - */ -struct_declaration - struct_declaration_nospace .or struct_declaration_space; -struct_declaration_space - type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE; -struct_declaration_nospace - type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE; - -/* - * <struct_declarator_list> ::= <struct_declarator> - * | <struct_declarator_list> "," <struct_declarator> - */ -struct_declarator_list - struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT; -struct_declarator_list_1 - comma .and struct_declarator; - -/* - * <struct_declarator> ::= <identifier> - * | <identifier> "[" <constant_expression> "]" - */ -struct_declarator - identifier .and struct_declarator_1; -struct_declarator_1 - struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE; -struct_declarator_2 - lbracket .and constant_expression .and rbracket; - -/* - * <initializer> ::= <assignment_expression> - */ -initializer - assignment_expression .and .true .emit OP_END; - -/* - * <declaration_statement> ::= <declaration> - */ -declaration_statement - declaration; - -/* - * <statement> ::= <compound_statement> - * | <simple_statement> - */ -statement - compound_statement .or simple_statement; -statement_space - compound_statement .or statement_space_1; -statement_space_1 - space .and simple_statement; - -/* - * <simple_statement> ::= <__asm_statement> - * | <selection_statement> - * | <iteration_statement> - * | <jump_statement> - * | <expression_statement> - * | <declaration_statement> - * - * note: this is an extension to the standard language specification. - * normally slang disallows use of __asm statements - */ -simple_statement - .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or - selection_statement .or - iteration_statement .or - precision_stmt .emit OP_PRECISION .or - jump_statement .or - expression_statement .emit OP_EXPRESSION .or - declaration_statement .emit OP_DECLARE; - -/* - * <compound_statement> ::= "{" "}" - * | "{" <statement_list> "}" - */ -compound_statement - compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END; -compound_statement_1 - compound_statement_2 .or compound_statement_3; -compound_statement_2 - lbrace .and rbrace; -compound_statement_3 - lbrace .and statement_list .and rbrace; - -/* - * <compound_statement_no_new_scope> ::= "{" "}" - * | "{" <statement_list> "}" - */ -compound_statement_no_new_scope - compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END; -compound_statement_no_new_scope_1 - compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3; -compound_statement_no_new_scope_2 - lbrace .and rbrace; -compound_statement_no_new_scope_3 - lbrace .and statement_list .and rbrace; - - -/* - * <statement_list> ::= <statement> - * | <statement_list> <statement> - */ -statement_list - statement .and .loop statement; - -/* - * <expression_statement> ::= ";" - * | <expression> ";" - */ -expression_statement - expression_statement_1 .or expression_statement_2; -expression_statement_1 - semicolon .emit OP_PUSH_VOID .emit OP_END; -expression_statement_2 - expression .and semicolon .emit OP_END; - -/* - * <selection_statement> ::= "if" "(" <expression> ")" <selection_rest_statement> - */ -selection_statement - "if" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and - rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement; - -/* - * <selection_rest_statement> ::= <statement> "else" <statement> - * | <statement> - */ -selection_rest_statement - statement .and selection_rest_statement_1; -selection_rest_statement_1 - selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END; -selection_rest_statement_2 - "else" .and optional_space .and statement; - -/* - * <condition> ::= <expression> - * | <fully_specified_type> <identifier> "=" <initializer> - * - * note: if <condition_1> is executed, the emit format must - * match <declaration> emit format - */ -condition - condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or - condition_3 .emit OP_EXPRESSION; -condition_1 - condition_1_nospace .or condition_1_space; -condition_1_nospace - fully_specified_type_nospace .and condition_2; -condition_1_space - fully_specified_type_space .and space .and condition_2; -condition_2 - identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and - initializer .and .true .emit DECLARATOR_NONE; -condition_3 - expression .and .true .emit OP_END; - -/* - * <iteration_statement> ::= "while" "(" <condition> ")" <statement> - * | "do" <statement> "while" "(" <expression> ")" ";" - * | "for" "(" <for_init_statement> <for_rest_statement> ")" <statement> - */ -iteration_statement - iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3; -iteration_statement_1 - "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and - rparen .error RPAREN_EXPECTED .and statement; -iteration_statement_2 - "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and - expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon; -iteration_statement_3 - "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and - for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement; - -/* - * <for_init_statement> ::= <expression_statement> - * | <declaration_statement> - */ -for_init_statement - expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE; - -/* - * <conditionopt> ::= <condition> - * | "" - * - * note: <conditionopt> is used only by "for" statement. - * if <condition> is ommitted, parser simulates default behaviour, - * that is simulates "true" expression - */ -conditionopt - condition .or - .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\0' .emit OP_END; - -/* - * <for_rest_statement> ::= <conditionopt> ";" - * | <conditionopt> ";" <expression> - */ -for_rest_statement - conditionopt .and semicolon .and for_rest_statement_1; -for_rest_statement_1 - for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END; -for_rest_statement_2 - expression .and .true .emit OP_END; - -/* - * <jump_statement> ::= "continue" ";" - * | "break" ";" - * | "return" ";" - * | "return" <expression> ";" - * | "discard" ";" // Fragment shader only. - */ -jump_statement - jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or - .if (shader_type == 1) jump_statement_5; -jump_statement_1 - "continue" .and semicolon .emit OP_CONTINUE; -jump_statement_2 - "break" .and semicolon .emit OP_BREAK; -jump_statement_3 - "return" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END; -jump_statement_4 - "return" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END; -jump_statement_5 - "discard" .and semicolon .emit OP_DISCARD; - -/* - * <__asm_statement> ::= "__asm" <identifier> <asm_arguments> ";" - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -__asm_statement - "__asm" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END; - -/* - * <asm_arguments> ::= <asm_argument> - * | <asm_arguments> "," <asm_argument> - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -asm_arguments - asm_argument .and .true .emit OP_END .and .loop asm_arguments_1; -asm_arguments_1 - comma .and asm_argument .and .true .emit OP_END; - -/* - * <asm_argument> ::= <variable_identifier> - * | <floatconstant> - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -asm_argument - var_with_field .or - variable_identifier .or - floatconstant; - -var_with_field - variable_identifier .and dot .and field_selection .emit OP_FIELD; - - -/* - * <translation_unit> ::= <external_declaration> - * | <translation_unit> <external_declaration> - */ -translation_unit - optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and - .loop external_declaration .and optional_space .and - '\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL; - - -/* - * <external_declaration> ::= <function_definition> - * | <declaration> - */ -external_declaration - precision_stmt .emit DEFAULT_PRECISION .or - function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or - invariant_stmt .emit INVARIANT_STMT .or - declaration .emit EXTERNAL_DECLARATION; - - -/* - * <precision_stmt> ::= "precision" <precision> <prectype> - */ -precision_stmt - "precision" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon; - -/* - * <precision> ::= "lowp" - * | "mediump" - * | "highp" - */ -precision - "lowp" .emit PRECISION_LOW .or - "mediump" .emit PRECISION_MEDIUM .or - "highp" .emit PRECISION_HIGH; - -/* - * <prectype> ::= "int" - * | "float" - * | "a sampler type" - */ -prectype - "int" .emit TYPE_SPECIFIER_INT .or - "float" .emit TYPE_SPECIFIER_FLOAT .or - "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or - "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or - "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or - "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or - "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or - "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or - "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or - "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW; - - -/* - * <invariant_stmt> ::= "invariant" identifier; - */ -invariant_stmt - "invariant" .and space .and identifier .and semicolon; - - -/* - * <function_definition> :: <function_prototype> <compound_statement_no_new_scope> - */ -function_definition - function_prototype .and compound_statement_no_new_scope; - - - -/* - * helper rules, not part of the official language syntax - */ - -digit_oct - '0'-'7'; - -digit_dec - '0'-'9'; - -digit_hex - '0'-'9' .or 'A'-'F' .or 'a'-'f'; - -id_character_first - 'a'-'z' .or 'A'-'Z' .or '_'; - -id_character_next - id_character_first .or digit_dec; - -identifier - id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\0'; - -float - float_1 .or float_2 .or float_3; -float_1 - float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix; -float_2 - float_digit_sequence .and .true .emit '\0' .and float_exponent_part .and optional_f_suffix; -float_3 - float_digit_sequence .and .true .emit '\0' .and 'f' .emit '\0'; - -float_fractional_constant - float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3; -float_fractional_constant_1 - float_digit_sequence .and '.' .and float_digit_sequence; -float_fractional_constant_2 - float_digit_sequence .and '.' .and .true .emit '\0'; -float_fractional_constant_3 - '.' .emit '\0' .and float_digit_sequence; - -float_optional_exponent_part - float_exponent_part .or .true .emit '\0'; - -float_digit_sequence - digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -float_exponent_part - float_exponent_part_1 .or float_exponent_part_2; -float_exponent_part_1 - 'e' .and float_optional_sign .and float_digit_sequence; -float_exponent_part_2 - 'E' .and float_optional_sign .and float_digit_sequence; - -float_optional_sign - float_sign .or .true; - -float_sign - '+' .or '-' .emit '-'; - -optional_f_suffix - 'f' .or .true; - - -integer - integer_hex .or integer_oct .or integer_dec; - -integer_hex - '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and - .true .emit '\0'; -integer_hex_1 - 'x' .or 'X'; - -integer_oct - '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\0'; - -integer_dec - digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -boolean - "true" .emit 2 .emit '1' .emit '\0' .or - "false" .emit 2 .emit '0' .emit '\0'; - -type_name - identifier; - -field_selection - identifier; - -floatconstant - float .emit OP_PUSH_FLOAT; - -intconstant - integer .emit OP_PUSH_INT; - -boolconstant - boolean .emit OP_PUSH_BOOL; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - white_char .or c_style_comment_block .or cpp_style_comment_block; - -white_char - ' ' .or '\t' .or new_line .or '\v' .or '\f'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -/* lexical rules */ - -/*ampersand - optional_space .and '&' .and optional_space;*/ - -ampersandampersand - optional_space .and '&' .and '&' .and optional_space; - -/*ampersandequals - optional_space .and '&' .and '=' .and optional_space;*/ - -/*bar - optional_space .and '|' .and optional_space;*/ - -barbar - optional_space .and '|' .and '|' .and optional_space; - -/*barequals - optional_space .and '|' .and '=' .and optional_space;*/ - -bang - optional_space .and '!' .and optional_space; - -bangequals - optional_space .and '!' .and '=' .and optional_space; - -/*caret - optional_space .and '^' .and optional_space;*/ - -caretcaret - optional_space .and '^' .and '^' .and optional_space; - -/*caretequals - optional_space .and '^' .and '=' .and optional_space;*/ - -colon - optional_space .and ':' .and optional_space; - -comma - optional_space .and ',' .and optional_space; - -dot - optional_space .and '.' .and optional_space; - -equals - optional_space .and '=' .and optional_space; - -equalsequals - optional_space .and '=' .and '=' .and optional_space; - -greater - optional_space .and '>' .and optional_space; - -greaterequals - optional_space .and '>' .and '=' .and optional_space; - -/*greatergreater - optional_space .and '>' .and '>' .and optional_space;*/ - -/*greatergreaterequals - optional_space .and '>' .and '>' .and '=' .and optional_space;*/ - -lbrace - optional_space .and '{' .and optional_space; - -lbracket - optional_space .and '[' .and optional_space; - -less - optional_space .and '<' .and optional_space; - -lessequals - optional_space .and '<' .and '=' .and optional_space; - -/*lessless - optional_space .and '<' .and '<' .and optional_space;*/ - -/*lesslessequals - optional_space .and '<' .and '<' .and '=' .and optional_space;*/ - -lparen - optional_space .and '(' .and optional_space; - -minus - optional_space .and '-' .and optional_space; - -minusequals - optional_space .and '-' .and '=' .and optional_space; - -minusminus - optional_space .and '-' .and '-' .and optional_space; - -/*percent - optional_space .and '%' .and optional_space;*/ - -/*percentequals - optional_space .and '%' .and '=' .and optional_space;*/ - -plus - optional_space .and '+' .and optional_space; - -plusequals - optional_space .and '+' .and '=' .and optional_space; - -plusplus - optional_space .and '+' .and '+' .and optional_space; - -question - optional_space .and '?' .and optional_space; - -rbrace - optional_space .and '}' .and optional_space; - -rbracket - optional_space .and ']' .and optional_space; - -rparen - optional_space .and ')' .and optional_space; - -semicolon - optional_space .and ';' .and optional_space; - -slash - optional_space .and '/' .and optional_space; - -slashequals - optional_space .and '/' .and '=' .and optional_space; - -star - optional_space .and '*' .and optional_space; - -starequals - optional_space .and '*' .and '=' .and optional_space; - -/*tilde - optional_space .and '~' .and optional_space;*/ - -/* string rules - these are used internally by the parser when parsing quoted strings */ - -.string string_lexer; - -string_lexer - lex_first_identifier_character .and .loop lex_next_identifier_character; - -lex_first_identifier_character - 'a'-'z' .or 'A'-'Z' .or '_'; - -lex_next_identifier_character - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - -/* error rules - these are used by error messages */ - -err_token - '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or - '-' .or '+' .or '=' .or '|' .or '\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '"' .or - '\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier; - -err_identifier - id_character_first .and .loop id_character_next; - diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h deleted file mode 100644 index 6a382970e1a..00000000000 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ /dev/null @@ -1,866 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax translation_unit;\n" -".emtcode REVISION 5\n" -".emtcode EXTERNAL_NULL 0\n" -".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n" -".emtcode EXTERNAL_DECLARATION 2\n" -".emtcode DEFAULT_PRECISION 3\n" -".emtcode INVARIANT_STMT 4\n" -".emtcode PRECISION_DEFAULT 0\n" -".emtcode PRECISION_LOW 1\n" -".emtcode PRECISION_MEDIUM 2\n" -".emtcode PRECISION_HIGH 3\n" -".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n" -".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n" -".emtcode FUNCTION_ORDINARY 0\n" -".emtcode FUNCTION_CONSTRUCTOR 1\n" -".emtcode FUNCTION_OPERATOR 2\n" -".emtcode FUNCTION_CALL_NONARRAY 0\n" -".emtcode FUNCTION_CALL_ARRAY 1\n" -".emtcode OPERATOR_ADDASSIGN 1\n" -".emtcode OPERATOR_SUBASSIGN 2\n" -".emtcode OPERATOR_MULASSIGN 3\n" -".emtcode OPERATOR_DIVASSIGN 4\n" -".emtcode OPERATOR_LOGICALXOR 11\n" -".emtcode OPERATOR_LESS 15\n" -".emtcode OPERATOR_GREATER 16\n" -".emtcode OPERATOR_LESSEQUAL 17\n" -".emtcode OPERATOR_GREATEREQUAL 18\n" -".emtcode OPERATOR_MULTIPLY 21\n" -".emtcode OPERATOR_DIVIDE 22\n" -".emtcode OPERATOR_INCREMENT 24\n" -".emtcode OPERATOR_DECREMENT 25\n" -".emtcode OPERATOR_PLUS 26\n" -".emtcode OPERATOR_MINUS 27\n" -".emtcode OPERATOR_NOT 29\n" -".emtcode DECLARATOR_NONE 0\n" -".emtcode DECLARATOR_NEXT 1\n" -".emtcode VARIABLE_NONE 0\n" -".emtcode VARIABLE_IDENTIFIER 1\n" -".emtcode VARIABLE_INITIALIZER 2\n" -".emtcode VARIABLE_ARRAY_EXPLICIT 3\n" -".emtcode VARIABLE_ARRAY_UNKNOWN 4\n" -".emtcode TYPE_QUALIFIER_NONE 0\n" -".emtcode TYPE_QUALIFIER_CONST 1\n" -".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n" -".emtcode TYPE_QUALIFIER_VARYING 3\n" -".emtcode TYPE_QUALIFIER_UNIFORM 4\n" -".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n" -".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n" -".emtcode TYPE_VARIANT 90\n" -".emtcode TYPE_INVARIANT 91\n" -".emtcode TYPE_CENTER 95\n" -".emtcode TYPE_CENTROID 96\n" -".emtcode TYPE_SPECIFIER_VOID 0\n" -".emtcode TYPE_SPECIFIER_BOOL 1\n" -".emtcode TYPE_SPECIFIER_BVEC2 2\n" -".emtcode TYPE_SPECIFIER_BVEC3 3\n" -".emtcode TYPE_SPECIFIER_BVEC4 4\n" -".emtcode TYPE_SPECIFIER_INT 5\n" -".emtcode TYPE_SPECIFIER_IVEC2 6\n" -".emtcode TYPE_SPECIFIER_IVEC3 7\n" -".emtcode TYPE_SPECIFIER_IVEC4 8\n" -".emtcode TYPE_SPECIFIER_FLOAT 9\n" -".emtcode TYPE_SPECIFIER_VEC2 10\n" -".emtcode TYPE_SPECIFIER_VEC3 11\n" -".emtcode TYPE_SPECIFIER_VEC4 12\n" -".emtcode TYPE_SPECIFIER_MAT2 13\n" -".emtcode TYPE_SPECIFIER_MAT3 14\n" -".emtcode TYPE_SPECIFIER_MAT4 15\n" -".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n" -".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n" -".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n" -".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n" -".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23\n" -".emtcode TYPE_SPECIFIER_STRUCT 24\n" -".emtcode TYPE_SPECIFIER_TYPENAME 25\n" -".emtcode TYPE_SPECIFIER_MAT23 26\n" -".emtcode TYPE_SPECIFIER_MAT32 27\n" -".emtcode TYPE_SPECIFIER_MAT24 28\n" -".emtcode TYPE_SPECIFIER_MAT42 29\n" -".emtcode TYPE_SPECIFIER_MAT34 30\n" -".emtcode TYPE_SPECIFIER_MAT43 31\n" -".emtcode TYPE_SPECIFIER_NONARRAY 0\n" -".emtcode TYPE_SPECIFIER_ARRAY 1\n" -".emtcode FIELD_NONE 0\n" -".emtcode FIELD_NEXT 1\n" -".emtcode FIELD_ARRAY 2\n" -".emtcode OP_END 0\n" -".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n" -".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n" -".emtcode OP_DECLARE 3\n" -".emtcode OP_ASM 4\n" -".emtcode OP_BREAK 5\n" -".emtcode OP_CONTINUE 6\n" -".emtcode OP_DISCARD 7\n" -".emtcode OP_RETURN 8\n" -".emtcode OP_EXPRESSION 9\n" -".emtcode OP_IF 10\n" -".emtcode OP_WHILE 11\n" -".emtcode OP_DO 12\n" -".emtcode OP_FOR 13\n" -".emtcode OP_PUSH_VOID 14\n" -".emtcode OP_PUSH_BOOL 15\n" -".emtcode OP_PUSH_INT 16\n" -".emtcode OP_PUSH_FLOAT 17\n" -".emtcode OP_PUSH_IDENTIFIER 18\n" -".emtcode OP_SEQUENCE 19\n" -".emtcode OP_ASSIGN 20\n" -".emtcode OP_ADDASSIGN 21\n" -".emtcode OP_SUBASSIGN 22\n" -".emtcode OP_MULASSIGN 23\n" -".emtcode OP_DIVASSIGN 24\n" -".emtcode OP_SELECT 31\n" -".emtcode OP_LOGICALOR 32\n" -".emtcode OP_LOGICALXOR 33\n" -".emtcode OP_LOGICALAND 34\n" -".emtcode OP_EQUAL 38\n" -".emtcode OP_NOTEQUAL 39\n" -".emtcode OP_LESS 40\n" -".emtcode OP_GREATER 41\n" -".emtcode OP_LESSEQUAL 42\n" -".emtcode OP_GREATEREQUAL 43\n" -".emtcode OP_ADD 46\n" -".emtcode OP_SUBTRACT 47\n" -".emtcode OP_MULTIPLY 48\n" -".emtcode OP_DIVIDE 49\n" -".emtcode OP_PREINCREMENT 51\n" -".emtcode OP_PREDECREMENT 52\n" -".emtcode OP_PLUS 53\n" -".emtcode OP_MINUS 54\n" -".emtcode OP_NOT 56\n" -".emtcode OP_SUBSCRIPT 57\n" -".emtcode OP_CALL 58\n" -".emtcode OP_FIELD 59\n" -".emtcode OP_POSTINCREMENT 60\n" -".emtcode OP_POSTDECREMENT 61\n" -".emtcode OP_PRECISION 62\n" -".emtcode OP_METHOD 63\n" -".emtcode PARAM_QUALIFIER_IN 0\n" -".emtcode PARAM_QUALIFIER_OUT 1\n" -".emtcode PARAM_QUALIFIER_INOUT 2\n" -".emtcode PARAMETER_NONE 0\n" -".emtcode PARAMETER_NEXT 1\n" -".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n" -".emtcode PARAMETER_ARRAY_PRESENT 1\n" -".errtext INVALID_EXTERNAL_DECLARATION \"2001: Syntax error.\"\n" -".errtext INVALID_OPERATOR_OVERRIDE \"2002: Invalid operator override.\"\n" -".errtext LBRACE_EXPECTED \"2003: '{' expected but '$err_token$' found.\"\n" -".errtext LPAREN_EXPECTED \"2004: '(' expected but '$err_token$' found.\"\n" -".errtext RPAREN_EXPECTED \"2005: ')' expected but '$err_token$' found.\"\n" -".errtext INVALID_PRECISION \"2006: Invalid precision specifier '$err_token$'.\"\n" -".errtext INVALID_PRECISION_TYPE \"2007: Invalid precision type '$err_token$'.\"\n" -".regbyte parsing_builtin 0\n" -".regbyte shader_type 0\n" -"variable_identifier\n" -" identifier .emit OP_PUSH_IDENTIFIER;\n" -"primary_expression\n" -" floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n" -"primary_expression_1\n" -" lparen .and expression .and rparen;\n" -"postfix_expression\n" -" postfix_expression_1 .and .loop postfix_expression_2;\n" -"postfix_expression_1\n" -" function_call .or primary_expression;\n" -"postfix_expression_2\n" -" postfix_expression_3 .or postfix_expression_4 .or\n" -" plusplus .emit OP_POSTINCREMENT .or\n" -" minusminus .emit OP_POSTDECREMENT;\n" -"postfix_expression_3\n" -" lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n" -"postfix_expression_4\n" -" dot .and field_selection .emit OP_FIELD;\n" -"integer_expression\n" -" expression;\n" -"function_call\n" -" function_call_or_method;\n" -"function_call_or_method\n" -" regular_function_call .or method_call;\n" -"method_call\n" -" identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;\n" -"regular_function_call\n" -" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n" -"function_call_generic\n" -" function_call_generic_1 .or function_call_generic_2;\n" -"function_call_generic_1\n" -" function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n" -"function_call_generic_2\n" -" function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n" -"function_call_header_no_parameters\n" -" function_call_header .and function_call_header_no_parameters_1;\n" -"function_call_header_no_parameters_1\n" -" \"void\" .or .true;\n" -"function_call_header_with_parameters\n" -" function_call_header .and assignment_expression .and .true .emit OP_END .and\n" -" .loop function_call_header_with_parameters_1;\n" -"function_call_header_with_parameters_1\n" -" comma .and assignment_expression .and .true .emit OP_END;\n" -"function_call_header\n" -" function_identifier .and lparen;\n" -"function_identifier\n" -" identifier .and function_identifier_opt_array;\n" -"function_identifier_opt_array\n" -" function_identifier_array .emit FUNCTION_CALL_ARRAY .or\n" -" .true .emit FUNCTION_CALL_NONARRAY;\n" -"function_identifier_array\n" -" lbracket .and constant_expression .and rbracket;\n" -"unary_expression\n" -" postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n" -" unary_expression_4 .or unary_expression_5;\n" -"unary_expression_1\n" -" plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n" -"unary_expression_2\n" -" minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n" -"unary_expression_3\n" -" plus .and unary_expression .and .true .emit OP_PLUS;\n" -"unary_expression_4\n" -" minus .and unary_expression .and .true .emit OP_MINUS;\n" -"unary_expression_5\n" -" bang .and unary_expression .and .true .emit OP_NOT;\n" -"multiplicative_expression\n" -" unary_expression .and .loop multiplicative_expression_1;\n" -"multiplicative_expression_1\n" -" multiplicative_expression_2 .or multiplicative_expression_3;\n" -"multiplicative_expression_2\n" -" star .and unary_expression .and .true .emit OP_MULTIPLY;\n" -"multiplicative_expression_3\n" -" slash .and unary_expression .and .true .emit OP_DIVIDE;\n" -"additive_expression\n" -" multiplicative_expression .and .loop additive_expression_1;\n" -"additive_expression_1\n" -" additive_expression_2 .or additive_expression_3;\n" -"additive_expression_2\n" -" plus .and multiplicative_expression .and .true .emit OP_ADD;\n" -"additive_expression_3\n" -" minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n" -"shift_expression\n" -" additive_expression;\n" -"relational_expression\n" -" shift_expression .and .loop relational_expression_1;\n" -"relational_expression_1\n" -" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n" -" relational_expression_5;\n" -"relational_expression_2\n" -" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n" -"relational_expression_3\n" -" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n" -"relational_expression_4\n" -" less .and shift_expression .and .true .emit OP_LESS;\n" -"relational_expression_5\n" -" greater .and shift_expression .and .true .emit OP_GREATER;\n" -"equality_expression\n" -" relational_expression .and .loop equality_expression_1;\n" -"equality_expression_1\n" -" equality_expression_2 .or equality_expression_3;\n" -"equality_expression_2\n" -" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n" -"equality_expression_3\n" -" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n" -"and_expression\n" -" equality_expression;\n" -"exclusive_or_expression\n" -" and_expression;\n" -"inclusive_or_expression\n" -" exclusive_or_expression;\n" -"logical_and_expression\n" -" inclusive_or_expression .and .loop logical_and_expression_1;\n" -"logical_and_expression_1\n" -" ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n" -"logical_xor_expression\n" -" logical_and_expression .and .loop logical_xor_expression_1;\n" -"logical_xor_expression_1\n" -" caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n" -"logical_or_expression\n" -" logical_xor_expression .and .loop logical_or_expression_1;\n" -"logical_or_expression_1\n" -" barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n" -"conditional_expression\n" -" logical_or_expression .and .loop conditional_expression_1;\n" -"conditional_expression_1\n" -" question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n" -"assignment_expression\n" -" assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n" -" assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n" -"assignment_expression_1\n" -" unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n" -"assignment_expression_2\n" -" unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n" -"assignment_expression_3\n" -" unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n" -"assignment_expression_4\n" -" unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n" -"assignment_expression_5\n" -" unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n" -"expression\n" -" assignment_expression .and .loop expression_1;\n" -"expression_1\n" -" comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n" -"constant_expression\n" -" conditional_expression .and .true .emit OP_END;\n" -"declaration\n" -" declaration_1 .or declaration_2;\n" -"declaration_1\n" -" function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n" -"declaration_2\n" -" init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n" -"function_prototype\n" -" function_prototype_1 .or function_prototype_2;\n" -"function_prototype_1\n" -" function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n" -"function_prototype_2\n" -" function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n" -"function_declarator\n" -" function_header_with_parameters .or function_header;\n" -"function_header_with_parameters\n" -" function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n" -"function_header_with_parameters_1\n" -" comma .and parameter_declaration;\n" -"function_header\n" -" function_header_nospace .or function_header_space;\n" -"function_header_space\n" -" fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n" -"function_header_nospace\n" -" fully_specified_type_nospace .and function_decl_identifier .and lparen;\n" -"function_decl_identifier\n" -" .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n" -" .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n" -" identifier .emit FUNCTION_ORDINARY;\n" -"__operator\n" -" \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n" -"overriden_operator\n" -" plusplus .emit OPERATOR_INCREMENT .or\n" -" plusequals .emit OPERATOR_ADDASSIGN .or\n" -" plus .emit OPERATOR_PLUS .or\n" -" minusminus .emit OPERATOR_DECREMENT .or\n" -" minusequals .emit OPERATOR_SUBASSIGN .or\n" -" minus .emit OPERATOR_MINUS .or\n" -" bang .emit OPERATOR_NOT .or\n" -" starequals .emit OPERATOR_MULASSIGN .or\n" -" star .emit OPERATOR_MULTIPLY .or\n" -" slashequals .emit OPERATOR_DIVASSIGN .or\n" -" slash .emit OPERATOR_DIVIDE .or\n" -" lessequals .emit OPERATOR_LESSEQUAL .or\n" -" \n" -" \n" -" less .emit OPERATOR_LESS .or\n" -" greaterequals .emit OPERATOR_GREATEREQUAL .or\n" -" \n" -" \n" -" greater .emit OPERATOR_GREATER .or\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" caretcaret .emit OPERATOR_LOGICALXOR ;\n" -"parameter_declarator\n" -" parameter_declarator_nospace .or parameter_declarator_space;\n" -"parameter_declarator_nospace\n" -" type_specifier_nospace .and identifier .and parameter_declarator_1;\n" -"parameter_declarator_space\n" -" type_specifier_space .and space .and identifier .and parameter_declarator_1;\n" -"parameter_declarator_1\n" -" parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n" -" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n" -"parameter_declarator_2\n" -" lbracket .and constant_expression .and rbracket;\n" -"parameter_declaration\n" -" parameter_declaration_1 .emit PARAMETER_NEXT;\n" -"parameter_declaration_1\n" -" parameter_declaration_2 .or parameter_declaration_3;\n" -"parameter_declaration_2\n" -" type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n" -"parameter_declaration_3\n" -" parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n" -"parameter_declaration_4\n" -" parameter_declaration_optprec .and parameter_declaration_rest;\n" -"parameter_declaration_optprec\n" -" parameter_declaration_prec .or .true .emit PRECISION_DEFAULT;\n" -"parameter_declaration_prec\n" -" precision .and space;\n" -"parameter_declaration_rest\n" -" parameter_declarator .or parameter_type_specifier;\n" -"parameter_qualifier\n" -" parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n" -"parameter_qualifier_1\n" -" parameter_qualifier_2 .and space;\n" -"parameter_qualifier_2\n" -" \"in\" .emit PARAM_QUALIFIER_IN .or\n" -" \"out\" .emit PARAM_QUALIFIER_OUT .or\n" -" \"inout\" .emit PARAM_QUALIFIER_INOUT;\n" -"parameter_type_specifier\n" -" parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n" -"parameter_type_specifier_1\n" -" type_specifier_nospace .or type_specifier_space;\n" -"parameter_type_specifier_2\n" -" parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n" -" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n" -"parameter_type_specifier_3\n" -" lbracket .and constant_expression .and rbracket;\n" -"init_declarator_list\n" -" single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n" -" .true .emit DECLARATOR_NONE;\n" -"init_declarator_list_1\n" -" comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n" -"init_declarator_list_2\n" -" init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n" -"init_declarator_list_3\n" -" equals .and initializer .emit VARIABLE_INITIALIZER;\n" -"init_declarator_list_4\n" -" lbracket .and init_declarator_list_5 .and rbracket;\n" -"init_declarator_list_5\n" -" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n" -"single_declaration\n" -" single_declaration_nospace .or single_declaration_space;\n" -"single_declaration_space\n" -" fully_specified_type_space .and single_declaration_space_1;\n" -"single_declaration_nospace\n" -" fully_specified_type_nospace .and single_declaration_nospace_1;\n" -"single_declaration_space_1\n" -" single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n" -"single_declaration_nospace_1\n" -" single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n" -"single_declaration_space_2\n" -" space .and identifier .and single_declaration_3;\n" -"single_declaration_nospace_2\n" -" identifier .and single_declaration_3;\n" -"single_declaration_3\n" -" single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n" -"single_declaration_4\n" -" equals .and initializer .emit VARIABLE_INITIALIZER;\n" -"single_declaration_5\n" -" lbracket .and single_declaration_6 .and rbracket;\n" -"single_declaration_6\n" -" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n" -"fully_specified_type_space\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space;\n" -"fully_specified_type_nospace\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace;\n" -"fully_specified_type_optinvariant\n" -" fully_specified_type_invariant .or .true .emit TYPE_VARIANT;\n" -"fully_specified_type_invariant\n" -" invariant_qualifier .and space;\n" -"fully_specified_type_optcentroid\n" -" fully_specified_type_centroid .or .true .emit TYPE_CENTER;\n" -"fully_specified_type_centroid\n" -" centroid_qualifier .and space;\n" -"fully_specified_type_optqual\n" -" fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE;\n" -"fully_specified_type_qual\n" -" type_qualifier .and space;\n" -"fully_specified_type_optprec\n" -" fully_specified_type_prec .or .true .emit PRECISION_DEFAULT;\n" -"fully_specified_type_prec\n" -" precision .and space;\n" -"invariant_qualifier\n" -" \"invariant\" .emit TYPE_INVARIANT;\n" -"centroid_qualifier\n" -" \"centroid\" .emit TYPE_CENTROID;\n" -"type_qualifier\n" -" \"const\" .emit TYPE_QUALIFIER_CONST .or\n" -" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n" -" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n" -" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n" -" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n" -" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n" -"type_specifier_nonarray_space\n" -" \"void\" .emit TYPE_SPECIFIER_VOID .or\n" -" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n" -" \"int\" .emit TYPE_SPECIFIER_INT .or\n" -" \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n" -" \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n" -" \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n" -" \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n" -" \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n" -" \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n" -" \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n" -" \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n" -" \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n" -" \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n" -" \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n" -" \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n" -" \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n" -" \"mat2x3\" .emit TYPE_SPECIFIER_MAT23 .or\n" -" \"mat3x2\" .emit TYPE_SPECIFIER_MAT32 .or\n" -" \"mat2x4\" .emit TYPE_SPECIFIER_MAT24 .or\n" -" \"mat4x2\" .emit TYPE_SPECIFIER_MAT42 .or\n" -" \"mat3x4\" .emit TYPE_SPECIFIER_MAT34 .or\n" -" \"mat4x3\" .emit TYPE_SPECIFIER_MAT43 .or\n" -" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n" -" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n" -" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n" -" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n" -" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n" -" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n" -" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n" -" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or\n" -" type_name .emit TYPE_SPECIFIER_TYPENAME;\n" -"type_specifier_nonarray_nospace\n" -" struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n" -"type_specifier_nonarray\n" -" type_specifier_nonarray_nospace .or type_specifier_nonarray_space;\n" -"type_specifier_space\n" -" type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY;\n" -"type_specifier_nospace\n" -" type_specifier_nospace_array .or type_specifier_nospace_1;\n" -"type_specifier_nospace_1\n" -" type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY;\n" -"type_specifier_nospace_array\n" -" type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket;\n" -"struct_specifier\n" -" \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n" -" struct_declaration_list .and rbrace .emit FIELD_NONE;\n" -"struct_specifier_1\n" -" struct_specifier_2 .or .true .emit '\\0';\n" -"struct_specifier_2\n" -" space .and identifier;\n" -"struct_declaration_list\n" -" struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n" -"struct_declaration\n" -" struct_declaration_nospace .or struct_declaration_space;\n" -"struct_declaration_space\n" -" type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n" -"struct_declaration_nospace\n" -" type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n" -"struct_declarator_list\n" -" struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n" -"struct_declarator_list_1\n" -" comma .and struct_declarator;\n" -"struct_declarator\n" -" identifier .and struct_declarator_1;\n" -"struct_declarator_1\n" -" struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n" -"struct_declarator_2\n" -" lbracket .and constant_expression .and rbracket;\n" -"initializer\n" -" assignment_expression .and .true .emit OP_END;\n" -"declaration_statement\n" -" declaration;\n" -"statement\n" -" compound_statement .or simple_statement;\n" -"statement_space\n" -" compound_statement .or statement_space_1;\n" -"statement_space_1\n" -" space .and simple_statement;\n" -"simple_statement\n" -" .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n" -" selection_statement .or\n" -" iteration_statement .or\n" -" precision_stmt .emit OP_PRECISION .or\n" -" jump_statement .or\n" -" expression_statement .emit OP_EXPRESSION .or\n" -" declaration_statement .emit OP_DECLARE;\n" -"compound_statement\n" -" compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n" -"compound_statement_1\n" -" compound_statement_2 .or compound_statement_3;\n" -"compound_statement_2\n" -" lbrace .and rbrace;\n" -"compound_statement_3\n" -" lbrace .and statement_list .and rbrace;\n" -"compound_statement_no_new_scope\n" -" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n" -"compound_statement_no_new_scope_1\n" -" compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n" -"compound_statement_no_new_scope_2\n" -" lbrace .and rbrace;\n" -"compound_statement_no_new_scope_3\n" -" lbrace .and statement_list .and rbrace;\n" -"statement_list\n" -" statement .and .loop statement;\n" -"expression_statement\n" -" expression_statement_1 .or expression_statement_2;\n" -"expression_statement_1\n" -" semicolon .emit OP_PUSH_VOID .emit OP_END;\n" -"expression_statement_2\n" -" expression .and semicolon .emit OP_END;\n" -"selection_statement\n" -" \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n" -" rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n" -"selection_rest_statement\n" -" statement .and selection_rest_statement_1;\n" -"selection_rest_statement_1\n" -" selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n" -"selection_rest_statement_2\n" -" \"else\" .and optional_space .and statement;\n" -"condition\n" -" condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n" -" condition_3 .emit OP_EXPRESSION;\n" -"condition_1\n" -" condition_1_nospace .or condition_1_space;\n" -"condition_1_nospace\n" -" fully_specified_type_nospace .and condition_2;\n" -"condition_1_space\n" -" fully_specified_type_space .and space .and condition_2;\n" -"condition_2\n" -" identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n" -" initializer .and .true .emit DECLARATOR_NONE;\n" -"condition_3\n" -" expression .and .true .emit OP_END;\n" -"iteration_statement\n" -" iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n" -"iteration_statement_1\n" -" \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n" -" rparen .error RPAREN_EXPECTED .and statement;\n" -"iteration_statement_2\n" -" \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n" -" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n" -"iteration_statement_3\n" -" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n" -" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;\n" -"for_init_statement\n" -" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n" -"conditionopt\n" -" condition .or\n" -" .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n" -"for_rest_statement\n" -" conditionopt .and semicolon .and for_rest_statement_1;\n" -"for_rest_statement_1\n" -" for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n" -"for_rest_statement_2\n" -" expression .and .true .emit OP_END;\n" -"jump_statement\n" -" jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n" -" .if (shader_type == 1) jump_statement_5;\n" -"jump_statement_1\n" -" \"continue\" .and semicolon .emit OP_CONTINUE;\n" -"jump_statement_2\n" -" \"break\" .and semicolon .emit OP_BREAK;\n" -"jump_statement_3\n" -" \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n" -"jump_statement_4\n" -" \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n" -"jump_statement_5\n" -" \"discard\" .and semicolon .emit OP_DISCARD;\n" -"__asm_statement\n" -" \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n" -"asm_arguments\n" -" asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n" -"asm_arguments_1\n" -" comma .and asm_argument .and .true .emit OP_END;\n" -"asm_argument\n" -" var_with_field .or\n" -" variable_identifier .or\n" -" floatconstant;\n" -"var_with_field\n" -" variable_identifier .and dot .and field_selection .emit OP_FIELD;\n" -"translation_unit\n" -" optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n" -" .loop external_declaration .and optional_space .and\n" -" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n" -"external_declaration\n" -" precision_stmt .emit DEFAULT_PRECISION .or\n" -" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n" -" invariant_stmt .emit INVARIANT_STMT .or\n" -" declaration .emit EXTERNAL_DECLARATION;\n" -"precision_stmt\n" -" \"precision\" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;\n" -"precision\n" -" \"lowp\" .emit PRECISION_LOW .or\n" -" \"mediump\" .emit PRECISION_MEDIUM .or\n" -" \"highp\" .emit PRECISION_HIGH;\n" -"prectype\n" -" \"int\" .emit TYPE_SPECIFIER_INT .or\n" -" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n" -" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n" -" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n" -" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n" -" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n" -" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n" -" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n" -" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n" -" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;\n" -"invariant_stmt\n" -" \"invariant\" .and space .and identifier .and semicolon;\n" -"function_definition\n" -" function_prototype .and compound_statement_no_new_scope;\n" -"digit_oct\n" -" '0'-'7';\n" -"digit_dec\n" -" '0'-'9';\n" -"digit_hex\n" -" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n" -"id_character_first\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"id_character_next\n" -" id_character_first .or digit_dec;\n" -"identifier\n" -" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n" -"float\n" -" float_1 .or float_2 .or float_3;\n" -"float_1\n" -" float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;\n" -"float_2\n" -" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part .and optional_f_suffix;\n" -"float_3\n" -" float_digit_sequence .and .true .emit '\\0' .and 'f' .emit '\\0';\n" -"float_fractional_constant\n" -" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n" -"float_fractional_constant_1\n" -" float_digit_sequence .and '.' .and float_digit_sequence;\n" -"float_fractional_constant_2\n" -" float_digit_sequence .and '.' .and .true .emit '\\0';\n" -"float_fractional_constant_3\n" -" '.' .emit '\\0' .and float_digit_sequence;\n" -"float_optional_exponent_part\n" -" float_exponent_part .or .true .emit '\\0';\n" -"float_digit_sequence\n" -" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"float_exponent_part\n" -" float_exponent_part_1 .or float_exponent_part_2;\n" -"float_exponent_part_1\n" -" 'e' .and float_optional_sign .and float_digit_sequence;\n" -"float_exponent_part_2\n" -" 'E' .and float_optional_sign .and float_digit_sequence;\n" -"float_optional_sign\n" -" float_sign .or .true;\n" -"float_sign\n" -" '+' .or '-' .emit '-';\n" -"optional_f_suffix\n" -" 'f' .or .true;\n" -"integer\n" -" integer_hex .or integer_oct .or integer_dec;\n" -"integer_hex\n" -" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n" -" .true .emit '\\0';\n" -"integer_hex_1\n" -" 'x' .or 'X';\n" -"integer_oct\n" -" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n" -"integer_dec\n" -" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"boolean\n" -" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n" -" \"false\" .emit 2 .emit '0' .emit '\\0';\n" -"type_name\n" -" identifier;\n" -"field_selection\n" -" identifier;\n" -"floatconstant\n" -" float .emit OP_PUSH_FLOAT;\n" -"intconstant\n" -" integer .emit OP_PUSH_INT;\n" -"boolconstant\n" -" boolean .emit OP_PUSH_BOOL;\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" white_char .or c_style_comment_block .or cpp_style_comment_block;\n" -"white_char\n" -" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n" -"new_line\n" -" cr_lf .or lf_cr .or '\\n' .or '\\r';\n" -"cr_lf\n" -" '\\r' .and '\\n';\n" -"lf_cr\n" -" '\\n' .and '\\r';\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest;\n" -"c_style_comment_rest\n" -" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n" -"c_style_comment_rest_1\n" -" c_style_comment_end .or c_style_comment_rest_2;\n" -"c_style_comment_rest_2\n" -" '*' .and c_style_comment_rest;\n" -"c_style_comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_end\n" -" '*' .and '/';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"ampersandampersand\n" -" optional_space .and '&' .and '&' .and optional_space;\n" -"barbar\n" -" optional_space .and '|' .and '|' .and optional_space;\n" -"bang\n" -" optional_space .and '!' .and optional_space;\n" -"bangequals\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"caretcaret\n" -" optional_space .and '^' .and '^' .and optional_space;\n" -"colon\n" -" optional_space .and ':' .and optional_space;\n" -"comma\n" -" optional_space .and ',' .and optional_space;\n" -"dot\n" -" optional_space .and '.' .and optional_space;\n" -"equals\n" -" optional_space .and '=' .and optional_space;\n" -"equalsequals\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"greater\n" -" optional_space .and '>' .and optional_space;\n" -"greaterequals\n" -" optional_space .and '>' .and '=' .and optional_space;\n" -"lbrace\n" -" optional_space .and '{' .and optional_space;\n" -"lbracket\n" -" optional_space .and '[' .and optional_space;\n" -"less\n" -" optional_space .and '<' .and optional_space;\n" -"lessequals\n" -" optional_space .and '<' .and '=' .and optional_space;\n" -"lparen\n" -" optional_space .and '(' .and optional_space;\n" -"minus\n" -" optional_space .and '-' .and optional_space;\n" -"minusequals\n" -" optional_space .and '-' .and '=' .and optional_space;\n" -"minusminus\n" -" optional_space .and '-' .and '-' .and optional_space;\n" -"plus\n" -" optional_space .and '+' .and optional_space;\n" -"plusequals\n" -" optional_space .and '+' .and '=' .and optional_space;\n" -"plusplus\n" -" optional_space .and '+' .and '+' .and optional_space;\n" -"question\n" -" optional_space .and '?' .and optional_space;\n" -"rbrace\n" -" optional_space .and '}' .and optional_space;\n" -"rbracket\n" -" optional_space .and ']' .and optional_space;\n" -"rparen\n" -" optional_space .and ')' .and optional_space;\n" -"semicolon\n" -" optional_space .and ';' .and optional_space;\n" -"slash\n" -" optional_space .and '/' .and optional_space;\n" -"slashequals\n" -" optional_space .and '/' .and '=' .and optional_space;\n" -"star\n" -" optional_space .and '*' .and optional_space;\n" -"starequals\n" -" optional_space .and '*' .and '=' .and optional_space;\n" -".string string_lexer;\n" -"string_lexer\n" -" lex_first_identifier_character .and .loop lex_next_identifier_character;\n" -"lex_first_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"lex_next_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"err_token\n" -" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n" -" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n" -" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n" -"err_identifier\n" -" id_character_first .and .loop id_character_next;\n" -"" diff --git a/src/mesa/shader/slang/library/slang_version.syn b/src/mesa/shader/slang/library/slang_version.syn deleted file mode 100644 index aaf8bef342f..00000000000 --- a/src/mesa/shader/slang/library/slang_version.syn +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_version.syn - * slang #version directive syntax - * \author Michal Krol - */ - -.syntax version_directive; - -version_directive - version_directive_1 .and .loop version_directive_2; -version_directive_1 - prior_optional_spaces .and optional_version_directive .and .true .emit $; -version_directive_2 - prior_optional_spaces .and version_directive_body .and .true .emit $; - -optional_version_directive - version_directive_body .or .true .emit 10 .emit 1; - -version_directive_body - '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and - new_line; - -version_number - version_number_110; - -version_number_110 - leading_zeroes .and "110" .emit 10 .emit 1; - -leading_zeroes - .loop zero; - -zero - '0'; - -space - single_space .and .loop single_space; - -optional_space - .loop single_space; - -single_space - ' ' .or '\t'; - -prior_optional_spaces - .loop prior_space; - -prior_space - c_style_comment_block .or cpp_style_comment_block .or space .or new_line; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -.string __string_filter; - -__string_filter - .loop __identifier_char; - -__identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9'; - diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h deleted file mode 100644 index e5a252b0196..00000000000 --- a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h +++ /dev/null @@ -1,109 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_vertex_builtin.gc */ - -5,2,2,90,95,5,0,12,0,1,103,108,95,80,111,115,105,116,105,111,110,0,0,0,2,2,90,95,5,0,9,0,1,103,108, -95,80,111,105,110,116,83,105,122,101,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,67,108,105,112,86,101, -114,116,101,120,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95,2,0,12,0, -1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,2,0,11,0,1,103, -108,95,78,111,114,109,97,108,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,86,101,114,116,101,120,0,0,0,2, -2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,48,0,0,0,2,2,90,95, -2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,49,0,0,0,2,2,90,95,2,0,12,0, -1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,50,0,0,0,2,2,90,95,2,0,12,0,1,103, -108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,51,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95, -77,117,108,116,105,84,101,120,67,111,111,114,100,52,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117, -108,116,105,84,101,120,67,111,111,114,100,53,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116, -105,84,101,120,67,111,111,114,100,54,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84, -101,120,67,111,111,114,100,55,0,0,0,2,2,90,95,2,0,9,0,1,103,108,95,70,111,103,67,111,111,114,100,0, -0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110,116,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0, -1,103,108,95,66,97,99,107,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110, -116,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,66, -97,99,107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108, -95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111, -114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0, -1,90,95,0,0,12,0,0,102,116,114,97,110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116, -114,105,120,0,16,8,48,0,57,18,103,108,95,86,101,114,116,101,120,0,59,120,120,120,120,0,48,18,103, -108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105, -120,0,16,10,49,0,57,18,103,108,95,86,101,114,116,101,120,0,59,121,121,121,121,0,48,46,18,103,108, -95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0, -16,10,50,0,57,18,103,108,95,86,101,114,116,101,120,0,59,122,122,122,122,0,48,46,18,103,108,95,77, -111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,16,10, -51,0,57,18,103,108,95,86,101,114,116,101,120,0,59,119,119,119,119,0,48,46,20,0,0,1,90,95,0,0,12,0, -0,116,101,120,116,117,114,101,49,68,76,111,100,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0, -0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114, -100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111, -114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97, -115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100, -52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0, -0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100, -0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0, -18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114, -100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,0,16,0, -115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1, -3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111, -111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59, -119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90, -95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1, -99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59, -120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,76, -111,100,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0, -9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100, -52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0, -59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1, -90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1,0,0,18,0,115,97, -109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90, -95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99, -111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111, -114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115, -0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0, -0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,1,0,0,19,0,115, -97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2, -90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99, -111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52, -95,116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,76,111,100,0, -1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108, -111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59, -120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0, -20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1, -90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111,106,76,111,100,0,1,1,0,0,20,0,115,97,109, -112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95, -0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114, -100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18, -99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4, -118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114, -101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,115,104,97,100,111,119,50,68,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1, -1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111, -114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18, -99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100,95, -98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18, -112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100, -95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, -108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0 diff --git a/src/mesa/shader/slang/library/syn_to_c.c b/src/mesa/shader/slang/library/syn_to_c.c deleted file mode 100644 index f997edfd8b5..00000000000 --- a/src/mesa/shader/slang/library/syn_to_c.c +++ /dev/null @@ -1,72 +0,0 @@ -#include <stdio.h> - -static int was_space = 0; -static int first_char = 1; - -static void put_char (int c) -{ - if (c == '\n') { - if (!first_char) { - fputs ("\\n\"\n\"", stdout); - first_char = 1; - } - } - else { - first_char = 0; - if (c == '\\') - fputs ("\\\\", stdout); - else if (c == '\"') - fputs ("\\\"", stdout); - else if (!was_space || !(c == ' ' || c == '\t')) - fputc (c, stdout); - was_space = (c == ' ' || c == '\t'); - } -} - -int main (int argc, char *argv[]) -{ - int c; - FILE *f; - - if (argc == 1) - return 1; - f = fopen (argv[1], "r"); - if (f == NULL) - return 1; - - fputs ("\n", stdout); - fputs ("/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */\n", stdout); - fputs ("\n", stdout); - fputs ("\"", stdout); - c = getc (f); - while (c != EOF) { - if (c == '/') { - int c2 = getc (f); - if (c2 == '*') { - was_space = 0; - c = getc (f); - for (;;) { - if (c == '*') { - c2 = getc (f); - if (c2 == '/') - break; - } - c = getc (f); - } - } - else { - put_char (c); - put_char (c2); - } - } - else { - put_char (c); - } - c = getc (f); - } - fputs ("\"\n", stdout); - - fclose (f); - return 0; -} - diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index a2708884437..54eb092f1a7 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -35,10 +35,10 @@ #include "shader/prog_optimize.h" #include "shader/prog_print.h" #include "shader/prog_parameter.h" -#include "shader/grammar/grammar_mesa.h" +#include "../../glsl/pp/sl_pp_public.h" +#include "../../glsl/cl/sl_cl_parse.h" #include "slang_codegen.h" #include "slang_compile.h" -#include "slang_preprocess.h" #include "slang_storage.h" #include "slang_emit.h" #include "slang_log.h" @@ -128,7 +128,7 @@ _slang_code_object_dtr(slang_code_object * self) typedef struct slang_parse_ctx_ { - const byte *I; + const unsigned char *I; slang_info_log *L; int parsing_builtin; GLboolean global_scope; /**< Is object being declared a global? */ @@ -184,22 +184,102 @@ parse_identifier(slang_parse_ctx * C) } static int +is_hex_digit(char c) +{ + return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); +} + +static int +parse_general_number(slang_parse_ctx *ctx, float *number) +{ + char *flt = NULL; + + if (*ctx->I == '0') { + int value = 0; + const unsigned char *pi; + + if (ctx->I[1] == 'x' || ctx->I[1] == 'X') { + ctx->I += 2; + if (!is_hex_digit(*ctx->I)) { + return 0; + } + do { + int digit; + + if (*ctx->I >= '0' && *ctx->I <= '9') { + digit = (int)(*ctx->I - '0'); + } else if (*ctx->I >= 'a' && *ctx->I <= 'f') { + digit = (int)(*ctx->I - 'a') + 10; + } else { + digit = (int)(*ctx->I - 'A') + 10; + } + value = value * 0x10 + digit; + ctx->I++; + } while (is_hex_digit(*ctx->I)); + if (*ctx->I != '\0') { + return 0; + } + ctx->I++; + *number = (float)value; + return 1; + } + + pi = ctx->I; + pi++; + while (*pi >= '0' && *pi <= '7') { + int digit; + + digit = (int)(*pi - '0'); + value = value * 010 + digit; + pi++; + } + if (*pi == '\0') { + pi++; + ctx->I = pi; + *number = (float)value; + return 1; + } + } + + parse_identifier_str(ctx, &flt); + flt = strdup(flt); + if (!flt) { + return 0; + } + if (flt[strlen(flt) - 1] == 'f' || flt[strlen(flt) - 1] == 'F') { + flt[strlen(flt) - 1] = '\0'; + } + *number = (float)_mesa_strtod(flt, (char **)NULL); + free(flt); + + return 1; +} + +static int parse_number(slang_parse_ctx * C, int *number) { const int radix = (int) (*C->I++); - *number = 0; - while (*C->I != '\0') { - int digit; - if (*C->I >= '0' && *C->I <= '9') - digit = (int) (*C->I - '0'); - else if (*C->I >= 'A' && *C->I <= 'Z') - digit = (int) (*C->I - 'A') + 10; - else - digit = (int) (*C->I - 'a') + 10; - *number = *number * radix + digit; + + if (radix == 1) { + float f = 0.0f; + + parse_general_number(C, &f); + *number = (int)f; + } else { + *number = 0; + while (*C->I != '\0') { + int digit; + if (*C->I >= '0' && *C->I <= '9') + digit = (int) (*C->I - '0'); + else if (*C->I >= 'A' && *C->I <= 'Z') + digit = (int) (*C->I - 'A') + 10; + else + digit = (int) (*C->I - 'a') + 10; + *number = *number * radix + digit; + C->I++; + } C->I++; } - C->I++; if (*number > 65535) slang_info_log_warning(C->L, "%d: literal integer overflow.", *number); return 1; @@ -208,32 +288,37 @@ parse_number(slang_parse_ctx * C, int *number) static int parse_float(slang_parse_ctx * C, float *number) { - char *integral = NULL; - char *fractional = NULL; - char *exponent = NULL; - char *whole = NULL; - - parse_identifier_str(C, &integral); - parse_identifier_str(C, &fractional); - parse_identifier_str(C, &exponent); - - whole = (char *) _slang_alloc((_mesa_strlen(integral) + - _mesa_strlen(fractional) + - _mesa_strlen(exponent) + 3) * sizeof(char)); - if (whole == NULL) { - slang_info_log_memory(C->L); - RETURN0; - } + if (*C->I == 1) { + C->I++; + parse_general_number(C, number); + } else { + char *integral = NULL; + char *fractional = NULL; + char *exponent = NULL; + char *whole = NULL; + + parse_identifier_str(C, &integral); + parse_identifier_str(C, &fractional); + parse_identifier_str(C, &exponent); + + whole = (char *) _slang_alloc((_mesa_strlen(integral) + + _mesa_strlen(fractional) + + _mesa_strlen(exponent) + 3) * sizeof(char)); + if (whole == NULL) { + slang_info_log_memory(C->L); + RETURN0; + } - slang_string_copy(whole, integral); - slang_string_concat(whole, "."); - slang_string_concat(whole, fractional); - slang_string_concat(whole, "E"); - slang_string_concat(whole, exponent); + slang_string_copy(whole, integral); + slang_string_concat(whole, "."); + slang_string_concat(whole, fractional); + slang_string_concat(whole, "E"); + slang_string_concat(whole, exponent); - *number = (float) (_mesa_strtod(whole, (char **) NULL)); + *number = (float) (_mesa_strtod(whole, (char **) NULL)); - _slang_free(whole); + _slang_free(whole); + } return 1; } @@ -2455,7 +2540,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, } static GLboolean -compile_binary(const byte * prod, slang_code_unit * unit, +compile_binary(const unsigned char * prod, slang_code_unit * unit, GLuint version, slang_unit_type type, slang_info_log * infolog, slang_code_unit * builtin, slang_code_unit * downlink, @@ -2488,17 +2573,141 @@ compile_binary(const byte * prod, slang_code_unit * unit, } static GLboolean -compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, - slang_unit_type type, slang_info_log * infolog, - slang_code_unit * builtin, +compile_with_grammar(const char *source, + slang_code_unit *unit, + slang_unit_type type, + slang_info_log *infolog, + slang_code_unit *builtin, struct gl_shader *shader, const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) + struct gl_sl_pragmas *pragmas, + unsigned int shader_type, + unsigned int parsing_builtin) { - byte *prod; - GLuint size, start, version; - slang_string preprocessed; - GLuint maxVersion; + struct sl_pp_context *context; + struct sl_pp_token_info *tokens; + unsigned char *prod; + GLuint size; + unsigned int version; + unsigned int maxVersion; + int result; + struct sl_pp_purify_options options; + char errmsg[200] = ""; + unsigned int errline = 0; + struct sl_pp_token_info *intokens; + unsigned int tokens_eaten; + + context = sl_pp_context_create(); + if (!context) { + slang_info_log_error(infolog, "out of memory"); + return GL_FALSE; + } + + if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") || + sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } + +#if FEATURE_es2_glsl + if (sl_pp_context_add_predefined(context, "GL_ES", "1") || + sl_pp_context_add_predefined(context, "GL_FRAGMENT_PRECISION_HIGH", "1")) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } +#endif + + memset(&options, 0, sizeof(options)); + if (sl_pp_tokenise(context, source, &options, &intokens)) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } + + if (sl_pp_version(context, intokens, &version, &tokens_eaten)) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(intokens); + return GL_FALSE; + } + + if (sl_pp_process(context, &intokens[tokens_eaten], &tokens)) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(intokens); + return GL_FALSE; + } + + free(intokens); + + /* For the time being we care about only a handful of tokens. */ + { + const struct sl_pp_token_info *src = tokens; + struct sl_pp_token_info *dst = tokens; + + while (src->token != SL_PP_EOF) { + switch (src->token) { + case SL_PP_COMMA: + case SL_PP_SEMICOLON: + case SL_PP_LBRACE: + case SL_PP_RBRACE: + case SL_PP_LPAREN: + case SL_PP_RPAREN: + case SL_PP_LBRACKET: + case SL_PP_RBRACKET: + case SL_PP_DOT: + case SL_PP_INCREMENT: + case SL_PP_ADDASSIGN: + case SL_PP_PLUS: + case SL_PP_DECREMENT: + case SL_PP_SUBASSIGN: + case SL_PP_MINUS: + case SL_PP_BITNOT: + case SL_PP_NOTEQUAL: + case SL_PP_NOT: + case SL_PP_MULASSIGN: + case SL_PP_STAR: + case SL_PP_DIVASSIGN: + case SL_PP_SLASH: + case SL_PP_MODASSIGN: + case SL_PP_MODULO: + case SL_PP_LSHIFTASSIGN: + case SL_PP_LSHIFT: + case SL_PP_LESSEQUAL: + case SL_PP_LESS: + case SL_PP_RSHIFTASSIGN: + case SL_PP_RSHIFT: + case SL_PP_GREATEREQUAL: + case SL_PP_GREATER: + case SL_PP_EQUAL: + case SL_PP_ASSIGN: + case SL_PP_AND: + case SL_PP_BITANDASSIGN: + case SL_PP_BITAND: + case SL_PP_XOR: + case SL_PP_BITXORASSIGN: + case SL_PP_BITXOR: + case SL_PP_OR: + case SL_PP_BITORASSIGN: + case SL_PP_BITOR: + case SL_PP_QUESTION: + case SL_PP_COLON: + case SL_PP_IDENTIFIER: + case SL_PP_UINT: + case SL_PP_FLOAT: + *dst++ = *src++; + break; + + default: + src++; + } + } + + /* The end of stream token. */ + *dst = *src; + } #if FEATURE_ARB_shading_language_120 maxVersion = 120; @@ -2508,36 +2717,33 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, maxVersion = 110; #endif - /* First retrieve the version number. */ - if (!_slang_preprocess_version(source, &version, &start, infolog)) - return GL_FALSE; - - if (version > maxVersion) { + if (version > maxVersion || + (version != 100 && version != 110 && version != 120)) { slang_info_log_error(infolog, "language version %.2f is not supported.", version * 0.01); - return GL_FALSE; - } - - /* Now preprocess the source string. */ - slang_string_init(&preprocessed); - if (!_slang_preprocess_directives(&preprocessed, &source[start], - infolog, extensions, pragmas)) { - slang_string_free(&preprocessed); - slang_info_log_error(infolog, "failed to preprocess the source."); + sl_pp_context_destroy(context); + free(tokens); return GL_FALSE; } /* Finally check the syntax and generate its binary representation. */ - if (!grammar_fast_check(id, - (const byte *) (slang_string_cstr(&preprocessed)), - &prod, &size, 65536)) { - char buf[1024]; - GLint pos; - - slang_string_free(&preprocessed); - grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); - slang_info_log_error(infolog, buf); + result = sl_cl_compile(context, + tokens, + shader_type, + parsing_builtin, + &prod, + &size, + errmsg, + sizeof(errmsg)); + + sl_pp_context_destroy(context); + free(tokens); + + if (result) { + /*GLint pos;*/ + + slang_info_log_error(infolog, errmsg); /* syntax error (possibly in library code) */ #if 0 { @@ -2551,77 +2757,65 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, #endif return GL_FALSE; } - slang_string_free(&preprocessed); /* Syntax is okay - translate it to internal representation. */ if (!compile_binary(prod, unit, version, type, infolog, builtin, &builtin[SLANG_BUILTIN_TOTAL - 1], shader)) { - grammar_alloc_free(prod); + free(prod); return GL_FALSE; } - grammar_alloc_free(prod); + free(prod); return GL_TRUE; } -LONGSTRING static const char *slang_shader_syn = -#include "library/slang_shader_syn.h" - ; - -static const byte slang_core_gc[] = { +static const unsigned char slang_core_gc[] = { #include "library/slang_core_gc.h" }; -static const byte slang_120_core_gc[] = { +static const unsigned char slang_120_core_gc[] = { #include "library/slang_120_core_gc.h" }; -static const byte slang_120_fragment_gc[] = { +static const unsigned char slang_120_fragment_gc[] = { #include "library/slang_builtin_120_fragment_gc.h" }; -static const byte slang_common_builtin_gc[] = { +static const unsigned char slang_common_builtin_gc[] = { #include "library/slang_common_builtin_gc.h" }; -static const byte slang_fragment_builtin_gc[] = { +static const unsigned char slang_fragment_builtin_gc[] = { #include "library/slang_fragment_builtin_gc.h" }; -static const byte slang_vertex_builtin_gc[] = { +static const unsigned char slang_vertex_builtin_gc[] = { #include "library/slang_vertex_builtin_gc.h" }; static GLboolean -compile_object(grammar * id, const char *source, slang_code_object * object, - slang_unit_type type, slang_info_log * infolog, +compile_object(const char *source, + slang_code_object *object, + slang_unit_type type, + slang_info_log *infolog, struct gl_shader *shader, const struct gl_extensions *extensions, struct gl_sl_pragmas *pragmas) { slang_code_unit *builtins = NULL; GLuint base_version = 110; - - /* load GLSL grammar */ - *id = grammar_load_from_text((const byte *) (slang_shader_syn)); - if (*id == 0) { - byte buf[1024]; - int pos; - - grammar_get_last_error(buf, 1024, &pos); - slang_info_log_error(infolog, (const char *) (buf)); - return GL_FALSE; - } + unsigned int shader_type; + unsigned int parsing_builtin; /* set shader type - the syntax is slightly different for different shaders */ - if (type == SLANG_UNIT_FRAGMENT_SHADER - || type == SLANG_UNIT_FRAGMENT_BUILTIN) - grammar_set_reg8(*id, (const byte *) "shader_type", 1); - else - grammar_set_reg8(*id, (const byte *) "shader_type", 2); + if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_FRAGMENT_BUILTIN) { + shader_type = 1; + } else { + shader_type = 2; + } /* enable language extensions */ - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); + parsing_builtin = 1; /* if parsing user-specified shader, load built-in library */ if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_VERTEX_SHADER) { @@ -2687,16 +2881,24 @@ compile_object(grammar * id, const char *source, slang_code_object * object, /* disable language extensions */ #if NEW_SLANG /* allow-built-ins */ - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); + parsing_builtin = 1; #else - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 0); + parsing_builtin = 0; #endif builtins = object->builtin; } /* compile the actual shader - pass-in built-in library for external shader */ - return compile_with_grammar(*id, source, &object->unit, type, infolog, - builtins, shader, extensions, pragmas); + return compile_with_grammar(source, + &object->unit, + type, + infolog, + builtins, + shader, + extensions, + pragmas, + shader_type, + parsing_builtin); } @@ -2705,9 +2907,6 @@ compile_shader(GLcontext *ctx, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, struct gl_shader *shader) { - GLboolean success; - grammar id = 0; - #if 0 /* for debug */ _mesa_printf("********* COMPILE SHADER ***********\n"); _mesa_printf("%s\n", shader->Source); @@ -2719,14 +2918,13 @@ compile_shader(GLcontext *ctx, slang_code_object * object, _slang_code_object_dtr(object); _slang_code_object_ctr(object); - success = compile_object(&id, shader->Source, object, type, infolog, shader, - &ctx->Extensions, &shader->Pragmas); - if (id != 0) - grammar_destroy(id); - if (!success) - return GL_FALSE; - - return GL_TRUE; + return compile_object(shader->Source, + object, + type, + infolog, + shader, + &ctx->Extensions, + &shader->Pragmas); } diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c deleted file mode 100644 index e9a24cc009a..00000000000 --- a/src/mesa/shader/slang/slang_preprocess.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_preprocess.c - * slang preprocessor - * \author Michal Krol - */ - -#include "main/imports.h" -#include "shader/grammar/grammar_mesa.h" -#include "slang_preprocess.h" - -LONGSTRING static const char *slang_pp_directives_syn = -#include "library/slang_pp_directives_syn.h" -; - -LONGSTRING static const char *slang_pp_expression_syn = -#include "library/slang_pp_expression_syn.h" -; - -LONGSTRING static const char *slang_pp_version_syn = -#include "library/slang_pp_version_syn.h" -; - -static GLvoid -grammar_error_to_log (slang_info_log *log) -{ - char buf[1024]; - GLint pos; - - grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos); - if (buf[0] == 0) { - _mesa_snprintf(buf, sizeof(buf), "Preprocessor error"); - } - slang_info_log_error (log, buf); -} - -GLboolean -_slang_preprocess_version (const char *text, GLuint *version, GLuint *eaten, slang_info_log *log) -{ - grammar id; - byte *prod, *I; - unsigned int size; - - id = grammar_load_from_text ((const byte *) (slang_pp_version_syn)); - if (id == 0) { - grammar_error_to_log (log); - return GL_FALSE; - } - - if (!grammar_fast_check (id, (const byte *) (text), &prod, &size, 8)) { - grammar_error_to_log (log); - grammar_destroy (id); - return GL_FALSE; - } - - /* there can be multiple #version directives - grab the last one */ - I = &prod[size - 6]; - *version = (GLuint) (I[0]) + (GLuint) (I[1]) * 100; - *eaten = (GLuint) (I[2]) + ((GLuint) (I[3]) << 8) + ((GLuint) (I[4]) << 16) + ((GLuint) (I[5]) << 24); - - grammar_destroy (id); - grammar_alloc_free (prod); - return GL_TRUE; -} - -/* - * The preprocessor does the following work. - * 1. Remove comments. Each comment block is replaced with a single space and if the - * block contains new-lines, they are preserved. This ensures that line numbers - * stay the same and if a comment block delimits two tokens, the are delitmited - * by the space after comment removal. - * 2. Remove preprocessor directives from the source string, checking their syntax and - * executing them if appropriate. Again, new-lines are preserved. - * 3. Expand macros. - * 4. Tokenize the source string by ensuring there is at least one space between every - * two adjacent tokens. - */ - -#define PP_ANNOTATE 0 - -static GLvoid -pp_annotate (slang_string *output, const char *fmt, ...) -{ -#if PP_ANNOTATE - va_list va; - char buffer[1024]; - - va_start (va, fmt); - _mesa_vsprintf (buffer, fmt, va); - va_end (va); - slang_string_pushs (output, buffer, _mesa_strlen (buffer)); -#else - (GLvoid) (output); - (GLvoid) (fmt); -#endif -} - - /* - * The expression is executed on a fixed-sized stack. The PUSH macro makes a runtime - * check if the stack is not overflown by too complex expressions. In that situation the - * GLSL preprocessor should report internal compiler error. - * The BINARYDIV makes a runtime check if the divider is not 0. If it is, it reports - * compilation error. - */ - -#define EXECUTION_STACK_SIZE 1024 - -#define PUSH(x)\ - do {\ - if (sp == 0) {\ - slang_info_log_error (elog, "internal compiler error: preprocessor execution stack overflow.");\ - return GL_FALSE;\ - }\ - stack[--sp] = x;\ - } while (GL_FALSE) - -#define POP(x)\ - do {\ - assert (sp < EXECUTION_STACK_SIZE);\ - x = stack[sp++];\ - } while (GL_FALSE) - -#define BINARY(op)\ - do {\ - GLint a, b;\ - POP(b);\ - POP(a);\ - PUSH(a op b);\ - } while (GL_FALSE) - -#define BINARYDIV(op)\ - do {\ - GLint a, b;\ - POP(b);\ - POP(a);\ - if (b == 0) {\ - slang_info_log_error (elog, "division by zero in preprocessor expression.");\ - return GL_FALSE;\ - }\ - PUSH(a op b);\ - } while (GL_FALSE) - -#define UNARY(op)\ - do {\ - GLint a;\ - POP(a);\ - PUSH(op a);\ - } while (GL_FALSE) - -#define OP_END 0 -#define OP_PUSHINT 1 -#define OP_LOGICALOR 2 -#define OP_LOGICALAND 3 -#define OP_OR 4 -#define OP_XOR 5 -#define OP_AND 6 -#define OP_EQUAL 7 -#define OP_NOTEQUAL 8 -#define OP_LESSEQUAL 9 -#define OP_GREATEREQUAL 10 -#define OP_LESS 11 -#define OP_GREATER 12 -#define OP_LEFTSHIFT 13 -#define OP_RIGHTSHIFT 14 -#define OP_ADD 15 -#define OP_SUBTRACT 16 -#define OP_MULTIPLY 17 -#define OP_DIVIDE 18 -#define OP_MODULUS 19 -#define OP_PLUS 20 -#define OP_MINUS 21 -#define OP_NEGATE 22 -#define OP_COMPLEMENT 23 - -static GLboolean -execute_expression (slang_string *output, const byte *code, GLuint *pi, GLint *result, - slang_info_log *elog) -{ - GLuint i = *pi; - GLint stack[EXECUTION_STACK_SIZE]; - GLuint sp = EXECUTION_STACK_SIZE; - - while (code[i] != OP_END) { - switch (code[i++]) { - case OP_PUSHINT: - i++; - PUSH(_mesa_atoi ((const char *) (&code[i]))); - i += _mesa_strlen ((const char *) (&code[i])) + 1; - break; - case OP_LOGICALOR: - BINARY(||); - break; - case OP_LOGICALAND: - BINARY(&&); - break; - case OP_OR: - BINARY(|); - break; - case OP_XOR: - BINARY(^); - break; - case OP_AND: - BINARY(&); - break; - case OP_EQUAL: - BINARY(==); - break; - case OP_NOTEQUAL: - BINARY(!=); - break; - case OP_LESSEQUAL: - BINARY(<=); - break; - case OP_GREATEREQUAL: - BINARY(>=); - break; - case OP_LESS: - BINARY(<); - break; - case OP_GREATER: - BINARY(>); - break; - case OP_LEFTSHIFT: - BINARY(<<); - break; - case OP_RIGHTSHIFT: - BINARY(>>); - break; - case OP_ADD: - BINARY(+); - break; - case OP_SUBTRACT: - BINARY(-); - break; - case OP_MULTIPLY: - BINARY(*); - break; - case OP_DIVIDE: - BINARYDIV(/); - break; - case OP_MODULUS: - BINARYDIV(%); - break; - case OP_PLUS: - UNARY(+); - break; - case OP_MINUS: - UNARY(-); - break; - case OP_NEGATE: - UNARY(!); - break; - case OP_COMPLEMENT: - UNARY(~); - break; - default: - assert (0); - } - } - - /* Write-back the index skipping the OP_END. */ - *pi = i + 1; - - /* There should be exactly one value left on the stack. This is our result. */ - POP(*result); - pp_annotate (output, "%d ", *result); - assert (sp == EXECUTION_STACK_SIZE); - return GL_TRUE; -} - -/* - * Function execute_expressions() executes up to 2 expressions. The second expression is there - * for the #line directive which takes 1 or 2 expressions that indicate line and file numbers. - * If it fails, it returns 0. If it succeeds, it returns the number of executed expressions. - */ - -#define EXP_END 0 -#define EXP_EXPRESSION 1 - -static GLuint -execute_expressions (slang_string *output, grammar eid, const byte *expr, GLint results[2], - slang_info_log *elog) -{ - GLint success; - byte *code; - GLuint size, count = 0; - - success = grammar_fast_check (eid, expr, &code, &size, 64); - if (success) { - GLuint i = 0; - - while (code[i++] == EXP_EXPRESSION) { - assert (count < 2); - - if (!execute_expression (output, code, &i, &results[count], elog)) { - count = 0; - break; - } - count++; - } - grammar_alloc_free (code); - } - else { - slang_info_log_error (elog, "syntax error in preprocessor expression.");\ - } - return count; -} - -/* - * The pp_symbol structure is used to hold macro definitions and macro formal parameters. The - * pp_symbols strcture is a collection of pp_symbol. It is used both for storing macro formal - * parameters and all global macro definitions. Making this unification wastes some memory, - * becuse macro formal parameters don't need further lists of symbols. We lose 8 bytes per - * formal parameter here, but making this we can use the same code to substitute macro parameters - * as well as macros in the source string. - */ - -typedef struct -{ - struct pp_symbol_ *symbols; - GLuint count; -} pp_symbols; - -static GLvoid -pp_symbols_init (pp_symbols *self) -{ - self->symbols = NULL; - self->count = 0; -} - -static GLvoid -pp_symbols_free (pp_symbols *); - -typedef struct pp_symbol_ -{ - slang_string name; - slang_string replacement; - pp_symbols parameters; -} pp_symbol; - -static GLvoid -pp_symbol_init (pp_symbol *self) -{ - slang_string_init (&self->name); - slang_string_init (&self->replacement); - pp_symbols_init (&self->parameters); -} - -static GLvoid -pp_symbol_free (pp_symbol *self) -{ - slang_string_free (&self->name); - slang_string_free (&self->replacement); - pp_symbols_free (&self->parameters); -} - -static GLvoid -pp_symbol_reset (pp_symbol *self) -{ - /* Leave symbol name intact. */ - slang_string_reset (&self->replacement); - pp_symbols_free (&self->parameters); - pp_symbols_init (&self->parameters); -} - -static GLvoid -pp_symbols_free (pp_symbols *self) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - pp_symbol_free (&self->symbols[i]); - _mesa_free (self->symbols); -} - -static pp_symbol * -pp_symbols_push (pp_symbols *self) -{ - self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, self->count * sizeof (pp_symbol), - (self->count + 1) * sizeof (pp_symbol))); - if (self->symbols == NULL) - return NULL; - pp_symbol_init (&self->symbols[self->count]); - return &self->symbols[self->count++]; -} - -static GLboolean -pp_symbols_erase (pp_symbols *self, pp_symbol *symbol) -{ - assert (symbol >= self->symbols && symbol < self->symbols + self->count); - - self->count--; - pp_symbol_free (symbol); - if (symbol < self->symbols + self->count) - _mesa_memcpy (symbol, symbol + 1, sizeof (pp_symbol) * (self->symbols + self->count - symbol)); - self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, (self->count + 1) * sizeof (pp_symbol), - self->count * sizeof (pp_symbol))); - return self->symbols != NULL; -} - -static pp_symbol * -pp_symbols_find (pp_symbols *self, const char *name) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - if (_mesa_strcmp (name, slang_string_cstr (&self->symbols[i].name)) == 0) - return &self->symbols[i]; - return NULL; -} - -/* - * The condition context of a single #if/#else/#endif level. Those can be nested, so there - * is a stack of condition contexts. - * There is a special global context on the bottom of the stack. It is there to simplify - * context handling. - */ - -typedef struct -{ - GLboolean current; /* The condition value of this level. */ - GLboolean effective; /* The effective product of current condition, outer level conditions - * and position within #if-#else-#endif sections. */ - GLboolean else_allowed; /* TRUE if in #if-#else section, FALSE if in #else-#endif section - * and for global context. */ - GLboolean endif_required; /* FALSE for global context only. */ -} pp_cond_ctx; - -/* Should be enuff. */ -#define CONDITION_STACK_SIZE 64 - -typedef struct -{ - pp_cond_ctx stack[CONDITION_STACK_SIZE]; - pp_cond_ctx *top; -} pp_cond_stack; - -static GLboolean -pp_cond_stack_push (pp_cond_stack *self, slang_info_log *elog) -{ - if (self->top == self->stack) { - slang_info_log_error (elog, "internal compiler error: preprocessor condition stack overflow."); - return GL_FALSE; - } - self->top--; - return GL_TRUE; -} - -static GLvoid -pp_cond_stack_reevaluate (pp_cond_stack *self) -{ - /* There must be at least 2 conditions on the stack - one global and one being evaluated. */ - assert (self->top <= &self->stack[CONDITION_STACK_SIZE - 2]); - - self->top->effective = self->top->current && self->top[1].effective; -} - - -/** - * Extension enables through #extension directive. - * NOTE: Currently, only enable/disable state is stored. - */ -typedef struct -{ - GLboolean ARB_draw_buffers; - GLboolean ARB_texture_rectangle; -} pp_ext; - - -/** - * Disable all extensions. Called at startup and on #extension all: disable. - */ -static GLvoid -pp_ext_disable_all(pp_ext *self) -{ - _mesa_memset(self, 0, sizeof(self)); -} - - -/** - * Called during preprocessor initialization to set the initial enable/disable - * state of extensions. - */ -static GLvoid -pp_ext_init(pp_ext *self, const struct gl_extensions *extensions) -{ - pp_ext_disable_all (self); - self->ARB_draw_buffers = GL_TRUE; - if (extensions->NV_texture_rectangle) - self->ARB_texture_rectangle = GL_TRUE; -} - -/** - * Called in response to #extension directives to enable/disable - * the named extension. - */ -static GLboolean -pp_ext_set(pp_ext *self, const char *name, GLboolean enable) -{ - if (_mesa_strcmp (name, "GL_ARB_draw_buffers") == 0) - self->ARB_draw_buffers = enable; - else if (_mesa_strcmp (name, "GL_ARB_texture_rectangle") == 0) - self->ARB_texture_rectangle = enable; - else - return GL_FALSE; - return GL_TRUE; -} - - -/** - * Called in response to #pragma. For example, "#pragma debug(on)" would - * call this function as pp_pragma("debug", "on"). - * \return GL_TRUE if pragma is valid, GL_FALSE if invalid - */ -static GLboolean -pp_pragma(struct gl_sl_pragmas *pragmas, const char *pragma, const char *param) -{ -#if 0 - printf("#pragma %s %s\n", pragma, param); -#endif - if (_mesa_strcmp(pragma, "optimize") == 0) { - if (!param) - return GL_FALSE; /* missing required param */ - if (_mesa_strcmp(param, "on") == 0) { - if (!pragmas->IgnoreOptimize) - pragmas->Optimize = GL_TRUE; - } - else if (_mesa_strcmp(param, "off") == 0) { - if (!pragmas->IgnoreOptimize) - pragmas->Optimize = GL_FALSE; - } - else { - return GL_FALSE; /* invalid param */ - } - } - else if (_mesa_strcmp(pragma, "debug") == 0) { - if (!param) - return GL_FALSE; /* missing required param */ - if (_mesa_strcmp(param, "on") == 0) { - if (!pragmas->IgnoreDebug) - pragmas->Debug = GL_TRUE; - } - else if (_mesa_strcmp(param, "off") == 0) { - if (!pragmas->IgnoreDebug) - pragmas->Debug = GL_FALSE; - } - else { - return GL_FALSE; /* invalid param */ - } - } - /* all other pragmas are silently ignored */ - return GL_TRUE; -} - - -/** - * The state of preprocessor: current line, file and version number, list - * of all defined macros and the #if/#endif context. - */ -typedef struct -{ - GLint line; - GLint file; - GLint version; - pp_symbols symbols; - pp_ext ext; - slang_info_log *elog; - pp_cond_stack cond; -} pp_state; - -static GLvoid -pp_state_init (pp_state *self, slang_info_log *elog, - const struct gl_extensions *extensions) -{ - self->line = 0; - self->file = 1; -#if FEATURE_es2_glsl - self->version = 100; -#else - self->version = 110; -#endif - pp_symbols_init (&self->symbols); - pp_ext_init (&self->ext, extensions); - self->elog = elog; - - /* Initialize condition stack and create the global context. */ - self->cond.top = &self->cond.stack[CONDITION_STACK_SIZE - 1]; - self->cond.top->current = GL_TRUE; - self->cond.top->effective = GL_TRUE; - self->cond.top->else_allowed = GL_FALSE; - self->cond.top->endif_required = GL_FALSE; -} - -static GLvoid -pp_state_free (pp_state *self) -{ - pp_symbols_free (&self->symbols); -} - -#define IS_FIRST_ID_CHAR(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || (x) == '_') -#define IS_NEXT_ID_CHAR(x) (IS_FIRST_ID_CHAR(x) || ((x) >= '0' && (x) <= '9')) -#define IS_WHITE(x) ((x) == ' ' || (x) == '\n') -#define IS_NULL(x) ((x) == '\0') - -#define SKIP_WHITE(x) do { while (IS_WHITE(*(x))) (x)++; } while (GL_FALSE) - -typedef struct -{ - slang_string *output; - const char *input; - pp_state *state; -} expand_state; - -static GLboolean -expand_defined (expand_state *e, slang_string *buffer) -{ - GLboolean in_paren = GL_FALSE; - const char *id; - - /* Parse the optional opening parenthesis. */ - SKIP_WHITE(e->input); - if (*e->input == '(') { - e->input++; - in_paren = GL_TRUE; - SKIP_WHITE(e->input); - } - - /* Parse operand. */ - if (!IS_FIRST_ID_CHAR(*e->input)) { - slang_info_log_error (e->state->elog, - "preprocess error: identifier expected after operator 'defined'."); - return GL_FALSE; - } - slang_string_reset (buffer); - slang_string_pushc (buffer, *e->input++); - while (IS_NEXT_ID_CHAR(*e->input)) - slang_string_pushc (buffer, *e->input++); - id = slang_string_cstr (buffer); - - /* Check if the operand is defined. Output 1 if it is defined, output 0 if not. */ - if (pp_symbols_find (&e->state->symbols, id) == NULL) - slang_string_pushs (e->output, " 0 ", 3); - else - slang_string_pushs (e->output, " 1 ", 3); - - /* Parse the closing parentehesis if the opening one was there. */ - if (in_paren) { - SKIP_WHITE(e->input); - if (*e->input != ')') { - slang_info_log_error (e->state->elog, "preprocess error: ')' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - return GL_TRUE; -} - -static GLboolean -expand (expand_state *, pp_symbols *); - -static GLboolean -expand_symbol (expand_state *e, pp_symbol *symbol) -{ - expand_state es; - - /* If the macro has some parameters, we need to parse them. */ - if (symbol->parameters.count != 0) { - GLuint i; - - /* Parse the opening parenthesis. */ - SKIP_WHITE(e->input); - if (*e->input != '(') { - slang_info_log_error (e->state->elog, "preprocess error: '(' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - - /* Parse macro actual parameters. This can be anything, separated by a colon. - */ - for (i = 0; i < symbol->parameters.count; i++) { - GLuint nested_paren_count = 0; /* track number of nested parentheses */ - - if (*e->input == ')') { - slang_info_log_error (e->state->elog, "preprocess error: unexpected ')'."); - return GL_FALSE; - } - - /* Eat all characters up to the comma or closing parentheses. */ - pp_symbol_reset (&symbol->parameters.symbols[i]); - while (!IS_NULL(*e->input)) { - /* Exit loop only when all nested parens have been eaten. */ - if (nested_paren_count == 0 && (*e->input == ',' || *e->input == ')')) - break; - - /* Actually count nested parens here. */ - if (*e->input == '(') - nested_paren_count++; - else if (*e->input == ')') - nested_paren_count--; - - slang_string_pushc (&symbol->parameters.symbols[i].replacement, *e->input++); - } - - /* If it was not the last paremeter, skip the comma. Otherwise, skip the - * closing parentheses. */ - if (i + 1 == symbol->parameters.count) { - /* This is the last paremeter - skip the closing parentheses. */ - if (*e->input != ')') { - slang_info_log_error (e->state->elog, "preprocess error: ')' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - else { - /* Skip the separating comma. */ - if (*e->input != ',') { - slang_info_log_error (e->state->elog, "preprocess error: ',' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - } - } - - /* Expand the macro. Use its parameters as a priority symbol list to expand - * macro parameters correctly. */ - es.output = e->output; - es.input = slang_string_cstr (&symbol->replacement); - es.state = e->state; - slang_string_pushc (e->output, ' '); - if (!expand (&es, &symbol->parameters)) - return GL_FALSE; - slang_string_pushc (e->output, ' '); - return GL_TRUE; -} - -/* - * Function expand() expands source text from <input> to <output>. The expansion is made using - * the list passed in <symbols> parameter. It allows us to expand macro formal parameters with - * actual parameters. The global list of symbols from pp state is used when doing a recursive - * call of expand(). - */ - -static GLboolean -expand (expand_state *e, pp_symbols *symbols) -{ - while (!IS_NULL(*e->input)) { - if (IS_FIRST_ID_CHAR(*e->input)) { - slang_string buffer; - const char *id; - - /* Parse the identifier. */ - slang_string_init (&buffer); - slang_string_pushc (&buffer, *e->input++); - while (IS_NEXT_ID_CHAR(*e->input)) - slang_string_pushc (&buffer, *e->input++); - id = slang_string_cstr (&buffer); - - /* Now check if the identifier is special in some way. The "defined" identifier is - * actually an operator that we must handle here and expand it either to " 0 " or " 1 ". - * The other identifiers start with "__" and we expand it to appropriate values - * taken from the preprocessor state. */ - if (_mesa_strcmp (id, "defined") == 0) { - if (!expand_defined (e, &buffer)) - return GL_FALSE; - } - else if (_mesa_strcmp (id, "__LINE__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->line); - slang_string_pushc (e->output, ' '); - } - else if (_mesa_strcmp (id, "__FILE__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->file); - slang_string_pushc (e->output, ' '); - } - else if (_mesa_strcmp (id, "__VERSION__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->version); - slang_string_pushc (e->output, ' '); - } -#if FEATURE_es2_glsl - else if (_mesa_strcmp (id, "GL_ES") == 0 || - _mesa_strcmp (id, "GL_FRAGMENT_PRECISION_HIGH") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, '1'); - slang_string_pushc (e->output, ' '); - } -#endif - else { - pp_symbol *symbol; - - /* The list of symbols from <symbols> take precedence over the list from <state>. - * Note that in some cases this is the same list so avoid double look-up. */ - symbol = pp_symbols_find (symbols, id); - if (symbol == NULL && symbols != &e->state->symbols) - symbol = pp_symbols_find (&e->state->symbols, id); - - /* If the symbol was found, recursively expand its definition. */ - if (symbol != NULL) { - if (!expand_symbol (e, symbol)) { - slang_string_free (&buffer); - return GL_FALSE; - } - } - else { - slang_string_push (e->output, &buffer); - } - } - slang_string_free (&buffer); - } - else if (IS_WHITE(*e->input)) { - slang_string_pushc (e->output, *e->input++); - } - else { - while (!IS_WHITE(*e->input) && !IS_NULL(*e->input) && !IS_FIRST_ID_CHAR(*e->input)) - slang_string_pushc (e->output, *e->input++); - } - } - return GL_TRUE; -} - -static GLboolean -parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_state *state, - grammar eid) -{ - const char *text; - GLuint len; - - text = (const char *) (&prod[*pi]); - len = _mesa_strlen (text); - - if (state->cond.top->effective) { - slang_string expr; - GLuint count; - GLint results[2]; - expand_state es; - - /* Expand the expression. */ - slang_string_init (&expr); - es.output = &expr; - es.input = text; - es.state = state; - if (!expand (&es, &state->symbols)) - return GL_FALSE; - - /* Execute the expression. */ - count = execute_expressions (output, eid, (const byte *) (slang_string_cstr (&expr)), - results, state->elog); - slang_string_free (&expr); - if (count != 1) - return GL_FALSE; - *result = results[0]; - } - else { - /* The directive is dead. */ - *result = 0; - } - - *pi += len + 1; - return GL_TRUE; -} - -#define ESCAPE_TOKEN 0 - -#define TOKEN_END 0 -#define TOKEN_DEFINE 1 -#define TOKEN_UNDEF 2 -#define TOKEN_IF 3 -#define TOKEN_ELSE 4 -#define TOKEN_ELIF 5 -#define TOKEN_ENDIF 6 -#define TOKEN_ERROR 7 -#define TOKEN_PRAGMA 8 -#define TOKEN_EXTENSION 9 -#define TOKEN_LINE 10 - -#define PARAM_END 0 -#define PARAM_PARAMETER 1 - -#define BEHAVIOR_REQUIRE 1 -#define BEHAVIOR_ENABLE 2 -#define BEHAVIOR_WARN 3 -#define BEHAVIOR_DISABLE 4 - -#define PRAGMA_NO_PARAM 0 -#define PRAGMA_PARAM 1 - - -static GLboolean -preprocess_source (slang_string *output, const char *source, - grammar pid, grammar eid, - slang_info_log *elog, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) -{ - static const char *predefined[] = { - "__FILE__", - "__LINE__", - "__VERSION__", -#if FEATURE_es2_glsl - "GL_ES", - "GL_FRAGMENT_PRECISION_HIGH", -#endif - NULL - }; - byte *prod; - GLuint size, i; - pp_state state; - - if (!grammar_fast_check (pid, (const byte *) (source), &prod, &size, 65536)) { - grammar_error_to_log (elog); - return GL_FALSE; - } - - pp_state_init (&state, elog, extensions); - - /* add the predefined symbols to the symbol table */ - for (i = 0; predefined[i]; i++) { - pp_symbol *symbol = NULL; - symbol = pp_symbols_push(&state.symbols); - assert(symbol); - slang_string_pushs(&symbol->name, - predefined[i], _mesa_strlen(predefined[i])); - } - - i = 0; - while (i < size) { - if (prod[i] != ESCAPE_TOKEN) { - if (state.cond.top->effective) { - slang_string input; - expand_state es; - - /* Eat only one line of source code to expand it. - * FIXME: This approach has one drawback. If a macro with parameters spans across - * multiple lines, the preprocessor will raise an error. */ - slang_string_init (&input); - while (prod[i] != '\0' && prod[i] != '\n') - slang_string_pushc (&input, prod[i++]); - if (prod[i] != '\0') - slang_string_pushc (&input, prod[i++]); - - /* Increment line number. */ - state.line++; - - es.output = output; - es.input = slang_string_cstr (&input); - es.state = &state; - if (!expand (&es, &state.symbols)) - goto error; - - slang_string_free (&input); - } - else { - /* Condition stack is disabled - keep track on line numbers and output only newlines. */ - if (prod[i] == '\n') { - state.line++; - /*pp_annotate (output, "%c", prod[i]);*/ - } - else { - /*pp_annotate (output, "%c", prod[i]);*/ - } - i++; - } - } - else { - const char *id; - GLuint idlen; - GLubyte token; - - i++; - token = prod[i++]; - switch (token) { - - case TOKEN_END: - /* End of source string. - * Check if all #ifs have been terminated by matching #endifs. - * On condition stack there should be only the global condition context. */ - if (state.cond.top->endif_required) { - slang_info_log_error (elog, "end of source without matching #endif."); - return GL_FALSE; - } - break; - - case TOKEN_DEFINE: - { - pp_symbol *symbol = NULL; - - /* Parse macro name. */ - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - pp_annotate (output, "// #define %s(", id); - - /* If the symbol is already defined, override it. */ - symbol = pp_symbols_find (&state.symbols, id); - if (symbol == NULL) { - symbol = pp_symbols_push (&state.symbols); - if (symbol == NULL) - goto error; - slang_string_pushs (&symbol->name, id, idlen); - } - else { - pp_symbol_reset (symbol); - } - } - i += idlen + 1; - - /* Parse optional macro parameters. */ - while (prod[i++] != PARAM_END) { - pp_symbol *param; - - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - pp_annotate (output, "%s, ", id); - param = pp_symbols_push (&symbol->parameters); - if (param == NULL) - goto error; - slang_string_pushs (¶m->name, id, idlen); - } - i += idlen + 1; - } - - /* Parse macro replacement. */ - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - slang_string replacement; - expand_state es; - - pp_annotate (output, ") %s", id); - - slang_string_init(&replacement); - slang_string_pushs(&replacement, id, idlen); - - /* Expand macro replacement. */ - es.output = &symbol->replacement; - es.input = slang_string_cstr(&replacement); - es.state = &state; - if (!expand(&es, &state.symbols)) { - slang_string_free(&replacement); - goto error; - } - slang_string_free(&replacement); - } - i += idlen + 1; - } - break; - - case TOKEN_UNDEF: - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - if (state.cond.top->effective) { - pp_symbol *symbol; - - pp_annotate (output, "// #undef %s", id); - /* Try to find symbol with given name and remove it. */ - symbol = pp_symbols_find (&state.symbols, id); - if (symbol != NULL) - if (!pp_symbols_erase (&state.symbols, symbol)) - goto error; - } - break; - - case TOKEN_IF: - { - GLint result; - - /* Parse #if expression end execute it. */ - pp_annotate (output, "// #if "); - if (!parse_if (output, prod, &i, &result, &state, eid)) - goto error; - - /* Push new condition on the stack. */ - if (!pp_cond_stack_push (&state.cond, state.elog)) - goto error; - state.cond.top->current = result ? GL_TRUE : GL_FALSE; - state.cond.top->else_allowed = GL_TRUE; - state.cond.top->endif_required = GL_TRUE; - pp_cond_stack_reevaluate (&state.cond); - } - break; - - case TOKEN_ELSE: - /* Check if #else is alloved here. */ - if (!state.cond.top->else_allowed) { - slang_info_log_error (elog, "#else without matching #if."); - goto error; - } - - /* Negate current condition and reevaluate it. */ - state.cond.top->current = !state.cond.top->current; - state.cond.top->else_allowed = GL_FALSE; - pp_cond_stack_reevaluate (&state.cond); - if (state.cond.top->effective) - pp_annotate (output, "// #else"); - break; - - case TOKEN_ELIF: - /* Check if #elif is alloved here. */ - if (!state.cond.top->else_allowed) { - slang_info_log_error (elog, "#elif without matching #if."); - goto error; - } - - /* Negate current condition and reevaluate it. */ - state.cond.top->current = !state.cond.top->current; - pp_cond_stack_reevaluate (&state.cond); - - if (state.cond.top->effective) - pp_annotate (output, "// #elif "); - - { - GLint result; - - /* Parse #elif expression end execute it. */ - if (!parse_if (output, prod, &i, &result, &state, eid)) - goto error; - - /* Update current condition and reevaluate it. */ - state.cond.top->current = result ? GL_TRUE : GL_FALSE; - pp_cond_stack_reevaluate (&state.cond); - } - break; - - case TOKEN_ENDIF: - /* Check if #endif is alloved here. */ - if (!state.cond.top->endif_required) { - slang_info_log_error (elog, "#endif without matching #if."); - goto error; - } - - /* Pop the condition off the stack. */ - state.cond.top++; - if (state.cond.top->effective) - pp_annotate (output, "// #endif"); - break; - - case TOKEN_EXTENSION: - /* Parse the extension name. */ - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - if (state.cond.top->effective) - pp_annotate (output, "// #extension %s: ", id); - - /* Parse and apply extension behavior. */ - if (state.cond.top->effective) { - switch (prod[i++]) { - - case BEHAVIOR_REQUIRE: - pp_annotate (output, "require"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") == 0) { - slang_info_log_error (elog, "require: bad behavior for #extension all."); - goto error; - } - else { - slang_info_log_error (elog, "%s: required extension is not supported.", id); - goto error; - } - } - break; - - case BEHAVIOR_ENABLE: - pp_annotate (output, "enable"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") == 0) { - slang_info_log_error (elog, "enable: bad behavior for #extension all."); - goto error; - } - else { - slang_info_log_warning (elog, "%s: enabled extension is not supported.", id); - } - } - break; - - case BEHAVIOR_WARN: - pp_annotate (output, "warn"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") != 0) { - slang_info_log_warning (elog, "%s: enabled extension is not supported.", id); - } - } - break; - - case BEHAVIOR_DISABLE: - pp_annotate (output, "disable"); - if (!pp_ext_set (&state.ext, id, GL_FALSE)) { - if (_mesa_strcmp (id, "all") == 0) { - pp_ext_disable_all (&state.ext); - } - else { - slang_info_log_warning (elog, "%s: disabled extension is not supported.", id); - } - } - break; - - default: - assert (0); - } - } - break; - - case TOKEN_PRAGMA: - { - GLint have_param; - const char *pragma, *param; - - pragma = (const char *) (&prod[i]); - i += _mesa_strlen(pragma) + 1; - have_param = (prod[i++] == PRAGMA_PARAM); - if (have_param) { - param = (const char *) (&prod[i]); - i += _mesa_strlen(param) + 1; - } - else { - param = NULL; - } - pp_pragma(pragmas, pragma, param); - } - break; - - case TOKEN_LINE: - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - - if (state.cond.top->effective) { - slang_string buffer; - GLuint count; - GLint results[2]; - expand_state es; - - slang_string_init (&buffer); - state.line++; - es.output = &buffer; - es.input = id; - es.state = &state; - if (!expand (&es, &state.symbols)) - goto error; - - pp_annotate (output, "// #line "); - count = execute_expressions (output, eid, - (const byte *) (slang_string_cstr (&buffer)), - results, state.elog); - slang_string_free (&buffer); - if (count == 0) - goto error; - - state.line = results[0] - 1; - if (count == 2) - state.file = results[1]; - } - break; - } - } - } - - /* Check for missing #endifs. */ - if (state.cond.top->endif_required) { - slang_info_log_error (elog, "#endif expected but end of source found."); - goto error; - } - - grammar_alloc_free(prod); - pp_state_free (&state); - return GL_TRUE; - -error: - grammar_alloc_free(prod); - pp_state_free (&state); - return GL_FALSE; -} - - -/** - * Remove the continuation characters from the input string. - * This is the very first step in preprocessing and is effective - * even inside comment blocks. - * If there is a whitespace between a backslash and a newline, - * this is not considered as a line continuation. - * \return GL_TRUE for success, GL_FALSE otherwise. - */ -static GLboolean -_slang_preprocess_backslashes(slang_string *output, - const char *input) -{ - while (*input) { - if (input[0] == '\\') { - /* If a newline follows, eat the backslash and the newline. */ - if (input[1] == '\r') { - if (input[2] == '\n') { - input += 3; - } else { - input += 2; - } - } else if (input[1] == '\n') { - if (input[2] == '\r') { - input += 3; - } else { - input += 2; - } - } else { - /* Leave the backslash alone. */ - slang_string_pushc(output, *input++); - } - } else { - slang_string_pushc(output, *input++); - } - } - return GL_TRUE; -} - - -/** - * Run preprocessor on source code. - * \param extensions indicates which GL extensions are enabled - * \param output the post-process results - * \param input the input text - * \param elog log to record warnings, errors - * \param extensions out extension settings - * \param pragmas in/out #pragma settings - * \return GL_TRUE for success, GL_FALSE for error - */ -GLboolean -_slang_preprocess_directives(slang_string *output, - const char *input, - slang_info_log *elog, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) -{ - grammar pid, eid; - GLboolean success; - slang_string without_backslashes; - - pid = grammar_load_from_text ((const byte *) (slang_pp_directives_syn)); - if (pid == 0) { - grammar_error_to_log (elog); - return GL_FALSE; - } - eid = grammar_load_from_text ((const byte *) (slang_pp_expression_syn)); - if (eid == 0) { - grammar_error_to_log (elog); - grammar_destroy (pid); - return GL_FALSE; - } - - slang_string_init(&without_backslashes); - success = _slang_preprocess_backslashes(&without_backslashes, input); - - if (0) { - _mesa_printf("Pre-processed shader:\n"); - _mesa_printf("%s", slang_string_cstr(&without_backslashes)); - _mesa_printf("----------------------\n"); - } - - if (success) { - success = preprocess_source(output, - slang_string_cstr(&without_backslashes), - pid, - eid, - elog, - extensions, - pragmas); - } - - slang_string_free(&without_backslashes); - grammar_destroy (eid); - grammar_destroy (pid); - - if (0) { - _mesa_printf("Post-processed shader:\n"); - _mesa_printf("%s", slang_string_cstr(output)); - _mesa_printf("----------------------\n"); - } - - return success; -} - diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h deleted file mode 100644 index f344820daef..00000000000 --- a/src/mesa/shader/slang/slang_preprocess.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_PREPROCESS_H -#define SLANG_PREPROCESS_H - -#include "slang_compile.h" -#include "slang_log.h" - - -extern GLboolean -_slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *); - -extern GLboolean -_slang_preprocess_directives(slang_string *output, const char *input, - slang_info_log *, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas); - -#endif /* SLANG_PREPROCESS_H */ diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak index a0d7dbbace9..a7a3b9a7f97 100644 --- a/src/mesa/sources.mak +++ b/src/mesa/sources.mak @@ -218,7 +218,6 @@ SHADER_SOURCES = \ shader/arbprogparse.c \ shader/arbprogram.c \ shader/atifragshader.c \ - shader/grammar/grammar_mesa.c \ shader/hash_table.c \ shader/lex.yy.c \ shader/nvfragparse.c \ @@ -255,7 +254,6 @@ SLANG_SOURCES = \ shader/slang/slang_link.c \ shader/slang/slang_log.c \ shader/slang/slang_mem.c \ - shader/slang/slang_preprocess.c \ shader/slang/slang_print.c \ shader/slang/slang_simplify.c \ shader/slang/slang_storage.c \ @@ -365,6 +363,12 @@ GLAPI_OBJECTS = \ COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o) +### Other archives/libraries + +GLSL_LIBS = \ + $(TOP)/src/glsl/pp/libglslpp.a \ + $(TOP)/src/glsl/cl/libglslcl.a + ### Include directories |