Merge branch 'master' into glsl-pp-rework-2
authorMichal Krol <michal@vmware.com>
Sat, 12 Dec 2009 15:48:32 +0000 (16:48 +0100)
committerMichal Krol <michal@vmware.com>
Sat, 12 Dec 2009 15:48:32 +0000 (16:48 +0100)
Conflicts:
progs/perf/drawoverhead.c
progs/perf/teximage.c
progs/perf/vbo.c
progs/perf/vertexrate.c
src/mesa/shader/slang/library/slang_common_builtin_gc.h

69 files changed:
Makefile
SConstruct
configs/default
src/SConscript
src/gallium/winsys/gdi/SConscript
src/glsl/Makefile [new file with mode: 0644]
src/glsl/Makefile.template [new file with mode: 0644]
src/glsl/SConscript [new file with mode: 0644]
src/glsl/apps/Makefile [new file with mode: 0644]
src/glsl/apps/compile.c [new file with mode: 0644]
src/glsl/apps/process.c [new file with mode: 0644]
src/glsl/apps/purify.c [new file with mode: 0644]
src/glsl/apps/tokenise.c [new file with mode: 0644]
src/glsl/apps/version.c [new file with mode: 0644]
src/glsl/cl/Makefile [new file with mode: 0644]
src/glsl/cl/sl_cl_parse.c [new file with mode: 0644]
src/glsl/cl/sl_cl_parse.h [new file with mode: 0644]
src/glsl/pp/Makefile [new file with mode: 0644]
src/glsl/pp/sl_pp_context.c [new file with mode: 0644]
src/glsl/pp/sl_pp_context.h [new file with mode: 0644]
src/glsl/pp/sl_pp_define.c [new file with mode: 0644]
src/glsl/pp/sl_pp_dict.c [new file with mode: 0644]
src/glsl/pp/sl_pp_dict.h [new file with mode: 0644]
src/glsl/pp/sl_pp_error.c [new file with mode: 0644]
src/glsl/pp/sl_pp_expression.c [new file with mode: 0644]
src/glsl/pp/sl_pp_expression.h [new file with mode: 0644]
src/glsl/pp/sl_pp_extension.c [new file with mode: 0644]
src/glsl/pp/sl_pp_if.c [new file with mode: 0644]
src/glsl/pp/sl_pp_line.c [new file with mode: 0644]
src/glsl/pp/sl_pp_macro.c [new file with mode: 0644]
src/glsl/pp/sl_pp_macro.h [new file with mode: 0644]
src/glsl/pp/sl_pp_pragma.c [new file with mode: 0644]
src/glsl/pp/sl_pp_process.c [new file with mode: 0644]
src/glsl/pp/sl_pp_process.h [new file with mode: 0644]
src/glsl/pp/sl_pp_public.h [new file with mode: 0644]
src/glsl/pp/sl_pp_purify.c [new file with mode: 0644]
src/glsl/pp/sl_pp_purify.h [new file with mode: 0644]
src/glsl/pp/sl_pp_token.c [new file with mode: 0644]
src/glsl/pp/sl_pp_token.h [new file with mode: 0644]
src/glsl/pp/sl_pp_version.c [new file with mode: 0644]
src/mesa/Makefile
src/mesa/SConscript
src/mesa/shader/grammar/grammar.c
src/mesa/shader/grammar/grammar.h
src/mesa/shader/grammar/grammar_mesa.h
src/mesa/shader/slang/descrip.mms
src/mesa/shader/slang/library/Makefile
src/mesa/shader/slang/library/SConscript [new file with mode: 0644]
src/mesa/shader/slang/library/gc_to_bin.c [deleted file]
src/mesa/shader/slang/library/slang_120_core_gc.h [deleted file]
src/mesa/shader/slang/library/slang_builtin_120_common_gc.h [deleted file]
src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h [deleted file]
src/mesa/shader/slang/library/slang_core_gc.h [deleted file]
src/mesa/shader/slang/library/slang_fragment_builtin_gc.h [deleted file]
src/mesa/shader/slang/library/slang_pp_directives.syn [deleted file]
src/mesa/shader/slang/library/slang_pp_directives_syn.h [deleted file]
src/mesa/shader/slang/library/slang_pp_expression.syn [deleted file]
src/mesa/shader/slang/library/slang_pp_expression_syn.h [deleted file]
src/mesa/shader/slang/library/slang_pp_version.syn [deleted file]
src/mesa/shader/slang/library/slang_pp_version_syn.h [deleted file]
src/mesa/shader/slang/library/slang_shader.syn [deleted file]
src/mesa/shader/slang/library/slang_shader_syn.h [deleted file]
src/mesa/shader/slang/library/slang_version.syn [deleted file]
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h [deleted file]
src/mesa/shader/slang/library/syn_to_c.c [deleted file]
src/mesa/shader/slang/slang_compile.c
src/mesa/shader/slang/slang_preprocess.c [deleted file]
src/mesa/shader/slang/slang_preprocess.h [deleted file]
src/mesa/sources.mak

