/* A Bison parser, made by GNU Bison 1.875.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Using locations.  */
#define YYLSP_NEEDED 0

/* If NAME_PREFIX is specified substitute the variables and functions
   names.  */
#define yyparse slparse
#define yylex   sllex
#define yyerror slerror
#define yylval  sllval
#define yychar  slchar
#define yydebug sldebug
#define yynerrs slnerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     SL_SURFACE = 258,
     SL_DISPLACEMENT = 259,
     SL_LIGHT = 260,
     SL_VOLUME = 261,
     SL_TRANSFORMATION = 262,
     SL_IMAGER = 263,
     SL_FOR = 264,
     SL_WHILE = 265,
     SL_IF = 266,
     SL_GATHER = 267,
     SL_ELSE = 268,
     SL_BREAK = 269,
     SL_CONTINUE = 270,
     SL_ILLUMINANCE = 271,
     SL_ILLUMINATE = 272,
     SL_SOLAR = 273,
     SL_RETURN = 274,
     SL_VOID = 275,
     SL_FCN_PI = 276,
     SL_IDENTIFIER_VALUE = 277,
     SL_FLOAT_VALUE = 278,
     SL_COMMA = 279,
     SL_SEMI_COLON = 280,
     SL_OPEN_PARANTHESIS = 281,
     SL_CLOSE_PARANTHESIS = 282,
     SL_OPEN_CRL_PARANTHESIS = 283,
     SL_CLOSE_CRL_PARANTHESIS = 284,
     SL_OPEN_SQR_PARANTHESIS = 285,
     SL_CLOSE_SQR_PARANTHESIS = 286,
     SL_TEXTURE = 287,
     SL_SHADOW = 288,
     SL_ENVIRONMENT = 289,
     SL_BUMP = 290,
     SL_TEXT_VALUE = 291,
     SL_COLON = 292,
     SL_QUESTION = 293,
     SL_STRING = 294,
     SL_MATRIX = 295,
     SL_NORMAL = 296,
     SL_VECTOR = 297,
     SL_POINT = 298,
     SL_COLOR = 299,
     SL_FLOAT = 300,
     SL_COMP_DIFFERENT = 301,
     SL_COMP_EQUAL = 302,
     SL_COMP_LESS_EQUAL = 303,
     SL_COMP_LESS = 304,
     SL_COMP_GREATER_EQUAL = 305,
     SL_COMP_GREATER = 306,
     SL_EQUAL = 307,
     SL_DECREMENT_BY = 308,
     SL_INCREMENT_BY = 309,
     SL_DECREMENT = 310,
     SL_INCREMENT = 311,
     SL_DIVIDE_BY = 312,
     SL_MULTIPLY_BY = 313,
     SL_MINUS = 314,
     SL_PLUS = 315,
     SL_CROSS = 316,
     SL_MULTIPLY = 317,
     SL_DIVIDE = 318,
     SL_DOT = 319,
     SL_OR = 320,
     SL_AND = 321,
     SL_NOT = 322,
     SL_OUTPUT = 323,
     SL_EXTERN = 324,
     SL_UNIFORM = 325,
     SL_VARIABLE = 326,
     SL_VERTEX = 327
   };
#endif
#define SL_SURFACE 258
#define SL_DISPLACEMENT 259
#define SL_LIGHT 260
#define SL_VOLUME 261
#define SL_TRANSFORMATION 262
#define SL_IMAGER 263
#define SL_FOR 264
#define SL_WHILE 265
#define SL_IF 266
#define SL_GATHER 267
#define SL_ELSE 268
#define SL_BREAK 269
#define SL_CONTINUE 270
#define SL_ILLUMINANCE 271
#define SL_ILLUMINATE 272
#define SL_SOLAR 273
#define SL_RETURN 274
#define SL_VOID 275
#define SL_FCN_PI 276
#define SL_IDENTIFIER_VALUE 277
#define SL_FLOAT_VALUE 278
#define SL_COMMA 279
#define SL_SEMI_COLON 280
#define SL_OPEN_PARANTHESIS 281
#define SL_CLOSE_PARANTHESIS 282
#define SL_OPEN_CRL_PARANTHESIS 283
#define SL_CLOSE_CRL_PARANTHESIS 284
#define SL_OPEN_SQR_PARANTHESIS 285
#define SL_CLOSE_SQR_PARANTHESIS 286
#define SL_TEXTURE 287
#define SL_SHADOW 288
#define SL_ENVIRONMENT 289
#define SL_BUMP 290
#define SL_TEXT_VALUE 291
#define SL_COLON 292
#define SL_QUESTION 293
#define SL_STRING 294
#define SL_MATRIX 295
#define SL_NORMAL 296
#define SL_VECTOR 297
#define SL_POINT 298
#define SL_COLOR 299
#define SL_FLOAT 300
#define SL_COMP_DIFFERENT 301
#define SL_COMP_EQUAL 302
#define SL_COMP_LESS_EQUAL 303
#define SL_COMP_LESS 304
#define SL_COMP_GREATER_EQUAL 305
#define SL_COMP_GREATER 306
#define SL_EQUAL 307
#define SL_DECREMENT_BY 308
#define SL_INCREMENT_BY 309
#define SL_DECREMENT 310
#define SL_INCREMENT 311
#define SL_DIVIDE_BY 312
#define SL_MULTIPLY_BY 313
#define SL_MINUS 314
#define SL_PLUS 315
#define SL_CROSS 316
#define SL_MULTIPLY 317
#define SL_DIVIDE 318
#define SL_DOT 319
#define SL_OR 320
#define SL_AND 321
#define SL_NOT 322
#define SL_OUTPUT 323
#define SL_EXTERN 324
#define SL_UNIFORM 325
#define SL_VARIABLE 326
#define SL_VERTEX 327




/* Copy the first part of user declarations.  */
#line 61 "sl.y"

//////////////////////////////////////////////////////////////////////////
// Misc C definitions
//////////////////////////////////////////////////////////////////////////
#undef alloca
#include	"common/global.h"
#include	"common/os.h"
#include	"opcodes.h"
#include	"sdr.h"
#include	<stdlib.h>

	void				yyerror(char *);				// Forward definition for stupid yacc
	int					yylex(void );					// Forward definition for stupid yacc
														
//////////////////////////////////////////////////////////////////////////
// Here's the only global CVariable
//////////////////////////////////////////////////////////////////////////
	CScriptContext		*sdr;

//////////////////////////////////////////////////////////////////////////




