/* 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   1385

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

/* 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,   490,   496,   506,   512,   522,
     528,   538,   543,   551,   556,   564,   566,   570,   574,   578,
     582,   583,   588,   592,   595,   598,   604,   608,   612,   614,
     616,   618,   620,   622,   624,   626,   631,   633,   635,   643,
     677,   681,   684,   688,   692,   696,   700,   704,   708,   712,
     716,   720,   724,   728,   732,   735,   737,   739,   742,   745,
     748,   752,   754,   756,   760,   761,   769,   775,   777,   779,
     781,   783,   785,   786,   787,   792
};

/* 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,    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,  1758,  1769,  1788,  1799,  1816,
    1827,  1846,  1856,  1871,  1881,  1898,  1903,  1910,  1917,  1950,
    1959,  1957,  1968,  1975,  1981,  1987,  2005,  2014,  2022,  2030,
    2035,  2040,  2045,  2050,  2055,  2068,  2083,  2088,  2093,  2104,
    2160,  2170,  2178,  2189,  2196,  2203,  2210,  2218,  2226,  2234,
    2242,  2250,  2258,  2266,  2274,  2285,  2325,  2334,  2349,  2364,
    2381,  2460,  2465,  2476,  2483,  2494,  2518,  2542,  2555,  2568,
    2581,  2598,  2602,  2609,  2607,  2616
};
#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,   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,     9,     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,   227,   228,   229,   230,
       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,   216,   215,     0,    61,    68,    56,     0,    52,
       0,     0,   218,   219,     9,     9,   157,     0,   115,     0,
     117,     9,     9,   189,   194,   196,   119,     9,   197,     9,
       9,     9,     9,   190,   191,     0,   175,   192,     0,   193,
     217,     9,   123,   129,   127,   132,   131,   135,   133,    75,
      72,   121,   122,    94,    95,   141,   160,    86,     9,   105,
     235,     0,   231,     0,    59,     0,     0,    67,    43,     0,
      36,     0,     0,     0,     9,   114,   116,     0,     9,     0,
       9,     0,     0,   184,   183,   214,   197,   201,   118,     9,
       9,     9,     9,     9,     9,     9,     9,     9,     9,     9,
     180,     9,     9,     9,     9,     9,     0,     9,     9,     9,
       9,     9,     0,     0,     0,     0,   143,     0,   140,     9,
       0,   233,   220,   222,   221,   224,    67,     0,     9,    62,
      69,    38,   120,     0,     0,   156,     9,     9,   171,   173,
       9,     0,     9,   200,   203,   202,   211,   210,   209,   207,
     208,   206,   177,   176,   182,   178,   179,     9,     0,   213,
     212,   205,   204,     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,   167,   169,     0,   195,     0,   181,
       9,   125,    79,    75,    83,    73,    74,    78,   142,     0,
     144,     0,   163,   165,   234,     0,     9,   226,    63,     0,
     188,     0,     9,   155,     9,     9,     9,   185,     9,     0,
       0,   147,     9,   223,     0,    67,    66,     9,   186,   152,
     154,     0,   172,   174,     0,   126,    80,     0,     0,   149,
     151,     0,   146,     0,   225,    64,   187,     9,     9,   198,
      82,     0,     0,     9,     9,   168,   170,     0,   148,   150,
     138,   139,   164,   166,     9,     0,     9,     0,     9,     0,
       9,     0,     9,     0,     9,     0,     9,     0,     9,     0,
       9,     0,     9,     0,     9,     0,     9,     0,   199
};

/* 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,   355,   339,   127,    92,    55,    93,   294,   170,   233,
     234,   349,   350,   292,    94,    63,    95,    96,    97,    98,
      99,   100,   101,   102,   153,   227,   348,   154,   229,   228,
     231,   230,   105,   106,   107,   237,   238,   329,   371,   372,
     108,   109,   254,   110,   194,   111,   112,   113,   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 -285
static const short yypact[] =
{
    -285,    54,    19,  -285,  -285,  -285,  -285,  -285,  -285,  -285,
      36,  -285,    16,    75,  -285,   -21,    19,  -285,    98,    99,
    -285,   -39,   102,  -285,    97,  -285,   104,  -285,   119,  -285,
    -285,  -285,  -285,   425,  -285,   124,   125,   -16,  -285,  -285,
    -285,  -285,  -285,  -285,  -285,  -285,  -285,    21,  -285,  -285,
    -285,  -285,   -12,    15,   123,  -285,  -285,   127,  -285,   131,
     126,   134,   124,   409,   139,  -285,    -9,   136,   144,  -285,
    -285,   146,   148,  -285,   149,   156,   162,    24,    44,  -285,
     163,   164,   623,   344,  -285,  -285,  -285,  -285,  -285,  -285,
     142,  -285,  -285,  -285,  -285,  -285,  -285,  -285,  -285,  -285,
     603,  -285,  -285,   137,   145,   166,  -285,  -285,  -285,  -285,
     481,  -285,  -285,   167,  -285,  -285,  -285,  -285,  -285,  -285,
     154,   672,  -285,  -285,   169,    57,   173,  -285,   125,  -285,
     177,   124,  -285,  -285,   794,   794,  -285,   183,  -285,   185,
    -285,   794,   693,  -285,   613,  -285,  -285,   794,  -285,   794,
     794,   794,   815,  -285,  -285,   535,  -285,  -285,   -10,  -285,
    -285,   794,  -285,  -285,  -285,  -285,  -285,  -285,  -285,    14,
    -285,  -285,  -285,  -285,  -285,   189,  -285,   199,   794,  -285,
     809,   186,  -285,     7,  -285,   192,   165,   139,  -285,   124,
    -285,  1314,   138,   140,   794,  -285,  -285,   412,   603,   859,
     794,   483,   153,    41,    41,  -285,   533,  1314,  -285,   794,
     794,   794,   794,   794,   794,   794,   794,   794,   794,   794,
    -285,   794,   794,   794,   794,   794,  1266,   794,   794,   794,
     794,   794,   193,    66,   172,   -22,   197,   200,  -285,   603,
     745,  -285,  -285,  -285,  -285,   196,   139,   198,   714,  -285,
    -285,  -285,  -285,   481,    62,  1314,   794,   603,  -285,  -285,
     794,  1287,   794,  -285,  -285,  1314,   244,   244,   244,   244,
     244,   244,    41,    41,    50,   170,   170,   794,  1321,    52,
      52,   174,  -285,   176,   305,   305,   305,   305,   305,   202,
     208,  -285,  -285,   714,    66,   189,   754,  -285,  -285,   794,
     603,   794,   794,    83,  -285,   207,   794,  1314,  -285,  -285,
     223,   794,  -285,   887,  -285,  -285,  1189,   176,   893,  -285,
     794,  -285,   187,   -11,  -285,  1314,  -285,  -285,  -285,   213,
     -10,   921,  -285,  -285,  -285,  1293,   672,  -285,  -285,   165,
     940,   214,   603,  1314,   794,   603,   794,  1314,   794,    66,
     172,   220,   794,  -285,   218,   139,  -285,   794,  -285,  -285,
    -285,  1214,  -285,  -285,   840,   305,  -285,    66,    22,   222,
     228,   227,  -285,  1239,  -285,  -285,  -285,   603,   794,  -285,
    -285,   220,   220,   603,   603,  -285,  -285,   968,  -285,  -285,
    -285,  -285,  -285,  -285,   794,   974,   794,  1002,   794,  1021,
     794,  1049,   794,  1055,   794,  1083,   794,  1102,   794,  1130,
     794,  1136,   794,  1164,   794,  1183,   794,  1245,  -285
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -285,  -285,  -285,  -285,  -285,  -285,  -285,    -2,   240,  -285,
      18,  -285,   221,  -285,  -285,   -46,  -285,  -285,  -285,  -285,
    -285,  -285,  -285,  -285,   194,  -285,  -285,   -80,  -239,  -285,
    -285,  -285,  -285,    76,   -27,  -285,  -285,   -86,   -20,  -285,
    -285,  -285,  -285,  -284,  -109,  -285,   -98,    11,  -285,  -285,
    -285,  -285,  -285,  -285,    -4,  -285,  -285,     9,  -285,  -285,
    -285,  -285,  -285,  -285,  -285,  -285,   -24,  -285,  -285,  -259,
    -285,  -285,  -285,  -285,  -285,  -285,  -285,  -285,  -285,  -285,
    -285,  -285,  -285,  -285,   -79,  -285,   -19,   -85,  -285,  -285,
    -130,    63,  -285,  -285,  -285,  -285,  -285,  -285,   -61,   -25,
    -285
};

/* 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 -233
static const short yytable[] =
{
      13,   176,   171,   155,   192,   193,   -26,   304,   161,    50,
     327,   -28,   177,    23,    13,   -51,    69,   202,   -53,   232,
      16,   205,     4,     5,     6,     7,     8,     9,   221,   243,
     162,    30,    31,    32,    16,    23,   222,   223,    60,    10,
      34,   -77,   180,   244,   232,   -32,    61,   137,    11,   138,
      56,    53,   161,    11,     3,   224,   225,    11,    19,   103,
      11,    90,   197,   199,    56,   366,   -77,   139,   201,   140,
     203,   204,   104,   207,   162,   163,   164,   165,   166,   167,
     168,   184,   226,   380,    20,   190,   311,   185,    11,   312,
     290,   291,   279,   280,   281,   282,   103,    22,    90,   240,
     258,   188,   217,   218,   219,   220,   103,   336,    90,   104,
     337,   172,   218,   219,   220,   255,   375,   224,   225,   104,
      28,   261,   388,   389,    36,    29,   120,   265,    34,    37,
     266,   267,   268,   269,   270,   271,   272,   273,   274,   275,
     276,   297,   278,   251,   309,    38,    47,    62,   284,   285,
     286,   287,   288,    49,    65,   310,    66,    67,   -35,   314,
     -37,   125,   173,   120,   169,   252,   330,   253,   131,   307,
     174,   236,   132,   120,   133,   134,   221,   313,   221,   179,
     264,   316,   135,   318,   222,   223,   222,   223,   136,   141,
     142,   221,   175,   178,   103,   183,    90,   187,   319,   222,
     223,   189,   332,   224,   225,   224,   225,   104,   195,   259,
     196,   235,   239,   242,   325,   247,   289,   248,   224,   225,
     331,   295,   180,   335,   293,   296,   302,   340,   321,   305,
     323,   338,   343,   322,   220,   103,   342,    90,   351,   -81,
     225,   347,   368,   358,   359,   374,   381,   362,   104,   103,
     298,    90,   382,   103,   383,    90,    27,   180,    51,   356,
     129,   120,   104,   250,   367,   361,   104,   364,   315,   365,
     324,   328,   376,   373,   326,   354,   334,     0,   340,   385,
       0,     0,     0,     0,     0,   390,   392,     0,     0,     0,
       0,   236,   211,   212,   213,   214,   103,     0,    90,   387,
       0,     0,   120,   215,   216,   217,   218,   219,   220,   104,
       0,   333,     0,     0,     0,   395,   120,   397,     0,   399,
     120,   401,     0,   403,     0,   405,     0,   407,     0,   409,
       0,   411,     0,   413,     0,   415,     0,   417,   103,     0,
      90,   103,     0,    90,     0,     0,     0,   369,     0,     0,
       0,   104,     0,   360,   104,     0,   363,     0,     0,     0,
     370,     0,     0,   120,   215,   216,   217,   218,   219,   220,
     160,     0,     0,   103,   161,    90,     0,   369,   369,   103,
     103,    90,    90,     0,     0,     0,   104,     0,   386,     0,
     370,   370,   104,   104,   391,   393,   162,   163,   164,   165,
     166,   167,   168,     0,     0,   120,     0,     0,   120,     0,
      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,   256,    49,    85,   257,
     120,    86,    87,    88,    89,     0,   120,   120,    -9,    -9,
      -9,    -9,    -9,    -9,    -9,     0,     0,     0,   209,   210,
     211,   212,   213,   214,    39,    40,    41,    42,    43,    44,
      45,   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,   262,     0,    49,
     263,     0,     0,    86,    87,    88,    89,     0,     0,     0,
      -9,    -9,    -9,    -9,    -9,    -9,    -9,     0,     0,   209,
     210,   211,   212,   213,   214,     0,    71,    72,     0,     0,
       0,     0,   215,   216,   217,   218,   219,   220,     0,    -9,
      11,    -9,    -9,    -9,   143,   144,   145,     0,     0,   147,
     208,     0,     0,     0,     0,    86,    87,    88,    89,   148,
       0,     0,    -9,    -9,    -9,    -9,    -9,    -9,    -9,     0,
       0,   209,   210,   211,   212,   213,   214,     0,     0,     0,
       0,     0,   149,   150,   215,   216,   217,   218,   219,   220,
     151,    -9,    11,    -9,    -9,    -9,    71,    72,     0,     0,
       0,     0,    73,    74,    75,    76,     0,    77,    78,    79,
      80,    81,    82,    10,     0,    83,    71,    72,    84,     0,
       0,    49,     0,     0,     0,    86,    87,    88,    89,   160,
       0,     0,     0,   200,   143,   144,   145,     0,   146,   147,
       0,     0,     0,     0,     0,    86,    87,    88,    89,   148,
       0,     0,     0,     0,     0,   162,   163,   164,   165,   166,
     167,   168,    11,     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,  -232,
       0,     0,     0,     0,    86,    87,    88,    89,   148,     0,
       0,     0,     0,     0,   143,   144,   145,    71,    72,   147,
     198,     0,     0,     0,     0,    86,    87,    88,    89,   148,
       0,   149,   150,     0,     0,   143,   144,   145,     0,   151,
     147,    11,   306,     0,     0,     0,    86,    87,    88,    89,
     148,     0,   149,   150,     0,     0,     0,    71,    72,     0,
     151,     0,    11,     0,     0,     0,     0,     0,     0,   299,
       0,     0,   300,   149,   150,   143,   144,   145,     0,  -145,
     147,   151,     0,    11,     0,     0,    86,    87,    88,    89,
     148,   209,   210,   211,   212,   213,   214,    71,    72,     0,
       0,     0,     0,     0,   215,   216,   217,   218,   219,   220,
       0,     0,     0,   149,   150,   143,   144,   145,    71,    72,
     147,   151,     0,    11,     0,     0,    86,    87,    88,    89,
     148,     0,     0,   241,     0,     0,   143,   144,   145,     0,
       0,   147,     0,     0,     0,     0,     0,    86,    87,    88,
      89,   206,     0,   149,   150,   209,   210,   211,   212,   213,
     214,   151,     0,    11,   378,     0,     0,   379,   215,   216,
     217,   218,   219,   220,   149,   150,     0,     0,     0,     0,
       0,     0,   151,   260,    11,     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,   352,   215,   216,   217,   218,
     219,   220,   215,   216,   217,   218,   219,   220,     0,     0,
       0,     0,     0,     0,   357,     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,   394,     0,     0,     0,     0,     0,   396,   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,   398,   215,   216,   217,
     218,   219,   220,   215,   216,   217,   218,   219,   220,     0,
       0,     0,     0,     0,     0,   400,     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,   402,     0,     0,     0,     0,     0,   404,
     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,   406,   215,   216,
     217,   218,   219,   220,   215,   216,   217,   218,   219,   220,
       0,     0,     0,     0,     0,     0,   408,     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,   410,     0,     0,     0,     0,     0,
     412,   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,   414,   215,
     216,   217,   218,   219,   220,   215,   216,   217,   218,   219,
     220,     0,     0,     0,     0,     0,     0,   416,     0,     0,
     209,   210,   211,   212,   213,   214,   345,     0,     0,     0,
       0,     0,     0,   215,   216,   217,   218,   219,   220,   209,
     210,   211,   212,   213,   214,   209,   210,   211,   212,   213,
     214,   377,   215,   216,   217,   218,   219,   220,   215,   216,
     217,   218,   219,   220,     0,     0,     0,     0,     0,     0,
     209,   210,   211,   212,   213,   214,   384,     0,     0,     0,
       0,     0,   418,   215,   216,   217,   218,   219,   220,     0,
       0,     0,     0,     0,     0,   209,   210,   211,   212,   213,
     214,   209,   210,   211,   212,   213,   214,   283,   215,   216,
     217,   218,   219,   220,   215,   216,   217,   218,   219,   220,
       0,     0,   209,   210,   211,   212,   213,   214,   317,     0,
       0,     0,     0,     0,   353,   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,   110,   100,    82,   134,   135,    27,   246,    30,    36,
     294,    27,   110,    15,    16,    27,    62,   147,    27,    30,
       2,   151,     3,     4,     5,     6,     7,     8,    38,    22,
      52,    70,    71,    72,    16,    37,    46,    47,    23,    20,
      26,    52,   121,    36,    30,    24,    31,    23,    69,    25,
      52,    30,    30,    69,     0,    65,    66,    69,    22,    63,
      69,    63,   141,   142,    66,   349,    52,    23,   147,    25,
     149,   150,    63,   152,    52,    53,    54,    55,    56,    57,
      58,    24,   161,   367,    68,   131,    24,    30,    69,    27,
      24,    25,   222,   223,   224,   225,   100,    22,   100,   178,
     198,   128,    61,    62,    63,    64,   110,    24,   110,   100,
      27,   100,    62,    63,    64,   194,   355,    65,    66,   110,
      22,   200,   381,   382,    27,    26,    63,   206,    26,    25,
     209,   210,   211,   212,   213,   214,   215,   216,   217,   218,
     219,   239,   221,   189,   253,    26,    22,    24,   227,   228,
     229,   230,   231,    28,    27,   253,    25,    31,    24,   257,
      24,    22,    25,   100,    22,    27,   296,    27,    24,   248,
      25,   175,    26,   110,    26,    26,    38,   256,    38,    25,
      27,   260,    26,   262,    46,    47,    46,    47,    26,    26,
      26,    38,    26,    26,   198,    26,   198,    24,   277,    46,
      47,    24,   300,    65,    66,    65,    66,   198,    25,   198,
      25,    22,    13,    27,   293,    23,    23,    52,    65,    66,
     299,    24,   301,   302,    52,    25,    30,   306,    52,    31,
      22,    24,   311,    31,    64,   239,    13,   239,    25,    52,
      66,   320,    22,    29,   342,    27,    24,   345,   239,   253,
     239,   253,    24,   257,    27,   257,    16,   336,    37,   339,
      66,   198,   253,   187,   350,   344,   257,   346,   257,   348,
     290,   295,   357,   352,   293,   336,   301,    -1,   357,   377,
      -1,    -1,    -1,    -1,    -1,   383,   384,    -1,    -1,    -1,
      -1,   295,    48,    49,    50,    51,   300,    -1,   300,   378,
      -1,    -1,   239,    59,    60,    61,    62,    63,    64,   300,
      -1,   300,    -1,    -1,    -1,   394,   253,   396,    -1,   398,
     257,   400,    -1,   402,    -1,   404,    -1,   406,    -1,   408,
      -1,   410,    -1,   412,    -1,   414,    -1,   416,   342,    -1,
     342,   345,    -1,   345,    -1,    -1,    -1,   351,    -1,    -1,
      -1,   342,    -1,   342,   345,    -1,   345,    -1,    -1,    -1,
     351,    -1,    -1,   300,    59,    60,    61,    62,    63,    64,
      26,    -1,    -1,   377,    30,   377,    -1,   381,   382,   383,
     384,   383,   384,    -1,    -1,    -1,   377,    -1,   377,    -1,
     381,   382,   383,   384,   383,   384,    52,    53,    54,    55,
      56,    57,    58,    -1,    -1,   342,    -1,    -1,   345,    -1,
       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,    24,    28,    29,    27,
     377,    32,    33,    34,    35,    -1,   383,   384,    39,    40,
      41,    42,    43,    44,    45,    -1,    -1,    -1,    46,    47,
      48,    49,    50,    51,    39,    40,    41,    42,    43,    44,
      45,    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,    24,    -1,    28,
      27,    -1,    -1,    32,    33,    34,    35,    -1,    -1,    -1,
      39,    40,    41,    42,    43,    44,    45,    -1,    -1,    46,
      47,    48,    49,    50,    51,    -1,     3,     4,    -1,    -1,
      -1,    -1,    59,    60,    61,    62,    63,    64,    -1,    68,
      69,    70,    71,    72,    21,    22,    23,    -1,    -1,    26,
      25,    -1,    -1,    -1,    -1,    32,    33,    34,    35,    36,
      -1,    -1,    39,    40,    41,    42,    43,    44,    45,    -1,
      -1,    46,    47,    48,    49,    50,    51,    -1,    -1,    -1,
      -1,    -1,    59,    60,    59,    60,    61,    62,    63,    64,
      67,    68,    69,    70,    71,    72,     3,     4,    -1,    -1,
      -1,    -1,     9,    10,    11,    12,    -1,    14,    15,    16,
      17,    18,    19,    20,    -1,    22,     3,     4,    25,    -1,
      -1,    28,    -1,    -1,    -1,    32,    33,    34,    35,    26,
      -1,    -1,    -1,    30,    21,    22,    23,    -1,    25,    26,
      -1,    -1,    -1,    -1,    -1,    32,    33,    34,    35,    36,
      -1,    -1,    -1,    -1,    -1,    52,    53,    54,    55,    56,
      57,    58,    69,    -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,
      27,    -1,    -1,    -1,    -1,    32,    33,    34,    35,    36,
      -1,    59,    60,    -1,    -1,    21,    22,    23,    -1,    67,
      26,    69,    28,    -1,    -1,    -1,    32,    33,    34,    35,
      36,    -1,    59,    60,    -1,    -1,    -1,     3,     4,    -1,
      67,    -1,    69,    -1,    -1,    -1,    -1,    -1,    -1,    24,
      -1,    -1,    27,    59,    60,    21,    22,    23,    -1,    25,
      26,    67,    -1,    69,    -1,    -1,    32,    33,    34,    35,
      36,    46,    47,    48,    49,    50,    51,     3,     4,    -1,
      -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,    64,
      -1,    -1,    -1,    59,    60,    21,    22,    23,     3,     4,
      26,    67,    -1,    69,    -1,    -1,    32,    33,    34,    35,
      36,    -1,    -1,    24,    -1,    -1,    21,    22,    23,    -1,
      -1,    26,    -1,    -1,    -1,    -1,    -1,    32,    33,    34,
      35,    36,    -1,    59,    60,    46,    47,    48,    49,    50,
      51,    67,    -1,    69,    24,    -1,    -1,    27,    59,    60,
      61,    62,    63,    64,    59,    60,    -1,    -1,    -1,    -1,
      -1,    -1,    67,    24,    69,    -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,    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,    31,    59,    60,
      61,    62,    63,    64,    59,    60,    61,    62,    63,    64,
      -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,    31,   171,   104,   100,    24,    29,   119,
     120,   157,   119,   120,   157,   157,   116,   110,    22,   127,
     130,   141,   142,   157,    27,   101,   160,    27,    24,    27,
     116,    24,    24,    27,    27,   119,   120,   157,   142,   142,
     119,   120,   119,   120,    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
};

#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 1750 "sl.y"
    {
			CFunction	*cFun	=	sdr->popFunction();

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

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

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

  case 166:
#line 1778 "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"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

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

  case 168:
#line 1808 "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 169:
#line 1821 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

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

  case 170:
#line 1836 "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 1850 "sl.y"
    {
			sdr->requiredShaderContext	|=	SLC_LIGHT;

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

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

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

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

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

  case 174:
#line 1888 "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 1899 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

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

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

  case 178:
#line 1920 "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 179:
#line 1953 "sl.y"
    {
			yyval.expression	=	getOperation(yyvsp[-2].expression,yyvsp[0].expression,opcodeDivFloatFloat,opcodeDivVectorVector,opcodeDivMatrixMatrix,NULL,NULL);
		;}
    break;

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

  case 181:
#line 1963 "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 182:
#line 1971 "sl.y"
    {
			yyval.expression	=	new CBinaryExpression(SLC_VECTOR,opcodeCrossProduct,getConversion(SLC_VECTOR,yyvsp[-2].expression),getConversion(SLC_VECTOR,yyvsp[0].expression));
		;}
    break;

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

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

  case 185:
#line 1992 "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 186:
#line 2008 "sl.y"
    {
			yyval.array	=	yyvsp[-1].array;
		;}
    break;

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

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

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

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

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

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

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

  case 194:
#line 2056 "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 195:
#line 2072 "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 196:
#line 2084 "sl.y"
    {
			yyval.expression	=	new CConstantTerminalExpression(SLC_FLOAT,strdup(yyvsp[0].string));
		;}
    break;

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

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

  case 199:
#line 2137 "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 200:
#line 2163 "sl.y"
    {	
			yyval.expression	=	yyvsp[-1].expression;
		;}
    break;

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

			sdr->undesire();
		;}
    break;

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

			sdr->undesire();
		;}
    break;

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

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

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

  case 206:
#line 2213 "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 207:
#line 2221 "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 208:
#line 2229 "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 209:
#line 2237 "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 210:
#line 2245 "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 211:
#line 2253 "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 212:
#line 2261 "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 213:
#line 2269 "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 214:
#line 2276 "sl.y"
    {
			yyval.expression			=	new CUnaryExpression(SLC_BOOLEAN,opcodeNot,getConversion(SLC_BOOLEAN,yyvsp[0].expression));
		;}
    break;

  case 215:
#line 2286 "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 216:
#line 2326 "sl.y"
    {
			yyval.expression	=	yyvsp[0].expression;
		;}
    break;

  case 217:
#line 2336 "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 218:
#line 2351 "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 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	=	"displacement";
		;}
    break;

  case 220:
#line 2384 "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 221:
#line 2461 "sl.y"
    {
			yyval.code	=	new CConstantTerminalExpression(SLC_STRING | SLC_UNIFORM,strdup(yyvsp[0].string));
		;}
    break;

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

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

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

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

  case 225:
#line 2501 "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 226:
#line 2523 "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 227:
#line 2543 "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 228:
#line 2556 "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 229:
#line 2569 "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 230:
#line 2582 "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 231:
#line 2599 "sl.y"
    {
		;}
    break;

  case 232:
#line 2602 "sl.y"
    {
		;}
    break;

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

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

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


    }

/* Line 999 of yacc.c.  */
#line 4097 "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 2622 "sl.y"



#include	"lex.sl.cpp"



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

	yyin	=	in;

	yyparse();

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

		strcpy(tmp,sdr->shaderName);
		strcat(tmp,".sdr");

		sdr->generateCode(tmp);

		delete [] tmp;
		return TRUE;
	}
	return FALSE;
}


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