index fbe9890686167cda5b591b576e6d98f94e888d6d..b63d75a2fce1212354d655ed981b052c603d1e82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -225,6 +225,10 @@ MAIN_FILES = \
        $(DIRECTORY)/include/GL/vms_x_fix.h                             \
        $(DIRECTORY)/include/GL/wglext.h                                \
        $(DIRECTORY)/include/GL/wmesa.h                                 \
+       $(DIRECTORY)/src/glsl/Makefile                                  \
+       $(DIRECTORY)/src/glsl/*/Makefile                                \
+       $(DIRECTORY)/src/glsl/*/SConscript                              \
+       $(DIRECTORY)/src/glsl/*/*.[ch]                                  \
        $(DIRECTORY)/src/Makefile                                       \
        $(DIRECTORY)/src/mesa/Makefile*                                 \
        $(DIRECTORY)/src/mesa/sources.mak                               \
index f43c10cecb3fef5eb98aff5029f5c66a4164ee36..122b8cf916fa9a68cb33dc9c7f79b7d4047440cc 100644 (file)
@@ -160,6 +160,25 @@ Export('env')
 # TODO: Build several variants at the same time?
 # http://www.scons.org/wiki/SimultaneousVariantBuilds
 
+if env['platform'] != common.default_platform:
+    # GLSL code has to be built twice -- one for the host OS, another for the target OS...
+
+    host_env = Environment(
+        # options are ignored
+        # default tool is used
+        toolpath = ['#scons'], 
+        ENV = os.environ,
+    )
+
+    host_env['platform'] = common.default_platform
+
+    SConscript(
+        'src/glsl/SConscript',
+        variant_dir = env['build'] + '/host',
+        duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+        exports={'env':host_env},
+    )
+
 SConscript(
        'src/SConscript',
        variant_dir = env['build'],
index 15f9285dbf69bb3b7a60c66e538417ba3d4d20cd..eb6123d1e0aeffe1f713e6491751780df6cecbf3 100644 (file)
@@ -83,7 +83,7 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
 
 # Directories to build
 LIB_DIR = lib
-SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
+SRC_DIRS = glsl mesa gallium egl gallium/winsys glu glut/glx glew glw
 GLU_DIRS = sgi
 DRIVER_DIRS = x11 osmesa
 # Which subdirs under $(TOP)/progs/ to enter:
index 5440acd1351f57de3064b6890346f456d2fcf49f..6083fcbec98cc903930696e7a5572eedf0067f19 100644 (file)
@@ -1,5 +1,6 @@
 Import('*')
 
+SConscript('glsl/SConscript')
 SConscript('gallium/SConscript')
 
 if 'mesa' in env['statetrackers']:
index 8f556daf04a79d149187c176f55095a978e3313f..74f6b2fd4751590c34ab53b578c0bc904843f149 100644 (file)
@@ -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 (file)
index 0000000..ca7f2d2
--- /dev/null
@@ -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 (file)
index 0000000..974987a
--- /dev/null
@@ -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 (file)
index 0000000..6f1f81b
--- /dev/null
@@ -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 (file)
index 0000000..c80fcb9
--- /dev/null
@@ -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 (file)
index 0000000..b116542
--- /dev/null
@@ -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 (file)
index 0000000..d7bc165
--- /dev/null
@@ -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 (file)
index 0000000..8c01f4f
--- /dev/null
@@ -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 (file)
index 0000000..91368c3
--- /dev/null
@@ -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 (file)
index 0000000..6f77f23
--- /dev/null
@@ -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 (file)
index 0000000..04a52df
--- /dev/null
@@ -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 (file)
index 0000000..a9db65c
--- /dev/null
@@ -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 (file)
index 0000000..23a0d5f
--- /dev/null
@@ -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 (file)
index 0000000..819079f
--- /dev/null
@@ -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 (file)
index 0000000..afc1b84
--- /dev/null
@@ -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 (file)
index 0000000..d95d29e
--- /dev/null
@@ -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 (file)
index 0000000..e004c9f
--- /dev/null
@@ -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 = &macro->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 = &macro->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 (file)
index 0000000..062139e
--- /dev/null
@@ -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 (file)
index 0000000..875217b
--- /dev/null
@@ -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 (file)
index 0000000..a9eeff9
--- /dev/null
@@ -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 (file)
index 0000000..ec90478
--- /dev/null
@@ -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 (file)
index 0000000..377d5b4
--- /dev/null
@@ -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 (file)
index 0000000..67b2440
--- /dev/null
@@ -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 (file)
index 0000000..6610bc6
--- /dev/null
@@ -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 (file)
index 0000000..ed5acc6
--- /dev/null
@@ -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 (file)
index 0000000..08b44c7
--- /dev/null
@@ -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, &macro->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, &macro->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 (file)
index 0000000..3ad3438
--- /dev/null
@@ -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 (file)
index 0000000..489eb17
--- /dev/null
@@ -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 (file)
index 0000000..e2adc2a
--- /dev/null
@@ -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 (file)
index 0000000..24311ba
--- /dev/null
@@ -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 (file)
index 0000000..0769036
--- /dev/null
@@ -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 (file)
index 0000000..b50f819
--- /dev/null
@@ -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 (file)
index 0000000..c0f55cb
--- /dev/null
@@ -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 (file)
index 0000000..e9a60b6
--- /dev/null
@@ -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, &current_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 (file)
index 0000000..ba9834a
--- /dev/null
@@ -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 (file)
index 0000000..db06523
--- /dev/null
@@ -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. */
+}
index 6f58ad61617de2f6afcf152f4375af28d53d195f..a815f46b4a1551514d0f57460522b4b19142539d 100644 (file)
@@ -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)
@@ -59,6 +58,12 @@ asm_subdirs:
        fi
 
 
