[692] | 1 | /* A Bison parser, made by GNU Bison 1.875. */
|
---|
| 2 |
|
---|
| 3 | /* Skeleton parser for Yacc-like parsing with Bison,
|
---|
| 4 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
|
---|
| 5 |
|
---|
| 6 | This program is free software; you can redistribute it and/or modify
|
---|
| 7 | it under the terms of the GNU General Public License as published by
|
---|
| 8 | the Free Software Foundation; either version 2, or (at your option)
|
---|
| 9 | any later version.
|
---|
| 10 |
|
---|
| 11 | This program is distributed in the hope that it will be useful,
|
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 14 | GNU General Public License for more details.
|
---|
| 15 |
|
---|
| 16 | You should have received a copy of the GNU General Public License
|
---|
| 17 | along with this program; if not, write to the Free Software
|
---|
| 18 | Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
| 19 | Boston, MA 02111-1307, USA. */
|
---|
| 20 |
|
---|
| 21 | /* As a special exception, when this file is copied by Bison into a
|
---|
| 22 | Bison output file, you may use that output file without restriction.
|
---|
| 23 | This special exception was added by the Free Software Foundation
|
---|
| 24 | in version 1.24 of Bison. */
|
---|
| 25 |
|
---|
| 26 | /* Written by Richard Stallman by simplifying the original so called
|
---|
| 27 | ``semantic'' parser. */
|
---|
| 28 |
|
---|
| 29 | /* All symbols defined below should begin with yy or YY, to avoid
|
---|
| 30 | infringing on user name space. This should be done even for local
|
---|
| 31 | variables, as they might otherwise be expanded by user macros.
|
---|
| 32 | There are some unavoidable exceptions within include files to
|
---|
| 33 | define necessary library symbols; they are noted "INFRINGES ON
|
---|
| 34 | USER NAME SPACE" below. */
|
---|
| 35 |
|
---|
| 36 | /* Identify Bison output. */
|
---|
| 37 | #define YYBISON 1
|
---|
| 38 |
|
---|
| 39 | /* Skeleton name. */
|
---|
| 40 | #define YYSKELETON_NAME "yacc.c"
|
---|
| 41 |
|
---|
| 42 | /* Pure parsers. */
|
---|
| 43 | #define YYPURE 0
|
---|
| 44 |
|
---|
| 45 | /* Using locations. */
|
---|
| 46 | #define YYLSP_NEEDED 0
|
---|
| 47 |
|
---|
| 48 | /* If NAME_PREFIX is specified substitute the variables and functions
|
---|
| 49 | names. */
|
---|
| 50 | #define yyparse ts10_parse
|
---|
| 51 | #define yylex ts10_lex
|
---|
| 52 | #define yyerror ts10_error
|
---|
| 53 | #define yylval ts10_lval
|
---|
| 54 | #define yychar ts10_char
|
---|
| 55 | #define yydebug ts10_debug
|
---|
| 56 | #define yynerrs ts10_nerrs
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | /* Tokens. */
|
---|
| 60 | #ifndef YYTOKENTYPE
|
---|
| 61 | # define YYTOKENTYPE
|
---|
| 62 | /* Put the tokens into the symbol table, so that GDB and other debuggers
|
---|
| 63 | know about them. */
|
---|
| 64 | enum yytokentype {
|
---|
| 65 | floatValue = 258,
|
---|
| 66 | gequal = 259,
|
---|
| 67 | less = 260,
|
---|
| 68 | texVariable = 261,
|
---|
| 69 | expandString = 262,
|
---|
| 70 | openParen = 263,
|
---|
| 71 | closeParen = 264,
|
---|
| 72 | semicolon = 265,
|
---|
| 73 | comma = 266,
|
---|
| 74 | nop = 267,
|
---|
| 75 | texture_1d = 268,
|
---|
| 76 | texture_2d = 269,
|
---|
| 77 | texture_rectangle = 270,
|
---|
| 78 | texture_3d = 271,
|
---|
| 79 | texture_cube_map = 272,
|
---|
| 80 | cull_fragment = 273,
|
---|
| 81 | pass_through = 274,
|
---|
| 82 | offset_2d_scale = 275,
|
---|
| 83 | offset_2d = 276,
|
---|
| 84 | offset_rectangle_scale = 277,
|
---|
| 85 | offset_rectangle = 278,
|
---|
| 86 | dependent_ar = 279,
|
---|
| 87 | dependent_gb = 280,
|
---|
| 88 | dot_product_2d_1of2 = 281,
|
---|
| 89 | dot_product_2d_2of2 = 282,
|
---|
| 90 | dot_product_rectangle_1of2 = 283,
|
---|
| 91 | dot_product_rectangle_2of2 = 284,
|
---|
| 92 | dot_product_depth_replace_1of2 = 285,
|
---|
| 93 | dot_product_depth_replace_2of2 = 286,
|
---|
| 94 | dot_product_3d_1of3 = 287,
|
---|
| 95 | dot_product_3d_2of3 = 288,
|
---|
| 96 | dot_product_3d_3of3 = 289,
|
---|
| 97 | dot_product_cube_map_1of3 = 290,
|
---|
| 98 | dot_product_cube_map_2of3 = 291,
|
---|
| 99 | dot_product_cube_map_3of3 = 292,
|
---|
| 100 | dot_product_reflect_cube_map_eye_from_qs_1of3 = 293,
|
---|
| 101 | dot_product_reflect_cube_map_eye_from_qs_2of3 = 294,
|
---|
| 102 | dot_product_reflect_cube_map_eye_from_qs_3of3 = 295,
|
---|
| 103 | dot_product_reflect_cube_map_const_eye_1of3 = 296,
|
---|
| 104 | dot_product_reflect_cube_map_const_eye_2of3 = 297,
|
---|
| 105 | dot_product_reflect_cube_map_const_eye_3of3 = 298,
|
---|
| 106 | dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 = 299,
|
---|
| 107 | dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 = 300,
|
---|
| 108 | dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 = 301,
|
---|
| 109 | dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 = 302,
|
---|
| 110 | dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 = 303,
|
---|
| 111 | dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 = 304
|
---|
| 112 | };
|
---|
| 113 | #endif
|
---|
| 114 | #define floatValue 258
|
---|
| 115 | #define gequal 259
|
---|
| 116 | #define less 260
|
---|
| 117 | #define texVariable 261
|
---|
| 118 | #define expandString 262
|
---|
| 119 | #define openParen 263
|
---|
| 120 | #define closeParen 264
|
---|
| 121 | #define semicolon 265
|
---|
| 122 | #define comma 266
|
---|
| 123 | #define nop 267
|
---|
| 124 | #define texture_1d 268
|
---|
| 125 | #define texture_2d 269
|
---|
| 126 | #define texture_rectangle 270
|
---|
| 127 | #define texture_3d 271
|
---|
| 128 | #define texture_cube_map 272
|
---|
| 129 | #define cull_fragment 273
|
---|
| 130 | #define pass_through 274
|
---|
| 131 | #define offset_2d_scale 275
|
---|
| 132 | #define offset_2d 276
|
---|
| 133 | #define offset_rectangle_scale 277
|
---|
| 134 | #define offset_rectangle 278
|
---|
| 135 | #define dependent_ar 279
|
---|
| 136 | #define dependent_gb 280
|
---|
| 137 | #define dot_product_2d_1of2 281
|
---|
| 138 | #define dot_product_2d_2of2 282
|
---|
| 139 | #define dot_product_rectangle_1of2 283
|
---|
| 140 | #define dot_product_rectangle_2of2 284
|
---|
| 141 | #define dot_product_depth_replace_1of2 285
|
---|
| 142 | #define dot_product_depth_replace_2of2 286
|
---|
| 143 | #define dot_product_3d_1of3 287
|
---|
| 144 | #define dot_product_3d_2of3 288
|
---|
| 145 | #define dot_product_3d_3of3 289
|
---|
| 146 | #define dot_product_cube_map_1of3 290
|
---|
| 147 | #define dot_product_cube_map_2of3 291
|
---|
| 148 | #define dot_product_cube_map_3of3 292
|
---|
| 149 | #define dot_product_reflect_cube_map_eye_from_qs_1of3 293
|
---|
| 150 | #define dot_product_reflect_cube_map_eye_from_qs_2of3 294
|
---|
| 151 | #define dot_product_reflect_cube_map_eye_from_qs_3of3 295
|
---|
| 152 | #define dot_product_reflect_cube_map_const_eye_1of3 296
|
---|
| 153 | #define dot_product_reflect_cube_map_const_eye_2of3 297
|
---|
| 154 | #define dot_product_reflect_cube_map_const_eye_3of3 298
|
---|
| 155 | #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 299
|
---|
| 156 | #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 300
|
---|
| 157 | #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 301
|
---|
| 158 | #define dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 302
|
---|
| 159 | #define dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 303
|
---|
| 160 | #define dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 304
|
---|
| 161 |
|
---|
| 162 |
|
---|
| 163 |
|
---|
| 164 |
|
---|
| 165 | /* Copy the first part of user declarations. */
|
---|
| 166 | #line 3 "ts1.0_grammar.y"
|
---|
| 167 |
|
---|
| 168 | void yyerror(char* s);
|
---|
| 169 | int yylex ( void );
|
---|
| 170 |
|
---|
| 171 | #ifdef _WIN32
|
---|
| 172 | # include <windows.h>
|
---|
| 173 | #endif
|
---|
| 174 | #include <stdio.h>
|
---|
| 175 | #include <stdlib.h>
|
---|
| 176 | #include "ts1.0_inst.h"
|
---|
| 177 | #include "ts1.0_inst_list.h"
|
---|
| 178 | #include "nvparse_errors.h"
|
---|
| 179 | #include "nvparse_externs.h"
|
---|
| 180 |
|
---|
| 181 |
|
---|
| 182 |
|
---|
| 183 | /* Enabling traces. */
|
---|
| 184 | #ifndef YYDEBUG
|
---|
| 185 | # define YYDEBUG 0
|
---|
| 186 | #endif
|
---|
| 187 |
|
---|
| 188 | /* Enabling verbose error messages. */
|
---|
| 189 | #ifdef YYERROR_VERBOSE
|
---|
| 190 | # undef YYERROR_VERBOSE
|
---|
| 191 | # define YYERROR_VERBOSE 1
|
---|
| 192 | #else
|
---|
| 193 | # define YYERROR_VERBOSE 0
|
---|
| 194 | #endif
|
---|
| 195 |
|
---|
| 196 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
---|
| 197 | #line 18 "ts1.0_grammar.y"
|
---|
| 198 | typedef union YYSTYPE {
|
---|
| 199 | float fval;
|
---|
| 200 | InstPtr inst;
|
---|
| 201 | InstListPtr instList;
|
---|
| 202 | MappedVariablePtr variable;
|
---|
| 203 | } YYSTYPE;
|
---|
| 204 | /* Line 191 of yacc.c. */
|
---|
| 205 | #line 205 "_ts1.0_parser.c"
|
---|
| 206 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
---|
| 207 | # define YYSTYPE_IS_DECLARED 1
|
---|
| 208 | # define YYSTYPE_IS_TRIVIAL 1
|
---|
| 209 | #endif
|
---|
| 210 |
|
---|
| 211 |
|
---|
| 212 |
|
---|
| 213 | /* Copy the second part of user declarations. */
|
---|
| 214 |
|
---|
| 215 |
|
---|
| 216 | /* Line 214 of yacc.c. */
|
---|
| 217 | #line 217 "_ts1.0_parser.c"
|
---|
| 218 |
|
---|
| 219 | #if ! defined (yyoverflow) || YYERROR_VERBOSE
|
---|
| 220 |
|
---|
| 221 | /* The parser invokes alloca or malloc; define the necessary symbols. */
|
---|
| 222 |
|
---|
| 223 | # if YYSTACK_USE_ALLOCA
|
---|
| 224 | # define YYSTACK_ALLOC alloca
|
---|
| 225 | # else
|
---|
| 226 | # ifndef YYSTACK_USE_ALLOCA
|
---|
| 227 | # if defined (alloca) || defined (_ALLOCA_H)
|
---|
| 228 | # define YYSTACK_ALLOC alloca
|
---|
| 229 | # else
|
---|
| 230 | # ifdef __GNUC__
|
---|
| 231 | # define YYSTACK_ALLOC __builtin_alloca
|
---|
| 232 | # endif
|
---|
| 233 | # endif
|
---|
| 234 | # endif
|
---|
| 235 | # endif
|
---|
| 236 |
|
---|
| 237 | # ifdef YYSTACK_ALLOC
|
---|
| 238 | /* Pacify GCC's `empty if-body' warning. */
|
---|
| 239 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
---|
| 240 | # else
|
---|
| 241 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 242 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 243 | # define YYSIZE_T size_t
|
---|
| 244 | # endif
|
---|
| 245 | # define YYSTACK_ALLOC malloc
|
---|
| 246 | # define YYSTACK_FREE free
|
---|
| 247 | # endif
|
---|
| 248 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
---|
| 249 |
|
---|
| 250 |
|
---|
| 251 | #if (! defined (yyoverflow) \
|
---|
| 252 | && (! defined (__cplusplus) \
|
---|
| 253 | || (YYSTYPE_IS_TRIVIAL)))
|
---|
| 254 |
|
---|
| 255 | /* A type that is properly aligned for any stack member. */
|
---|
| 256 | union yyalloc
|
---|
| 257 | {
|
---|
| 258 | short yyss;
|
---|
| 259 | YYSTYPE yyvs;
|
---|
| 260 | };
|
---|
| 261 |
|
---|
| 262 | /* The size of the maximum gap between one aligned stack and the next. */
|
---|
| 263 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
|
---|
| 264 |
|
---|
| 265 | /* The size of an array large to enough to hold all stacks, each with
|
---|
| 266 | N elements. */
|
---|
| 267 | # define YYSTACK_BYTES(N) \
|
---|
| 268 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
|
---|
| 269 | + YYSTACK_GAP_MAXIMUM)
|
---|
| 270 |
|
---|
| 271 | /* Copy COUNT objects from FROM to TO. The source and destination do
|
---|
| 272 | not overlap. */
|
---|
| 273 | # ifndef YYCOPY
|
---|
| 274 | # if 1 < __GNUC__
|
---|
| 275 | # define YYCOPY(To, From, Count) \
|
---|
| 276 | __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
---|
| 277 | # else
|
---|
| 278 | # define YYCOPY(To, From, Count) \
|
---|
| 279 | do \
|
---|
| 280 | { \
|
---|
| 281 | register YYSIZE_T yyi; \
|
---|
| 282 | for (yyi = 0; yyi < (Count); yyi++) \
|
---|
| 283 | (To)[yyi] = (From)[yyi]; \
|
---|
| 284 | } \
|
---|
| 285 | while (0)
|
---|
| 286 | # endif
|
---|
| 287 | # endif
|
---|
| 288 |
|
---|
| 289 | /* Relocate STACK from its old location to the new one. The
|
---|
| 290 | local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
---|
| 291 | elements in the stack, and YYPTR gives the new location of the
|
---|
| 292 | stack. Advance YYPTR to a properly aligned location for the next
|
---|
| 293 | stack. */
|
---|
| 294 | # define YYSTACK_RELOCATE(Stack) \
|
---|
| 295 | do \
|
---|
| 296 | { \
|
---|
| 297 | YYSIZE_T yynewbytes; \
|
---|
| 298 | YYCOPY (&yyptr->Stack, Stack, yysize); \
|
---|
| 299 | Stack = &yyptr->Stack; \
|
---|
| 300 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
---|
| 301 | yyptr += yynewbytes / sizeof (*yyptr); \
|
---|
| 302 | } \
|
---|
| 303 | while (0)
|
---|
| 304 |
|
---|
| 305 | #endif
|
---|
| 306 |
|
---|
| 307 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 308 | typedef signed char yysigned_char;
|
---|
| 309 | #else
|
---|
| 310 | typedef short yysigned_char;
|
---|
| 311 | #endif
|
---|
| 312 |
|
---|
| 313 | /* YYFINAL -- State number of the termination state. */
|
---|
| 314 | #define YYFINAL 80
|
---|
| 315 | /* YYLAST -- Last index in YYTABLE. */
|
---|
| 316 | #define YYLAST 223
|
---|
| 317 |
|
---|
| 318 | /* YYNTOKENS -- Number of terminals. */
|
---|
| 319 | #define YYNTOKENS 50
|
---|
| 320 | /* YYNNTS -- Number of nonterminals. */
|
---|
| 321 | #define YYNNTS 6
|
---|
| 322 | /* YYNRULES -- Number of rules. */
|
---|
| 323 | #define YYNRULES 46
|
---|
| 324 | /* YYNRULES -- Number of states. */
|
---|
| 325 | #define YYNSTATES 218
|
---|
| 326 |
|
---|
| 327 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
---|
| 328 | #define YYUNDEFTOK 2
|
---|
| 329 | #define YYMAXUTOK 304
|
---|
| 330 |
|
---|
| 331 | #define YYTRANSLATE(YYX) \
|
---|
| 332 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
---|
| 333 |
|
---|
| 334 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
---|
| 335 | static const unsigned char yytranslate[] =
|
---|
| 336 | {
|
---|
| 337 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 338 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 339 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 340 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 341 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 342 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 343 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 344 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 345 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 346 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 347 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 348 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 349 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 350 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 351 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 352 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 353 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 354 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 355 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 356 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 357 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 358 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 359 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 360 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 361 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 362 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
|
---|
| 363 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
---|
| 364 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
---|
| 365 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
---|
| 366 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
---|
| 367 | 45, 46, 47, 48, 49
|
---|
| 368 | };
|
---|
| 369 |
|
---|
| 370 | #if YYDEBUG
|
---|
| 371 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
---|
| 372 | YYRHS. */
|
---|
| 373 | static const unsigned short yyprhs[] =
|
---|
| 374 | {
|
---|
| 375 | 0, 0, 3, 5, 9, 12, 17, 19, 23, 27,
|
---|
| 376 | 31, 35, 39, 43, 54, 58, 75, 88, 105, 118,
|
---|
| 377 | 123, 128, 133, 138, 143, 148, 153, 158, 163, 168,
|
---|
| 378 | 173, 178, 183, 188, 193, 198, 203, 214, 219, 224,
|
---|
| 379 | 229, 234, 239, 250, 255, 260, 262
|
---|
| 380 | };
|
---|
| 381 |
|
---|
| 382 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
---|
| 383 | static const yysigned_char yyrhs[] =
|
---|
| 384 | {
|
---|
| 385 | 51, 0, -1, 52, -1, 52, 54, 10, -1, 54,
|
---|
| 386 | 10, -1, 7, 8, 6, 9, -1, 6, -1, 12,
|
---|
| 387 | 8, 9, -1, 13, 8, 9, -1, 14, 8, 9,
|
---|
| 388 | -1, 15, 8, 9, -1, 16, 8, 9, -1, 17,
|
---|
| 389 | 8, 9, -1, 18, 8, 55, 11, 55, 11, 55,
|
---|
| 390 | 11, 55, 9, -1, 19, 8, 9, -1, 20, 8,
|
---|
| 391 | 6, 11, 3, 11, 3, 11, 3, 11, 3, 11,
|
---|
| 392 | 3, 11, 3, 9, -1, 21, 8, 6, 11, 3,
|
---|
| 393 | 11, 3, 11, 3, 11, 3, 9, -1, 22, 8,
|
---|
| 394 | 6, 11, 3, 11, 3, 11, 3, 11, 3, 11,
|
---|
| 395 | 3, 11, 3, 9, -1, 23, 8, 6, 11, 3,
|
---|
| 396 | 11, 3, 11, 3, 11, 3, 9, -1, 24, 8,
|
---|
| 397 | 6, 9, -1, 25, 8, 6, 9, -1, 26, 8,
|
---|
| 398 | 53, 9, -1, 27, 8, 53, 9, -1, 28, 8,
|
---|
| 399 | 53, 9, -1, 29, 8, 53, 9, -1, 30, 8,
|
---|
| 400 | 53, 9, -1, 31, 8, 53, 9, -1, 32, 8,
|
---|
| 401 | 53, 9, -1, 33, 8, 53, 9, -1, 34, 8,
|
---|
| 402 | 53, 9, -1, 35, 8, 53, 9, -1, 36, 8,
|
---|
| 403 | 53, 9, -1, 37, 8, 53, 9, -1, 38, 8,
|
---|
| 404 | 53, 9, -1, 39, 8, 53, 9, -1, 40, 8,
|
---|
| 405 | 53, 9, -1, 41, 8, 53, 11, 3, 11, 3,
|
---|
| 406 | 11, 3, 9, -1, 42, 8, 53, 9, -1, 43,
|
---|
| 407 | 8, 53, 9, -1, 44, 8, 53, 9, -1, 45,
|
---|
| 408 | 8, 53, 9, -1, 46, 8, 53, 9, -1, 47,
|
---|
| 409 | 8, 53, 11, 3, 11, 3, 11, 3, 9, -1,
|
---|
| 410 | 48, 8, 53, 9, -1, 49, 8, 53, 9, -1,
|
---|
| 411 | 4, -1, 5, -1
|
---|
| 412 | };
|
---|
| 413 |
|
---|
| 414 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
---|
| 415 | static const unsigned short yyrline[] =
|
---|
| 416 | {
|
---|
| 417 | 0, 73, 73, 81, 87, 97, 103, 111, 115, 119,
|
---|
| 418 | 123, 127, 131, 135, 139, 143, 147, 151, 155, 159,
|
---|
| 419 | 163, 167, 172, 177, 182, 187, 192, 197, 202, 207,
|
---|
| 420 | 212, 217, 222, 227, 232, 237, 242, 247, 252, 257,
|
---|
| 421 | 262, 267, 272, 277, 282, 289, 293
|
---|
| 422 | };
|
---|
| 423 | #endif
|
---|
| 424 |
|
---|
| 425 | #if YYDEBUG || YYERROR_VERBOSE
|
---|
| 426 | /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
---|
| 427 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
---|
| 428 | static const char *const yytname[] =
|
---|
| 429 | {
|
---|
| 430 | "$end", "error", "$undefined", "floatValue", "gequal", "less",
|
---|
| 431 | "texVariable", "expandString", "openParen", "closeParen", "semicolon",
|
---|
| 432 | "comma", "nop", "texture_1d", "texture_2d", "texture_rectangle",
|
---|
| 433 | "texture_3d", "texture_cube_map", "cull_fragment", "pass_through",
|
---|
| 434 | "offset_2d_scale", "offset_2d", "offset_rectangle_scale",
|
---|
| 435 | "offset_rectangle", "dependent_ar", "dependent_gb",
|
---|
| 436 | "dot_product_2d_1of2", "dot_product_2d_2of2",
|
---|
| 437 | "dot_product_rectangle_1of2", "dot_product_rectangle_2of2",
|
---|
| 438 | "dot_product_depth_replace_1of2", "dot_product_depth_replace_2of2",
|
---|
| 439 | "dot_product_3d_1of3", "dot_product_3d_2of3", "dot_product_3d_3of3",
|
---|
| 440 | "dot_product_cube_map_1of3", "dot_product_cube_map_2of3",
|
---|
| 441 | "dot_product_cube_map_3of3",
|
---|
| 442 | "dot_product_reflect_cube_map_eye_from_qs_1of3",
|
---|
| 443 | "dot_product_reflect_cube_map_eye_from_qs_2of3",
|
---|
| 444 | "dot_product_reflect_cube_map_eye_from_qs_3of3",
|
---|
| 445 | "dot_product_reflect_cube_map_const_eye_1of3",
|
---|
| 446 | "dot_product_reflect_cube_map_const_eye_2of3",
|
---|
| 447 | "dot_product_reflect_cube_map_const_eye_3of3",
|
---|
| 448 | "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3",
|
---|
| 449 | "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3",
|
---|
| 450 | "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3",
|
---|
| 451 | "dot_product_cube_map_and_reflect_cube_map_const_eye_1of3",
|
---|
| 452 | "dot_product_cube_map_and_reflect_cube_map_const_eye_2of3",
|
---|
| 453 | "dot_product_cube_map_and_reflect_cube_map_const_eye_3of3", "$accept",
|
---|
| 454 | "WholeEnchilada", "InstListDesc", "MappedVariableDesc", "InstDesc",
|
---|
| 455 | "CondDesc", 0
|
---|
| 456 | };
|
---|
| 457 | #endif
|
---|
| 458 |
|
---|
| 459 | # ifdef YYPRINT
|
---|
| 460 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
|
---|
| 461 | token YYLEX-NUM. */
|
---|
| 462 | static const unsigned short yytoknum[] =
|
---|
| 463 | {
|
---|
| 464 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
---|
| 465 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
|
---|
| 466 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
|
---|
| 467 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
|
---|
| 468 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304
|
---|
| 469 | };
|
---|
| 470 | # endif
|
---|
| 471 |
|
---|
| 472 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
---|
| 473 | static const unsigned char yyr1[] =
|
---|
| 474 | {
|
---|
| 475 | 0, 50, 51, 52, 52, 53, 53, 54, 54, 54,
|
---|
| 476 | 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
|
---|
| 477 | 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
|
---|
| 478 | 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
|
---|
| 479 | 54, 54, 54, 54, 54, 55, 55
|
---|
| 480 | };
|
---|
| 481 |
|
---|
| 482 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
---|
| 483 | static const unsigned char yyr2[] =
|
---|
| 484 | {
|
---|
| 485 | 0, 2, 1, 3, 2, 4, 1, 3, 3, 3,
|
---|
| 486 | 3, 3, 3, 10, 3, 16, 12, 16, 12, 4,
|
---|
| 487 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
---|
| 488 | 4, 4, 4, 4, 4, 4, 10, 4, 4, 4,
|
---|
| 489 | 4, 4, 10, 4, 4, 1, 1
|
---|
| 490 | };
|
---|
| 491 |
|
---|
| 492 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
---|
| 493 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
---|
| 494 | means the default is an error. */
|
---|
| 495 | static const unsigned char yydefact[] =
|
---|
| 496 | {
|
---|
| 497 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 498 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 499 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 500 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 501 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 502 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 503 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 504 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 505 | 1, 0, 4, 7, 8, 9, 10, 11, 12, 45,
|
---|
| 506 | 46, 0, 14, 0, 0, 0, 0, 0, 0, 6,
|
---|
| 507 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 508 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 509 | 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
---|
| 510 | 0, 19, 20, 0, 21, 22, 23, 24, 25, 26,
|
---|
| 511 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 0,
|
---|
| 512 | 37, 38, 39, 40, 41, 0, 43, 44, 0, 0,
|
---|
| 513 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 514 | 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 515 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 516 | 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
|
---|
| 517 | 36, 42, 0, 0, 0, 0, 0, 16, 0, 18,
|
---|
| 518 | 0, 0, 0, 0, 0, 0, 15, 17
|
---|
| 519 | };
|
---|
| 520 |
|
---|
| 521 | /* YYDEFGOTO[NTERM-NUM]. */
|
---|
| 522 | static const yysigned_char yydefgoto[] =
|
---|
| 523 | {
|
---|
| 524 | -1, 39, 40, 101, 41, 91
|
---|
| 525 | };
|
---|
| 526 |
|
---|
| 527 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
---|
| 528 | STATE-NUM. */
|
---|
| 529 | #define YYPACT_NINF -127
|
---|
| 530 | static const short yypact[] =
|
---|
| 531 | {
|
---|
| 532 | -11, 31, 35, 39, 40, 41, 42, 43, 44, 45,
|
---|
| 533 | 46, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
---|
| 534 | 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
|
---|
| 535 | 90, 91, 92, 93, 94, 95, 96, 97, 98, 107,
|
---|
| 536 | -11, 36, 99, 100, 101, 102, 103, 104, 37, 105,
|
---|
| 537 | 109, 110, 111, 112, 113, 114, 38, 38, 38, 38,
|
---|
| 538 | 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
---|
| 539 | 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
---|
| 540 | -127, 115, -127, -127, -127, -127, -127, -127, -127, -127,
|
---|
| 541 | -127, 116, -127, 117, 118, 119, 120, 123, 124, -127,
|
---|
| 542 | 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
|
---|
| 543 | 136, 137, 138, 139, 140, 141, 142, 143, 145, 146,
|
---|
| 544 | 147, 148, 149, 150, 152, -127, 37, 121, 155, 159,
|
---|
| 545 | 160, -127, -127, 158, -127, -127, -127, -127, -127, -127,
|
---|
| 546 | -127, -127, -127, -127, -127, -127, -127, -127, -127, 162,
|
---|
| 547 | -127, -127, -127, -127, -127, 163, -127, -127, 156, 157,
|
---|
| 548 | 161, 164, 165, 168, 167, 169, 37, 166, 170, 171,
|
---|
| 549 | 176, -127, 178, 179, 172, 173, 174, 175, 177, 180,
|
---|
| 550 | 181, 37, 184, 186, 187, 190, 191, 192, 188, 185,
|
---|
| 551 | 189, 193, 194, 197, 198, -127, 195, 196, 199, 200,
|
---|
| 552 | -127, -127, 201, 202, 203, 204, 205, -127, 206, -127,
|
---|
| 553 | 207, 208, 212, 213, 211, 214, -127, -127
|
---|
| 554 | };
|
---|
| 555 |
|
---|
| 556 | /* YYPGOTO[NTERM-NUM]. */
|
---|
| 557 | static const short yypgoto[] =
|
---|
| 558 | {
|
---|
| 559 | -127, -127, -127, -1, 182, -126
|
---|
| 560 | };
|
---|
| 561 |
|
---|
| 562 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
---|
| 563 | positive, shift that token. If negative, reduce the rule which
|
---|
| 564 | number is the opposite. If zero, do what YYDEFACT says.
|
---|
| 565 | If YYTABLE_NINF, syntax error. */
|
---|
| 566 | #define YYTABLE_NINF -1
|
---|
| 567 | static const unsigned char yytable[] =
|
---|
| 568 | {
|
---|
| 569 | 158, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
---|
| 570 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
---|
| 571 | 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
---|
| 572 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 42,
|
---|
| 573 | 174, 89, 90, 43, 99, 100, 82, 44, 45, 46,
|
---|
| 574 | 47, 48, 49, 50, 51, 188, 102, 103, 104, 105,
|
---|
| 575 | 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
|
---|
| 576 | 116, 117, 118, 119, 120, 121, 122, 123, 124, 52,
|
---|
| 577 | 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
---|
| 578 | 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
|
---|
| 579 | 73, 74, 75, 76, 77, 78, 79, 80, 83, 84,
|
---|
| 580 | 85, 86, 87, 88, 92, 93, 94, 95, 96, 97,
|
---|
| 581 | 98, 0, 0, 0, 159, 125, 0, 126, 127, 128,
|
---|
| 582 | 129, 130, 131, 132, 133, 0, 134, 135, 136, 137,
|
---|
| 583 | 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
|
---|
| 584 | 148, 0, 150, 149, 151, 152, 153, 154, 160, 156,
|
---|
| 585 | 155, 157, 161, 162, 163, 164, 165, 166, 167, 175,
|
---|
| 586 | 0, 0, 168, 176, 177, 169, 170, 171, 172, 178,
|
---|
| 587 | 173, 179, 180, 181, 182, 183, 184, 189, 185, 190,
|
---|
| 588 | 191, 186, 187, 192, 193, 194, 196, 195, 202, 203,
|
---|
| 589 | 197, 0, 204, 205, 198, 199, 200, 201, 210, 211,
|
---|
| 590 | 0, 207, 206, 209, 208, 214, 215, 0, 212, 213,
|
---|
| 591 | 216, 0, 81, 217
|
---|
| 592 | };
|
---|
| 593 |
|
---|
| 594 | static const short yycheck[] =
|
---|
| 595 | {
|
---|
| 596 | 126, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
---|
| 597 | 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
---|
| 598 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
---|
| 599 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 8,
|
---|
| 600 | 166, 4, 5, 8, 6, 7, 10, 8, 8, 8,
|
---|
| 601 | 8, 8, 8, 8, 8, 181, 57, 58, 59, 60,
|
---|
| 602 | 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
---|
| 603 | 71, 72, 73, 74, 75, 76, 77, 78, 79, 8,
|
---|
| 604 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 605 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 606 | 8, 8, 8, 8, 8, 8, 8, 0, 9, 9,
|
---|
| 607 | 9, 9, 9, 9, 9, 6, 6, 6, 6, 6,
|
---|
| 608 | 6, -1, -1, -1, 3, 10, -1, 11, 11, 11,
|
---|
| 609 | 11, 11, 9, 9, 8, -1, 9, 9, 9, 9,
|
---|
| 610 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
---|
| 611 | 9, -1, 9, 11, 9, 9, 9, 9, 3, 9,
|
---|
| 612 | 11, 9, 3, 3, 6, 3, 3, 11, 11, 3,
|
---|
| 613 | -1, -1, 11, 3, 3, 11, 11, 9, 11, 3,
|
---|
| 614 | 11, 3, 3, 11, 11, 11, 11, 3, 11, 3,
|
---|
| 615 | 3, 11, 11, 3, 3, 3, 11, 9, 3, 3,
|
---|
| 616 | 11, -1, 3, 3, 11, 11, 9, 9, 3, 3,
|
---|
| 617 | -1, 9, 11, 9, 11, 3, 3, -1, 11, 11,
|
---|
| 618 | 9, -1, 40, 9
|
---|
| 619 | };
|
---|
| 620 |
|
---|
| 621 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
---|
| 622 | symbol of state STATE-NUM. */
|
---|
| 623 | static const unsigned char yystos[] =
|
---|
| 624 | {
|
---|
| 625 | 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
---|
| 626 | 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
---|
| 627 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
---|
| 628 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 51,
|
---|
| 629 | 52, 54, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 630 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 631 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 632 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
| 633 | 0, 54, 10, 9, 9, 9, 9, 9, 9, 4,
|
---|
| 634 | 5, 55, 9, 6, 6, 6, 6, 6, 6, 6,
|
---|
| 635 | 7, 53, 53, 53, 53, 53, 53, 53, 53, 53,
|
---|
| 636 | 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
|
---|
| 637 | 53, 53, 53, 53, 53, 10, 11, 11, 11, 11,
|
---|
| 638 | 11, 9, 9, 8, 9, 9, 9, 9, 9, 9,
|
---|
| 639 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 11,
|
---|
| 640 | 9, 9, 9, 9, 9, 11, 9, 9, 55, 3,
|
---|
| 641 | 3, 3, 3, 6, 3, 3, 11, 11, 11, 11,
|
---|
| 642 | 11, 9, 11, 11, 55, 3, 3, 3, 3, 3,
|
---|
| 643 | 3, 11, 11, 11, 11, 11, 11, 11, 55, 3,
|
---|
| 644 | 3, 3, 3, 3, 3, 9, 11, 11, 11, 11,
|
---|
| 645 | 9, 9, 3, 3, 3, 3, 11, 9, 11, 9,
|
---|
| 646 | 3, 3, 11, 11, 3, 3, 9, 9
|
---|
| 647 | };
|
---|
| 648 |
|
---|
| 649 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
---|
| 650 | # define YYSIZE_T __SIZE_TYPE__
|
---|
| 651 | #endif
|
---|
| 652 | #if ! defined (YYSIZE_T) && defined (size_t)
|
---|
| 653 | # define YYSIZE_T size_t
|
---|
| 654 | #endif
|
---|
| 655 | #if ! defined (YYSIZE_T)
|
---|
| 656 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 657 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 658 | # define YYSIZE_T size_t
|
---|
| 659 | # endif
|
---|
| 660 | #endif
|
---|
| 661 | #if ! defined (YYSIZE_T)
|
---|
| 662 | # define YYSIZE_T unsigned int
|
---|
| 663 | #endif
|
---|
| 664 |
|
---|
| 665 | #define yyerrok (yyerrstatus = 0)
|
---|
| 666 | #define yyclearin (yychar = YYEMPTY)
|
---|
| 667 | #define YYEMPTY (-2)
|
---|
| 668 | #define YYEOF 0
|
---|
| 669 |
|
---|
| 670 | #define YYACCEPT goto yyacceptlab
|
---|
| 671 | #define YYABORT goto yyabortlab
|
---|
| 672 | #define YYERROR goto yyerrlab1
|
---|
| 673 |
|
---|
| 674 |
|
---|
| 675 | /* Like YYERROR except do call yyerror. This remains here temporarily
|
---|
| 676 | to ease the transition to the new meaning of YYERROR, for GCC.
|
---|
| 677 | Once GCC version 2 has supplanted version 1, this can go. */
|
---|
| 678 |
|
---|
| 679 | #define YYFAIL goto yyerrlab
|
---|
| 680 |
|
---|
| 681 | #define YYRECOVERING() (!!yyerrstatus)
|
---|
| 682 |
|
---|
| 683 | #define YYBACKUP(Token, Value) \
|
---|
| 684 | do \
|
---|
| 685 | if (yychar == YYEMPTY && yylen == 1) \
|
---|
| 686 | { \
|
---|
| 687 | yychar = (Token); \
|
---|
| 688 | yylval = (Value); \
|
---|
| 689 | yytoken = YYTRANSLATE (yychar); \
|
---|
| 690 | YYPOPSTACK; \
|
---|
| 691 | goto yybackup; \
|
---|
| 692 | } \
|
---|
| 693 | else \
|
---|
| 694 | { \
|
---|
| 695 | yyerror ("syntax error: cannot back up");\
|
---|
| 696 | YYERROR; \
|
---|
| 697 | } \
|
---|
| 698 | while (0)
|
---|
| 699 |
|
---|
| 700 | #define YYTERROR 1
|
---|
| 701 | #define YYERRCODE 256
|
---|
| 702 |
|
---|
| 703 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions
|
---|
| 704 | are run). */
|
---|
| 705 |
|
---|
| 706 | #ifndef YYLLOC_DEFAULT
|
---|
| 707 | # define YYLLOC_DEFAULT(Current, Rhs, N) \
|
---|
| 708 | Current.first_line = Rhs[1].first_line; \
|
---|
| 709 | Current.first_column = Rhs[1].first_column; \
|
---|
| 710 | Current.last_line = Rhs[N].last_line; \
|
---|
| 711 | Current.last_column = Rhs[N].last_column;
|
---|
| 712 | #endif
|
---|
| 713 |
|
---|
| 714 | /* YYLEX -- calling `yylex' with the right arguments. */
|
---|
| 715 |
|
---|
| 716 | #ifdef YYLEX_PARAM
|
---|
| 717 | # define YYLEX yylex (YYLEX_PARAM)
|
---|
| 718 | #else
|
---|
| 719 | # define YYLEX yylex ()
|
---|
| 720 | #endif
|
---|
| 721 |
|
---|
| 722 | /* Enable debugging if requested. */
|
---|
| 723 | #if YYDEBUG
|
---|
| 724 |
|
---|
| 725 | # ifndef YYFPRINTF
|
---|
| 726 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 727 | # define YYFPRINTF fprintf
|
---|
| 728 | # endif
|
---|
| 729 |
|
---|
| 730 | # define YYDPRINTF(Args) \
|
---|
| 731 | do { \
|
---|
| 732 | if (yydebug) \
|
---|
| 733 | YYFPRINTF Args; \
|
---|
| 734 | } while (0)
|
---|
| 735 |
|
---|
| 736 | # define YYDSYMPRINT(Args) \
|
---|
| 737 | do { \
|
---|
| 738 | if (yydebug) \
|
---|
| 739 | yysymprint Args; \
|
---|
| 740 | } while (0)
|
---|
| 741 |
|
---|
| 742 | # define YYDSYMPRINTF(Title, Token, Value, Location) \
|
---|
| 743 | do { \
|
---|
| 744 | if (yydebug) \
|
---|
| 745 | { \
|
---|
| 746 | YYFPRINTF (stderr, "%s ", Title); \
|
---|
| 747 | yysymprint (stderr, \
|
---|
| 748 | Token, Value); \
|
---|
| 749 | YYFPRINTF (stderr, "\n"); \
|
---|
| 750 | } \
|
---|
| 751 | } while (0)
|
---|
| 752 |
|
---|
| 753 | /*------------------------------------------------------------------.
|
---|
| 754 | | yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
---|
| 755 | | TOP (cinluded). |
|
---|
| 756 | `------------------------------------------------------------------*/
|
---|
| 757 |
|
---|
| 758 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 759 | static void
|
---|
| 760 | yy_stack_print (short *bottom, short *top)
|
---|
| 761 | #else
|
---|
| 762 | static void
|
---|
| 763 | yy_stack_print (bottom, top)
|
---|
| 764 | short *bottom;
|
---|
| 765 | short *top;
|
---|
| 766 | #endif
|
---|
| 767 | {
|
---|
| 768 | YYFPRINTF (stderr, "Stack now");
|
---|
| 769 | for (/* Nothing. */; bottom <= top; ++bottom)
|
---|
| 770 | YYFPRINTF (stderr, " %d", *bottom);
|
---|
| 771 | YYFPRINTF (stderr, "\n");
|
---|
| 772 | }
|
---|
| 773 |
|
---|
| 774 | # define YY_STACK_PRINT(Bottom, Top) \
|
---|
| 775 | do { \
|
---|
| 776 | if (yydebug) \
|
---|
| 777 | yy_stack_print ((Bottom), (Top)); \
|
---|
| 778 | } while (0)
|
---|
| 779 |
|
---|
| 780 |
|
---|
| 781 | /*------------------------------------------------.
|
---|
| 782 | | Report that the YYRULE is going to be reduced. |
|
---|
| 783 | `------------------------------------------------*/
|
---|
| 784 |
|
---|
| 785 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 786 | static void
|
---|
| 787 | yy_reduce_print (int yyrule)
|
---|
| 788 | #else
|
---|
| 789 | static void
|
---|
| 790 | yy_reduce_print (yyrule)
|
---|
| 791 | int yyrule;
|
---|
| 792 | #endif
|
---|
| 793 | {
|
---|
| 794 | int yyi;
|
---|
| 795 | unsigned int yylineno = yyrline[yyrule];
|
---|
| 796 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
---|
| 797 | yyrule - 1, yylineno);
|
---|
| 798 | /* Print the symbols being reduced, and their result. */
|
---|
| 799 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
---|
| 800 | YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
---|
| 801 | YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
|
---|
| 802 | }
|
---|
| 803 |
|
---|
| 804 | # define YY_REDUCE_PRINT(Rule) \
|
---|
| 805 | do { \
|
---|
| 806 | if (yydebug) \
|
---|
| 807 | yy_reduce_print (Rule); \
|
---|
| 808 | } while (0)
|
---|
| 809 |
|
---|
| 810 | /* Nonzero means print parse trace. It is left uninitialized so that
|
---|
| 811 | multiple parsers can coexist. */
|
---|
| 812 | int yydebug;
|
---|
| 813 | #else /* !YYDEBUG */
|
---|
| 814 | # define YYDPRINTF(Args)
|
---|
| 815 | # define YYDSYMPRINT(Args)
|
---|
| 816 | # define YYDSYMPRINTF(Title, Token, Value, Location)
|
---|
| 817 | # define YY_STACK_PRINT(Bottom, Top)
|
---|
| 818 | # define YY_REDUCE_PRINT(Rule)
|
---|
| 819 | #endif /* !YYDEBUG */
|
---|
| 820 |
|
---|
| 821 |
|
---|
| 822 | /* YYINITDEPTH -- initial size of the parser's stacks. */
|
---|
| 823 | #ifndef YYINITDEPTH
|
---|
| 824 | # define YYINITDEPTH 200
|
---|
| 825 | #endif
|
---|
| 826 |
|
---|
| 827 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
---|
| 828 | if the built-in stack extension method is used).
|
---|
| 829 |
|
---|
| 830 | Do not make this value too large; the results are undefined if
|
---|
| 831 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
---|
| 832 | evaluated with infinite-precision integer arithmetic. */
|
---|
| 833 |
|
---|
| 834 | #if YYMAXDEPTH == 0
|
---|
| 835 | # undef YYMAXDEPTH
|
---|
| 836 | #endif
|
---|
| 837 |
|
---|
| 838 | #ifndef YYMAXDEPTH
|
---|
| 839 | # define YYMAXDEPTH 10000
|
---|
| 840 | #endif
|
---|
| 841 |
|
---|
| 842 |
|
---|
| 843 |
|
---|
| 844 | #if YYERROR_VERBOSE
|
---|
| 845 |
|
---|
| 846 | # ifndef yystrlen
|
---|
| 847 | # if defined (__GLIBC__) && defined (_STRING_H)
|
---|
| 848 | # define yystrlen strlen
|
---|
| 849 | # else
|
---|
| 850 | /* Return the length of YYSTR. */
|
---|
| 851 | static YYSIZE_T
|
---|
| 852 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 853 | yystrlen (const char *yystr)
|
---|
| 854 | # else
|
---|
| 855 | yystrlen (yystr)
|
---|
| 856 | const char *yystr;
|
---|
| 857 | # endif
|
---|
| 858 | {
|
---|
| 859 | register const char *yys = yystr;
|
---|
| 860 |
|
---|
| 861 | while (*yys++ != '\0')
|
---|
| 862 | continue;
|
---|
| 863 |
|
---|
| 864 | return yys - yystr - 1;
|
---|
| 865 | }
|
---|
| 866 | # endif
|
---|
| 867 | # endif
|
---|
| 868 |
|
---|
| 869 | # ifndef yystpcpy
|
---|
| 870 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
|
---|
| 871 | # define yystpcpy stpcpy
|
---|
| 872 | # else
|
---|
| 873 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
---|
| 874 | YYDEST. */
|
---|
| 875 | static char *
|
---|
| 876 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 877 | yystpcpy (char *yydest, const char *yysrc)
|
---|
| 878 | # else
|
---|
| 879 | yystpcpy (yydest, yysrc)
|
---|
| 880 | char *yydest;
|
---|
| 881 | const char *yysrc;
|
---|
| 882 | # endif
|
---|
| 883 | {
|
---|
| 884 | register char *yyd = yydest;
|
---|
| 885 | register const char *yys = yysrc;
|
---|
| 886 |
|
---|
| 887 | while ((*yyd++ = *yys++) != '\0')
|
---|
| 888 | continue;
|
---|
| 889 |
|
---|
| 890 | return yyd - 1;
|
---|
| 891 | }
|
---|
| 892 | # endif
|
---|
| 893 | # endif
|
---|
| 894 |
|
---|
| 895 | #endif /* !YYERROR_VERBOSE */
|
---|
| 896 |
|
---|
| 897 |
|
---|
| 898 |
|
---|
| 899 | #if YYDEBUG
|
---|
| 900 | /*--------------------------------.
|
---|
| 901 | | Print this symbol on YYOUTPUT. |
|
---|
| 902 | `--------------------------------*/
|
---|
| 903 |
|
---|
| 904 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 905 | static void
|
---|
| 906 | yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
|
---|
| 907 | #else
|
---|
| 908 | static void
|
---|
| 909 | yysymprint (yyoutput, yytype, yyvaluep)
|
---|
| 910 | FILE *yyoutput;
|
---|
| 911 | int yytype;
|
---|
| 912 | YYSTYPE *yyvaluep;
|
---|
| 913 | #endif
|
---|
| 914 | {
|
---|
| 915 | /* Pacify ``unused variable'' warnings. */
|
---|
| 916 | (void) yyvaluep;
|
---|
| 917 |
|
---|
| 918 | if (yytype < YYNTOKENS)
|
---|
| 919 | {
|
---|
| 920 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
|
---|
| 921 | # ifdef YYPRINT
|
---|
| 922 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
---|
| 923 | # endif
|
---|
| 924 | }
|
---|
| 925 | else
|
---|
| 926 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
---|
| 927 |
|
---|
| 928 | switch (yytype)
|
---|
| 929 | {
|
---|
| 930 | default:
|
---|
| 931 | break;
|
---|
| 932 | }
|
---|
| 933 | YYFPRINTF (yyoutput, ")");
|
---|
| 934 | }
|
---|
| 935 |
|
---|
| 936 | #endif /* ! YYDEBUG */
|
---|
| 937 | /*-----------------------------------------------.
|
---|
| 938 | | Release the memory associated to this symbol. |
|
---|
| 939 | `-----------------------------------------------*/
|
---|
| 940 |
|
---|
| 941 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 942 | static void
|
---|
| 943 | yydestruct (int yytype, YYSTYPE *yyvaluep)
|
---|
| 944 | #else
|
---|
| 945 | static void
|
---|
| 946 | yydestruct (yytype, yyvaluep)
|
---|
| 947 | int yytype;
|
---|
| 948 | YYSTYPE *yyvaluep;
|
---|
| 949 | #endif
|
---|
| 950 | {
|
---|
| 951 | /* Pacify ``unused variable'' warnings. */
|
---|
| 952 | (void) yyvaluep;
|
---|
| 953 |
|
---|
| 954 | switch (yytype)
|
---|
| 955 | {
|
---|
| 956 |
|
---|
| 957 | default:
|
---|
| 958 | break;
|
---|
| 959 | }
|
---|
| 960 | }
|
---|
| 961 |
|
---|
| 962 |
|
---|
| 963 | /* Prevent warnings from -Wmissing-prototypes. */
|
---|
| 964 |
|
---|
| 965 | #ifdef YYPARSE_PARAM
|
---|
| 966 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 967 | int yyparse (void *YYPARSE_PARAM);
|
---|
| 968 | # else
|
---|
| 969 | int yyparse ();
|
---|
| 970 | # endif
|
---|
| 971 | #else /* ! YYPARSE_PARAM */
|
---|
| 972 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 973 | int yyparse (void);
|
---|
| 974 | #else
|
---|
| 975 | int yyparse ();
|
---|
| 976 | #endif
|
---|
| 977 | #endif /* ! YYPARSE_PARAM */
|
---|
| 978 |
|
---|
| 979 |
|
---|
| 980 |
|
---|
| 981 | /* The lookahead symbol. */
|
---|
| 982 | int yychar;
|
---|
| 983 |
|
---|
| 984 | /* The semantic value of the lookahead symbol. */
|
---|
| 985 | YYSTYPE yylval;
|
---|
| 986 |
|
---|
| 987 | /* Number of syntax errors so far. */
|
---|
| 988 | int yynerrs;
|
---|
| 989 |
|
---|
| 990 |
|
---|
| 991 |
|
---|
| 992 | /*----------.
|
---|
| 993 | | yyparse. |
|
---|
| 994 | `----------*/
|
---|
| 995 |
|
---|
| 996 | #ifdef YYPARSE_PARAM
|
---|
| 997 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 998 | int yyparse (void *YYPARSE_PARAM)
|
---|
| 999 | # else
|
---|
| 1000 | int yyparse (YYPARSE_PARAM)
|
---|
| 1001 | void *YYPARSE_PARAM;
|
---|
| 1002 | # endif
|
---|
| 1003 | #else /* ! YYPARSE_PARAM */
|
---|
| 1004 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 1005 | int
|
---|
| 1006 | yyparse (void)
|
---|
| 1007 | #else
|
---|
| 1008 | int
|
---|
| 1009 | yyparse ()
|
---|
| 1010 |
|
---|
| 1011 | #endif
|
---|
| 1012 | #endif
|
---|
| 1013 | {
|
---|
| 1014 |
|
---|
| 1015 | register int yystate;
|
---|
| 1016 | register int yyn;
|
---|
| 1017 | int yyresult;
|
---|
| 1018 | /* Number of tokens to shift before error messages enabled. */
|
---|
| 1019 | int yyerrstatus;
|
---|
| 1020 | /* Lookahead token as an internal (translated) token number. */
|
---|
| 1021 | int yytoken = 0;
|
---|
| 1022 |
|
---|
| 1023 | /* Three stacks and their tools:
|
---|
| 1024 | `yyss': related to states,
|
---|
| 1025 | `yyvs': related to semantic values,
|
---|
| 1026 | `yyls': related to locations.
|
---|
| 1027 |
|
---|
| 1028 | Refer to the stacks thru separate pointers, to allow yyoverflow
|
---|
| 1029 | to reallocate them elsewhere. */
|
---|
| 1030 |
|
---|
| 1031 | /* The state stack. */
|
---|
| 1032 | short yyssa[YYINITDEPTH];
|
---|
| 1033 | short *yyss = yyssa;
|
---|
| 1034 | register short *yyssp;
|
---|
| 1035 |
|
---|
| 1036 | /* The semantic value stack. */
|
---|
| 1037 | YYSTYPE yyvsa[YYINITDEPTH];
|
---|
| 1038 | YYSTYPE *yyvs = yyvsa;
|
---|
| 1039 | register YYSTYPE *yyvsp;
|
---|
| 1040 |
|
---|
| 1041 |
|
---|
| 1042 |
|
---|
| 1043 | #define YYPOPSTACK (yyvsp--, yyssp--)
|
---|
| 1044 |
|
---|
| 1045 | YYSIZE_T yystacksize = YYINITDEPTH;
|
---|
| 1046 |
|
---|
| 1047 | /* The variables used to return semantic value and location from the
|
---|
| 1048 | action routines. */
|
---|
| 1049 | YYSTYPE yyval;
|
---|
| 1050 |
|
---|
| 1051 |
|
---|
| 1052 | /* When reducing, the number of symbols on the RHS of the reduced
|
---|
| 1053 | rule. */
|
---|
| 1054 | int yylen;
|
---|
| 1055 |
|
---|
| 1056 | YYDPRINTF ((stderr, "Starting parse\n"));
|
---|
| 1057 |
|
---|
| 1058 | yystate = 0;
|
---|
| 1059 | yyerrstatus = 0;
|
---|
| 1060 | yynerrs = 0;
|
---|
| 1061 | yychar = YYEMPTY; /* Cause a token to be read. */
|
---|
| 1062 |
|
---|
| 1063 | /* Initialize stack pointers.
|
---|
| 1064 | Waste one element of value and location stack
|
---|
| 1065 | so that they stay on the same level as the state stack.
|
---|
| 1066 | The wasted elements are never initialized. */
|
---|
| 1067 |
|
---|
| 1068 | yyssp = yyss;
|
---|
| 1069 | yyvsp = yyvs;
|
---|
| 1070 |
|
---|
| 1071 | goto yysetstate;
|
---|
| 1072 |
|
---|
| 1073 | /*------------------------------------------------------------.
|
---|
| 1074 | | yynewstate -- Push a new state, which is found in yystate. |
|
---|
| 1075 | `------------------------------------------------------------*/
|
---|
| 1076 | yynewstate:
|
---|
| 1077 | /* In all cases, when you get here, the value and location stacks
|
---|
| 1078 | have just been pushed. so pushing a state here evens the stacks.
|
---|
| 1079 | */
|
---|
| 1080 | yyssp++;
|
---|
| 1081 |
|
---|
| 1082 | yysetstate:
|
---|
| 1083 | *yyssp = yystate;
|
---|
| 1084 |
|
---|
| 1085 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
| 1086 | {
|
---|
| 1087 | /* Get the current used size of the three stacks, in elements. */
|
---|
| 1088 | YYSIZE_T yysize = yyssp - yyss + 1;
|
---|
| 1089 |
|
---|
| 1090 | #ifdef yyoverflow
|
---|
| 1091 | {
|
---|
| 1092 | /* Give user a chance to reallocate the stack. Use copies of
|
---|
| 1093 | these so that the &'s don't force the real ones into
|
---|
| 1094 | memory. */
|
---|
| 1095 | YYSTYPE *yyvs1 = yyvs;
|
---|
| 1096 | short *yyss1 = yyss;
|
---|
| 1097 |
|
---|
| 1098 |
|
---|
| 1099 | /* Each stack pointer address is followed by the size of the
|
---|
| 1100 | data in use in that stack, in bytes. This used to be a
|
---|
| 1101 | conditional around just the two extra args, but that might
|
---|
| 1102 | be undefined if yyoverflow is a macro. */
|
---|
| 1103 | yyoverflow ("parser stack overflow",
|
---|
| 1104 | &yyss1, yysize * sizeof (*yyssp),
|
---|
| 1105 | &yyvs1, yysize * sizeof (*yyvsp),
|
---|
| 1106 |
|
---|
| 1107 | &yystacksize);
|
---|
| 1108 |
|
---|
| 1109 | yyss = yyss1;
|
---|
| 1110 | yyvs = yyvs1;
|
---|
| 1111 | }
|
---|
| 1112 | #else /* no yyoverflow */
|
---|
| 1113 | # ifndef YYSTACK_RELOCATE
|
---|
| 1114 | goto yyoverflowlab;
|
---|
| 1115 | # else
|
---|
| 1116 | /* Extend the stack our own way. */
|
---|
| 1117 | if (YYMAXDEPTH <= yystacksize)
|
---|
| 1118 | goto yyoverflowlab;
|
---|
| 1119 | yystacksize *= 2;
|
---|
| 1120 | if (YYMAXDEPTH < yystacksize)
|
---|
| 1121 | yystacksize = YYMAXDEPTH;
|
---|
| 1122 |
|
---|
| 1123 | {
|
---|
| 1124 | short *yyss1 = yyss;
|
---|
| 1125 | union yyalloc *yyptr =
|
---|
| 1126 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
---|
| 1127 | if (! yyptr)
|
---|
| 1128 | goto yyoverflowlab;
|
---|
| 1129 | YYSTACK_RELOCATE (yyss);
|
---|
| 1130 | YYSTACK_RELOCATE (yyvs);
|
---|
| 1131 |
|
---|
| 1132 | # undef YYSTACK_RELOCATE
|
---|
| 1133 | if (yyss1 != yyssa)
|
---|
| 1134 | YYSTACK_FREE (yyss1);
|
---|
| 1135 | }
|
---|
| 1136 | # endif
|
---|
| 1137 | #endif /* no yyoverflow */
|
---|
| 1138 |
|
---|
| 1139 | yyssp = yyss + yysize - 1;
|
---|
| 1140 | yyvsp = yyvs + yysize - 1;
|
---|
| 1141 |
|
---|
| 1142 |
|
---|
| 1143 | YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
---|
| 1144 | (unsigned long int) yystacksize));
|
---|
| 1145 |
|
---|
| 1146 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
| 1147 | YYABORT;
|
---|
| 1148 | }
|
---|
| 1149 |
|
---|
| 1150 | YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
---|
| 1151 |
|
---|
| 1152 | goto yybackup;
|
---|
| 1153 |
|
---|
| 1154 | /*-----------.
|
---|
| 1155 | | yybackup. |
|
---|
| 1156 | `-----------*/
|
---|
| 1157 | yybackup:
|
---|
| 1158 |
|
---|
| 1159 | /* Do appropriate processing given the current state. */
|
---|
| 1160 | /* Read a lookahead token if we need one and don't already have one. */
|
---|
| 1161 | /* yyresume: */
|
---|
| 1162 |
|
---|
| 1163 | /* First try to decide what to do without reference to lookahead token. */
|
---|
| 1164 |
|
---|
| 1165 | yyn = yypact[yystate];
|
---|
| 1166 | if (yyn == YYPACT_NINF)
|
---|
| 1167 | goto yydefault;
|
---|
| 1168 |
|
---|
| 1169 | /* Not known => get a lookahead token if don't already have one. */
|
---|
| 1170 |
|
---|
| 1171 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
---|
| 1172 | if (yychar == YYEMPTY)
|
---|
| 1173 | {
|
---|
| 1174 | YYDPRINTF ((stderr, "Reading a token: "));
|
---|
| 1175 | yychar = YYLEX;
|
---|
| 1176 | }
|
---|
| 1177 |
|
---|
| 1178 | if (yychar <= YYEOF)
|
---|
| 1179 | {
|
---|
| 1180 | yychar = yytoken = YYEOF;
|
---|
| 1181 | YYDPRINTF ((stderr, "Now at end of input.\n"));
|
---|
| 1182 | }
|
---|
| 1183 | else
|
---|
| 1184 | {
|
---|
| 1185 | yytoken = YYTRANSLATE (yychar);
|
---|
| 1186 | YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
|
---|
| 1187 | }
|
---|
| 1188 |
|
---|
| 1189 | /* If the proper action on seeing token YYTOKEN is to reduce or to
|
---|
| 1190 | detect an error, take that action. */
|
---|
| 1191 | yyn += yytoken;
|
---|
| 1192 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
|
---|
| 1193 | goto yydefault;
|
---|
| 1194 | yyn = yytable[yyn];
|
---|
| 1195 | if (yyn <= 0)
|
---|
| 1196 | {
|
---|
| 1197 | if (yyn == 0 || yyn == YYTABLE_NINF)
|
---|
| 1198 | goto yyerrlab;
|
---|
| 1199 | yyn = -yyn;
|
---|
| 1200 | goto yyreduce;
|
---|
| 1201 | }
|
---|
| 1202 |
|
---|
| 1203 | if (yyn == YYFINAL)
|
---|
| 1204 | YYACCEPT;
|
---|
| 1205 |
|
---|
| 1206 | /* Shift the lookahead token. */
|
---|
| 1207 | YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
|
---|
| 1208 |
|
---|
| 1209 | /* Discard the token being shifted unless it is eof. */
|
---|
| 1210 | if (yychar != YYEOF)
|
---|
| 1211 | yychar = YYEMPTY;
|
---|
| 1212 |
|
---|
| 1213 | *++yyvsp = yylval;
|
---|
| 1214 |
|
---|
| 1215 |
|
---|
| 1216 | /* Count tokens shifted since error; after three, turn off error
|
---|
| 1217 | status. */
|
---|
| 1218 | if (yyerrstatus)
|
---|
| 1219 | yyerrstatus--;
|
---|
| 1220 |
|
---|
| 1221 | yystate = yyn;
|
---|
| 1222 | goto yynewstate;
|
---|
| 1223 |
|
---|
| 1224 |
|
---|
| 1225 | /*-----------------------------------------------------------.
|
---|
| 1226 | | yydefault -- do the default action for the current state. |
|
---|
| 1227 | `-----------------------------------------------------------*/
|
---|
| 1228 | yydefault:
|
---|
| 1229 | yyn = yydefact[yystate];
|
---|
| 1230 | if (yyn == 0)
|
---|
| 1231 | goto yyerrlab;
|
---|
| 1232 | goto yyreduce;
|
---|
| 1233 |
|
---|
| 1234 |
|
---|
| 1235 | /*-----------------------------.
|
---|
| 1236 | | yyreduce -- Do a reduction. |
|
---|
| 1237 | `-----------------------------*/
|
---|
| 1238 | yyreduce:
|
---|
| 1239 | /* yyn is the number of a rule to reduce with. */
|
---|
| 1240 | yylen = yyr2[yyn];
|
---|
| 1241 |
|
---|
| 1242 | /* If YYLEN is nonzero, implement the default value of the action:
|
---|
| 1243 | `$$ = $1'.
|
---|
| 1244 |
|
---|
| 1245 | Otherwise, the following line sets YYVAL to garbage.
|
---|
| 1246 | This behavior is undocumented and Bison
|
---|
| 1247 | users should not rely upon it. Assigning to YYVAL
|
---|
| 1248 | unconditionally makes the parser a bit smaller, and it avoids a
|
---|
| 1249 | GCC warning that YYVAL may be used uninitialized. */
|
---|
| 1250 | yyval = yyvsp[1-yylen];
|
---|
| 1251 |
|
---|
| 1252 |
|
---|
| 1253 | YY_REDUCE_PRINT (yyn);
|
---|
| 1254 | switch (yyn)
|
---|
| 1255 | {
|
---|
| 1256 | case 2:
|
---|
| 1257 | #line 74 "ts1.0_grammar.y"
|
---|
| 1258 | {
|
---|
| 1259 | yyvsp[0].instList->Validate();
|
---|
| 1260 | yyvsp[0].instList->Invoke();
|
---|
| 1261 | delete yyvsp[0].instList;
|
---|
| 1262 | ;}
|
---|
| 1263 | break;
|
---|
| 1264 |
|
---|
| 1265 | case 3:
|
---|
| 1266 | #line 82 "ts1.0_grammar.y"
|
---|
| 1267 | {
|
---|
| 1268 | *(yyvsp[-2].instList) += yyvsp[-1].inst;
|
---|
| 1269 | delete yyvsp[-1].inst;
|
---|
| 1270 | yyval.instList = yyvsp[-2].instList;
|
---|
| 1271 | ;}
|
---|
| 1272 | break;
|
---|
| 1273 |
|
---|
| 1274 | case 4:
|
---|
| 1275 | #line 88 "ts1.0_grammar.y"
|
---|
| 1276 | {
|
---|
| 1277 | InstListPtr instList = new InstList;
|
---|
| 1278 | *instList += yyvsp[-1].inst;
|
---|
| 1279 | delete yyvsp[-1].inst;
|
---|
| 1280 | yyval.instList = instList;
|
---|
| 1281 | ;}
|
---|
| 1282 | break;
|
---|
| 1283 |
|
---|
| 1284 | case 5:
|
---|
| 1285 | #line 98 "ts1.0_grammar.y"
|
---|
| 1286 | {
|
---|
| 1287 | yyval.variable = new MappedVariable;
|
---|
| 1288 | yyval.variable->var = yyvsp[-1].fval;
|
---|
| 1289 | yyval.variable->expand = true;
|
---|
| 1290 | ;}
|
---|
| 1291 | break;
|
---|
| 1292 |
|
---|
| 1293 | case 6:
|
---|
| 1294 | #line 104 "ts1.0_grammar.y"
|
---|
| 1295 | {
|
---|
| 1296 | yyval.variable = new MappedVariable;
|
---|
| 1297 | yyval.variable->var = yyvsp[0].fval;
|
---|
| 1298 | yyval.variable->expand = false;
|
---|
| 1299 | ;}
|
---|
| 1300 | break;
|
---|
| 1301 |
|
---|
| 1302 | case 7:
|
---|
| 1303 | #line 112 "ts1.0_grammar.y"
|
---|
| 1304 | {
|
---|
| 1305 | yyval.inst = new Inst(TSP_NOP);
|
---|
| 1306 | ;}
|
---|
| 1307 | break;
|
---|
| 1308 |
|
---|
| 1309 | case 8:
|
---|
| 1310 | #line 116 "ts1.0_grammar.y"
|
---|
| 1311 | {
|
---|
| 1312 | yyval.inst = new Inst(TSP_TEXTURE_1D);
|
---|
| 1313 | ;}
|
---|
| 1314 | break;
|
---|
| 1315 |
|
---|
| 1316 | case 9:
|
---|
| 1317 | #line 120 "ts1.0_grammar.y"
|
---|
| 1318 | {
|
---|
| 1319 | yyval.inst = new Inst(TSP_TEXTURE_2D);
|
---|
| 1320 | ;}
|
---|
| 1321 | break;
|
---|
| 1322 |
|
---|
| 1323 | case 10:
|
---|
| 1324 | #line 124 "ts1.0_grammar.y"
|
---|
| 1325 | {
|
---|
| 1326 | yyval.inst = new Inst(TSP_TEXTURE_RECTANGLE);
|
---|
| 1327 | ;}
|
---|
| 1328 | break;
|
---|
| 1329 |
|
---|
| 1330 | case 11:
|
---|
| 1331 | #line 128 "ts1.0_grammar.y"
|
---|
| 1332 | {
|
---|
| 1333 | yyval.inst = new Inst(TSP_TEXTURE_3D);
|
---|
| 1334 | ;}
|
---|
| 1335 | break;
|
---|
| 1336 |
|
---|
| 1337 | case 12:
|
---|
| 1338 | #line 132 "ts1.0_grammar.y"
|
---|
| 1339 | {
|
---|
| 1340 | yyval.inst = new Inst(TSP_TEXTURE_CUBE_MAP);
|
---|
| 1341 | ;}
|
---|
| 1342 | break;
|
---|
| 1343 |
|
---|
| 1344 | case 13:
|
---|
| 1345 | #line 136 "ts1.0_grammar.y"
|
---|
| 1346 | {
|
---|
| 1347 | yyval.inst = new Inst(TSP_CULL_FRAGMENT, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1348 | ;}
|
---|
| 1349 | break;
|
---|
| 1350 |
|
---|
| 1351 | case 14:
|
---|
| 1352 | #line 140 "ts1.0_grammar.y"
|
---|
| 1353 | {
|
---|
| 1354 | yyval.inst = new Inst(TSP_PASS_THROUGH);
|
---|
| 1355 | ;}
|
---|
| 1356 | break;
|
---|
| 1357 |
|
---|
| 1358 | case 15:
|
---|
| 1359 | #line 144 "ts1.0_grammar.y"
|
---|
| 1360 | {
|
---|
| 1361 | yyval.inst = new Inst(TSP_OFFSET_2D_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1362 | ;}
|
---|
| 1363 | break;
|
---|
| 1364 |
|
---|
| 1365 | case 16:
|
---|
| 1366 | #line 148 "ts1.0_grammar.y"
|
---|
| 1367 | {
|
---|
| 1368 | yyval.inst = new Inst(TSP_OFFSET_2D, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1369 | ;}
|
---|
| 1370 | break;
|
---|
| 1371 |
|
---|
| 1372 | case 17:
|
---|
| 1373 | #line 152 "ts1.0_grammar.y"
|
---|
| 1374 | {
|
---|
| 1375 | yyval.inst = new Inst(TSP_OFFSET_RECTANGLE_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1376 | ;}
|
---|
| 1377 | break;
|
---|
| 1378 |
|
---|
| 1379 | case 18:
|
---|
| 1380 | #line 156 "ts1.0_grammar.y"
|
---|
| 1381 | {
|
---|
| 1382 | yyval.inst = new Inst(TSP_OFFSET_RECTANGLE, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1383 | ;}
|
---|
| 1384 | break;
|
---|
| 1385 |
|
---|
| 1386 | case 19:
|
---|
| 1387 | #line 160 "ts1.0_grammar.y"
|
---|
| 1388 | {
|
---|
| 1389 | yyval.inst = new Inst(TSP_DEPENDENT_AR, yyvsp[-1].fval);
|
---|
| 1390 | ;}
|
---|
| 1391 | break;
|
---|
| 1392 |
|
---|
| 1393 | case 20:
|
---|
| 1394 | #line 164 "ts1.0_grammar.y"
|
---|
| 1395 | {
|
---|
| 1396 | yyval.inst = new Inst(TSP_DEPENDENT_GB, yyvsp[-1].fval);
|
---|
| 1397 | ;}
|
---|
| 1398 | break;
|
---|
| 1399 |
|
---|
| 1400 | case 21:
|
---|
| 1401 | #line 168 "ts1.0_grammar.y"
|
---|
| 1402 | {
|
---|
| 1403 | yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_1_OF_2, yyvsp[-1].variable);
|
---|
| 1404 | delete yyvsp[-1].variable;
|
---|
| 1405 | ;}
|
---|
| 1406 | break;
|
---|
| 1407 |
|
---|
| 1408 | case 22:
|
---|
| 1409 | #line 173 "ts1.0_grammar.y"
|
---|
| 1410 | {
|
---|
| 1411 | yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_2_OF_2, yyvsp[-1].variable);
|
---|
| 1412 | delete yyvsp[-1].variable;
|
---|
| 1413 | ;}
|
---|
| 1414 | break;
|
---|
| 1415 |
|
---|
| 1416 | case 23:
|
---|
| 1417 | #line 178 "ts1.0_grammar.y"
|
---|
| 1418 | {
|
---|
| 1419 | yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_1_OF_2, yyvsp[-1].variable);
|
---|
| 1420 | delete yyvsp[-1].variable;
|
---|
| 1421 | ;}
|
---|
| 1422 | break;
|
---|
| 1423 |
|
---|
| 1424 | case 24:
|
---|
| 1425 | #line 183 "ts1.0_grammar.y"
|
---|
| 1426 | {
|
---|
| 1427 | yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_2_OF_2, yyvsp[-1].variable);
|
---|
| 1428 | delete yyvsp[-1].variable;
|
---|
| 1429 | ;}
|
---|
| 1430 | break;
|
---|
| 1431 |
|
---|
| 1432 | case 25:
|
---|
| 1433 | #line 188 "ts1.0_grammar.y"
|
---|
| 1434 | {
|
---|
| 1435 | yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_1_OF_2, yyvsp[-1].variable);
|
---|
| 1436 | delete yyvsp[-1].variable;
|
---|
| 1437 | ;}
|
---|
| 1438 | break;
|
---|
| 1439 |
|
---|
| 1440 | case 26:
|
---|
| 1441 | #line 193 "ts1.0_grammar.y"
|
---|
| 1442 | {
|
---|
| 1443 | yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_2_OF_2, yyvsp[-1].variable);
|
---|
| 1444 | delete yyvsp[-1].variable;
|
---|
| 1445 | ;}
|
---|
| 1446 | break;
|
---|
| 1447 |
|
---|
| 1448 | case 27:
|
---|
| 1449 | #line 198 "ts1.0_grammar.y"
|
---|
| 1450 | {
|
---|
| 1451 | yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_1_OF_3, yyvsp[-1].variable);
|
---|
| 1452 | delete yyvsp[-1].variable;
|
---|
| 1453 | ;}
|
---|
| 1454 | break;
|
---|
| 1455 |
|
---|
| 1456 | case 28:
|
---|
| 1457 | #line 203 "ts1.0_grammar.y"
|
---|
| 1458 | {
|
---|
| 1459 | yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_2_OF_3, yyvsp[-1].variable);
|
---|
| 1460 | delete yyvsp[-1].variable;
|
---|
| 1461 | ;}
|
---|
| 1462 | break;
|
---|
| 1463 |
|
---|
| 1464 | case 29:
|
---|
| 1465 | #line 208 "ts1.0_grammar.y"
|
---|
| 1466 | {
|
---|
| 1467 | yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_3_OF_3, yyvsp[-1].variable);
|
---|
| 1468 | delete yyvsp[-1].variable;
|
---|
| 1469 | ;}
|
---|
| 1470 | break;
|
---|
| 1471 |
|
---|
| 1472 | case 30:
|
---|
| 1473 | #line 213 "ts1.0_grammar.y"
|
---|
| 1474 | {
|
---|
| 1475 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_1_OF_3, yyvsp[-1].variable);
|
---|
| 1476 | delete yyvsp[-1].variable;
|
---|
| 1477 | ;}
|
---|
| 1478 | break;
|
---|
| 1479 |
|
---|
| 1480 | case 31:
|
---|
| 1481 | #line 218 "ts1.0_grammar.y"
|
---|
| 1482 | {
|
---|
| 1483 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_2_OF_3, yyvsp[-1].variable);
|
---|
| 1484 | delete yyvsp[-1].variable;
|
---|
| 1485 | ;}
|
---|
| 1486 | break;
|
---|
| 1487 |
|
---|
| 1488 | case 32:
|
---|
| 1489 | #line 223 "ts1.0_grammar.y"
|
---|
| 1490 | {
|
---|
| 1491 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_3_OF_3, yyvsp[-1].variable);
|
---|
| 1492 | delete yyvsp[-1].variable;
|
---|
| 1493 | ;}
|
---|
| 1494 | break;
|
---|
| 1495 |
|
---|
| 1496 | case 33:
|
---|
| 1497 | #line 228 "ts1.0_grammar.y"
|
---|
| 1498 | {
|
---|
| 1499 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
|
---|
| 1500 | delete yyvsp[-1].variable;
|
---|
| 1501 | ;}
|
---|
| 1502 | break;
|
---|
| 1503 |
|
---|
| 1504 | case 34:
|
---|
| 1505 | #line 233 "ts1.0_grammar.y"
|
---|
| 1506 | {
|
---|
| 1507 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
|
---|
| 1508 | delete yyvsp[-1].variable;
|
---|
| 1509 | ;}
|
---|
| 1510 | break;
|
---|
| 1511 |
|
---|
| 1512 | case 35:
|
---|
| 1513 | #line 238 "ts1.0_grammar.y"
|
---|
| 1514 | {
|
---|
| 1515 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
|
---|
| 1516 | delete yyvsp[-1].variable;
|
---|
| 1517 | ;}
|
---|
| 1518 | break;
|
---|
| 1519 |
|
---|
| 1520 | case 36:
|
---|
| 1521 | #line 243 "ts1.0_grammar.y"
|
---|
| 1522 | {
|
---|
| 1523 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1524 | delete yyvsp[-7].variable;
|
---|
| 1525 | ;}
|
---|
| 1526 | break;
|
---|
| 1527 |
|
---|
| 1528 | case 37:
|
---|
| 1529 | #line 248 "ts1.0_grammar.y"
|
---|
| 1530 | {
|
---|
| 1531 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
|
---|
| 1532 | delete yyvsp[-1].variable;
|
---|
| 1533 | ;}
|
---|
| 1534 | break;
|
---|
| 1535 |
|
---|
| 1536 | case 38:
|
---|
| 1537 | #line 253 "ts1.0_grammar.y"
|
---|
| 1538 | {
|
---|
| 1539 | yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
|
---|
| 1540 | delete yyvsp[-1].variable;
|
---|
| 1541 | ;}
|
---|
| 1542 | break;
|
---|
| 1543 |
|
---|
| 1544 | case 39:
|
---|
| 1545 | #line 258 "ts1.0_grammar.y"
|
---|
| 1546 | {
|
---|
| 1547 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
|
---|
| 1548 | delete yyvsp[-1].variable;
|
---|
| 1549 | ;}
|
---|
| 1550 | break;
|
---|
| 1551 |
|
---|
| 1552 | case 40:
|
---|
| 1553 | #line 263 "ts1.0_grammar.y"
|
---|
| 1554 | {
|
---|
| 1555 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
|
---|
| 1556 | delete yyvsp[-1].variable;
|
---|
| 1557 | ;}
|
---|
| 1558 | break;
|
---|
| 1559 |
|
---|
| 1560 | case 41:
|
---|
| 1561 | #line 268 "ts1.0_grammar.y"
|
---|
| 1562 | {
|
---|
| 1563 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
|
---|
| 1564 | delete yyvsp[-1].variable;
|
---|
| 1565 | ;}
|
---|
| 1566 | break;
|
---|
| 1567 |
|
---|
| 1568 | case 42:
|
---|
| 1569 | #line 273 "ts1.0_grammar.y"
|
---|
| 1570 | {
|
---|
| 1571 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
|
---|
| 1572 | delete yyvsp[-7].variable;
|
---|
| 1573 | ;}
|
---|
| 1574 | break;
|
---|
| 1575 |
|
---|
| 1576 | case 43:
|
---|
| 1577 | #line 278 "ts1.0_grammar.y"
|
---|
| 1578 | {
|
---|
| 1579 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
|
---|
| 1580 | delete yyvsp[-1].variable;
|
---|
| 1581 | ;}
|
---|
| 1582 | break;
|
---|
| 1583 |
|
---|
| 1584 | case 44:
|
---|
| 1585 | #line 283 "ts1.0_grammar.y"
|
---|
| 1586 | {
|
---|
| 1587 | yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
|
---|
| 1588 | delete yyvsp[-1].variable;
|
---|
| 1589 | ;}
|
---|
| 1590 | break;
|
---|
| 1591 |
|
---|
| 1592 | case 45:
|
---|
| 1593 | #line 290 "ts1.0_grammar.y"
|
---|
| 1594 | {
|
---|
| 1595 | yyval.fval = yyvsp[0].fval;
|
---|
| 1596 | ;}
|
---|
| 1597 | break;
|
---|
| 1598 |
|
---|
| 1599 | case 46:
|
---|
| 1600 | #line 294 "ts1.0_grammar.y"
|
---|
| 1601 | {
|
---|
| 1602 | yyval.fval = yyvsp[0].fval;
|
---|
| 1603 | ;}
|
---|
| 1604 | break;
|
---|
| 1605 |
|
---|
| 1606 |
|
---|
| 1607 | }
|
---|
| 1608 |
|
---|
| 1609 | /* Line 999 of yacc.c. */
|
---|
| 1610 | #line 1610 "_ts1.0_parser.c"
|
---|
| 1611 |
|
---|
| 1612 | yyvsp -= yylen;
|
---|
| 1613 | yyssp -= yylen;
|
---|
| 1614 |
|
---|
| 1615 |
|
---|
| 1616 | YY_STACK_PRINT (yyss, yyssp);
|
---|
| 1617 |
|
---|
| 1618 | *++yyvsp = yyval;
|
---|
| 1619 |
|
---|
| 1620 |
|
---|
| 1621 | /* Now `shift' the result of the reduction. Determine what state
|
---|
| 1622 | that goes to, based on the state we popped back to and the rule
|
---|
| 1623 | number reduced by. */
|
---|
| 1624 |
|
---|
| 1625 | yyn = yyr1[yyn];
|
---|
| 1626 |
|
---|
| 1627 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
|
---|
| 1628 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
---|
| 1629 | yystate = yytable[yystate];
|
---|
| 1630 | else
|
---|
| 1631 | yystate = yydefgoto[yyn - YYNTOKENS];
|
---|
| 1632 |
|
---|
| 1633 | goto yynewstate;
|
---|
| 1634 |
|
---|
| 1635 |
|
---|
| 1636 | /*------------------------------------.
|
---|
| 1637 | | yyerrlab -- here on detecting error |
|
---|
| 1638 | `------------------------------------*/
|
---|
| 1639 | yyerrlab:
|
---|
| 1640 | /* If not already recovering from an error, report this error. */
|
---|
| 1641 | if (!yyerrstatus)
|
---|
| 1642 | {
|
---|
| 1643 | ++yynerrs;
|
---|
| 1644 | #if YYERROR_VERBOSE
|
---|
| 1645 | yyn = yypact[yystate];
|
---|
| 1646 |
|
---|
| 1647 | if (YYPACT_NINF < yyn && yyn < YYLAST)
|
---|
| 1648 | {
|
---|
| 1649 | YYSIZE_T yysize = 0;
|
---|
| 1650 | int yytype = YYTRANSLATE (yychar);
|
---|
| 1651 | char *yymsg;
|
---|
| 1652 | int yyx, yycount;
|
---|
| 1653 |
|
---|
| 1654 | yycount = 0;
|
---|
| 1655 | /* Start YYX at -YYN if negative to avoid negative indexes in
|
---|
| 1656 | YYCHECK. */
|
---|
| 1657 | for (yyx = yyn < 0 ? -yyn : 0;
|
---|
| 1658 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
---|
| 1659 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
---|
| 1660 | yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
---|
| 1661 | yysize += yystrlen ("syntax error, unexpected ") + 1;
|
---|
| 1662 | yysize += yystrlen (yytname[yytype]);
|
---|
| 1663 | yymsg = (char *) YYSTACK_ALLOC (yysize);
|
---|
| 1664 | if (yymsg != 0)
|
---|
| 1665 | {
|
---|
| 1666 | char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
|
---|
| 1667 | yyp = yystpcpy (yyp, yytname[yytype]);
|
---|
| 1668 |
|
---|
| 1669 | if (yycount < 5)
|
---|
| 1670 | {
|
---|
| 1671 | yycount = 0;
|
---|
| 1672 | for (yyx = yyn < 0 ? -yyn : 0;
|
---|
| 1673 | yyx < (int) (sizeof (yytname) / sizeof (char *));
|
---|
| 1674 | yyx++)
|
---|
| 1675 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
---|
| 1676 | {
|
---|
| 1677 | const char *yyq = ! yycount ? ", expecting " : " or ";
|
---|
| 1678 | yyp = yystpcpy (yyp, yyq);
|
---|
| 1679 | yyp = yystpcpy (yyp, yytname[yyx]);
|
---|
| 1680 | yycount++;
|
---|
| 1681 | }
|
---|
| 1682 | }
|
---|
| 1683 | yyerror (yymsg);
|
---|
| 1684 | YYSTACK_FREE (yymsg);
|
---|
| 1685 | }
|
---|
| 1686 | else
|
---|
| 1687 | yyerror ("syntax error; also virtual memory exhausted");
|
---|
| 1688 | }
|
---|
| 1689 | else
|
---|
| 1690 | #endif /* YYERROR_VERBOSE */
|
---|
| 1691 | yyerror ("syntax error");
|
---|
| 1692 | }
|
---|
| 1693 |
|
---|
| 1694 |
|
---|
| 1695 |
|
---|
| 1696 | if (yyerrstatus == 3)
|
---|
| 1697 | {
|
---|
| 1698 | /* If just tried and failed to reuse lookahead token after an
|
---|
| 1699 | error, discard it. */
|
---|
| 1700 |
|
---|
| 1701 | /* Return failure if at end of input. */
|
---|
| 1702 | if (yychar == YYEOF)
|
---|
| 1703 | {
|
---|
| 1704 | /* Pop the error token. */
|
---|
| 1705 | YYPOPSTACK;
|
---|
| 1706 | /* Pop the rest of the stack. */
|
---|
| 1707 | while (yyss < yyssp)
|
---|
| 1708 | {
|
---|
| 1709 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
---|
| 1710 | yydestruct (yystos[*yyssp], yyvsp);
|
---|
| 1711 | YYPOPSTACK;
|
---|
| 1712 | }
|
---|
| 1713 | YYABORT;
|
---|
| 1714 | }
|
---|
| 1715 |
|
---|
| 1716 | YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
|
---|
| 1717 | yydestruct (yytoken, &yylval);
|
---|
| 1718 | yychar = YYEMPTY;
|
---|
| 1719 |
|
---|
| 1720 | }
|
---|
| 1721 |
|
---|
| 1722 | /* Else will try to reuse lookahead token after shifting the error
|
---|
| 1723 | token. */
|
---|
| 1724 | goto yyerrlab1;
|
---|
| 1725 |
|
---|
| 1726 |
|
---|
| 1727 | /*----------------------------------------------------.
|
---|
| 1728 | | yyerrlab1 -- error raised explicitly by an action. |
|
---|
| 1729 | `----------------------------------------------------*/
|
---|
| 1730 | yyerrlab1:
|
---|
| 1731 | yyerrstatus = 3; /* Each real token shifted decrements this. */
|
---|
| 1732 |
|
---|
| 1733 | for (;;)
|
---|
| 1734 | {
|
---|
| 1735 | yyn = yypact[yystate];
|
---|
| 1736 | if (yyn != YYPACT_NINF)
|
---|
| 1737 | {
|
---|
| 1738 | yyn += YYTERROR;
|
---|
| 1739 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
---|
| 1740 | {
|
---|
| 1741 | yyn = yytable[yyn];
|
---|
| 1742 | if (0 < yyn)
|
---|
| 1743 | break;
|
---|
| 1744 | }
|
---|
| 1745 | }
|
---|
| 1746 |
|
---|
| 1747 | /* Pop the current state because it cannot handle the error token. */
|
---|
| 1748 | if (yyssp == yyss)
|
---|
| 1749 | YYABORT;
|
---|
| 1750 |
|
---|
| 1751 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
---|
| 1752 | yydestruct (yystos[yystate], yyvsp);
|
---|
| 1753 | yyvsp--;
|
---|
| 1754 | yystate = *--yyssp;
|
---|
| 1755 |
|
---|
| 1756 | YY_STACK_PRINT (yyss, yyssp);
|
---|
| 1757 | }
|
---|
| 1758 |
|
---|
| 1759 | if (yyn == YYFINAL)
|
---|
| 1760 | YYACCEPT;
|
---|
| 1761 |
|
---|
| 1762 | YYDPRINTF ((stderr, "Shifting error token, "));
|
---|
| 1763 |
|
---|
| 1764 | *++yyvsp = yylval;
|
---|
| 1765 |
|
---|
| 1766 |
|
---|
| 1767 | yystate = yyn;
|
---|
| 1768 | goto yynewstate;
|
---|
| 1769 |
|
---|
| 1770 |
|
---|
| 1771 | /*-------------------------------------.
|
---|
| 1772 | | yyacceptlab -- YYACCEPT comes here. |
|
---|
| 1773 | `-------------------------------------*/
|
---|
| 1774 | yyacceptlab:
|
---|
| 1775 | yyresult = 0;
|
---|
| 1776 | goto yyreturn;
|
---|
| 1777 |
|
---|
| 1778 | /*-----------------------------------.
|
---|
| 1779 | | yyabortlab -- YYABORT comes here. |
|
---|
| 1780 | `-----------------------------------*/
|
---|
| 1781 | yyabortlab:
|
---|
| 1782 | yyresult = 1;
|
---|
| 1783 | goto yyreturn;
|
---|
| 1784 |
|
---|
| 1785 | #ifndef yyoverflow
|
---|
| 1786 | /*----------------------------------------------.
|
---|
| 1787 | | yyoverflowlab -- parser overflow comes here. |
|
---|
| 1788 | `----------------------------------------------*/
|
---|
| 1789 | yyoverflowlab:
|
---|
| 1790 | yyerror ("parser stack overflow");
|
---|
| 1791 | yyresult = 2;
|
---|
| 1792 | /* Fall through. */
|
---|
| 1793 | #endif
|
---|
| 1794 |
|
---|
| 1795 | yyreturn:
|
---|
| 1796 | #ifndef yyoverflow
|
---|
| 1797 | if (yyss != yyssa)
|
---|
| 1798 | YYSTACK_FREE (yyss);
|
---|
| 1799 | #endif
|
---|
| 1800 | return yyresult;
|
---|
| 1801 | }
|
---|
| 1802 |
|
---|
| 1803 |
|
---|
| 1804 | #line 300 "ts1.0_grammar.y"
|
---|
| 1805 |
|
---|
| 1806 | void yyerror(char* s)
|
---|
| 1807 | {
|
---|
| 1808 | errors.set("unrecognized token");
|
---|
| 1809 | }
|
---|
| 1810 |
|
---|