/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 84 "sl.y"
typedef union YYSTYPE {
  char					*string;
  CExpression			*code;
  CExpression			*expression;
  float					real;
  int					integer;
  CArray<CExpression *>	*array;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 261 "sl.cpp"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */


/* Line 214 of yacc.c.  */
#line 273 "sl.cpp"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
	 || (YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  register YYSIZE_T yyi;		\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  3
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   2065

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  73
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  101
/* YYNRULES -- Number of rules. */
#define YYNRULES  237
/* YYNRULES -- Number of states. */
#define YYNSTATES  468

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   327

#define YYTRANSLATE(YYX) 						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short yyprhs[] =
{
       0,     0,     3,     4,     7,     9,    11,    13,    14,    16,
      17,    19,    20,    22,    24,    26,    28,    30,    32,    34,
      39,    42,    44,    48,    52,    57,    59,    60,    64,    67,
      69,    70,    74,    75,    80,    82,    83,    90,    91,    99,
     103,   108,   109,   110,   119,   121,   123,   125,   127,   129,
     131,   133,   134,   138,   141,   143,   144,   148,   151,   154,
     155,   160,   161,   165,   166,   174,   175,   182,   183,   185,
     189,   190,   195,   198,   201,   204,   205,   209,   210,   215,
     216,   223,   224,   232,   235,   237,   239,   241,   243,   246,
     247,   249,   251,   253,   255,   258,   261,   263,   265,   267,
     269,   271,   273,   275,   277,   279,   282,   284,   286,   288,
     290,   292,   294,   296,   298,   302,   305,   309,   312,   316,
     319,   324,   327,   330,   331,   336,   337,   345,   346,   351,
     352,   357,   360,   363,   364,   369,   370,   375,   377,   387,
     397,   399,   400,   404,   406,   408,   409,   411,   412,   416,
     418,   422,   424,   432,   438,   446,   450,   452,   453,   459,
     464,   467,   472,   474,   480,   488,   498,   510,   516,   526,
     532,   542,   548,   558,   563,   571,   576,   584,   586,   590,
     594,   598,   602,   603,   608,   612,   615,   618,   624,   628,
     632,   634,   636,   638,   640,   642,   644,   646,   651,   653,
     655,   663,   697,   701,   704,   708,   712,   716,   720,   724,
     728,   732,   736,   740,   744,   748,   752,   755,   757,   759,
     762,   765,   768,   772,   774,   776,   780,   781,   789,   795,
     797,   799,   801,   803,   805,   806,   807,   812
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
      74,     0,    -1,    -1,    75,    81,    -1,    70,    -1,    71,
      -1,    72,    -1,    -1,    69,    -1,    -1,    68,    -1,    -1,
      45,    -1,    44,    -1,    42,    -1,    41,    -1,    43,    -1,
      40,    -1,    39,    -1,    77,    78,    76,    79,    -1,    83,
      81,    -1,    92,    -1,    80,    22,    26,    -1,    20,    22,
      26,    -1,    82,    84,    27,   107,    -1,    85,    -1,    -1,
      86,    25,    85,    -1,    86,    25,    -1,    86,    -1,    -1,
      80,    87,    88,    -1,    -1,    22,    89,    24,    88,    -1,
      22,    -1,    -1,    22,    30,    31,    90,    24,    88,    -1,
      -1,    22,    30,    23,    31,    91,    24,    88,    -1,    22,
      30,    31,    -1,    22,    30,    23,    31,    -1,    -1,    -1,
      95,    22,    26,    93,    96,    27,    94,   107,    -1,     3,
      -1,     4,    -1,     5,    -1,     6,    -1,     7,    -1,     8,
      -1,    97,    -1,    -1,    98,    25,    97,    -1,    98,    25,
      -1,    98,    -1,    -1,    80,    99,   106,    -1,    52,   157,
      -1,    52,   159,    -1,    -1,    22,    24,   102,   101,    -1,
      -1,    22,   103,   100,    -1,    -1,    22,    30,    23,    31,
      24,   104,   101,    -1,    -1,    22,    30,    23,    31,   105,
     100,    -1,    -1,   101,    -1,   101,    24,   106,    -1,    -1,
      28,   108,   118,    29,    -1,    80,   111,    -1,    52,   157,
      -1,    52,   159,    -1,    -1,    22,   112,   116,    -1,    -1,
      22,   113,   110,   116,    -1,    -1,    22,    30,    23,    31,
     114,   116,    -1,    -1,    22,    30,    23,    31,   115,   110,
     116,    -1,    24,   111,    -1,    25,    -1,   120,    -1,   119,
      -1,     1,    -1,   118,   117,    -1,    -1,   136,    -1,   125,
      -1,   143,    -1,   148,    -1,   127,    25,    -1,   130,    25,
      -1,   121,    -1,   122,    -1,   123,    -1,   151,    -1,   153,
      -1,   155,    -1,   107,    -1,   109,    -1,    83,    -1,   164,
      25,    -1,    25,    -1,   144,    -1,   149,    -1,   126,    -1,
     137,    -1,   152,    -1,   154,    -1,   156,    -1,    14,    23,
      25,    -1,    14,    25,    -1,    15,    23,    25,    -1,    15,
      25,    -1,    19,   157,    25,    -1,    19,    25,    -1,    10,
      26,   163,    27,    -1,   124,   119,    -1,   124,   120,    -1,
      -1,    22,    52,   128,   157,    -1,    -1,    22,    30,   157,
      31,    52,   129,   157,    -1,    -1,    22,    54,   131,   157,
      -1,    -1,    22,    53,   132,   157,    -1,    22,    56,    -1,
      22,    55,    -1,    -1,    22,    58,   133,   157,    -1,    -1,
      22,    57,   134,   157,    -1,     9,    -1,   135,    26,   138,
      25,   140,    25,   141,    27,   119,    -1,   135,    26,   138,
      25,   140,    25,   141,    27,   120,    -1,   139,    -1,    -1,
     127,    24,   139,    -1,   127,    -1,   163,    -1,    -1,   142,
      -1,    -1,   127,    24,   142,    -1,   127,    -1,   130,    24,
     142,    -1,   130,    -1,    11,    26,   163,    27,   119,    13,
     119,    -1,    11,    26,   163,    27,   117,    -1,    11,    26,
     163,    27,   119,    13,   120,    -1,   145,    24,   157,    -1,
     157,    -1,    -1,    12,    26,   147,   145,    27,    -1,   146,
     119,    13,   119,    -1,   146,   117,    -1,   146,   119,    13,
     120,    -1,    16,    -1,   150,    26,   157,    27,   119,    -1,
     150,    26,   157,    24,   157,    27,   119,    -1,   150,    26,
     157,    24,   157,    24,   157,    27,   119,    -1,   150,    26,
     157,    24,   157,    24,   157,    24,   157,    27,   119,    -1,
     150,    26,   157,    27,   120,    -1,   150,    26,   157,    24,
     157,    24,   157,    27,   120,    -1,    17,    26,   157,    27,
     119,    -1,    17,    26,   157,    24,   157,    24,   157,    27,
     119,    -1,    17,    26,   157,    27,   120,    -1,    17,    26,
     157,    24,   157,    24,   157,    27,   120,    -1,    18,    26,
      27,   119,    -1,    18,    26,   157,    24,   157,    27,   119,
      -1,    18,    26,    27,   120,    -1,    18,    26,   157,    24,
     157,    27,   120,    -1,   161,    -1,   157,    60,   157,    -1,
     157,    59,   157,    -1,   157,    62,   157,    -1,   157,    63,
     157,    -1,    -1,   157,    64,   158,   157,    -1,   157,    61,
     157,    -1,    60,   157,    -1,    59,   157,    -1,   163,    38,
     157,    37,   157,    -1,    28,   160,    29,    -1,   157,    24,
     160,    -1,   157,    -1,    21,    -1,   127,    -1,   130,    -1,
     162,    -1,   164,    -1,    22,    -1,    22,    30,   157,    31,
      -1,    23,    -1,    36,    -1,    26,   157,    24,   157,    24,
     157,    27,    -1,    26,   157,    24,   157,    24,   157,    24,
     157,    24,   157,    24,   157,    24,   157,    24,   157,    24,
     157,    24,   157,    24,   157,    24,   157,    24,   157,    24,
     157,    24,   157,    24,   157,    27,    -1,    26,   157,    27,
      -1,    80,   157,    -1,    80,    36,   157,    -1,    26,   163,
      27,    -1,   163,    66,   163,    -1,   163,    65,   163,    -1,
     157,    51,   157,    -1,   157,    49,   157,    -1,   157,    50,
     157,    -1,   157,    48,   157,    -1,   157,    47,   157,    -1,
     157,    46,   157,    -1,   163,    47,   163,    -1,   163,    46,
     163,    -1,    67,   163,    -1,   169,    -1,   166,    -1,    22,
      26,    -1,     3,    26,    -1,     4,    26,    -1,   165,   171,
      27,    -1,    36,    -1,    22,    -1,    30,   157,    31,    -1,
      -1,   170,    26,   167,   168,    24,   171,    27,    -1,   170,
      26,   167,   168,    27,    -1,    32,    -1,    33,    -1,    34,
      -1,    35,    -1,   172,    -1,    -1,    -1,   157,    24,   173,
     172,    -1,   157,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,   247,   247,   247,   255,   260,   265,   270,   277,   282,
     288,   293,   299,   304,   309,   314,   319,   324,   329,   336,
     356,   361,   376,   392,   403,   424,   429,   438,   445,   451,
     461,   460,   488,   487,   499,   511,   508,   526,   522,   542,
     553,   578,   589,   575,   609,   614,   619,   624,   629,   634,
     643,   648,   656,   663,   669,   679,   678,   708,   722,   742,
     740,   753,   752,   768,   763,   787,   783,   804,   811,   816,
     829,   828,   848,   869,   875,   884,   883,   897,   896,   915,
     911,   936,   932,   958,   964,   974,   981,   987,   997,  1003,
    1012,  1017,  1022,  1027,  1032,  1037,  1042,  1047,  1052,  1057,
    1062,  1067,  1072,  1077,  1082,  1087,  1092,  1101,  1106,  1111,
    1116,  1121,  1126,  1131,  1140,  1167,  1196,  1223,  1250,  1279,
    1303,  1316,  1326,  1341,  1339,  1364,  1359,  1388,  1386,  1408,
    1406,  1426,  1437,  1450,  1448,  1470,  1468,  1492,  1498,  1515,
    1534,  1539,  1547,  1554,  1563,  1568,  1576,  1581,  1589,  1596,
    1601,  1608,  1617,  1632,  1641,  1658,  1665,  1675,  1673,  1689,
    1702,  1709,  1722,  1730,  1741,  1754,  1769,  1788,  1799,  1818,
    1829,  1846,  1857,  1876,  1886,  1901,  1911,  1928,  1933,  1940,
    1947,  1980,  1989,  1987,  1998,  2005,  2011,  2017,  2035,  2044,
    2052,  2060,  2065,  2070,  2075,  2080,  2085,  2098,  2113,  2118,
    2123,  2134,  2190,  2200,  2208,  2219,  2226,  2233,  2240,  2248,
    2256,  2264,  2272,  2280,  2288,  2296,  2304,  2315,  2355,  2364,
    2379,  2394,  2411,  2490,  2495,  2506,  2513,  2524,  2548,  2572,
    2585,  2598,  2611,  2628,  2632,  2639,  2637,  2646
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "SL_SURFACE", "SL_DISPLACEMENT", 
  "SL_LIGHT", "SL_VOLUME", "SL_TRANSFORMATION", "SL_IMAGER", "SL_FOR", 
  "SL_WHILE", "SL_IF", "SL_GATHER", "SL_ELSE", "SL_BREAK", "SL_CONTINUE", 
  "SL_ILLUMINANCE", "SL_ILLUMINATE", "SL_SOLAR", "SL_RETURN", "SL_VOID", 
  "SL_FCN_PI", "SL_IDENTIFIER_VALUE", "SL_FLOAT_VALUE", "SL_COMMA", 
  "SL_SEMI_COLON", "SL_OPEN_PARANTHESIS", "SL_CLOSE_PARANTHESIS", 
  "SL_OPEN_CRL_PARANTHESIS", "SL_CLOSE_CRL_PARANTHESIS", 
  "SL_OPEN_SQR_PARANTHESIS", "SL_CLOSE_SQR_PARANTHESIS", "SL_TEXTURE", 
  "SL_SHADOW", "SL_ENVIRONMENT", "SL_BUMP", "SL_TEXT_VALUE", "SL_COLON", 
  "SL_QUESTION", "SL_STRING", "SL_MATRIX", "SL_NORMAL", "SL_VECTOR", 
  "SL_POINT", "SL_COLOR", "SL_FLOAT", "SL_COMP_DIFFERENT", 
  "SL_COMP_EQUAL", "SL_COMP_LESS_EQUAL", "SL_COMP_LESS", 
  "SL_COMP_GREATER_EQUAL", "SL_COMP_GREATER", "SL_EQUAL", 
  "SL_DECREMENT_BY", "SL_INCREMENT_BY", "SL_DECREMENT", "SL_INCREMENT", 
  "SL_DIVIDE_BY", "SL_MULTIPLY_BY", "SL_MINUS", "SL_PLUS", "SL_CROSS", 
  "SL_MULTIPLY", "SL_DIVIDE", "SL_DOT", "SL_OR", "SL_AND", "SL_NOT", 
  "SL_OUTPUT", "SL_EXTERN", "SL_UNIFORM", "SL_VARIABLE", "SL_VERTEX", 
  "$accept", "slStart", "@1", "slContainerClass", "slInheritanceClass", 
  "slOutputClass", "slTypeSpecifier", "slTypeDecl", "slShader", 
  "slFunctionHeader", "slFunction", "slFunctionParameterList", 
  "slFunctionParameters", "slFunctionParameter", "@2", 
  "slFunctionParameterIdentifierList", "@3", "@4", "@5", "slMain", "@6", 
  "@7", "slShaderType", "slShaderParameterList", "slShaderParameters", 
  "slShaderParameter", "@8", "slShaderParameterInitializer", 
  "slShaderParameterIdentifierToken", "@9", "@10", "@11", "@12", 
  "slShaderParameterIdentifierList", "slBlock", "@13", 
  "slVariableDeclerations", "slVariableInitializer", 
  "slVariableIdentifierList", "@14", "@15", "@16", "@17", 
  "slVariableIdentifierTail", "slStatement", "slStatements", 
  "slMatchedStatement", "slUnmatchedStatement", "slBreakStatement", 
  "slContinueStatement", "slReturnStatement", "slWhileStartStatement", 
  "slWhileStatement", "slUnmatchedWhileStatement", 
  "slAssignmentStatement", "@18", "@19", "slUpdateStatement", "@20", 
  "@21", "@22", "@23", "slForStartStatement", "slForStatement", 
  "slUnmatchedForStatement", "slForInitStatement", "slForInitStatements", 
  "slForCheckStatement", "slForIncrementStatement", 
  "slForIncrementStatements", "slMatchedIfStatement", 
  "slUnmatchedIfStatement", "slGatherParameterList", "slGatherHeader", 
  "@24", "slMatchedGatherStatement", "slUnmatchedGatherStatement", 
  "slIlluminanceStartStatement", "slIlluminanceStatement", 
  "slUnmatchedIlluminanceStatement", "slIlluminateStatement", 
  "slUnmatchedIlluminateStatement", "slSolarStatement", 
  "slUnmatchedSolarStatement", "slAritmeticExpression", "@25", 
  "slArrayList", "slArrayItems", "slAritmeticTerminalValue", 
  "slAritmeticTypeCast", "slBooleanExpression", "slFunctionCall", 
  "slFunCallHeader", "slFunCall", "slTextureNameSpecifier", 
  "slTextureChannelSpecifier", "slTextureCall", "slTextureName", 
  "slFunctionCallParameterList", "slFunctionCallParameters", "@26", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    73,    75,    74,    76,    76,    76,    76,    77,    77,
      78,    78,    79,    79,    79,    79,    79,    79,    79,    80,
      81,    81,    82,    82,    83,    84,    84,    85,    85,    85,
      87,    86,    89,    88,    88,    90,    88,    91,    88,    88,
      88,    93,    94,    92,    95,    95,    95,    95,    95,    95,
      96,    96,    97,    97,    97,    99,    98,   100,   100,   102,
     101,   103,   101,   104,   101,   105,   101,   101,   106,   106,
     108,   107,   109,   110,   110,   112,   111,   113,   111,   114,
     111,   115,   111,   116,   116,   117,   117,   117,   118,   118,
     119,   119,   119,   119,   119,   119,   119,   119,   119,   119,
     119,   119,   119,   119,   119,   119,   119,   120,   120,   120,
     120,   120,   120,   120,   121,   121,   122,   122,   123,   123,
     124,   125,   126,   128,   127,   129,   127,   131,   130,   132,
     130,   130,   130,   133,   130,   134,   130,   135,   136,   137,
     138,   138,   139,   139,   140,   140,   141,   141,   142,   142,
     142,   142,   143,   144,   144,   145,   145,   147,   146,   148,
     149,   149,   150,   151,   151,   151,   151,   152,   152,   153,
     153,   154,   154,   155,   155,   156,   156,   157,   157,   157,
     157,   157,   158,   157,   157,   157,   157,   157,   159,   160,
     160,   161,   161,   161,   161,   161,   161,   161,   161,   161,
     161,   161,   161,   162,   162,   163,   163,   163,   163,   163,
     163,   163,   163,   163,   163,   163,   163,   164,   164,   165,
     165,   165,   166,   167,   167,   168,   168,   169,   169,   170,
     170,   170,   170,   171,   171,   173,   172,   172
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     0,     2,     1,     1,     1,     0,     1,     0,
       1,     0,     1,     1,     1,     1,     1,     1,     1,     4,
       2,     1,     3,     3,     4,     1,     0,     3,     2,     1,
       0,     3,     0,     4,     1,     0,     6,     0,     7,     3,
       4,     0,     0,     8,     1,     1,     1,     1,     1,     1,
       1,     0,     3,     2,     1,     0,     3,     2,     2,     0,
       4,     0,     3,     0,     7,     0,     6,     0,     1,     3,
       0,     4,     2,     2,     2,     0,     3,     0,     4,     0,
       6,     0,     7,     2,     1,     1,     1,     1,     2,     0,
       1,     1,     1,     1,     2,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     3,     2,     3,     2,     3,     2,
       4,     2,     2,     0,     4,     0,     7,     0,     4,     0,
       4,     2,     2,     0,     4,     0,     4,     1,     9,     9,
       1,     0,     3,     1,     1,     0,     1,     0,     3,     1,
       3,     1,     7,     5,     7,     3,     1,     0,     5,     4,
       2,     4,     1,     5,     7,     9,    11,     5,     9,     5,
       9,     5,     9,     4,     7,     4,     7,     1,     3,     3,
       3,     3,     0,     4,     3,     2,     2,     5,     3,     3,
       1,     1,     1,     1,     1,     1,     1,     4,     1,     1,
       7,    33,     3,     2,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     2,     1,     1,     2,
       2,     2,     3,     1,     1,     3,     0,     7,     5,     1,
       1,     1,     1,     1,     0,     0,     4,     1
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       2,     0,     9,     1,    44,    45,    46,    47,    48,    49,
       0,     8,    11,     0,     3,     9,     9,    21,     0,     0,
      10,     7,     0,    30,     0,    25,    29,    20,     0,    23,
       4,     5,     6,     0,    22,     0,     0,     9,    41,    18,
      17,    15,    14,    16,    13,    12,    19,    34,    31,    70,
      24,    27,     9,     0,     0,    89,    55,     0,    50,    54,
       0,    39,     0,     0,    67,    42,     9,    40,     0,    33,
      87,     0,     0,   137,     0,     0,     0,     0,     0,   162,
       0,     0,     9,     0,   106,    71,   229,   230,   231,   232,
       0,   104,   102,   103,    88,    86,    85,    96,    97,    98,
       9,    91,   109,     0,     0,     0,    90,   110,    92,   107,
       0,    93,   108,     0,    99,   111,   100,   112,   101,   113,
       0,     9,   218,   217,     0,    61,    68,    56,     0,    52,
       0,     0,   220,   221,     9,     9,   157,     0,   115,     0,
     117,     9,     9,   191,   196,   198,   119,     9,   199,     9,
       9,     9,     9,   192,   193,     0,   177,   194,     0,   195,
     219,     9,   123,   129,   127,   132,   131,   135,   133,    75,
      72,   121,   122,    94,    95,   141,   160,    86,     9,   105,
     237,     0,   233,     0,    59,     0,     0,    67,    43,     0,
      36,     0,     0,     0,     9,   114,   116,     0,     9,     0,
       9,     0,     0,   186,   185,   216,   199,   203,   118,     9,
       9,     9,     9,     9,     9,     9,     9,     9,     9,     9,
     182,     9,     9,     9,     9,     9,     0,     9,     9,     9,
       9,     9,     0,     0,     0,     0,   143,     0,   140,     9,
       0,   235,   222,   224,   223,   226,    67,     0,     9,    62,
      69,    38,   120,     0,     0,   156,     9,     9,   173,   175,
       9,     0,     9,   202,   205,   204,   213,   212,   211,   209,
     210,   208,   179,   178,   184,   180,   181,     9,     0,   215,
     214,   207,   206,     0,   124,   130,   128,   136,   134,     0,
       0,    84,    76,     9,     0,     0,     9,   159,   161,     9,
       9,     9,     9,     0,    60,    65,     9,    57,    58,   153,
      86,     9,   158,     0,   169,   171,     0,   197,     0,   183,
       9,   125,    79,    75,    83,    73,    74,    78,   142,     0,
     144,     0,   163,   167,   236,     0,     9,   228,    63,     0,
     190,     0,     9,   155,     9,     9,     9,   187,     9,     0,
       0,   147,     9,     9,   225,     0,    67,    66,     9,   188,
     152,   154,     0,   174,   176,     0,   126,    80,     0,     0,
     149,   151,     0,   146,     0,     0,     0,     0,   164,     9,
       0,     9,     0,   227,    64,   189,     9,     9,   200,    82,
       0,     0,     9,     9,     9,     9,     9,     9,   141,     0,
       9,   170,   172,     0,   148,   150,   138,   139,     0,   165,
     168,     0,     0,     9,     0,     0,     9,     0,     9,     9,
       9,     9,     9,     9,     9,     9,     9,     0,   166,     0,
       0,     0,     0,     0,     9,     9,     9,     9,   147,     9,
       0,     0,     0,     0,     9,     9,     9,     9,     0,     9,
       0,     9,     0,     9,     0,     9,     0,     9,     0,     9,
       0,     9,     0,     9,     0,     9,     0,   201
};

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,     1,     2,    33,    12,    21,    46,   152,    14,    15,
      91,    24,    25,    26,    35,    48,    54,    68,   130,    17,
      52,   128,    18,    57,    58,    59,    64,   249,   126,   246,
     186,   356,   339,   127,    92,    55,    93,   294,   170,   233,
     234,   349,   350,   292,    94,    63,   171,    96,    97,    98,
      99,   379,   101,   102,   153,   227,   348,   154,   229,   228,
     231,   230,   380,   106,   107,   237,   238,   329,   372,   373,
     108,   109,   254,   381,   194,   111,   112,   382,   114,   115,
     116,   117,   118,   119,   191,   277,   308,   341,   156,   157,
     158,   159,   121,   122,   245,   303,   123,   124,   181,   182,
     301
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -288
static const short yypact[] =
{
    -288,    16,   120,  -288,  -288,  -288,  -288,  -288,  -288,  -288,
      20,  -288,   -48,    43,  -288,   -18,   120,  -288,    48,    54,
    -288,   129,    61,  -288,    88,  -288,   104,  -288,   108,  -288,
    -288,  -288,  -288,   220,  -288,   123,   114,   -17,  -288,  -288,
    -288,  -288,  -288,  -288,  -288,  -288,  -288,    15,  -288,  -288,
    -288,  -288,   -12,     6,   127,  -288,  -288,   137,  -288,   142,
     148,   149,   123,  1010,   158,  -288,   -10,   159,   160,  -288,
    -288,   164,   172,  -288,   178,   179,   181,    74,   112,  -288,
     182,   183,   476,    49,  -288,  -288,  -288,  -288,  -288,  -288,
     170,  -288,  -288,  -288,  -288,  -288,  -288,  -288,  -288,  -288,
     801,  -288,  -288,   185,   187,   188,  -288,  -288,  -288,  -288,
    1082,  -288,  -288,   190,  -288,  -288,  -288,  -288,  -288,  -288,
     193,   613,  -288,  -288,   195,    19,   189,  -288,   114,  -288,
     198,   123,  -288,  -288,  1248,  1248,  -288,   194,  -288,   207,
    -288,  1248,  1108,  -288,   216,  -288,  -288,  1248,  -288,  1248,
    1248,  1248,  1269,  -288,  -288,  1859,  -288,  -288,    92,  -288,
    -288,  1248,  -288,  -288,  -288,  -288,  -288,  -288,  -288,    -8,
    -288,  -288,  -288,  -288,  -288,   201,  -288,   221,  1248,  -288,
    1469,   176,  -288,   -11,  -288,   210,   184,   158,  -288,   123,
    -288,  1994,   -19,   106,  1248,  -288,  -288,   814,   801,  1488,
    1248,  1013,   116,    86,    86,  -288,    50,  1994,  -288,  1248,
    1248,  1248,  1248,  1248,  1248,  1248,  1248,  1248,  1248,  1248,
    -288,  1248,  1248,  1248,  1248,  1248,   738,  1248,  1248,  1248,
    1248,  1248,   218,     7,   196,     3,   215,   224,  -288,   801,
    1294,  -288,  -288,  -288,  -288,   222,   158,   214,  1157,  -288,
    -288,  -288,  -288,  1082,    36,  1994,  1248,   801,  -288,  -288,
    1248,  1967,  1248,  -288,  -288,  1994,   900,   900,   900,   900,
     900,   900,    86,    86,   124,   186,   186,  1248,  2001,    95,
      95,   191,  -288,   202,   166,   166,   166,   166,   166,   225,
     231,  -288,  -288,  1157,     7,   201,  1178,  -288,  -288,  1248,
     801,  1248,  1248,    42,  -288,   251,  1248,  1994,  -288,  -288,
     263,  1248,  -288,  1516,  -288,  -288,  1819,   202,  1522,  -288,
    1248,  -288,   227,     4,  -288,  1994,  -288,  -288,  -288,   256,
      92,  1300,  -288,  -288,  -288,  1973,   613,  -288,  -288,   184,
    1550,   253,   801,  1994,  1248,   801,  1248,  1994,  1248,     7,
     196,   264,  1248,   897,  -288,   258,   158,  -288,  1248,  -288,
    -288,  -288,  1865,  -288,  -288,  1341,   166,  -288,     7,   344,
     265,   266,   268,  -288,  1347,   267,   271,   273,  -288,   897,
     275,   897,   278,  -288,  -288,  -288,   801,  1248,  -288,  -288,
     264,   264,   801,  1248,   801,  1248,  1248,  1227,   201,   279,
    1248,  -288,  -288,  1569,  -288,  -288,  -288,  -288,  1890,  -288,
    -288,   128,  1388,   897,  1597,   280,   897,  1394,  1248,   897,
     897,  1248,   897,  1248,  1178,  1248,   897,  1603,  -288,   293,
    1631,  1915,   283,  1435,  1248,   897,  1248,   897,   264,  1248,
    1650,  1921,   284,  1441,  1248,   897,   897,   897,  1678,  1248,
    1684,  1248,  1712,  1248,  1731,  1248,  1759,  1248,  1765,  1248,
    1793,  1248,  1812,  1248,  1840,  1248,  1946,  -288
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -288,  -288,  -288,  -288,  -288,  -288,  -288,    -2,   294,  -288,
      10,  -288,   254,  -288,  -288,   -57,  -288,  -288,  -288,  -288,
    -288,  -288,  -288,  -288,   248,  -288,  -288,   -24,  -240,  -288,
    -288,  -288,  -288,   130,   -32,  -288,  -288,   -34,    28,  -288,
    -288,  -288,  -288,  -287,  -107,  -288,   285,   -98,  -288,  -288,
    -288,   -62,  -288,  -288,    68,  -288,  -288,   177,  -288,  -288,
    -288,  -288,   -42,  -288,  -288,   -79,    27,   -97,  -112,  -221,
    -288,  -288,  -288,   -33,  -288,  -288,  -288,   -22,  -288,  -288,
    -288,  -288,  -288,  -288,   547,  -288,    35,   -29,  -288,  -288,
    -111,   239,  -288,  -288,  -288,  -288,  -288,  -288,    -5,    32,
    -288
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -235
static const short yytable[] =
{
      13,   100,   172,   176,    50,    69,   304,   327,   252,   -26,
     -28,   243,    16,    23,    13,   -51,     3,   -53,    34,   221,
      20,   105,   232,   192,   193,   244,    16,   222,   223,    60,
     110,   290,   291,   161,   232,    23,   202,    61,   100,   -32,
     205,   113,    19,   184,   -77,    53,   224,   225,   100,   185,
      56,    11,    11,    71,    72,   162,   -77,    11,   105,    11,
     311,    90,   367,   312,    56,    22,   336,   110,   105,   337,
      28,   143,   144,   145,   190,   160,   147,   110,   113,   161,
      29,   389,    86,    87,    88,    89,   148,    34,   113,    -9,
      -9,    -9,    -9,    -9,    -9,    -9,   188,   137,    90,   138,
     259,   162,   163,   164,   165,   166,   167,   168,    90,   149,
     150,   279,   280,   281,   282,    36,   384,   151,    -9,    11,
      -9,    -9,    -9,     4,     5,     6,     7,     8,     9,    37,
     221,   103,   251,   253,    38,   139,   100,   140,   222,   223,
      10,   298,    49,   264,   221,    47,   309,   217,   218,   219,
     220,    62,   222,   223,   221,   420,   105,   224,   225,   315,
     224,   225,   222,   223,    65,   110,   221,    66,   103,   404,
     405,   224,   225,   -35,   222,   223,   113,   100,   103,    67,
     125,   224,   225,   -37,   131,   330,   218,   219,   220,    11,
     132,   100,   169,   224,   225,   100,    90,   105,   133,    30,
      31,    32,   333,   242,   134,   135,   110,   136,   141,   142,
     173,   105,   174,   187,   175,   105,   178,   113,   179,   195,
     110,   183,   189,   235,   110,   215,   216,   217,   218,   219,
     220,   113,   196,   247,   239,   113,   248,    90,   100,   295,
     104,   289,   160,   236,   361,   305,   200,   364,   293,   296,
     220,    90,   302,   323,   321,    90,   322,   225,   105,    39,
      40,    41,    42,    43,    44,    45,   103,   110,   162,   163,
     164,   165,   166,   167,   168,   338,   342,   104,   113,   -81,
     100,   351,   359,   100,   411,   383,   369,   104,   402,   390,
     391,    51,   416,   395,   407,   392,   410,   396,    90,   397,
     105,   398,   120,   105,   400,   424,   435,   103,   438,   110,
      27,   446,   110,   330,   129,   357,   368,   250,   324,   415,
     113,   103,   328,   113,   100,   103,   442,   432,   326,   385,
     100,   355,   100,   334,     0,     0,     0,     0,     0,   120,
      90,     0,     0,    90,   105,     0,     0,     0,    95,   120,
     105,    90,   105,   110,     0,     0,     0,     0,     0,   110,
       0,   110,     0,   236,   113,     0,     0,     0,   103,     0,
     113,     0,   113,     0,   161,   104,     0,    90,     0,    90,
       0,     0,     0,     0,    90,     0,     0,     0,     0,     0,
      90,     0,    90,     0,     0,   177,   162,   163,   164,   165,
     166,   167,   168,     0,     0,     0,     0,     0,     0,     0,
     103,    90,     0,   103,    90,     0,   104,    90,    90,   370,
      90,   103,     0,     0,    90,     0,     0,     0,     0,     0,
     104,     0,     0,    90,   104,    90,     0,   120,     0,     0,
       0,     0,     0,    90,    90,    90,     0,   103,     0,   103,
       0,     0,     0,     0,   103,     0,     0,     0,   370,   370,
     103,     0,   103,     0,     0,     0,   236,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   104,   120,    71,
      72,   103,     0,   258,   103,     0,     0,   103,   103,     0,
     103,     0,   120,     0,   103,     0,   120,   143,   144,   145,
       0,   146,   147,   103,     0,   103,   370,     0,    86,    87,
      88,    89,   148,   103,   103,   103,     0,     0,     0,   104,
       0,     0,   104,     0,   297,     0,     0,     0,   371,     0,
     104,     0,     0,     0,     0,   149,   150,     0,   310,   120,
       0,     0,   314,   151,     0,    11,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   104,     0,   104,     0,
       0,     0,     0,   104,     0,     0,     0,   371,   371,   104,
       0,   104,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   120,     0,     0,   120,   332,     0,     0,     0,     0,
     104,     0,   120,   104,     0,     0,   104,   104,     0,   104,
       0,     0,     0,   104,     0,     0,     0,     0,     0,     0,
       0,     0,   104,     0,   104,   371,    71,    72,   120,     0,
     120,     0,   104,   104,   104,   120,     0,   360,     0,   155,
     363,   120,     0,   120,   143,   144,   145,     0,   378,   147,
    -234,     0,     0,     0,     0,    86,    87,    88,    89,   148,
       0,     0,   120,     0,     0,   120,     0,     0,   120,   120,
       0,   120,     0,     0,     0,   120,   399,     0,   180,     0,
       0,   401,   149,   150,   120,     0,   120,   406,     0,   409,
     151,     0,    11,     0,   120,   120,   120,     0,   197,   199,
       0,     0,     0,     0,   201,     0,   203,   204,   258,   207,
       0,   297,     0,     0,   428,   429,     0,   314,   226,     0,
       0,   332,     0,     0,     0,     0,     0,     0,     0,     0,
     360,     0,   363,     0,     0,   240,     0,     0,     0,     0,
     401,   406,   409,     0,     0,     0,     0,     0,     0,     0,
       0,   255,     0,     0,     0,     0,     0,   261,     0,     0,
       0,     0,     0,   265,     0,     0,   266,   267,   268,   269,
     270,   271,   272,   273,   274,   275,   276,     0,   278,   283,
       0,     0,     0,     0,   284,   285,   286,   287,   288,     0,
       0,     0,     0,     0,   209,   210,   211,   212,   213,   214,
       0,     0,     0,     0,     0,   307,     0,   215,   216,   217,
     218,   219,   220,   313,    71,    72,     0,   316,     0,   318,
      73,    74,    75,    76,     0,    77,    78,    79,    80,    81,
      82,    10,     0,    83,   319,     0,    84,     0,     0,    49,
       0,     0,     0,    86,    87,    88,    89,     0,   256,     0,
     325,   257,     0,     0,     0,     0,   331,     0,   180,   335,
       0,     0,     0,   340,     0,     0,     0,     0,   343,     0,
     209,   210,   211,   212,   213,   214,     0,   347,     0,     0,
      11,     0,     0,   215,   216,   217,   218,   219,   220,     0,
       0,     0,     0,   180,     0,     0,     0,     0,     0,     0,
       0,   362,     0,   365,     0,   366,     0,     0,     0,   374,
      71,    72,     0,     0,     0,   340,    73,    74,   375,    76,
       0,    77,    78,    79,   376,   377,    82,    10,     0,    83,
       0,     0,    84,     0,     0,    49,     0,     0,     0,    86,
      87,    88,    89,     0,   403,     0,     0,     0,     0,     0,
     408,     0,     0,   412,   414,     0,     0,   417,   211,   212,
     213,   214,     0,     0,     0,     0,     0,     0,     0,   215,
     216,   217,   218,   219,   220,   427,    11,     0,   430,     0,
     431,     0,   433,     0,     0,     0,     0,     0,     0,     0,
       0,   440,     0,   441,     0,     0,   443,     0,     0,     0,
       0,   448,     0,     0,     0,     0,   450,     0,   452,     0,
     454,     0,   456,     0,   458,     0,   460,     0,   462,     0,
     464,    70,   466,    71,    72,     0,     0,     0,     0,    73,
      74,    75,    76,     0,    77,    78,    79,    80,    81,    82,
      10,     0,    83,     0,     0,    84,     0,   262,    49,    85,
     263,     0,    86,    87,    88,    89,     0,     0,     0,    -9,
      -9,    -9,    -9,    -9,    -9,    -9,     0,     0,     0,   209,
     210,   211,   212,   213,   214,     0,     0,     0,     0,     0,
       0,     0,   215,   216,   217,   218,   219,   220,    -9,    11,
      -9,    -9,    -9,    70,     0,    71,    72,     0,     0,     0,
       0,    73,    74,    75,    76,     0,    77,    78,    79,    80,
      81,    82,    10,     0,    83,     0,     0,    84,     0,     0,
      49,    71,    72,     0,    86,    87,    88,    89,     0,     0,
       0,    -9,    -9,    -9,    -9,    -9,    -9,    -9,     0,   143,
     144,   145,     0,     0,   147,   198,     0,     0,     0,     0,
      86,    87,    88,    89,   148,     0,     0,     0,     0,     0,
      -9,    11,    -9,    -9,    -9,     0,     0,     0,     0,     0,
      71,    72,     0,     0,     0,     0,     0,   149,   150,     0,
       0,     0,     0,     0,     0,   151,     0,    11,   143,   144,
     145,    71,    72,   147,     0,   306,     0,     0,     0,    86,
      87,    88,    89,   148,     0,     0,     0,     0,     0,   143,
     144,   145,     0,  -145,   147,     0,     0,     0,     0,     0,
      86,    87,    88,    89,   148,     0,   149,   150,     0,     0,
       0,     0,     0,     0,   151,     0,    11,     0,     0,     0,
      71,    72,     0,     0,     0,     0,     0,   149,   150,     0,
       0,     0,     0,     0,     0,   151,     0,    11,   143,   144,
     145,    71,    72,   147,   413,     0,     0,     0,     0,    86,
      87,    88,    89,   148,     0,     0,     0,     0,     0,   143,
     144,   145,    71,    72,   147,     0,     0,     0,     0,     0,
      86,    87,    88,    89,   148,     0,   149,   150,     0,     0,
     143,   144,   145,     0,   151,   147,    11,     0,     0,     0,
       0,    86,    87,    88,    89,   206,     0,   149,   150,     0,
       0,     0,     0,     0,     0,   151,     0,    11,   299,     0,
       0,   300,     0,     0,   352,     0,     0,   353,   149,   150,
       0,     0,     0,     0,     0,     0,   151,     0,    11,     0,
     209,   210,   211,   212,   213,   214,   209,   210,   211,   212,
     213,   214,     0,   215,   216,   217,   218,   219,   220,   215,
     216,   217,   218,   219,   220,   387,     0,     0,   388,     0,
       0,   393,     0,     0,   394,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   209,   210,   211,
     212,   213,   214,   209,   210,   211,   212,   213,   214,     0,
     215,   216,   217,   218,   219,   220,   215,   216,   217,   218,
     219,   220,   421,     0,     0,   422,     0,     0,   425,     0,
       0,   426,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   209,   210,   211,   212,   213,   214,
     209,   210,   211,   212,   213,   214,     0,   215,   216,   217,
     218,   219,   220,   215,   216,   217,   218,   219,   220,   439,
       0,     0,   353,     0,     0,   393,     0,     0,   447,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   209,   210,   211,   212,   213,   214,   209,   210,   211,
     212,   213,   214,   241,   215,   216,   217,   218,   219,   220,
     215,   216,   217,   218,   219,   220,     0,     0,     0,     0,
       0,     0,   260,     0,     0,   209,   210,   211,   212,   213,
     214,     0,     0,     0,     0,     0,     0,     0,   215,   216,
     217,   218,   219,   220,   209,   210,   211,   212,   213,   214,
     344,     0,     0,     0,     0,     0,   346,   215,   216,   217,
     218,   219,   220,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   209,   210,   211,   212,   213,   214,   209,   210,
     211,   212,   213,   214,   358,   215,   216,   217,   218,   219,
     220,   215,   216,   217,   218,   219,   220,     0,     0,     0,
       0,     0,     0,   418,     0,     0,   209,   210,   211,   212,
     213,   214,     0,     0,     0,     0,     0,     0,     0,   215,
     216,   217,   218,   219,   220,   209,   210,   211,   212,   213,
     214,   423,     0,     0,     0,     0,     0,   434,   215,   216,
     217,   218,   219,   220,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   209,   210,   211,   212,   213,   214,   209,
     210,   211,   212,   213,   214,   436,   215,   216,   217,   218,
     219,   220,   215,   216,   217,   218,   219,   220,     0,     0,
       0,     0,     0,     0,   444,     0,     0,   209,   210,   211,
     212,   213,   214,     0,     0,     0,     0,     0,     0,     0,
     215,   216,   217,   218,   219,   220,   209,   210,   211,   212,
     213,   214,   449,     0,     0,     0,     0,     0,   451,   215,
     216,   217,   218,   219,   220,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   209,   210,   211,   212,   213,   214,
     209,   210,   211,   212,   213,   214,   453,   215,   216,   217,
     218,   219,   220,   215,   216,   217,   218,   219,   220,     0,
       0,     0,     0,     0,     0,   455,     0,     0,   209,   210,
     211,   212,   213,   214,     0,     0,     0,     0,     0,     0,
       0,   215,   216,   217,   218,   219,   220,   209,   210,   211,
     212,   213,   214,   457,     0,     0,     0,     0,     0,   459,
     215,   216,   217,   218,   219,   220,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   209,   210,   211,   212,   213,
     214,   209,   210,   211,   212,   213,   214,   461,   215,   216,
     217,   218,   219,   220,   215,   216,   217,   218,   219,   220,
       0,     0,     0,     0,     0,     0,   463,     0,     0,   209,
     210,   211,   212,   213,   214,     0,   345,     0,     0,     0,
       0,     0,   215,   216,   217,   218,   219,   220,   209,   210,
     211,   212,   213,   214,   465,   209,   210,   211,   212,   213,
     214,   215,   216,   217,   218,   219,   220,     0,   215,   216,
     217,   218,   219,   220,   208,     0,   209,   210,   211,   212,
     213,   214,   386,     0,     0,     0,     0,     0,     0,   215,
     216,   217,   218,   219,   220,   209,   210,   211,   212,   213,
     214,   209,   210,   211,   212,   213,   214,   419,   215,   216,
     217,   218,   219,   220,   215,   216,   217,   218,   219,   220,
       0,     0,     0,     0,     0,     0,   209,   210,   211,   212,
     213,   214,   437,     0,     0,     0,     0,     0,   445,   215,
     216,   217,   218,   219,   220,     0,     0,     0,     0,     0,
       0,   209,   210,   211,   212,   213,   214,   209,   210,   211,
     212,   213,   214,   467,   215,   216,   217,   218,   219,   220,
     215,   216,   217,   218,   219,   220,     0,     0,     0,     0,
       0,     0,   209,   210,   211,   212,   213,   214,   317,     0,
       0,     0,     0,     0,   354,   215,   216,   217,   218,   219,
     220,     0,     0,   209,   210,   211,   212,   213,   214,   209,
     210,   211,   212,   213,   214,     0,   215,   216,   217,   218,
     219,   220,   215,   216,   217,   218,   219,   220,   320,     0,
     209,   210,   211,   212,   213,   214,     0,   209,   210,   211,
     212,   213,   214,   215,   216,   217,   218,   219,   220,     0,
     215,   216,   217,   218,   219,   220
};

static const short yycheck[] =
{
       2,    63,   100,   110,    36,    62,   246,   294,    27,    27,
      27,    22,     2,    15,    16,    27,     0,    27,    26,    38,
      68,    63,    30,   134,   135,    36,    16,    46,    47,    23,
      63,    24,    25,    30,    30,    37,   147,    31,   100,    24,
     151,    63,    22,    24,    52,    30,    65,    66,   110,    30,
      52,    69,    69,     3,     4,    52,    52,    69,   100,    69,
      24,    63,   349,    27,    66,    22,    24,   100,   110,    27,
      22,    21,    22,    23,   131,    26,    26,   110,   100,    30,
      26,   368,    32,    33,    34,    35,    36,    26,   110,    39,
      40,    41,    42,    43,    44,    45,   128,    23,   100,    25,
     198,    52,    53,    54,    55,    56,    57,    58,   110,    59,
      60,   222,   223,   224,   225,    27,   356,    67,    68,    69,
      70,    71,    72,     3,     4,     5,     6,     7,     8,    25,
      38,    63,   189,    27,    26,    23,   198,    25,    46,    47,
      20,   239,    28,    27,    38,    22,   253,    61,    62,    63,
      64,    24,    46,    47,    38,    27,   198,    65,    66,   257,
      65,    66,    46,    47,    27,   198,    38,    25,   100,   390,
     391,    65,    66,    24,    46,    47,   198,   239,   110,    31,
      22,    65,    66,    24,    24,   296,    62,    63,    64,    69,
      26,   253,    22,    65,    66,   257,   198,   239,    26,    70,
      71,    72,   300,    27,    26,    26,   239,    26,    26,    26,
      25,   253,    25,    24,    26,   257,    26,   239,    25,    25,
     253,    26,    24,    22,   257,    59,    60,    61,    62,    63,
      64,   253,    25,    23,    13,   257,    52,   239,   300,    24,
      63,    23,    26,   175,   342,    31,    30,   345,    52,    25,
      64,   253,    30,    22,    52,   257,    31,    66,   300,    39,
      40,    41,    42,    43,    44,    45,   198,   300,    52,    53,
      54,    55,    56,    57,    58,    24,    13,   100,   300,    52,
     342,    25,    29,   345,   395,    27,    22,   110,   386,    24,
      24,    37,    13,    26,   392,    27,   394,    26,   300,    26,
     342,    26,    63,   345,    26,    25,    13,   239,    25,   342,
      16,    27,   345,   424,    66,   339,   350,   187,   290,   398,
     342,   253,   295,   345,   386,   257,   438,   424,   293,   358,
     392,   336,   394,   301,    -1,    -1,    -1,    -1,    -1,   100,
     342,    -1,    -1,   345,   386,    -1,    -1,    -1,    63,   110,
     392,   353,   394,   386,    -1,    -1,    -1,    -1,    -1,   392,
      -1,   394,    -1,   295,   386,    -1,    -1,    -1,   300,    -1,
     392,    -1,   394,    -1,    30,   198,    -1,   379,    -1,   381,
      -1,    -1,    -1,    -1,   386,    -1,    -1,    -1,    -1,    -1,
     392,    -1,   394,    -1,    -1,   110,    52,    53,    54,    55,
      56,    57,    58,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     342,   413,    -1,   345,   416,    -1,   239,   419,   420,   351,
     422,   353,    -1,    -1,   426,    -1,    -1,    -1,    -1,    -1,
     253,    -1,    -1,   435,   257,   437,    -1,   198,    -1,    -1,
      -1,    -1,    -1,   445,   446,   447,    -1,   379,    -1,   381,
      -1,    -1,    -1,    -1,   386,    -1,    -1,    -1,   390,   391,
     392,    -1,   394,    -1,    -1,    -1,   398,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   300,   239,     3,
       4,   413,    -1,   198,   416,    -1,    -1,   419,   420,    -1,
     422,    -1,   253,    -1,   426,    -1,   257,    21,    22,    23,
      -1,    25,    26,   435,    -1,   437,   438,    -1,    32,    33,
      34,    35,    36,   445,   446,   447,    -1,    -1,    -1,   342,
      -1,    -1,   345,    -1,   239,    -1,    -1,    -1,   351,    -1,
     353,    -1,    -1,    -1,    -1,    59,    60,    -1,   253,   300,
      -1,    -1,   257,    67,    -1,    69,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   379,    -1,   381,    -1,
      -1,    -1,    -1,   386,    -1,    -1,    -1,   390,   391,   392,
      -1,   394,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   342,    -1,    -1,   345,   300,    -1,    -1,    -1,    -1,
     413,    -1,   353,   416,    -1,    -1,   419,   420,    -1,   422,
      -1,    -1,    -1,   426,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   435,    -1,   437,   438,     3,     4,   379,    -1,
     381,    -1,   445,   446,   447,   386,    -1,   342,    -1,    82,
     345,   392,    -1,   394,    21,    22,    23,    -1,   353,    26,
      27,    -1,    -1,    -1,    -1,    32,    33,    34,    35,    36,
      -1,    -1,   413,    -1,    -1,   416,    -1,    -1,   419,   420,
      -1,   422,    -1,    -1,    -1,   426,   381,    -1,   121,    -1,
      -1,   386,    59,    60,   435,    -1,   437,   392,    -1,   394,
      67,    -1,    69,    -1,   445,   446,   447,    -1,   141,   142,
      -1,    -1,    -1,    -1,   147,    -1,   149,   150,   413,   152,
      -1,   416,    -1,    -1,   419,   420,    -1,   422,   161,    -1,
      -1,   426,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     435,    -1,   437,    -1,    -1,   178,    -1,    -1,    -1,    -1,
     445,   446,   447,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   194,    -1,    -1,    -1,    -1,    -1,   200,    -1,    -1,
      -1,    -1,    -1,   206,    -1,    -1,   209,   210,   211,   212,
     213,   214,   215,   216,   217,   218,   219,    -1,   221,    31,
      -1,    -1,    -1,    -1,   227,   228,   229,   230,   231,    -1,
      -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,    51,
      -1,    -1,    -1,    -1,    -1,   248,    -1,    59,    60,    61,
      62,    63,    64,   256,     3,     4,    -1,   260,    -1,   262,
       9,    10,    11,    12,    -1,    14,    15,    16,    17,    18,
      19,    20,    -1,    22,   277,    -1,    25,    -1,    -1,    28,
      -1,    -1,    -1,    32,    33,    34,    35,    -1,    24,    -1,
     293,    27,    -1,    -1,    -1,    -1,   299,    -1,   301,   302,
      -1,    -1,    -1,   306,    -1,    -1,    -1,    -1,   311,    -1,
      46,    47,    48,    49,    50,    51,    -1,   320,    -1,    -1,
      69,    -1,    -1,    59,    60,    61,    62,    63,    64,    -1,
      -1,    -1,    -1,   336,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   344,    -1,   346,    -1,   348,    -1,    -1,    -1,   352,
       3,     4,    -1,    -1,    -1,   358,     9,    10,    11,    12,
      -1,    14,    15,    16,    17,    18,    19,    20,    -1,    22,
      -1,    -1,    25,    -1,    -1,    28,    -1,    -1,    -1,    32,
      33,    34,    35,    -1,   387,    -1,    -1,    -1,    -1,    -1,
     393,    -1,    -1,   396,   397,    -1,    -1,   400,    48,    49,
      50,    51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
      60,    61,    62,    63,    64,   418,    69,    -1,   421,    -1,
     423,    -1,   425,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   434,    -1,   436,    -1,    -1,   439,    -1,    -1,    -1,
      -1,   444,    -1,    -1,    -1,    -1,   449,    -1,   451,    -1,
     453,    -1,   455,    -1,   457,    -1,   459,    -1,   461,    -1,
     463,     1,   465,     3,     4,    -1,    -1,    -1,    -1,     9,
      10,    11,    12,    -1,    14,    15,    16,    17,    18,    19,
      20,    -1,    22,    -1,    -1,    25,    -1,    24,    28,    29,
      27,    -1,    32,    33,    34,    35,    -1,    -1,    -1,    39,
      40,    41,    42,    43,    44,    45,    -1,    -1,    -1,    46,
      47,    48,    49,    50,    51,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    59,    60,    61,    62,    63,    64,    68,    69,
      70,    71,    72,     1,    -1,     3,     4,    -1,    -1,    -1,
      -1,     9,    10,    11,    12,    -1,    14,    15,    16,    17,
      18,    19,    20,    -1,    22,    -1,    -1,    25,    -1,    -1,
      28,     3,     4,    -1,    32,    33,    34,    35,    -1,    -1,
      -1,    39,    40,    41,    42,    43,    44,    45,    -1,    21,
      22,    23,    -1,    -1,    26,    27,    -1,    -1,    -1,    -1,
      32,    33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,
      68,    69,    70,    71,    72,    -1,    -1,    -1,    -1,    -1,
       3,     4,    -1,    -1,    -1,    -1,    -1,    59,    60,    -1,
      -1,    -1,    -1,    -1,    -1,    67,    -1,    69,    21,    22,
      23,     3,     4,    26,    -1,    28,    -1,    -1,    -1,    32,
      33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,    21,
      22,    23,    -1,    25,    26,    -1,    -1,    -1,    -1,    -1,
      32,    33,    34,    35,    36,    -1,    59,    60,    -1,    -1,
      -1,    -1,    -1,    -1,    67,    -1,    69,    -1,    -1,    -1,
       3,     4,    -1,    -1,    -1,    -1,    -1,    59,    60,    -1,
      -1,    -1,    -1,    -1,    -1,    67,    -1,    69,    21,    22,
      23,     3,     4,    26,    27,    -1,    -1,    -1,    -1,    32,
      33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,    21,
      22,    23,     3,     4,    26,    -1,    -1,    -1,    -1,    -1,
      32,    33,    34,    35,    36,    -1,    59,    60,    -1,    -1,
      21,    22,    23,    -1,    67,    26,    69,    -1,    -1,    -1,
      -1,    32,    33,    34,    35,    36,    -1,    59,    60,    -1,
      -1,    -1,    -1,    -1,    -1,    67,    -1,    69,    24,    -1,
      -1,    27,    -1,    -1,    24,    -1,    -1,    27,    59,    60,
      -1,    -1,    -1,    -1,    -1,    -1,    67,    -1,    69,    -1,
      46,    47,    48,    49,    50,    51,    46,    47,    48,    49,
      50,    51,    -1,    59,    60,    61,    62,    63,    64,    59,
      60,    61,    62,    63,    64,    24,    -1,    -1,    27,    -1,
      -1,    24,    -1,    -1,    27,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,
      49,    50,    51,    46,    47,    48,    49,    50,    51,    -1,
      59,    60,    61,    62,    63,    64,    59,    60,    61,    62,
      63,    64,    24,    -1,    -1,    27,    -1,    -1,    24,    -1,
      -1,    27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,    51,
      46,    47,    48,    49,    50,    51,    -1,    59,    60,    61,
      62,    63,    64,    59,    60,    61,    62,    63,    64,    24,
      -1,    -1,    27,    -1,    -1,    24,    -1,    -1,    27,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    46,    47,    48,    49,    50,    51,    46,    47,    48,
      49,    50,    51,    24,    59,    60,    61,    62,    63,    64,
      59,    60,    61,    62,    63,    64,    -1,    -1,    -1,    -1,
      -1,    -1,    24,    -1,    -1,    46,    47,    48,    49,    50,
      51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,    60,
      61,    62,    63,    64,    46,    47,    48,    49,    50,    51,
      24,    -1,    -1,    -1,    -1,    -1,    24,    59,    60,    61,
      62,    63,    64,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    46,    47,    48,    49,    50,    51,    46,    47,
      48,    49,    50,    51,    24,    59,    60,    61,    62,    63,
      64,    59,    60,    61,    62,    63,    64,    -1,    -1,    -1,
      -1,    -1,    -1,    24,    -1,    -1,    46,    47,    48,    49,
      50,    51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
      60,    61,    62,    63,    64,    46,    47,    48,    49,    50,
      51,    24,    -1,    -1,    -1,    -1,    -1,    24,    59,    60,
      61,    62,    63,    64,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    46,    47,    48,    49,    50,    51,    46,
      47,    48,    49,    50,    51,    24,    59,    60,    61,    62,
      63,    64,    59,    60,    61,    62,    63,    64,    -1,    -1,
      -1,    -1,    -1,    -1,    24,    -1,    -1,    46,    47,    48,
      49,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      59,    60,    61,    62,    63,    64,    46,    47,    48,    49,
      50,    51,    24,    -1,    -1,    -1,    -1,    -1,    24,    59,
      60,    61,    62,    63,    64,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,    51,
      46,    47,    48,    49,    50,    51,    24,    59,    60,    61,
      62,    63,    64,    59,    60,    61,    62,    63,    64,    -1,
      -1,    -1,    -1,    -1,    -1,    24,    -1,    -1,    46,    47,
      48,    49,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    59,    60,    61,    62,    63,    64,    46,    47,    48,
      49,    50,    51,    24,    -1,    -1,    -1,    -1,    -1,    24,
      59,    60,    61,    62,    63,    64,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,
      51,    46,    47,    48,    49,    50,    51,    24,    59,    60,
      61,    62,    63,    64,    59,    60,    61,    62,    63,    64,
      -1,    -1,    -1,    -1,    -1,    -1,    24,    -1,    -1,    46,
      47,    48,    49,    50,    51,    -1,    27,    -1,    -1,    -1,
      -1,    -1,    59,    60,    61,    62,    63,    64,    46,    47,
      48,    49,    50,    51,    24,    46,    47,    48,    49,    50,
      51,    59,    60,    61,    62,    63,    64,    -1,    59,    60,
      61,    62,    63,    64,    25,    -1,    46,    47,    48,    49,
      50,    51,    27,    -1,    -1,    -1,    -1,    -1,    -1,    59,
      60,    61,    62,    63,    64,    46,    47,    48,    49,    50,
      51,    46,    47,    48,    49,    50,    51,    27,    59,    60,
      61,    62,    63,    64,    59,    60,    61,    62,    63,    64,
      -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,    49,
      50,    51,    27,    -1,    -1,    -1,    -1,    -1,    27,    59,
      60,    61,    62,    63,    64,    -1,    -1,    -1,    -1,    -1,
      -1,    46,    47,    48,    49,    50,    51,    46,    47,    48,
      49,    50,    51,    27,    59,    60,    61,    62,    63,    64,
      59,    60,    61,    62,    63,    64,    -1,    -1,    -1,    -1,
      -1,    -1,    46,    47,    48,    49,    50,    51,    31,    -1,
      -1,    -1,    -1,    -1,    31,    59,    60,    61,    62,    63,
      64,    -1,    -1,    46,    47,    48,    49,    50,    51,    46,
      47,    48,    49,    50,    51,    -1,    59,    60,    61,    62,
      63,    64,    59,    60,    61,    62,    63,    64,    37,    -1,
      46,    47,    48,    49,    50,    51,    -1,    46,    47,    48,
      49,    50,    51,    59,    60,    61,    62,    63,    64,    -1,
      59,    60,    61,    62,    63,    64
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,    74,    75,     0,     3,     4,     5,     6,     7,     8,
      20,    69,    77,    80,    81,    82,    83,    92,    95,    22,
      68,    78,    22,    80,    84,    85,    86,    81,    22,    26,
      70,    71,    72,    76,    26,    87,    27,    25,    26,    39,
      40,    41,    42,    43,    44,    45,    79,    22,    88,    28,
     107,    85,    93,    30,    89,   108,    80,    96,    97,    98,
      23,    31,    24,   118,    99,    27,    25,    31,    90,    88,
       1,     3,     4,     9,    10,    11,    12,    14,    15,    16,
      17,    18,    19,    22,    25,    29,    32,    33,    34,    35,
      80,    83,   107,   109,   117,   119,   120,   121,   122,   123,
     124,   125,   126,   127,   130,   135,   136,   137,   143,   144,
     146,   148,   149,   150,   151,   152,   153,   154,   155,   156,
     164,   165,   166,   169,   170,    22,   101,   106,    94,    97,
      91,    24,    26,    26,    26,    26,    26,    23,    25,    23,
      25,    26,    26,    21,    22,    23,    25,    26,    36,    59,
      60,    67,    80,   127,   130,   157,   161,   162,   163,   164,
      26,    30,    52,    53,    54,    55,    56,    57,    58,    22,
     111,   119,   120,    25,    25,    26,   117,   119,    26,    25,
     157,   171,   172,    26,    24,    30,   103,    24,   107,    24,
      88,   157,   163,   163,   147,    25,    25,   157,    27,   157,
      30,   157,   163,   157,   157,   163,    36,   157,    25,    46,
      47,    48,    49,    50,    51,    59,    60,    61,    62,    63,
      64,    38,    46,    47,    65,    66,   157,   128,   132,   131,
     134,   133,    30,   112,   113,    22,   127,   138,   139,    13,
     157,    24,    27,    22,    36,   167,   102,    23,    52,   100,
     106,    88,    27,    27,   145,   157,    24,    27,   119,   120,
      24,   157,    24,    27,    27,   157,   157,   157,   157,   157,
     157,   157,   157,   157,   157,   157,   157,   158,   157,   163,
     163,   163,   163,    31,   157,   157,   157,   157,   157,    23,
      24,    25,   116,    52,   110,    24,    25,   119,   120,    24,
      27,   173,    30,   168,   101,    31,    28,   157,   159,   117,
     119,    24,    27,   157,   119,   120,   157,    31,   157,   157,
      37,    52,    31,    22,   111,   157,   159,   116,   139,   140,
     163,   157,   119,   120,   172,   157,    24,    27,    24,   105,
     157,   160,    13,   157,    24,    27,    24,   157,   129,   114,
     115,    25,    24,    27,    31,   171,   104,   100,    24,    29,
     119,   120,   157,   119,   120,   157,   157,   116,   110,    22,
     127,   130,   141,   142,   157,    11,    17,    18,   119,   124,
     135,   146,   150,    27,   101,   160,    27,    24,    27,   116,
      24,    24,    27,    24,    27,    26,    26,    26,    26,   119,
      26,   119,   120,   157,   142,   142,   119,   120,   157,   119,
     120,   163,   157,    27,   157,   138,    13,   157,    24,    27,
      27,    24,    27,    24,    25,    24,    27,   157,   119,   119,
     157,   157,   140,   157,    24,    13,    24,    27,    25,    24,
     157,   157,   141,   157,    24,    27,    27,    27,   157,    24,
     157,    24,   157,    24,   157,    24,   157,    24,   157,    24,
     157,    24,   157,    24,   157,    24,   157,    27
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrlab1


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL		goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { 								\
      yyerror ("syntax error: cannot back up");\
      YYERROR;							\
    }								\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)         \
  Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
# define YYLEX yylex ()
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)

# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint Args;				\
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Token, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (cinluded).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylineno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylineno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (Rule);		\
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */



/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  
  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack. Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	short *yyss1 = yyss;


	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;


  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:
#line 247 "sl.y"
    {
			;}
    break;

  case 3:
#line 250 "sl.y"
    {
			;}
    break;

  case 4:
#line 256 "sl.y"
    {
				yyval.integer	=	SLC_UNIFORM;
			;}
    break;

  case 5:
#line 261 "sl.y"
    {
				yyval.integer	=	SLC_VARYING;
			;}
    break;

  case 6:
#line 266 "sl.y"
    {
				yyval.integer	=	SLC_VARYING | SLC_VERTEX;
			;}
    break;

  case 7:
#line 270 "sl.y"
    {
				yyval.integer	=	0;
			;}
    break;

  case 8:
#line 278 "sl.y"
    {
				yyval.integer	=	SLC_EXTERN;
			;}
    break;

  case 9:
#line 282 "sl.y"
    {
				yyval.integer	=	0;
			;}
    break;

  case 10:
#line 289 "sl.y"
    {
				yyval.integer	=	SLC_OUTPUT;
			;}
    break;

  case 11:
#line 293 "sl.y"
    {
				yyval.integer	=	0;
			;}
    break;

  case 12:
#line 300 "sl.y"
    {
				yyval.integer	=	SLC_FLOAT;
			;}
    break;

  case 13:
#line 305 "sl.y"
    {
				yyval.integer	=	SLC_VECTOR | SLC_VCOLOR;
			;}
    break;

  case 14:
#line 310 "sl.y"
    {
				yyval.integer	=	SLC_VECTOR | SLC_VVECTOR;
			;}
    break;

  case 15:
#line 315 "sl.y"
    {
				yyval.integer	=	SLC_VECTOR | SLC_VNORMAL;
			;}
    break;

  case 16:
#line 320 "sl.y"
    {
				yyval.integer	=	SLC_VECTOR | SLC_VPOINT;
			;}
    break;

  case 17:
#line 325 "sl.y"
    {
				yyval.integer	=	SLC_MATRIX;
			;}
    break;

  case 18:
#line 330 "sl.y"
    {
				yyval.integer	=	SLC_STRING | SLC_UNIFORM;
			;}
    break;

  case 19:
#line 340 "sl.y"
    {
				yyval.integer	=	yyvsp[-3].integer | yyvsp[-2].integer | yyvsp[-1].integer | yyvsp[0].integer;
				sdr->desire(yyval.integer);
			;}
    break;

  case 20:
#line 358 "sl.y"
    {
		;}
    break;

  case 21:
#line 362 "sl.y"
    {
		;}
    break;

  case 22:
#line 379 "sl.y"
    {
			CFunction	*thisFunction	=	sdr->newFunction(yyvsp[-1].string);
			
			if (yyvsp[-2].integer & (SLC_OUTPUT | SLC_EXTERN | SLC_RDONLY)) {
				sdr->error("Invalid return type for function %s\n",yyvsp[-1].string);
				yyvsp[-2].integer	&=	~(SLC_OUTPUT | SLC_EXTERN | SLC_RDONLY);
			}

			thisFunction->returnValue	=	new CParameter(yyvsp[-1].string,yyvsp[-2].integer,1);

			sdr->undesire();
		;}
    break;

  case 23:
#line 395 "sl.y"
    {
			CFunction	*thisFunction	=	sdr->newFunction(yyvsp[-1].string);
			
			thisFunction->returnValue	=	NULL;
		;}
    break;

  case 24:
#line 407 "sl.y"
    {
			CFunction	*cFun		=	sdr->popFunction();

			cFun->initExpression	=	yyvsp[-2].code;
			cFun->code				=	yyvsp[0].code;

			if (cFun->returnValue != NULL)
				if (cFun->returnValueGiven == FALSE) 
					sdr->error("Return value not given for %s\n",cFun->symbolName);

		;}
    break;

  case 25:
#line 425 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 26:
#line 429 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 27:
#line 441 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 28:
#line 447 "sl.y"
    {
			yyval.code	=	yyvsp[-1].code;
		;}
    break;

  case 29:
#line 452 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 30:
#line 461 "sl.y"
    {
			int	type	=	sdr->desired();

			if (type & (SLC_EXTERN)) {
				sdr->error("Invalid parameter type\n");
				type	&=	~(SLC_EXTERN);
			}

			if (type & SLC_OUTPUT) {
				sdr->undesire();
				sdr->desire(type);					// Make sure we mark the desired type as READ-ONLY
			} else {
				sdr->undesire();
				sdr->desire(type | SLC_RDONLY);		// Make sure we mark the desired type as READ-ONLY
			}
		;}
    break;

  case 31:
#line 478 "sl.y"
    {
			yyval.code					=	yyvsp[0].code;
			sdr->undesire();						// We're done with the type
		;}
    break;

  case 32:
#line 488 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[0].string,sdr->desired(),1);	// Add the Parameter to the current CFunction
		;}
    break;

  case 33:
#line 495 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 34:
#line 500 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[0].string,sdr->desired(),1);
	
			yyval.code			=	new CNullExpression;
		;}
    break;

  case 35:
#line 511 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[-2].string,sdr->desired() | SLC_ARRAY,-1);
		;}
    break;

  case 36:
#line 518 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 37:
#line 526 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[-3].string,sdr->desired() | SLC_ARRAY, atoi(yyvsp[-1].string));
			
			if (cParameter->numItems <= 0) {
				sdr->error("Array size for %s is invalid (%s)\n",yyvsp[-3].string,yyvsp[-1].string);
				cParameter->numItems	=	1;
			}
		;}
    break;

  case 38:
#line 538 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 39:
#line 545 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[-2].string,sdr->desired() | SLC_ARRAY, -1);
			
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 40:
#line 557 "sl.y"
    {
			CParameter	*cParameter;
			
			cParameter	=	sdr->newParameter(yyvsp[-3].string,sdr->desired() | SLC_ARRAY, atoi(yyvsp[-1].string));
			
			if (cParameter->numItems <= 0) {
				sdr->error("Array size for %s is invalid (%s)\n",yyvsp[-3].string,yyvsp[-1].string);
				cParameter->numItems	=	1;
			}

			yyval.code	=	new CNullExpression;
		;}
    break;

  case 41:
#line 578 "sl.y"
    {
			CFunction		*mainFunction	=	sdr->newFunction(constantShaderMain);

			mainFunction->returnValue		=	NULL;

			sdr->shaderName					=	strdup(yyvsp[-1].string);
			sdr->shaderType					=	yyvsp[-2].integer;
			sdr->shaderFunction				=	mainFunction;
		;}
    break;

  case 42:
#line 589 "sl.y"
    {	
		;}
    break;

  case 43:
#line 592 "sl.y"
    {
			CFunction	*cFun			=	sdr->popFunction();
			CParameter	*cParameter;

			for (cParameter=cFun->parameters->first();cParameter!=NULL;cParameter=cFun->parameters->next()) {
				sdr->variables->push(cParameter);
			}

			assert(cFun == sdr->shaderFunction);

			cFun->initExpression	=	yyvsp[-3].code;
			cFun->code				=	yyvsp[0].code;
		;}
    break;

  case 44:
#line 610 "sl.y"
    {
			yyval.integer	=	SLC_SURFACE;
		;}
    break;

  case 45:
#line 615 "sl.y"
    {
			yyval.integer	=	SLC_DISPLACEMENT;
		;}
    break;

  case 46:
#line 620 "sl.y"
    {
			yyval.integer	=	SLC_LIGHT;
		;}
    break;

  case 47:
#line 625 "sl.y"
    {
			yyval.integer	=	SLC_VOLUME;
		;}
    break;

  case 48:
#line 630 "sl.y"
    {
			yyval.integer	=	SLC_TRANSFORMATION;
		;}
    break;

  case 49:
#line 635 "sl.y"
    {
			yyval.integer	=	SLC_IMAGER;
		;}
    break;

  case 50:
#line 644 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 51:
#line 648 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 52:
#line 659 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 53:
#line 665 "sl.y"
    {
			yyval.code	=	yyvsp[-1].code;
		;}
    break;

  case 54:
#line 670 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 55:
#line 679 "sl.y"
    {
			int	type	=	yyvsp[0].integer;

			if (type & SLC_VARYING) {
			} else {
				type |= SLC_UNIFORM;
			}

			// FIXME: Shaders have uniform variables only
			//type |= SLC_UNIFORM;

			sdr->undesire();
			sdr->desire(type);
		;}
    break;

  case 56:
#line 694 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		
			if (yyvsp[-2].integer & (SLC_EXTERN)) {
				sdr->error("Invalid parameter type for the shader\n");
			}

			sdr->undesire();
		;}
    break;

  case 57:
#line 710 "sl.y"
    {
			//if (!(sdr->desired() & SLC_VARYING)) {
				yyval.code	=	getAssignment(sdr->variableList,yyvsp[0].expression);
			//} else {
			//	CVariable	*cVar;

			//	while((cVar = sdr->variableList->pop()) != NULL) {
			//	}
			//	$$	=	new CNullExpression;
			//}
		;}
    break;

  case 58:
#line 724 "sl.y"
    {
			//if (!(sdr->desired() & SLC_VARYING))
				yyval.code	=	getAssignment(sdr->variableList,yyvsp[0].array);
			//else {
			//	CVariable	*cVar;

			//	while((cVar = sdr->variableList->pop()) != NULL) {
			//	}

			//	$$	=	new CNullExpression;
			//}
		;}
    break;

  case 59:
#line 742 "sl.y"
    {
			CParameter	*cParameter	=	sdr->newParameter(yyvsp[-1].string,sdr->desired() | SLC_PARAMETER,1);

			sdr->variableList->push(cParameter);	// Save the parameter so that we can generate init code later
		;}
    break;

  case 60:
#line 748 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 61:
#line 753 "sl.y"
    {
			CParameter	*cParameter	=	sdr->newParameter(yyvsp[0].string,sdr->desired() | SLC_PARAMETER,1);

			sdr->variableList->push(cParameter);
		;}
    break;

  case 62:
#line 759 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 63:
#line 768 "sl.y"
    {
			CParameter	*cParameter	=	sdr->newParameter(yyvsp[-4].string,sdr->desired() | SLC_PARAMETER | SLC_ARRAY,atoi(yyvsp[-2].string));

			if (cParameter->numItems <= 0) {
				sdr->error("Array size for %s is invalid (%s)\n",yyvsp[-4].string,yyvsp[-2].string);
				cParameter->numItems	=	1;
			}

			sdr->variableList->push(cParameter);
		;}
    break;

  case 64:
#line 779 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 65:
#line 787 "sl.y"
    {
			CParameter	*cParameter	=	sdr->newParameter(yyvsp[-3].string,sdr->desired() | SLC_PARAMETER | SLC_ARRAY,atoi(yyvsp[-1].string));

			// Get the parameter
			if (cParameter->numItems <= 0)	{
				sdr->error("Array size for %s is invalid (%s)\n",yyvsp[-3].string,yyvsp[-1].string);
				cParameter->numItems	=	1;
			}

			sdr->variableList->push(cParameter);
		;}
    break;

  case 66:
#line 799 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 67:
#line 804 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 68:
#line 812 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 69:
#line 819 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 70:
#line 829 "sl.y"
    {
			CFunction	*cFun	=	sdr->newFunction(constantBlockName);
		;}
    break;

  case 71:
#line 834 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			cFun->code			=	yyvsp[-1].code;

			yyval.code	=	new	CFuncallExpression(cFun,NULL);
		;}
    break;

  case 72:
#line 850 "sl.y"
    {
			CVariable	*cVar;

			if (yyvsp[-1].integer & (SLC_OUTPUT | SLC_RDONLY)) {
				sdr->error("Invalid container class for local variables\n");
			}

			// Remove the uninitialized variables from the list
			while((cVar = (CVariable *) sdr->variableList->pop()) != NULL);

			sdr->undesire();

			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 73:
#line 871 "sl.y"
    {
			yyval.code	=	getAssignment(sdr->variableList,yyvsp[0].expression);
		;}
    break;

  case 74:
#line 877 "sl.y"
    {
			yyval.code	=	getAssignment(sdr->variableList,yyvsp[0].array);
		;}
    break;

  case 75:
#line 884 "sl.y"
    {
			CVariable	*cVar;

			cVar	=	sdr->newVariable(yyvsp[0].string,sdr->desired(),1);

			sdr->variableList->push(cVar);
		;}
    break;

  case 76:
#line 892 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 77:
#line 897 "sl.y"
    {
			CVariable	*cVar;

			cVar	=	sdr->newVariable(yyvsp[0].string,sdr->desired(),1);

			sdr->variableList->push(cVar);
		;}
    break;

  case 78:
#line 906 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-1].code,yyvsp[0].code);
		;}
    break;

  case 79:
#line 915 "sl.y"
    {
			CVariable	*cVar;

			cVar	=	sdr->newVariable(yyvsp[-3].string,sdr->desired() | SLC_ARRAY,atoi(yyvsp[-1].string));

			if (cVar->numItems <= 0) {
				sdr->error("Array size is invalid for %s (%s)\n",yyvsp[-3].string,yyvsp[-1].string);
				cVar->numItems	=	1;
			}

			sdr->variableList->push(cVar);
		;}
    break;

  case 80:
#line 928 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 81:
#line 936 "sl.y"
    {
			CVariable	*cVar;

			cVar	=	sdr->newVariable(yyvsp[-3].string,sdr->desired() | SLC_ARRAY,atoi(yyvsp[-1].string));

		
			if (cVar->numItems <= 0) {
				sdr->error("Array size is invalid for %s (%s)\n",yyvsp[-3].string,yyvsp[-1].string);
				cVar->numItems	=	1;
			}

			sdr->variableList->push(cVar);
		;}
    break;

  case 82:
#line 952 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-1].code,yyvsp[0].code);
		;}
    break;

  case 83:
#line 960 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 84:
#line 965 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 85:
#line 975 "sl.y"
    {

			yyval.code	=	yyvsp[0].code;
			assert(sdr->desired() & SLC_NONE);
		;}
    break;

  case 86:
#line 982 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
			assert(sdr->desired() & SLC_NONE);
		;}
    break;

  case 87:
#line 988 "sl.y"
    {
			// Recoverable error happened
			yyval.code	=	new CNullExpression;
			assert(sdr->desired() & SLC_NONE);
		;}
    break;

  case 88:
#line 999 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-1].code,yyvsp[0].code);
		;}
    break;

  case 89:
#line 1003 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 90:
#line 1013 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 91:
#line 1018 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 92:
#line 1023 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 93:
#line 1028 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 94:
#line 1033 "sl.y"
    {
			yyval.code	=	yyvsp[-1].expression;
		;}
    break;

  case 95:
#line 1038 "sl.y"
    {
			yyval.code	=	yyvsp[-1].expression;
		;}
    break;

  case 96:
#line 1043 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 97:
#line 1048 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 98:
#line 1053 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 99:
#line 1058 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 100:
#line 1063 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 101:
#line 1068 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 102:
#line 1073 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 103:
#line 1078 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 104:
#line 1083 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 105:
#line 1088 "sl.y"
    {
			yyval.code	=	yyvsp[-1].expression;
		;}
    break;

  case 106:
#line 1093 "sl.y"
    {
			yyval.code					=	new CNullExpression;
		;}
    break;

  case 107:
#line 1102 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 108:
#line 1107 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 109:
#line 1112 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 110:
#line 1117 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 111:
#line 1122 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 112:
#line 1127 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 113:
#line 1132 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 114:
#line 1141 "sl.y"
    {
			CFunction	*cFunction;
			int			bc;
			char		tmp[256];

			if (sscanf(yyvsp[-1].string,"%d",&bc) != 1) sdr->error("Invalid break count: %s\n",yyvsp[-1].string);

			if (bc <= 0) sdr->error("Bad break count: %s\n",yyvsp[-1].string);

			for(cFunction = sdr->functionStack->last(); cFunction != NULL; cFunction = sdr->functionStack->prev()) {
				if (strcmp(cFunction->symbolName,constantLoopName) == 0) bc--;
				else if (strcmp(cFunction->symbolName,constantBlockName) == 0) continue;

				if (bc == 0) break;

				sdr->error("Break target not found\n");
				break;
			}

			if (cFunction == NULL) sdr->error("Break target not found\n");

			sprintf(tmp,"%s\t%s\n",opcodeBreak,yyvsp[-1].string);

			yyval.code	=	new CFixedExpression(tmp);
		;}
    break;

  case 115:
#line 1168 "sl.y"
    {
			CFunction	*cFunction;
			char		tmp[256];
			int			bc	=	(int) 1;

			sdr->functionStack->push(sdr->lastFunction);
			for(cFunction = sdr->functionStack->last(); cFunction != NULL; cFunction = sdr->functionStack->prev()) {
				if (strcmp(cFunction->symbolName,constantLoopName) == 0) bc--;
				else if (strcmp(cFunction->symbolName,constantBlockName) == 0) continue;

				if (bc == 0) break;

				sdr->error("Break target not found\n");
				break;
			}
			sdr->lastFunction	=	sdr->functionStack->pop();

			if (cFunction == NULL) sdr->error("Break target not found\n");

			sprintf(tmp,"%s\t1\n",opcodeBreak);

			yyval.code	=	new CFixedExpression(tmp);
		;}
    break;

  case 116:
#line 1197 "sl.y"
    {
			CFunction	*cFunction;
			char		tmp[256];
			int			bc;

			if (sscanf(yyvsp[-1].string,"%d",&bc) != 1) sdr->error("Bad continue count: %s\n",yyvsp[-1].string);

			if (bc <= 0) sdr->error("Bad continue count: %s\n",yyvsp[-1].string);

			for(cFunction = sdr->functionStack->last(); cFunction != NULL; cFunction = sdr->functionStack->prev()) {
				if (strcmp(cFunction->symbolName,constantLoopName) == 0) bc--;
				else if (strcmp(cFunction->symbolName,constantBlockName) == 0) continue;

				if (bc == 0) break;

				sdr->error("Continue target not found\n");
				break;
			}

			if (cFunction == NULL) sdr->error("Continue target not found\n");

			sprintf(tmp,"%s\t%s\n",opcodeContinue,yyvsp[-1].string);

			yyval.code	=	new CFixedExpression(tmp);
		;}
    break;

  case 117:
#line 1224 "sl.y"
    {
			CFunction	*cFunction;
			char		tmp[256];
			int			bc	=	(int) 1;

			for(cFunction = sdr->functionStack->last(); cFunction != NULL; cFunction = sdr->functionStack->prev()) {
				if (strcmp(cFunction->symbolName,constantLoopName) == 0) bc--;
				else if (strcmp(cFunction->symbolName,constantBlockName) == 0) continue;

				if (bc == 0) break;
				
				sdr->error("Continue target not found\n");
				break;
			}

			if (cFunction == NULL) sdr->error("Continue target not found\n");

			sprintf(tmp,"%s\t1\n",opcodeContinue);

			yyval.code	=	new CFixedExpression(tmp);
		;}
    break;

  case 118:
#line 1251 "sl.y"
    {
			CFunction	*cFun	=	sdr->lastFunction;
			CExpression	*c;

			// Skip over loops
			for (cFun = sdr->functionStack->last(); cFun != NULL; cFun = sdr->functionStack->prev()) {
				if (strcmp(cFun->symbolName,constantBlockName) == 0) continue;
				if (strcmp(cFun->symbolName,constantLoopName) == 0) continue;
				break;
			}

			if (cFun ==	NULL) {
				sdr->error("Return target not found\n");
				yyval.code	=	new CNullExpression;
			} else {
				if (cFun->returnValue == NULL) {
					sdr->error("Function %s was not expecting a return value\n",cFun->symbolName);
					c	=	new CNullExpression;
				} else {
					c	=	new CAssignmentExpression(cFun->returnValue,yyvsp[-1].expression);				
				}

				yyval.code	=	c;

				cFun->returnValueGiven	=	TRUE;
			}
		;}
    break;

  case 119:
#line 1280 "sl.y"
    {
			CFunction	*cFun	=	sdr->lastFunction;

			// Skip over loops
			for (cFun = sdr->functionStack->last(); cFun != NULL; cFun = sdr->functionStack->prev()) {
				if (strcmp(cFun->symbolName,constantBlockName) == 0) continue;
				if (strcmp(cFun->symbolName,constantLoopName) == 0) continue;
				break;
			}

			if (cFun ==	NULL)	sdr->error("Return target not found\n");
			else {
				if (cFun->returnValue != NULL) {
					sdr->error("Function %s was expecting a return value\n",cFun->symbolName);
				}
			}
		;}
    break;

  case 120:
#line 1307 "sl.y"
    {
			CFunction	*cFun	=	sdr->newFunction(constantLoopName);
			
			yyval.expression	=	yyvsp[-1].expression;	
		;}
    break;

  case 121:
#line 1318 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CForLoop(NULL,yyvsp[-1].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 122:
#line 1328 "sl.y"
    {

			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CForLoop(NULL,yyvsp[-1].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 123:
#line 1341 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 124:
#line 1348 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {	
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CAssignmentExpression(cVar,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 125:
#line 1364 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-4].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-4].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 126:
#line 1371 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-6].string);

			if (cVar == NULL) {
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CArrayAssignmentExpression(cVar,yyvsp[-4].expression,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 127:
#line 1388 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 128:
#line 1395 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeAddFloatFloat,opcodeAddVectorVector,FALSE,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 129:
#line 1408 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 130:
#line 1415 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeSubFloatFloat,opcodeSubVectorVector,FALSE,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 131:
#line 1428 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeAddFloatFloat,opcodeAddVectorVector,FALSE,new CConstantTerminalExpression(SLC_FLOAT,strdup("1")));
			}
		;}
    break;

  case 132:
#line 1439 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeAddFloatFloat,opcodeAddVectorVector,FALSE,new CConstantTerminalExpression(SLC_FLOAT,strdup("-1")));
			}
		;}
    break;

  case 133:
#line 1450 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 134:
#line 1457 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeMulFloatFloat,opcodeMulVectorVector,FALSE,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 135:
#line 1470 "sl.y"
    {
			CVariable	*cVar				=	sdr->getVariable(yyvsp[-1].string);

			if (cVar == NULL)	sdr->error("Identifier %s not found\n",yyvsp[-1].string);
			else				sdr->desire(cVar->type);
		;}
    break;

  case 136:
#line 1477 "sl.y"
    {
			CVariable			*cVar		=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {
				yyval.expression	=	new CNullExpression;
			} else {
				yyval.expression	=	new CUpdateExpression(cVar,opcodeDivFloatFloat,opcodeDivVectorVector,FALSE,yyvsp[0].expression);
				sdr->undesire();
			}
		;}
    break;

  case 137:
#line 1493 "sl.y"
    {
			CFunction	*cFun	=	sdr->newFunction(constantLoopName);
		;}
    break;

  case 138:
#line 1507 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CForLoop(yyvsp[-6].code,yyvsp[-4].expression,yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 139:
#line 1524 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CForLoop(yyvsp[-6].code,yyvsp[-4].expression,yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 140:
#line 1535 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 141:
#line 1539 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 142:
#line 1550 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 143:
#line 1555 "sl.y"
    {
			yyval.code	=	yyvsp[0].expression;
		;}
    break;

  case 144:
#line 1564 "sl.y"
    {
			yyval.expression	=	getConversion(SLC_BOOLEAN,yyvsp[0].expression);
		;}
    break;

  case 145:
#line 1568 "sl.y"
    {
			yyval.expression	=	new CConstantTerminalExpression(SLC_BOOLEAN | SLC_UNIFORM,strdup("true"));
		;}
    break;

  case 146:
#line 1577 "sl.y"
    {
			yyval.code	=	yyvsp[0].code;
		;}
    break;

  case 147:
#line 1581 "sl.y"
    {
			yyval.code	=	new CNullExpression;
		;}
    break;

  case 148:
#line 1592 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 149:
#line 1597 "sl.y"
    {
			yyval.code	=	yyvsp[0].expression;
		;}
    break;

  case 150:
#line 1604 "sl.y"
    {
			yyval.code	=	new CTwoExpressions(yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 151:
#line 1609 "sl.y"
    {
			yyval.code	=	yyvsp[0].expression;
		;}
    break;

  case 152:
#line 1624 "sl.y"
    {
			yyval.code	=	new CIfThenElse(yyvsp[-4].expression,yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 153:
#line 1637 "sl.y"
    {
			yyval.code	=	new CIfThenElse(yyvsp[-2].expression,yyvsp[0].code,NULL);
		;}
    break;

  case 154:
#line 1648 "sl.y"
    {
			yyval.code	=	new CIfThenElse(yyvsp[-4].expression,yyvsp[-2].code,yyvsp[0].code);
		;}
    break;

  case 155:
#line 1661 "sl.y"
    {
			yyval.array->push(yyvsp[0].expression);
		;}
    break;

  case 156:
#line 1666 "sl.y"
    {
			sdr->actualParameters->push(yyvsp[0].expression);
			yyval.array	=	sdr->actualParameters;
		;}
    break;

  case 157:
#line 1675 "sl.y"
    {
			sdr->actualParameterStack->push(sdr->actualParameters);
			sdr->actualParameters	=	new CArray<CExpression *>;
		;}
    break;

  case 158:
#line 1681 "sl.y"
    {
			yyval.array	=	yyvsp[-1].array;
		;}
    break;

  case 159:
#line 1693 "sl.y"
    {
			yyval.code	=	new CGatherThenElse(yyvsp[-3].array,yyvsp[-2].code,yyvsp[0].code);
			sdr->actualParameters	=	sdr->actualParameterStack->pop();
		;}
    break;

  case 160:
#line 1704 "sl.y"
    {
			yyval.code	=	new CGatherThenElse(yyvsp[-1].array,yyvsp[0].code,NULL);
			sdr->actualParameters	=	sdr->actualParameterStack->pop();
		;}
    break;

  case 161:
#line 1713 "sl.y"
    {
			yyval.code	=	new CGatherThenElse(yyvsp[-3].array,yyvsp[-2].code,yyvsp[0].code);
			sdr->actualParameters	=	sdr->actualParameterStack->pop();
		;}
    break;

  case 162:
#line 1723 "sl.y"
    {
			CFunction	*cCFunction	=	sdr->newFunction(constantLoopName);

			sdr->requiredShaderContext	|=	SLC_SURFACE;
		;}
    break;

  case 163:
#line 1735 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(NULL,yyvsp[-2].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 164:
#line 1748 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(NULL,yyvsp[-2].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 165:
#line 1763 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(yyvsp[-6].expression,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 166:
#line 1780 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(yyvsp[-6].expression,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 167:
#line 1793 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(yyvsp[-2].expression,NULL,NULL,yyvsp[0].code);
		;}
    break;

  case 168:
#line 1808 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

			yyval.code	=	new CIlluminationLoop(yyvsp[-6].expression,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 169:
#line 1823 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeIlluminate,opcodeEndIlluminate,yyvsp[-2].expression,NULL,NULL,yyvsp[0].code);
		;}
    break;

  case 170:
#line 1838 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeIlluminate,opcodeEndIlluminate,yyvsp[-6].expression,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 171:
#line 1851 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeIlluminate,opcodeEndIlluminate,yyvsp[-2].expression,NULL,NULL,yyvsp[0].code);
		;}
    break;

  case 172:
#line 1866 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeIlluminate,opcodeEndIlluminate,yyvsp[-6].expression,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].code);
		;}
    break;

  case 173:
#line 1880 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeSolar,opcodeEndSolar,NULL,NULL,NULL,yyvsp[0].code);
		;}
    break;

  case 174:
#line 1893 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeSolar,opcodeEndSolar,yyvsp[-4].expression,yyvsp[-2].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 175:
#line 1905 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeSolar,opcodeEndSolar,NULL,NULL,NULL,yyvsp[0].code);
		;}
    break;

  case 176:
#line 1918 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

			yyval.code	=	new CIlluminateSolar(opcodeSolar,opcodeEndSolar,yyvsp[-4].expression,yyvsp[-2].expression,NULL,yyvsp[0].code);
		;}
    break;

  case 177:
#line 1929 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 178:
#line 1936 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeAddFloatFloat,opcodeAddVectorVector,opcodeAddMatrixMatrix,NULL,NULL);
		;}
    break;

  case 179:
#line 1943 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeSubFloatFloat,opcodeSubVectorVector,opcodeSubMatrixMatrix,NULL,NULL);
		;}
    break;

  case 180:
#line 1950 "sl.y"
    {
			yyval.expression	=	NULL;

			if (yyvsp[-2].expression->type & SLC_MATRIX) {
				if (yyvsp[0].expression->type & SLC_VVECTOR) {
					yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VVECTOR,opcodeMulMatrixVector,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
				} else if (yyvsp[0].expression->type & SLC_VPOINT) {
					yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VPOINT,opcodeMulMatrixPoint,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
				} else if (yyvsp[0].expression->type & SLC_VNORMAL) {
					yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VNORMAL,opcodeMulMatrixNormal,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
				}
			}

			if (yyval.expression == NULL) {
				if (yyvsp[0].expression->type & SLC_MATRIX) {
					if (yyvsp[-2].expression->type & SLC_VVECTOR) {
						yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VVECTOR,opcodeMulVectorMatrix,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
					} else if (yyvsp[-2].expression->type & SLC_VPOINT) {
						yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VPOINT,opcodeMulPointMatrix,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
					} else if (yyvsp[-2].expression->type & SLC_VNORMAL) {
						yyval.expression	=	new CBinaryExpression(SLC_VECTOR | SLC_VNORMAL,opcodeMulNormalMatrix,yyvsp[-2].expression,getConversion(SLC_VECTOR,yyvsp[0].expression));
					}
				}
			}


			if (yyval.expression == NULL)
				yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeMulFloatFloat,opcodeMulVectorVector,opcodeMulMatrixMatrix,NULL,NULL);
		;}
    break;

  case 181:
#line 1983 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeDivFloatFloat,opcodeDivVectorVector,opcodeDivMatrixMatrix,NULL,NULL);
		;}
    break;

  case 182:
#line 1989 "sl.y"
    {
			sdr->desire(SLC_VECTOR | SLC_VVECTOR);
		;}
    break;

  case 183:
#line 1993 "sl.y"
    {
			sdr->undesire();
			yyval.expression	=	new CBinaryExpression(SLC_FLOAT,opcodeDotProduct,getConversion(SLC_VECTOR,yyvsp[-3].expression),getConversion(SLC_VECTOR,yyvsp[0].expression));
		;}
    break;

  case 184:
#line 2001 "sl.y"
    {
			yyval.expression	=	new CBinaryExpression(SLC_VECTOR,opcodeCrossProduct,getConversion(SLC_VECTOR,yyvsp[-2].expression),getConversion(SLC_VECTOR,yyvsp[0].expression));
		;}
    break;

  case 185:
#line 2007 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;	
		;}
    break;

  case 186:
#line 2013 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[0].expression,opcodeNegFloat,opcodeNegVector,opcodeNegMatrix,NULL,NULL);
		;}
    break;

  case 187:
#line 2022 "sl.y"
    {
			int	ft	=	yyvsp[-2].expression->type;
			int	st	=	yyvsp[0].expression->type;

			if ((yyvsp[-2].expression->type & SLC_TYPE_MASK) == (yyvsp[0].expression->type & SLC_TYPE_MASK)) {
				yyval.expression	=	new CConditionalExpression(yyvsp[-2].expression->type,yyvsp[-4].expression,yyvsp[-2].expression,yyvsp[0].expression);
			} else {
				sdr->error("Type mismatch in conditional execution\n");
			}
		;}
    break;

  case 188:
#line 2038 "sl.y"
    {
			yyval.array	=	yyvsp[-1].array;
		;}
    break;

  case 189:
#line 2047 "sl.y"
    {
			yyval.array	=	yyvsp[0].array;
			yyval.array->push(yyvsp[-2].expression);
		;}
    break;

  case 190:
#line 2053 "sl.y"
    {
			yyval.array	=	new CArray<CExpression *>;
			yyval.array->push(yyvsp[0].expression);
		;}
    break;

  case 191:
#line 2061 "sl.y"
    {
			yyval.expression	=	new CConstantTerminalExpression(SLC_FLOAT | SLC_UNIFORM,strdup("3.141592654"));
		;}
    break;

  case 192:
#line 2066 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 193:
#line 2071 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 194:
#line 2076 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 195:
#line 2081 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 196:
#line 2086 "sl.y"
    {
	
			CVariable	*cVar	=	sdr->getVariable(yyvsp[0].string);

			if (cVar == NULL) {
				sdr->error("Identifier %s not found\n",yyvsp[0].string);
				yyval.expression	=	new CNullExpression;
			} else { 
				yyval.expression	=	new CTerminalExpression(cVar);
			}
		;}
    break;

  case 197:
#line 2102 "sl.y"
    {
			CVariable *cVar	=	sdr->getVariable(yyvsp[-3].string);

			if (cVar == NULL) {
				sdr->error("Identifier %s not found\n",yyvsp[-3].string);
				yyval.expression	=	new CNullExpression;
			} else { 
				yyval.expression	=	new CArrayExpression(cVar,yyvsp[-1].expression);
			}
		;}
    break;

  case 198:
#line 2114 "sl.y"
    {
			yyval.expression	=	new CConstantTerminalExpression(SLC_FLOAT,strdup(yyvsp[0].string));
		;}
    break;

  case 199:
#line 2119 "sl.y"
    {
			yyval.expression	=	new CConstantTerminalExpression(SLC_STRING,strdup(yyvsp[0].string));
		;}
    break;

  case 200:
#line 2130 "sl.y"
    {
			yyval.expression	=	new CVectorExpression(yyvsp[-5].expression,yyvsp[-3].expression,yyvsp[-1].expression);
		;}
    break;

  case 201:
#line 2167 "sl.y"
    {
			CExpression	*elements[16];

			elements[0]		=	yyvsp[-31].expression;
			elements[1]		=	yyvsp[-29].expression;
			elements[2]		=	yyvsp[-27].expression;
			elements[3]		=	yyvsp[-25].expression;
			elements[4]		=	yyvsp[-23].expression;
			elements[5]		=	yyvsp[-21].expression;
			elements[6]		=	yyvsp[-19].expression;
			elements[7]		=	yyvsp[-17].expression;
			elements[8]		=	yyvsp[-15].expression;
			elements[9]		=	yyvsp[-13].expression;
			elements[10]	=	yyvsp[-11].expression;
			elements[11]	=	yyvsp[-9].expression;
			elements[12]	=	yyvsp[-7].expression;
			elements[13]	=	yyvsp[-5].expression;
			elements[14]	=	yyvsp[-3].expression;
			elements[15]	=	yyvsp[-1].expression;

			yyval.expression				=	new CMatrixExpression(elements);
		;}
    break;

  case 202:
#line 2193 "sl.y"
    {	
			yyval.expression	=	yyvsp[-1].expression;
		;}
    break;

  case 203:
#line 2202 "sl.y"
    {
			yyval.expression	=	getConversion(yyvsp[-1].integer,yyvsp[0].expression);

			sdr->undesire();
		;}
    break;

  case 204:
#line 2211 "sl.y"
    {
			yyval.expression	=	getConversion(yyvsp[-2].integer,yyvsp[-1].string,yyvsp[0].expression);

			sdr->undesire();
		;}
    break;

  case 205:
#line 2222 "sl.y"
    {
			yyval.expression	=	yyvsp[-1].expression;
		;}
    break;

  case 206:
#line 2229 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,NULL,NULL,NULL,NULL,opcodeAnd);
		;}
    break;

  case 207:
#line 2236 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,NULL,NULL,NULL,NULL,opcodeOr);
		;}
    break;

  case 208:
#line 2243 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatGreater,opcodeVectorGreater,NULL,NULL,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 209:
#line 2251 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatLess,opcodeVectorLess,NULL,NULL,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 210:
#line 2259 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatEGreater,opcodeVectorEGreater,NULL,NULL,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 211:
#line 2267 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatELess,opcodeVectorELess,NULL,NULL,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 212:
#line 2275 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatEqual,opcodeVectorEqual,NULL,opcodeStringEqual,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 213:
#line 2283 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeFloatNotEqual,opcodeVectorNotEqual,NULL,opcodeStringNotEqual,NULL);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 214:
#line 2291 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,NULL,NULL,NULL,NULL,opcodeAnd);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 215:
#line 2299 "sl.y"
    {
			yyval.expression			=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,NULL,NULL,NULL,NULL,opcodeXor);
			yyval.expression->type	=	SLC_BOOLEAN | (yyvsp[-2].expression->type & yyvsp[0].expression->type & SLC_UNIFORM);
		;}
    break;

  case 216:
#line 2306 "sl.y"
    {
			yyval.expression			=	new CUnaryExpression(SLC_BOOLEAN,opcodeNot,getConversion(SLC_BOOLEAN,yyvsp[0].expression));
		;}
    break;

  case 217:
#line 2316 "sl.y"
    {
			CFunctionPrototype		*cFun;
			CArray<CExpression *>	*parameters	=	sdr->actualParameters;	// This is the list of parameters to the function

			char					*funName	=	yyvsp[0].string;

			// Clear the desired type flags
			sdr->undesire();

			// Restore the old parameters
			sdr->actualParameters		=	sdr->actualParameterStack->pop();


			// Check the builtin functions
			for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
				if (cFun->perfectMatch(yyvsp[0].string,parameters,sdr->desired())) break;
			}

			if (cFun == NULL) {
				for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
					if (cFun->match(yyvsp[0].string,parameters,sdr->desired())) break;
				}
			}

			if (cFun != NULL) {
				yyval.expression	=	new CBuiltinExpression(cFun,parameters);
			} else {
				sdr->error("Function %s not found\n",yyvsp[0].string);
				if (parameters->numItems != 0) {
					CExpression	*cCode;
					while((cCode = parameters->pop()) != NULL) {
						delete cCode;
					}
				}
				delete parameters;
				yyval.expression	=	new CNullExpression;
			}
		;}
    break;

  case 218:
#line 2356 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 219:
#line 2366 "sl.y"
    {
			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);

			// Set the name
			yyval.string	=	yyvsp[-1].string;
		;}
    break;

  case 220:
#line 2381 "sl.y"
    {
			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);

			// Set the name
			yyval.string	=	"surface";
		;}
    break;

  case 221:
#line 2396 "sl.y"
    {
			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);

			// Set the name
			yyval.string	=	"displacement";
		;}
    break;

  case 222:
#line 2414 "sl.y"
    {
			CFunction				*cFun;
			CArray<CExpression *>	*parameters	=	sdr->actualParameters;	// This is the list of parameters to the function

			char					*funName	=	yyvsp[-2].string;

			// Clear the desired type flags
			sdr->undesire();

			// Restore the old parameters
			sdr->actualParameters		=	sdr->actualParameterStack->pop();

			// Search for the CFunction here....
			cFun	=	sdr->getFunction(yyvsp[-2].string,parameters);

			if (cFun != NULL) {													// Cool, the function exists
				// A function with the same name is defined ... 
				// Try to match the parameters;
				if (cFun->parameters->numItems == parameters->numItems) {	// The number of parameters match
					// A function with the same name is defined and the number of Parameters match
					yyval.expression	=	new CFuncallExpression(cFun,parameters);					
				}
			}

			// If not found, check the predefined CFunctions
			if (cFun == NULL) {
				CFunctionPrototype	*cFun;
				char				*fName	=	yyvsp[-2].string;
				// Check the builtin CFunctions

				for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
					if (cFun->perfectMatch(yyvsp[-2].string,parameters,sdr->desired())) break;
				}

				if (cFun == NULL) {
					for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
						if (cFun->match(yyvsp[-2].string,parameters,sdr->desired())) break;
					}
				}

				// Check if there is a DSO implementing this function
				if (cFun == NULL) {
					sdr->enumerateDso(yyvsp[-2].string);

					for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
						if (cFun->perfectMatch(yyvsp[-2].string,parameters,sdr->desired())) break;
					}

					if (cFun == NULL) {
						for (cFun = sdr->builtinFunctions->first(); cFun != NULL; cFun = sdr->builtinFunctions->next()) {
							if (cFun->match(yyvsp[-2].string,parameters,sdr->desired())) break;
						}
					}
				}

				if (cFun != NULL) {
					yyval.expression	=	new CBuiltinExpression(cFun,parameters);
				} else {
					sdr->error("Function %s not found\n",yyvsp[-2].string);
					if (parameters->numItems != 0) {
						CExpression	*cCode;
						while((cCode = parameters->pop()) != NULL) {
							delete cCode;
						}
					}
					delete parameters;
					yyval.expression	=	new CNullExpression;
				}

			}
		;}
    break;

  case 223:
#line 2491 "sl.y"
    {
			yyval.code	=	new CConstantTerminalExpression(SLC_STRING | SLC_UNIFORM,strdup(yyvsp[0].string));
		;}
    break;

  case 224:
#line 2496 "sl.y"
    {
			CVariable	*cVar	=	sdr->getVariable(yyvsp[0].string);

			if (cVar != NULL)	yyval.code	=	new CTerminalExpression(cVar);
			else				yyval.code	=	new CNullExpression;
		;}
    break;

  case 225:
#line 2509 "sl.y"
    {
			yyval.code	=	getConversion(SLC_FLOAT | (yyvsp[-1].expression->type & SLC_UNIFORM),yyvsp[-1].expression);
		;}
    break;

  case 226:
#line 2513 "sl.y"
    {
			yyval.code	=	new CConstantTerminalExpression(SLC_FLOAT | SLC_UNIFORM,strdup("0"));
		;}
    break;

  case 227:
#line 2531 "sl.y"
    {
			// Fake the parameters
			CArray<CExpression *>	*parameters	=	sdr->actualParameters;	// This is the list of parameters to the function
			CArray<CExpression *>	*pl			=	new CArray<CExpression *>;
			CExpression				*cExpression;

			pl->push(yyvsp[-4].code);
			pl->push(yyvsp[-3].code);
			for (cExpression=parameters->first();cExpression!=NULL;cExpression=parameters->next())
				pl->push(cExpression);

			delete parameters;
			sdr->actualParameters	=	pl;

			yyval.string						=	yyvsp[-6].string;
		;}
    break;

  case 228:
#line 2553 "sl.y"
    {
			// Fake the parameters
			CArray<CExpression *>	*parameters	=	sdr->actualParameters;	// This is the list of parameters to the function
			CArray<CExpression *>	*pl			=	new CArray<CExpression *>;
			CExpression				*cExpression;

			pl->push(yyvsp[-2].code);
			pl->push(yyvsp[-1].code);
			for (cExpression=parameters->first();cExpression!=NULL;cExpression=parameters->next())
				pl->push(cExpression);

			delete parameters;
			sdr->actualParameters	=	pl;

			yyval.string						=	yyvsp[-4].string;
		;}
    break;

  case 229:
#line 2573 "sl.y"
    {
			yyval.string	=	"texture";

			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);
		;}
    break;

  case 230:
#line 2586 "sl.y"
    {
			yyval.string	=	"shadow";

			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);
		;}
    break;

  case 231:
#line 2599 "sl.y"
    {
			yyval.string	=	"environment";

			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);
		;}
    break;

  case 232:
#line 2612 "sl.y"
    {
			yyval.string	=	"bump";

			// Save the old parameters
			sdr->actualParameterStack->push(sdr->actualParameters);
			// Start a new parameter list
			sdr->actualParameters	=	new CArray<CExpression *>;

			// Make sure we do not do something stupid with the parameters
			sdr->desire(SLC_NONE);
		;}
    break;

  case 233:
#line 2629 "sl.y"
    {
		;}
    break;

  case 234:
#line 2632 "sl.y"
    {
		;}
    break;

  case 235:
#line 2639 "sl.y"
    {
			sdr->actualParameters->push(yyvsp[-1].expression);
		;}
    break;

  case 236:
#line 2643 "sl.y"
    {
		;}
    break;

  case 237:
#line 2647 "sl.y"
    {
			sdr->actualParameters->push(yyvsp[0].expression);
		;}
    break;


    }

/* Line 999 of yacc.c.  */
#line 4268 "sl.cpp"

  yyvsp -= yylen;
  yyssp -= yylen;


  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  int yytype = YYTRANSLATE (yychar);
	  char *yymsg;
	  int yyx, yycount;

	  yycount = 0;
	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  for (yyx = yyn < 0 ? -yyn : 0;
	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
	  yysize += yystrlen ("syntax error, unexpected ") + 1;
	  yysize += yystrlen (yytname[yytype]);
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[yytype]);

	      if (yycount < 5)
		{
		  yycount = 0;
		  for (yyx = yyn < 0 ? -yyn : 0;
		       yyx < (int) (sizeof (yytname) / sizeof (char *));
		       yyx++)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			const char *yyq = ! yycount ? ", expecting " : " or ";
			yyp = yystpcpy (yyp, yyq);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yycount++;
		      }
		}
	      yyerror (yymsg);
	      YYSTACK_FREE (yymsg);
	    }
	  else
	    yyerror ("syntax error; also virtual memory exhausted");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror ("syntax error");
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
	 error, discard it.  */

      /* Return failure if at end of input.  */
      if (yychar == YYEOF)
        {
	  /* Pop the error token.  */
          YYPOPSTACK;
	  /* Pop the rest of the stack.  */
	  while (yyss < yyssp)
	    {
	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
	      yydestruct (yystos[*yyssp], yyvsp);
	      YYPOPSTACK;
	    }
	  YYABORT;
        }

      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
      yydestruct (yytoken, &yylval);
      yychar = YYEMPTY;

    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      yyvsp--;
      yystate = *--yyssp;

      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}


#line 2652 "sl.y"



#include	"lex.sl.cpp"



int	CScriptContext::compile(FILE *in,char *outName) {
	
	sdr	=	this;

	yyin	=	in;

	yyparse();

	if (compileError == 0) {
		char		*tmp;

		if (outName == NULL) {
			// If there's no compile error, dump the compiled code
			tmp	=	new char[strlen(sdr->shaderName)+5];

			strcpy(tmp,sdr->shaderName);
			strcat(tmp,".sdr");
		} else {
			tmp	=	outName;
		}

		sdr->generateCode(tmp);

		if (tmp != outName) delete [] tmp;

		return TRUE;
	}
	return FALSE;
}


void	yyerror(char *mes) {
	sdr->error("Parse error\n");
}