+######################################################################
+# GLSL built-in library
+glsl_builtin:
+       (cd shader/slang/library && $(MAKE)) || exit 1 ;
+
+
 ######################################################################
 # Dependency generation
 
@@ -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
index ca4a9afce5cdee581de2920e8995fcc9f560e33d..1f16a01e1a950a85a42ec901cb09c5acb288a8db 100644 (file)
@@ -227,7 +227,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 +337,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
        # 
index a9775961d3a6577654cc072c8f3e423847e578e6..b83920a089b9d03e32c6f184be5d10d754f07caa 100644 (file)
@@ -566,7 +566,7 @@ static void emit_destroy (emit **em)
     }
 }
 
-static unsigned int emit_size (emit *_E)
+static unsigned int emit_size (emit *_E, const char *str)
 {
     unsigned int n = 0;
 
@@ -576,7 +576,9 @@ static unsigned int emit_size (emit *_E)
         {
             if (_E->m_emit_type == et_position)
                 n += 4;     /* position is a 32-bit unsigned integer */
-            else
+            else if (_E->m_emit_type == et_stream) {
+               n += strlen(str) + 1;
+            } else
                 n++;
         }
         _E = _E->m_next;
@@ -585,7 +587,7 @@ static unsigned int emit_size (emit *_E)
     return n;
 }
 
-static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx **_Ctx)
+static int emit_push (emit *_E, byte *_P, const char *str, unsigned int _Pos, regbyte_ctx **_Ctx)
 {
     while (_E != NULL)
     {
@@ -593,9 +595,10 @@ static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx
         {
             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 */
+            else if (_E->m_emit_type == et_stream) {
+                strcpy(_P, str);
+                _P += strlen(str) + 1;
+            } else /* _Em->type == et_position */
             {
                 *_P++ = (byte) (_Pos);
                 *_P++ = (byte) (_Pos >> 8);
@@ -617,7 +620,7 @@ static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx
             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;
+                new_rbc->m_current_value = str[0];
         }
 
         _E = _E->m_next;
@@ -727,6 +730,7 @@ typedef enum spec_type_
 {
     st_false,
     st_true,
+    st_token,
     st_byte,
     st_byte_range,
     st_string,
@@ -741,6 +745,7 @@ typedef enum spec_type_
 typedef struct spec_
 {
     spec_type m_spec_type;
+    enum sl_pp_token m_token;       /* st_token */
     byte m_byte[2];                 /* st_byte, st_byte_range */
     byte *m_string;                 /* st_string */
     struct rule_ *m_rule;           /* st_identifier, st_identifier_loop */
@@ -979,12 +984,12 @@ static int barray_append (barray **ba, barray **nb)
 */
 static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte_ctx **rbc)
 {
-    unsigned int count = emit_size (em);
+   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);
+   return emit_push (em, (**ba).data + ((**ba).len - count), " ", pos, rbc);
 }
 
 /*
@@ -1967,7 +1972,114 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
         }
         eat_spaces (&t);
 
-        s->m_spec_type = st_string;
+      /* Try to convert string to a token. */
+      if (s->m_string[0] == '@') {
+         s->m_spec_type = st_token;
+         if (!strcmp(s->m_string, "@,")) {
+            s->m_token = SL_PP_COMMA;
+         } else if (!strcmp(s->m_string, "@;")) {
+            s->m_token = SL_PP_SEMICOLON;
+         } else if (!strcmp(s->m_string, "@{")) {
+            s->m_token = SL_PP_LBRACE;
+         } else if (!strcmp(s->m_string, "@}")) {
+            s->m_token = SL_PP_RBRACE;
+         } else if (!strcmp(s->m_string, "@(")) {
+            s->m_token = SL_PP_LPAREN;
+         } else if (!strcmp(s->m_string, "@)")) {
+            s->m_token = SL_PP_RPAREN;
+         } else if (!strcmp(s->m_string, "@[")) {
+            s->m_token = SL_PP_LBRACKET;
+         } else if (!strcmp(s->m_string, "@]")) {
+            s->m_token = SL_PP_RBRACKET;
+         } else if (!strcmp(s->m_string, "@.")) {
+            s->m_token = SL_PP_DOT;
+         } else if (!strcmp(s->m_string, "@++")) {
+            s->m_token = SL_PP_INCREMENT;
+         } else if (!strcmp(s->m_string, "@+=")) {
+            s->m_token = SL_PP_ADDASSIGN;
+         } else if (!strcmp(s->m_string, "@+")) {
+            s->m_token = SL_PP_PLUS;
+         } else if (!strcmp(s->m_string, "@--")) {
+            s->m_token = SL_PP_DECREMENT;
+         } else if (!strcmp(s->m_string, "@-=")) {
+            s->m_token = SL_PP_SUBASSIGN;
+         } else if (!strcmp(s->m_string, "@-")) {
+            s->m_token = SL_PP_MINUS;
+         } else if (!strcmp(s->m_string, "@~")) {
+            s->m_token = SL_PP_BITNOT;
+         } else if (!strcmp(s->m_string, "@!=")) {
+            s->m_token = SL_PP_NOTEQUAL;
+         } else if (!strcmp(s->m_string, "@!")) {
+            s->m_token = SL_PP_NOT;
+         } else if (!strcmp(s->m_string, "@*=")) {
+            s->m_token = SL_PP_MULASSIGN;
+         } else if (!strcmp(s->m_string, "@*")) {
+            s->m_token = SL_PP_STAR;
+         } else if (!strcmp(s->m_string, "@/=")) {
+            s->m_token = SL_PP_DIVASSIGN;
+         } else if (!strcmp(s->m_string, "@/")) {
+            s->m_token = SL_PP_SLASH;
+         } else if (!strcmp(s->m_string, "@%=")) {
+            s->m_token = SL_PP_MODASSIGN;
+         } else if (!strcmp(s->m_string, "@%")) {
+            s->m_token = SL_PP_MODULO;
+         } else if (!strcmp(s->m_string, "@<<=")) {
+            s->m_token = SL_PP_LSHIFTASSIGN;
+         } else if (!strcmp(s->m_string, "@<<")) {
+            s->m_token = SL_PP_LSHIFT;
+         } else if (!strcmp(s->m_string, "@<=")) {
+            s->m_token = SL_PP_LESSEQUAL;
+         } else if (!strcmp(s->m_string, "@<")) {
+            s->m_token = SL_PP_LESS;
+         } else if (!strcmp(s->m_string, "@>>=")) {
+            s->m_token = SL_PP_RSHIFTASSIGN;
+         } else if (!strcmp(s->m_string, "@>>")) {
+            s->m_token = SL_PP_RSHIFT;
+         } else if (!strcmp(s->m_string, "@>=")) {
+            s->m_token = SL_PP_GREATEREQUAL;
+         } else if (!strcmp(s->m_string, "@>")) {
+            s->m_token = SL_PP_GREATER;
+         } else if (!strcmp(s->m_string, "@==")) {
+            s->m_token = SL_PP_EQUAL;
+         } else if (!strcmp(s->m_string, "@=")) {
+            s->m_token = SL_PP_ASSIGN;
+         } else if (!strcmp(s->m_string, "@&&")) {
+            s->m_token = SL_PP_AND;
+         } else if (!strcmp(s->m_string, "@&=")) {
+            s->m_token = SL_PP_BITANDASSIGN;
+         } else if (!strcmp(s->m_string, "@&")) {
+            s->m_token = SL_PP_BITAND;
+         } else if (!strcmp(s->m_string, "@^^")) {
+            s->m_token = SL_PP_XOR;
+         } else if (!strcmp(s->m_string, "@^=")) {
+            s->m_token = SL_PP_BITXORASSIGN;
+         } else if (!strcmp(s->m_string, "@^")) {
+            s->m_token = SL_PP_BITXOR;
+         } else if (!strcmp(s->m_string, "@||")) {
+            s->m_token = SL_PP_OR;
+         } else if (!strcmp(s->m_string, "@|=")) {
+            s->m_token = SL_PP_BITORASSIGN;
+         } else if (!strcmp(s->m_string, "@|")) {
+            s->m_token = SL_PP_BITOR;
+         } else if (!strcmp(s->m_string, "@?")) {
+            s->m_token = SL_PP_QUESTION;
+         } else if (!strcmp(s->m_string, "@:")) {
+            s->m_token = SL_PP_COLON;
+         } else if (!strcmp(s->m_string, "@ID")) {
+            s->m_token = SL_PP_IDENTIFIER;
+         } else if (!strcmp(s->m_string, "@UINT")) {
+            s->m_token = SL_PP_UINT;
+         } else if (!strcmp(s->m_string, "@FLOAT")) {
+            s->m_token = SL_PP_FLOAT;
+         } else if (!strcmp(s->m_string, "@EOF")) {
+            s->m_token = SL_PP_EOF;
+         } else {
+            spec_destroy(&s);
+            return 1;
+         }
+      } else {
+         s->m_spec_type = st_string;
+      }
     }
     else if (*t == '.')
     {
@@ -2518,11 +2630,17 @@ match (dict *di, const byte *text, int *index, rule *ru, barray **ba, int filter
 }
 
 static match_result
-fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool *_BP,
-            int filtering_string, regbyte_ctx **rbc)
+fast_match(dict *di,
+           const struct sl_pp_token_info *tokens,
+           int *index,
+           rule *ru,
+           int *_PP,
+           bytepool *_BP,
+           regbyte_ctx **rbc,
+           struct sl_pp_context *context)
 {
    int ind = *index;
-    int _P = filtering_string ? 0 : *_PP;
+   int _P = *_PP;
     int _P2;
     match_result status = mr_not_matched;
     spec *sp = ru->m_specs;
@@ -2531,9 +2649,9 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
     /* for every specifier in the rule */
     while (sp)
     {
-      int i, len, save_ind = ind;
+      int save_ind = ind;
 
-        _P2 = _P + (sp->m_emits ? emit_size (sp->m_emits) : 0);
+      _P2 = _P + (sp->m_emits ? emit_size(sp->m_emits, sl_pp_context_cstr(context, tokens[ind].data.identifier)) : 0);
         if (bytepool_reserve (_BP, _P2))
         {
             free_regbyte_ctx_stack (ctx, *rbc);
@@ -2545,7 +2663,7 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
             switch (sp->m_spec_type)
             {
             case st_identifier:
-                status = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx);
+                status = fast_match(di, tokens, &ind, sp->m_rule, &_P2, _BP, &ctx, context);
 
                 if (status == mr_internal_error)
                 {
@@ -2553,58 +2671,38 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
                     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;
-                    }
+         case st_token:
+            if (tokens[ind].token == sp->m_token) {
+               status = mr_matched;
+               ind++;
+            } else {
+               status = mr_not_matched;
+            }
+            break;
 
-                    if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len))
-                    {
-                        status = mr_not_matched;
-                        break;
-                    }
+         case st_string:
+            if (tokens[ind].token != SL_PP_IDENTIFIER) {
+               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 (!strcmp(sl_pp_context_cstr(context, tokens[ind].data.identifier), sp->m_string)) {
+               status = mr_matched;
+               ind++;
+            } else {
+               status = mr_not_matched;
+            }
+            break;
 
-                    if (status == mr_matched)
-                        ind += len;
-                }
-                break;
             case st_byte:
-                status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched;
+                /**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;
+                /**status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ?
+                    mr_matched : mr_not_matched;**/
                 if (status == mr_matched)
                     ind++;
                 break;
@@ -2624,7 +2722,7 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
                     match_result result;
 
                     save_ind = ind;
-                    result = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx);
+                    result = fast_match(di, tokens, &ind, sp->m_rule, &_P2, _BP, &ctx, context);
 
                     if (result == mr_error_raised)
                     {
@@ -2633,11 +2731,9 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
                     }
                     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))
+                                if (emit_push (sp->m_emits, _BP->_F + _P, sl_pp_context_cstr(context, tokens[ind - 1].data.identifier), save_ind, &ctx))
                                 {
                                     free_regbyte_ctx_stack (ctx, *rbc);
                                     return mr_internal_error;
@@ -2645,13 +2741,12 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
                             }
 
                             _P = _P2;
-                            _P2 += sp->m_emits ? emit_size (sp->m_emits) : 0;
+                            _P2 += sp->m_emits ? emit_size(sp->m_emits, sl_pp_context_cstr(context, tokens[ind].data.identifier)) : 0;
                             if (bytepool_reserve (_BP, _P2))
                             {
                                 free_regbyte_ctx_stack (ctx, *rbc);
                                 return mr_internal_error;
                             }
-                        }
                     }
                     else if (result == mr_internal_error)
                     {
@@ -2682,8 +2777,8 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
 
             if (sp->m_errtext)
             {
-                set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text,
-                    ind), ind);
+                /**set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text,
+                    ind), ind);**/
 
                 return mr_error_raised;
             }
@@ -2694,8 +2789,8 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
         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))
+                const char *str = (ind <= 0) ? "" : sl_pp_context_cstr(context, tokens[ind - 1].data.identifier);
+                if (emit_push (sp->m_emits, _BP->_F + _P, str, save_ind, &ctx))
                 {
                     free_regbyte_ctx_stack (ctx, *rbc);
                     return mr_internal_error;
@@ -2710,7 +2805,6 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
         {
             *index = ind;
             *rbc = ctx;
-            if (!filtering_string)
                 *_PP = _P;
             return mr_matched;
         }
@@ -2723,7 +2817,6 @@ fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool
     {
         *index = ind;
         *rbc = ctx;
-        if (!filtering_string)
             *_PP = _P;
         return mr_matched;
     }
@@ -3013,14 +3106,19 @@ int grammar_set_reg8 (grammar id, const byte *name, byte 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)
+int
+grammar_fast_check (grammar id,
+                    struct sl_pp_context *context,
+                    struct sl_pp_token_info *tokens,
+                    byte **prod,
+                    unsigned int *size,
+                    unsigned int estimate_prod_size)
 {
-    dict *di = NULL;
+   dict *di = NULL;
    int index = 0;
+   regbyte_ctx *rbc = NULL;
+   bytepool *bp = NULL;
+   int _P = 0;
 
     clear_last_error ();
 
@@ -3034,72 +3132,25 @@ static int _grammar_check (grammar id, const byte *text, byte **prod, unsigned i
     *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;
+   }
 
-        bytepool_create (&bp, estimate_prod_size);
-        if (bp == NULL)
-            return 0;
+   if (fast_match(di, tokens, &index, di->m_syntax, &_P, bp, &rbc, context) != mr_matched) {
+      bytepool_destroy (&bp);
+      free_regbyte_ctx_stack (rbc, 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);
 
-        free_regbyte_ctx_stack (rbc, NULL);
+   *prod = bp->_F;
+   *size = _P;
+   bp->_F = NULL;
+   bytepool_destroy(&bp);
 
-        *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);
+   return 1;
 }
 
 int grammar_destroy (grammar id)
index 591e38aefa68d2e0c9c4a66b98f944e47c11e8e3..c3c21659d6c8f78fcc832c4a6f5438bcda4d0455 100644 (file)
@@ -61,24 +61,21 @@ grammar grammar_load_from_text (const byte *text);
 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);
+int
+grammar_fast_check (grammar id,
+                    struct sl_pp_context *context,
+                    struct sl_pp_token_info *tokens,
+                    byte **prod,
+                    unsigned int *size,
+                    unsigned int estimate_prod_size);
 
 /*
     destroys grammar object identified by <id>
index 6c92c5812da6138b9e3e9cc8a202f9927081767e..beabf1e4e17c3bbe2d8cfb9d0a5293c3d3cb3a29 100644 (file)
@@ -26,6 +26,8 @@
 #define GRAMMAR_MESA_H
 
 
+#include "../../glsl/pp/sl_pp_public.h"
+
 #include "main/imports.h"
 /* NOTE: include Mesa 3-D specific headers here */
 
index 6eefbcf5bdd73d426c5eaef312de376d61614f6e..759a01cf040914217695155856f715af106c9c4f 100644 (file)
@@ -22,7 +22,7 @@ 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
index 0e03fac2ee176ad8c296acf752785b1c3bac8869..c6964512bfec548cf1f14e5d82a42429e0a3d231 100644 (file)
@@ -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,41 +12,13 @@ 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 (file)
index 0000000..ef13114
--- /dev/null
@@ -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 (file)
index 8aef7b5..0000000
+++ /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 (file)
index 1fdbddf..0000000
+++ /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 (file)
index c397b9f..0000000
+++ /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 (file)
index add3b5a..0000000
+++ /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_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
deleted file mode 100644 (file)
index b3d3e87..0000000
+++ /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 (file)
index c5a1cce..0000000
+++ /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 (file)
index b51d168..0000000
+++ /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 (file)
index 430f8d8..0000000
+++ /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 (file)
index bfdb220..0000000
+++ /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 (file)
index f3e9ef6..0000000
+++ /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 (file)
index 3fe1a57..0000000
+++ /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 (file)
index 54aee3f..0000000
+++ /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 (file)
index cc5c70a..0000000
+++ /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 (file)
index 6a38297..0000000
+++ /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 (file)
index aaf8bef..0000000
+++ /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 (file)
index e5a252b..0000000
+++ /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 (file)
index f997edf..0000000
+++ /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;
-}
-
index a2708884437a906ccd4918837599859c485906f3..54eb092f1a78b9fce47066e84dbc3d588ae7d476 100644 (file)
 #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? */
@@ -183,23 +183,103 @@ parse_identifier(slang_parse_ctx * C)
    return slang_atom_pool_atom(C->atoms, id);
 }
 
+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 (file)
index e9a24cc..0000000
+++ /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 (&param->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 (file)
index f344820..0000000
+++ /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 */
index a0d7dbbace9eb7bd98471952b3c9f28e666f87fb..3f1a5592e795d3ec541a67fede56c87c2e269c4f 100644 (file)
@@ -255,7 +255,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 +364,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