~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to intern/elbeem/intern/cfgparser.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Lukas Fittl
  • Date: 2006-09-20 01:57:27 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060920015727-gmoqlxwstx9wwqs3
Tags: 2.42a-1ubuntu1
* Merge from Debian unstable (Closes: Malone #55903). Remaining changes:
  - debian/genpot: Add python scripts from Lee June <blender@eyou.com> to
    generate a reasonable PO template from the sources. Since gettext is used
    in a highly nonstandard way, xgettext does not work for this job.
  - debian/rules: Call the scripts, generate po/blender.pot, and clean it up
    in the clean target.
  - Add a proper header to the generated PO template.
* debian/control: Build depend on libavformat-dev >= 3:0.cvs20060823-3.1,
  otherwise this package will FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A Bison parser, made by GNU Bison 2.0.  */
2
 
 
3
 
/* Skeleton parser for Yacc-like parsing with Bison,
4
 
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 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
 
/* Substitute the variable and function names.  */
49
 
#define yyparse yy_parse
50
 
#define yylex   yy_lex
51
 
#define yyerror yy_error
52
 
#define yylval  yy_lval
53
 
#define yychar  yy_char
54
 
#define yydebug yy_debug
55
 
#define yynerrs yy_nerrs
56
 
 
57
 
 
58
 
/* Tokens.  */
59
 
#ifndef YYTOKENTYPE
60
 
# define YYTOKENTYPE
61
 
   /* Put the tokens into the symbol table, so that GDB and other debuggers
62
 
      know about them.  */
63
 
   enum yytokentype {
64
 
     DT_INTEGER = 258,
65
 
     DT_FLOAT = 259,
66
 
     DT_STRING = 260,
67
 
     DT_ATTRNAME = 261,
68
 
     DT_ATTRVALUE = 262,
69
 
     KW_LBMSIM = 263,
70
 
     KW_COMPARELBM = 264,
71
 
     KW_ANIFRAMETIME = 265,
72
 
     KW_DEBUGMODE = 266,
73
 
     KW_DEBUGLEVEL = 267,
74
 
     KW_P_RELAXTIME = 268,
75
 
     KW_P_REYNOLDS = 269,
76
 
     KW_P_VISCOSITY = 270,
77
 
     KW_P_SOUNDSPEED = 271,
78
 
     KW_P_DOMAINSIZE = 272,
79
 
     KW_P_FORCE = 273,
80
 
     KW_P_TIMELENGTH = 274,
81
 
     KW_P_STEPTIME = 275,
82
 
     KW_P_TIMEFACTOR = 276,
83
 
     KW_P_ANIFRAMETIME = 277,
84
 
     KW_P_ANISTART = 278,
85
 
     KW_P_SURFACETENSION = 279,
86
 
     KW_P_ACTIVATE = 280,
87
 
     KW_P_DEACTIVATE = 281,
88
 
     KW_P_DENSITY = 282,
89
 
     KW_P_CELLSIZE = 283,
90
 
     KW_P_GSTAR = 284,
91
 
     KW_PFSPATH = 285,
92
 
     KW_PARTLINELENGTH = 286,
93
 
     KW_PARTICLES = 287,
94
 
     KW_FRAMESPERSEC = 288,
95
 
     KW_RAYTRACING = 289,
96
 
     KW_PAROPEN = 290,
97
 
     KW_PARCLOSE = 291,
98
 
     KW_FILENAME = 292,
99
 
     KW_PMCAUSTICS = 293,
100
 
     KW_MAXRAYDEPTH = 294,
101
 
     KW_CAUSTICDIST = 295,
102
 
     KW_CAUSTICPHOT = 296,
103
 
     KW_SHADOWMAPBIAS = 297,
104
 
     KW_TREEMAXDEPTH = 298,
105
 
     KW_TREEMAXTRIANGLES = 299,
106
 
     KW_RESOLUTION = 300,
107
 
     KW_ANTIALIAS = 301,
108
 
     KW_EYEPOINT = 302,
109
 
     KW_ANISTART = 303,
110
 
     KW_ANIFRAMES = 304,
111
 
     KW_FRAMESKIP = 305,
112
 
     KW_LOOKAT = 306,
113
 
     KW_UPVEC = 307,
114
 
     KW_FOVY = 308,
115
 
     KW_ASPECT = 309,
116
 
     KW_AMBIENCE = 310,
117
 
     KW_BACKGROUND = 311,
118
 
     KW_DEBUGPIXEL = 312,
119
 
     KW_TESTMODE = 313,
120
 
     KW_OPENGLATTR = 314,
121
 
     KW_BLENDERATTR = 315,
122
 
     KW_ATTRIBUTE = 316,
123
 
     KW_ATTRCHANNEL = 317,
124
 
     KW_OBJATTR = 318,
125
 
     KW_EQUALS = 319,
126
 
     KW_DEFINEATTR = 320,
127
 
     KW_ATTREND = 321,
128
 
     KW_GEOMETRY = 322,
129
 
     KW_TYPE = 323,
130
 
     KW_GEOTYPE_BOX = 324,
131
 
     KW_GEOTYPE_FLUID = 325,
132
 
     KW_GEOTYPE_OBJMODEL = 326,
133
 
     KW_GEOTYPE_SPHERE = 327,
134
 
     KW_CASTSHADOWS = 328,
135
 
     KW_RECEIVESHADOWS = 329,
136
 
     KW_VISIBLE = 330,
137
 
     KW_BOX_END = 331,
138
 
     KW_BOX_START = 332,
139
 
     KW_POLY = 333,
140
 
     KW_NUMVERTICES = 334,
141
 
     KW_VERTEX = 335,
142
 
     KW_NUMPOLYGONS = 336,
143
 
     KW_ISOSURF = 337,
144
 
     KW_FILEMODE = 338,
145
 
     KW_INVERT = 339,
146
 
     KW_MATERIAL = 340,
147
 
     KW_MATTYPE_PHONG = 341,
148
 
     KW_MATTYPE_BLINN = 342,
149
 
     KW_NAME = 343,
150
 
     KW_AMBIENT = 344,
151
 
     KW_DIFFUSE = 345,
152
 
     KW_SPECULAR = 346,
153
 
     KW_MIRROR = 347,
154
 
     KW_TRANSPARENCE = 348,
155
 
     KW_REFRACINDEX = 349,
156
 
     KW_TRANSADDITIVE = 350,
157
 
     KW_TRANSATTCOL = 351,
158
 
     KW_FRESNEL = 352,
159
 
     KW_LIGHT = 353,
160
 
     KW_ACTIVE = 354,
161
 
     KW_COLOUR = 355,
162
 
     KW_POSITION = 356,
163
 
     KW_LIGHT_OMNI = 357,
164
 
     KW_CAUSTICPHOTONS = 358,
165
 
     KW_CAUSTICSTRENGTH = 359,
166
 
     KW_SHADOWMAP = 360,
167
 
     KW_CAUSTICSMAP = 361
168
 
   };
169
 
#endif
170
 
#define DT_INTEGER 258
171
 
#define DT_FLOAT 259
172
 
#define DT_STRING 260
173
 
#define DT_ATTRNAME 261
174
 
#define DT_ATTRVALUE 262
175
 
#define KW_LBMSIM 263
176
 
#define KW_COMPARELBM 264
177
 
#define KW_ANIFRAMETIME 265
178
 
#define KW_DEBUGMODE 266
179
 
#define KW_DEBUGLEVEL 267
180
 
#define KW_P_RELAXTIME 268
181
 
#define KW_P_REYNOLDS 269
182
 
#define KW_P_VISCOSITY 270
183
 
#define KW_P_SOUNDSPEED 271
184
 
#define KW_P_DOMAINSIZE 272
185
 
#define KW_P_FORCE 273
186
 
#define KW_P_TIMELENGTH 274
187
 
#define KW_P_STEPTIME 275
188
 
#define KW_P_TIMEFACTOR 276
189
 
#define KW_P_ANIFRAMETIME 277
190
 
#define KW_P_ANISTART 278
191
 
#define KW_P_SURFACETENSION 279
192
 
#define KW_P_ACTIVATE 280
193
 
#define KW_P_DEACTIVATE 281
194
 
#define KW_P_DENSITY 282
195
 
#define KW_P_CELLSIZE 283
196
 
#define KW_P_GSTAR 284
197
 
#define KW_PFSPATH 285
198
 
#define KW_PARTLINELENGTH 286
199
 
#define KW_PARTICLES 287
200
 
#define KW_FRAMESPERSEC 288
201
 
#define KW_RAYTRACING 289
202
 
#define KW_PAROPEN 290
203
 
#define KW_PARCLOSE 291
204
 
#define KW_FILENAME 292
205
 
#define KW_PMCAUSTICS 293
206
 
#define KW_MAXRAYDEPTH 294
207
 
#define KW_CAUSTICDIST 295
208
 
#define KW_CAUSTICPHOT 296
209
 
#define KW_SHADOWMAPBIAS 297
210
 
#define KW_TREEMAXDEPTH 298
211
 
#define KW_TREEMAXTRIANGLES 299
212
 
#define KW_RESOLUTION 300
213
 
#define KW_ANTIALIAS 301
214
 
#define KW_EYEPOINT 302
215
 
#define KW_ANISTART 303
216
 
#define KW_ANIFRAMES 304
217
 
#define KW_FRAMESKIP 305
218
 
#define KW_LOOKAT 306
219
 
#define KW_UPVEC 307
220
 
#define KW_FOVY 308
221
 
#define KW_ASPECT 309
222
 
#define KW_AMBIENCE 310
223
 
#define KW_BACKGROUND 311
224
 
#define KW_DEBUGPIXEL 312
225
 
#define KW_TESTMODE 313
226
 
#define KW_OPENGLATTR 314
227
 
#define KW_BLENDERATTR 315
228
 
#define KW_ATTRIBUTE 316
229
 
#define KW_ATTRCHANNEL 317
230
 
#define KW_OBJATTR 318
231
 
#define KW_EQUALS 319
232
 
#define KW_DEFINEATTR 320
233
 
#define KW_ATTREND 321
234
 
#define KW_GEOMETRY 322
235
 
#define KW_TYPE 323
236
 
#define KW_GEOTYPE_BOX 324
237
 
#define KW_GEOTYPE_FLUID 325
238
 
#define KW_GEOTYPE_OBJMODEL 326
239
 
#define KW_GEOTYPE_SPHERE 327
240
 
#define KW_CASTSHADOWS 328
241
 
#define KW_RECEIVESHADOWS 329
242
 
#define KW_VISIBLE 330
243
 
#define KW_BOX_END 331
244
 
#define KW_BOX_START 332
245
 
#define KW_POLY 333
246
 
#define KW_NUMVERTICES 334
247
 
#define KW_VERTEX 335
248
 
#define KW_NUMPOLYGONS 336
249
 
#define KW_ISOSURF 337
250
 
#define KW_FILEMODE 338
251
 
#define KW_INVERT 339
252
 
#define KW_MATERIAL 340
253
 
#define KW_MATTYPE_PHONG 341
254
 
#define KW_MATTYPE_BLINN 342
255
 
#define KW_NAME 343
256
 
#define KW_AMBIENT 344
257
 
#define KW_DIFFUSE 345
258
 
#define KW_SPECULAR 346
259
 
#define KW_MIRROR 347
260
 
#define KW_TRANSPARENCE 348
261
 
#define KW_REFRACINDEX 349
262
 
#define KW_TRANSADDITIVE 350
263
 
#define KW_TRANSATTCOL 351
264
 
#define KW_FRESNEL 352
265
 
#define KW_LIGHT 353
266
 
#define KW_ACTIVE 354
267
 
#define KW_COLOUR 355
268
 
#define KW_POSITION 356
269
 
#define KW_LIGHT_OMNI 357
270
 
#define KW_CAUSTICPHOTONS 358
271
 
#define KW_CAUSTICSTRENGTH 359
272
 
#define KW_SHADOWMAP 360
273
 
#define KW_CAUSTICSMAP 361
274
 
 
275
 
 
276
 
 
277
 
 
278
 
/* Copy the first part of user declarations.  */
279
 
#line 14 "src/cfgparser.yy"
280
 
 
281
 
 
282
 
#define YYDEBUG 1
283
 
 
284
 
/* library functions */
285
 
#include <stdio.h>
286
 
#include <stdlib.h>
287
 
#include <string.h>
288
 
#include "attributes.h"
289
 
 
290
 
        void yy_warn(char *s);
291
 
        void yy_error(const char *s);
292
 
 
293
 
  /* imported from flex... */
294
 
  extern int yy_lex();
295
 
  extern int lineCount;
296
 
  extern FILE *yy_in;
297
 
 
298
 
  /* the parse function from bison */
299
 
  int yy_parse( void );
300
 
 
301
 
// local variables to access objects 
302
 
#include "simulation_object.h"
303
 
#ifdef LBM_INCLUDE_TESTSOLVERS
304
 
#include "simulation_complbm.h"
305
 
#endif // LBM_INCLUDE_TESTSOLVERS
306
 
 
307
 
#include "parametrizer.h"
308
 
#include "ntl_renderglobals.h"
309
 
#include "ntl_scene.h"
310
 
 
311
 
#include "ntl_lightobject.h"
312
 
#include "ntl_material.h"
313
 
#include "ntl_geometrymodel.h"
314
 
#include "globals.h"
315
 
 
316
 
        /* global variables */
317
 
        static map<string,AttributeList*> attrs; /* global attribute storage */
318
 
        vector<string>                  currentAttrValue;    /* build string vector */
319
 
        
320
 
        // global raytracing settings, stores object,lights,material lists etc.
321
 
        // lists are freed by ntlScene upon deletion
322
 
  static ntlRenderGlobals *reglob;      /* raytracing global settings */
323
 
 
324
 
        /* light initialization checks */
325
 
        ntlLightObject      *currentLight;
326
 
        ntlLightObject      *currentLightOmni;
327
 
 
328
 
        /* geometry initialization checks */
329
 
        ntlGeometryClass    *currentGeoClass;
330
 
        ntlGeometryObject   *currentGeoObj;
331
 
        SimulationObject    *currentGeometrySim;
332
 
        ntlGeometryObjModel *currentGeometryModel;
333
 
        AttributeList                           *currentAttrib;
334
 
        string                                                  currentAttrName, currentAttribAddName;
335
 
 
336
 
#ifndef ELBEEM_BLENDER
337
 
#include "ntl_geometrybox.h"
338
 
#include "ntl_geometrysphere.h"
339
 
        ntlGeometryBox      *currentGeometryBox;
340
 
#endif //ELBEEM_BLENDER
341
 
        
342
 
        /* material init checks */
343
 
        ntlMaterial                             *currentMaterial;
344
 
 
345
 
 
346
 
 
347
 
/* Enabling traces.  */
348
 
#ifndef YYDEBUG
349
 
# define YYDEBUG 1
350
 
#endif
351
 
 
352
 
/* Enabling verbose error messages.  */
353
 
#ifdef YYERROR_VERBOSE
354
 
# undef YYERROR_VERBOSE
355
 
# define YYERROR_VERBOSE 1
356
 
#else
357
 
# define YYERROR_VERBOSE 0
358
 
#endif
359
 
 
360
 
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
361
 
#line 87 "src/cfgparser.yy"
362
 
typedef union YYSTYPE {
363
 
  int    intValue;
364
 
  float  floatValue;
365
 
  char  *charValue;
366
 
} YYSTYPE;
367
 
/* Line 190 of yacc.c.  */
368
 
#line 369 "bld-std-gcc/src/cfgparser.cpp"
369
 
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
370
 
# define YYSTYPE_IS_DECLARED 1
371
 
# define YYSTYPE_IS_TRIVIAL 1
372
 
#endif
373
 
 
374
 
 
375
 
 
376
 
/* Copy the second part of user declarations.  */
377
 
 
378
 
 
379
 
/* Line 213 of yacc.c.  */
380
 
#line 381 "bld-std-gcc/src/cfgparser.cpp"
381
 
 
382
 
#if ! defined (yyoverflow) || YYERROR_VERBOSE
383
 
 
384
 
# ifndef YYFREE
385
 
#  define YYFREE free
386
 
# endif
387
 
# ifndef YYMALLOC
388
 
#  define YYMALLOC malloc
389
 
# endif
390
 
 
391
 
/* The parser invokes alloca or malloc; define the necessary symbols.  */
392
 
 
393
 
# ifdef YYSTACK_USE_ALLOCA
394
 
#  if YYSTACK_USE_ALLOCA
395
 
#   ifdef __GNUC__
396
 
#    define YYSTACK_ALLOC __builtin_alloca
397
 
#   else
398
 
#    define YYSTACK_ALLOC alloca
399
 
#   endif
400
 
#  endif
401
 
# endif
402
 
 
403
 
# ifdef YYSTACK_ALLOC
404
 
   /* Pacify GCC's `empty if-body' warning. */
405
 
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
406
 
# else
407
 
#  if defined (__STDC__) || defined (__cplusplus)
408
 
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
409
 
#   define YYSIZE_T size_t
410
 
#  endif
411
 
#  define YYSTACK_ALLOC YYMALLOC
412
 
#  define YYSTACK_FREE YYFREE
413
 
# endif
414
 
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
415
 
 
416
 
 
417
 
#if (! defined (yyoverflow) \
418
 
     && (! defined (__cplusplus) \
419
 
         || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
420
 
 
421
 
/* A type that is properly aligned for any stack member.  */
422
 
union yyalloc
423
 
{
424
 
  short int yyss;
425
 
  YYSTYPE yyvs;
426
 
  };
427
 
 
428
 
/* The size of the maximum gap between one aligned stack and the next.  */
429
 
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
430
 
 
431
 
/* The size of an array large to enough to hold all stacks, each with
432
 
   N elements.  */
433
 
# define YYSTACK_BYTES(N) \
434
 
     ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
435
 
      + YYSTACK_GAP_MAXIMUM)
436
 
 
437
 
/* Copy COUNT objects from FROM to TO.  The source and destination do
438
 
   not overlap.  */
439
 
# ifndef YYCOPY
440
 
#  if defined (__GNUC__) && 1 < __GNUC__
441
 
#   define YYCOPY(To, From, Count) \
442
 
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
443
 
#  else
444
 
#   define YYCOPY(To, From, Count)              \
445
 
      do                                        \
446
 
        {                                       \
447
 
          register YYSIZE_T yyi;                \
448
 
          for (yyi = 0; yyi < (Count); yyi++)   \
449
 
            (To)[yyi] = (From)[yyi];            \
450
 
        }                                       \
451
 
      while (0)
452
 
#  endif
453
 
# endif
454
 
 
455
 
/* Relocate STACK from its old location to the new one.  The
456
 
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
457
 
   elements in the stack, and YYPTR gives the new location of the
458
 
   stack.  Advance YYPTR to a properly aligned location for the next
459
 
   stack.  */
460
 
# define YYSTACK_RELOCATE(Stack)                                        \
461
 
    do                                                                  \
462
 
      {                                                                 \
463
 
        YYSIZE_T yynewbytes;                                            \
464
 
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
465
 
        Stack = &yyptr->Stack;                                          \
466
 
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
467
 
        yyptr += yynewbytes / sizeof (*yyptr);                          \
468
 
      }                                                                 \
469
 
    while (0)
470
 
 
471
 
#endif
472
 
 
473
 
#if defined (__STDC__) || defined (__cplusplus)
474
 
   typedef signed char yysigned_char;
475
 
#else
476
 
   typedef short int yysigned_char;
477
 
#endif
478
 
 
479
 
/* YYFINAL -- State number of the termination state. */
480
 
#define YYFINAL  15
481
 
/* YYLAST -- Last index in YYTABLE.  */
482
 
#define YYLAST   288
483
 
 
484
 
/* YYNTOKENS -- Number of terminals. */
485
 
#define YYNTOKENS  107
486
 
/* YYNNTS -- Number of nonterminals. */
487
 
#define YYNNTS  82
488
 
/* YYNRULES -- Number of rules. */
489
 
#define YYNRULES  143
490
 
/* YYNRULES -- Number of states. */
491
 
#define YYNSTATES  249
492
 
 
493
 
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
494
 
#define YYUNDEFTOK  2
495
 
#define YYMAXUTOK   361
496
 
 
497
 
#define YYTRANSLATE(YYX)                                                \
498
 
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
499
 
 
500
 
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
501
 
static const unsigned char yytranslate[] =
502
 
{
503
 
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
504
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
505
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
506
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
507
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
508
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
509
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
510
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
511
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
512
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
513
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
514
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
515
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
516
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
517
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
518
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
519
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
520
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
521
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
522
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
523
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
524
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
525
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
526
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
527
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
528
 
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
529
 
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
530
 
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
531
 
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
532
 
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
533
 
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
534
 
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
535
 
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
536
 
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
537
 
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
538
 
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
539
 
     105,   106
540
 
};
541
 
 
542
 
#if YYDEBUG
543
 
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
544
 
   YYRHS.  */
545
 
static const unsigned short int yyprhs[] =
546
 
{
547
 
       0,     0,     3,     6,     8,    10,    12,    14,    16,    19,
548
 
      22,    27,    30,    32,    34,    36,    38,    40,    42,    44,
549
 
      46,    48,    50,    52,    54,    56,    58,    60,    62,    64,
550
 
      66,    68,    70,    72,    74,    76,    78,    80,    82,    85,
551
 
      88,    91,    94,    98,   101,   106,   111,   116,   119,   122,
552
 
     127,   132,   135,   138,   141,   144,   148,   151,   154,   157,
553
 
     164,   167,   169,   171,   173,   175,   177,   179,   182,   185,
554
 
     190,   195,   196,   204,   207,   209,   211,   213,   215,   217,
555
 
     219,   221,   223,   225,   227,   229,   231,   233,   235,   237,
556
 
     240,   243,   246,   249,   252,   257,   262,   265,   270,   277,
557
 
     280,   282,   284,   286,   288,   290,   292,   294,   296,   298,
558
 
     300,   302,   304,   306,   309,   314,   319,   323,   326,   329,
559
 
     332,   335,   340,   343,   344,   351,   354,   356,   358,   360,
560
 
     361,   362,   370,   371,   372,   379,   382,   384,   386,   388,
561
 
     390,   392,   394,   396
562
 
};
563
 
 
564
 
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
565
 
static const short int yyrhs[] =
566
 
{
567
 
     108,     0,    -1,   108,   109,    -1,   109,    -1,   112,    -1,
568
 
     172,    -1,   110,    -1,   111,    -1,    11,     3,    -1,    12,
569
 
       3,    -1,    34,    35,   113,    36,    -1,   113,   114,    -1,
570
 
     114,    -1,   117,    -1,   115,    -1,   116,    -1,   118,    -1,
571
 
     119,    -1,   120,    -1,   121,    -1,   122,    -1,   123,    -1,
572
 
     124,    -1,   125,    -1,   126,    -1,   127,    -1,   128,    -1,
573
 
     129,    -1,   130,    -1,   131,    -1,   132,    -1,   133,    -1,
574
 
     134,    -1,   135,    -1,   136,    -1,   144,    -1,   175,    -1,
575
 
     158,    -1,    48,   187,    -1,    10,   187,    -1,    49,   186,
576
 
      -1,    50,   188,    -1,    45,   186,   186,    -1,    46,     3,
577
 
      -1,    47,   185,   185,   185,    -1,    51,   185,   185,   185,
578
 
      -1,    52,   185,   185,   185,    -1,    53,   185,    -1,    54,
579
 
     185,    -1,    55,   185,   185,   185,    -1,    56,   185,   185,
580
 
     185,    -1,    37,     5,    -1,    43,   186,    -1,    44,   186,
581
 
      -1,    39,   186,    -1,    57,     3,     3,    -1,    58,   188,
582
 
      -1,    59,     5,    -1,    60,     5,    -1,    98,    35,    68,
583
 
     138,   137,    36,    -1,   137,   139,    -1,   139,    -1,   102,
584
 
      -1,   140,    -1,   141,    -1,   142,    -1,   143,    -1,    99,
585
 
     188,    -1,    73,   188,    -1,   100,   185,   185,   185,    -1,
586
 
     101,   185,   185,   185,    -1,    -1,    67,    35,    68,   147,
587
 
     145,   146,    36,    -1,   146,   148,    -1,   148,    -1,    69,
588
 
      -1,    72,    -1,    71,    -1,     8,    -1,     9,    -1,   149,
589
 
      -1,   150,    -1,   151,    -1,   152,    -1,   153,    -1,   154,
590
 
      -1,   155,    -1,   156,    -1,   157,    -1,    88,     5,    -1,
591
 
      85,     5,    -1,    73,   188,    -1,    74,   188,    -1,    75,
592
 
     188,    -1,    77,   185,   185,   185,    -1,    76,   185,   185,
593
 
     185,    -1,    63,     5,    -1,    65,    35,   174,    36,    -1,
594
 
      85,    35,    68,   160,   159,    36,    -1,   159,   161,    -1,
595
 
     161,    -1,    86,    -1,    87,    -1,   162,    -1,   163,    -1,
596
 
     164,    -1,   165,    -1,   166,    -1,   168,    -1,   167,    -1,
597
 
     169,    -1,   170,    -1,   171,    -1,    88,     5,    -1,    89,
598
 
     183,   183,   183,    -1,    90,   183,   183,   183,    -1,    91,
599
 
     185,   185,    -1,    92,   184,    -1,    93,   184,    -1,    94,
600
 
     185,    -1,    95,   184,    -1,    96,   185,   185,   185,    -1,
601
 
      97,   187,    -1,    -1,    61,     6,    35,   173,   174,    36,
602
 
      -1,   174,   175,    -1,   175,    -1,   179,    -1,   176,    -1,
603
 
      -1,    -1,    62,     6,    64,   177,   182,   178,    66,    -1,
604
 
      -1,    -1,     6,    64,   180,   182,   181,    66,    -1,   182,
605
 
       7,    -1,     7,    -1,   184,    -1,   185,    -1,     4,    -1,
606
 
       3,    -1,     3,    -1,     3,    -1,     3,    -1
607
 
};
608
 
 
609
 
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
610
 
static const unsigned short int yyrline[] =
611
 
{
612
 
       0,   146,   146,   147,   150,   151,   152,   153,   157,   160,
613
 
     175,   176,   176,   179,   180,   181,   182,   184,   185,   186,
614
 
     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
615
 
     197,   198,   199,   200,   202,   203,   204,   205,   210,   214,
616
 
     219,   223,   229,   233,   237,   241,   245,   249,   253,   257,
617
 
     261,   265,   269,   273,   277,   281,   285,   289,   294,   303,
618
 
     314,   315,   318,   326,   327,   328,   329,   333,   338,   343,
619
 
     348,   366,   365,   386,   387,   390,   399,   407,   412,   418,
620
 
     430,   431,   432,   433,   434,   435,   436,   437,   438,   443,
621
 
     448,   454,   460,   466,   471,   486,   502,   508,   518,   529,
622
 
     530,   533,   538,   542,   543,   544,   545,   546,   547,   548,
623
 
     549,   550,   551,   556,   561,   566,   571,   577,   582,   587,
624
 
     592,   597,   602,   613,   613,   623,   623,   626,   626,   629,
625
 
     630,   629,   637,   638,   637,   645,   648,   658,   661,   673,
626
 
     675,   681,   692,   704
627
 
};
628
 
#endif
629
 
 
630
 
#if YYDEBUG || YYERROR_VERBOSE
631
 
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
632
 
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
633
 
static const char *const yytname[] =
634
 
{
635
 
  "$end", "error", "$undefined", "DT_INTEGER", "DT_FLOAT", "DT_STRING",
636
 
  "DT_ATTRNAME", "DT_ATTRVALUE", "KW_LBMSIM", "KW_COMPARELBM",
637
 
  "KW_ANIFRAMETIME", "KW_DEBUGMODE", "KW_DEBUGLEVEL", "KW_P_RELAXTIME",
638
 
  "KW_P_REYNOLDS", "KW_P_VISCOSITY", "KW_P_SOUNDSPEED", "KW_P_DOMAINSIZE",
639
 
  "KW_P_FORCE", "KW_P_TIMELENGTH", "KW_P_STEPTIME", "KW_P_TIMEFACTOR",
640
 
  "KW_P_ANIFRAMETIME", "KW_P_ANISTART", "KW_P_SURFACETENSION",
641
 
  "KW_P_ACTIVATE", "KW_P_DEACTIVATE", "KW_P_DENSITY", "KW_P_CELLSIZE",
642
 
  "KW_P_GSTAR", "KW_PFSPATH", "KW_PARTLINELENGTH", "KW_PARTICLES",
643
 
  "KW_FRAMESPERSEC", "KW_RAYTRACING", "KW_PAROPEN", "KW_PARCLOSE",
644
 
  "KW_FILENAME", "KW_PMCAUSTICS", "KW_MAXRAYDEPTH", "KW_CAUSTICDIST",
645
 
  "KW_CAUSTICPHOT", "KW_SHADOWMAPBIAS", "KW_TREEMAXDEPTH",
646
 
  "KW_TREEMAXTRIANGLES", "KW_RESOLUTION", "KW_ANTIALIAS", "KW_EYEPOINT",
647
 
  "KW_ANISTART", "KW_ANIFRAMES", "KW_FRAMESKIP", "KW_LOOKAT", "KW_UPVEC",
648
 
  "KW_FOVY", "KW_ASPECT", "KW_AMBIENCE", "KW_BACKGROUND", "KW_DEBUGPIXEL",
649
 
  "KW_TESTMODE", "KW_OPENGLATTR", "KW_BLENDERATTR", "KW_ATTRIBUTE",
650
 
  "KW_ATTRCHANNEL", "KW_OBJATTR", "KW_EQUALS", "KW_DEFINEATTR",
651
 
  "KW_ATTREND", "KW_GEOMETRY", "KW_TYPE", "KW_GEOTYPE_BOX",
652
 
  "KW_GEOTYPE_FLUID", "KW_GEOTYPE_OBJMODEL", "KW_GEOTYPE_SPHERE",
653
 
  "KW_CASTSHADOWS", "KW_RECEIVESHADOWS", "KW_VISIBLE", "KW_BOX_END",
654
 
  "KW_BOX_START", "KW_POLY", "KW_NUMVERTICES", "KW_VERTEX",
655
 
  "KW_NUMPOLYGONS", "KW_ISOSURF", "KW_FILEMODE", "KW_INVERT",
656
 
  "KW_MATERIAL", "KW_MATTYPE_PHONG", "KW_MATTYPE_BLINN", "KW_NAME",
657
 
  "KW_AMBIENT", "KW_DIFFUSE", "KW_SPECULAR", "KW_MIRROR",
658
 
  "KW_TRANSPARENCE", "KW_REFRACINDEX", "KW_TRANSADDITIVE",
659
 
  "KW_TRANSATTCOL", "KW_FRESNEL", "KW_LIGHT", "KW_ACTIVE", "KW_COLOUR",
660
 
  "KW_POSITION", "KW_LIGHT_OMNI", "KW_CAUSTICPHOTONS",
661
 
  "KW_CAUSTICSTRENGTH", "KW_SHADOWMAP", "KW_CAUSTICSMAP", "$accept",
662
 
  "desc_line", "desc_expression", "toggledebug_expression",
663
 
  "setdebuglevel_expression", "raytrace_section", "raytrace_line",
664
 
  "raytrace_expression", "anistart_expression", "aniframetime_expression",
665
 
  "aniframes_expression", "frameskip_expression", "resolution_expression",
666
 
  "antialias_expression", "eyepoint_expression", "lookat_expression",
667
 
  "upvec_expression", "fovy_expression", "aspect_expression",
668
 
  "ambience_expression", "background_expression", "filename_expression",
669
 
  "treemaxdepth_expression", "treemaxtriangles_expression",
670
 
  "maxraydepth_expression", "debugpixel_expression", "testmode_expression",
671
 
  "openglattr_expr", "blenderattr_expr", "light_expression",
672
 
  "lightsettings_line", "lighttype_expression", "lightsettings_expression",
673
 
  "lightactive_expression", "lightcastshadows_expression",
674
 
  "lightcolor_expression", "lightposition_expression",
675
 
  "geometry_expression", "@1", "geometrysettings_line",
676
 
  "geometrytype_expression", "geometrysettings_expression",
677
 
  "geometryexpression_name", "geometryexpression_propname",
678
 
  "geometryexpression_castshadows", "geometryexpression_recshadows",
679
 
  "geometryexpression_visible", "geometryexpression_boxstart",
680
 
  "geometryexpression_boxend", "geometryexpression_attrib",
681
 
  "geometryexpression_defattrib", "material_expression",
682
 
  "materialsettings_line", "materialtype_expression",
683
 
  "materialsettings_expression", "materialexpression_name",
684
 
  "materialexpression_ambient", "materialexpression_diffuse",
685
 
  "materialexpression_specular", "materialexpression_mirror",
686
 
  "materialexpression_transparence", "materialexpression_refracindex",
687
 
  "materialexpression_transadd", "materialexpression_transattcol",
688
 
  "materialexpression_fresnel", "attribute_section", "@2",
689
 
  "attribute_line", "attribute_expression", "attribute_channel", "@3",
690
 
  "@4", "attribute_normal", "@5", "@6", "attrvalue_list", "DT_COLOR",
691
 
  "DT_ZEROTOONE", "DT_REALVAL", "DT_INTLTZERO", "DT_POSINT", "DT_BOOLEAN", 0
692
 
};
693
 
#endif
694
 
 
695
 
# ifdef YYPRINT
696
 
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
697
 
   token YYLEX-NUM.  */
698
 
static const unsigned short int yytoknum[] =
699
 
{
700
 
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
701
 
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
702
 
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
703
 
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
704
 
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
705
 
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
706
 
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
707
 
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
708
 
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
709
 
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
710
 
     355,   356,   357,   358,   359,   360,   361
711
 
};
712
 
# endif
713
 
 
714
 
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
715
 
static const unsigned char yyr1[] =
716
 
{
717
 
       0,   107,   108,   108,   109,   109,   109,   109,   110,   111,
718
 
     112,   113,   113,   114,   114,   114,   114,   114,   114,   114,
719
 
     114,   114,   114,   114,   114,   114,   114,   114,   114,   114,
720
 
     114,   114,   114,   114,   114,   114,   114,   114,   115,   116,
721
 
     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
722
 
     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
723
 
     137,   137,   138,   139,   139,   139,   139,   140,   141,   142,
724
 
     143,   145,   144,   146,   146,   147,   147,   147,   147,   147,
725
 
     148,   148,   148,   148,   148,   148,   148,   148,   148,   149,
726
 
     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
727
 
     159,   160,   160,   161,   161,   161,   161,   161,   161,   161,
728
 
     161,   161,   161,   162,   163,   164,   165,   166,   167,   168,
729
 
     169,   170,   171,   173,   172,   174,   174,   175,   175,   177,
730
 
     178,   176,   180,   181,   179,   182,   182,   183,   184,   185,
731
 
     185,   186,   187,   188
732
 
};
733
 
 
734
 
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
735
 
static const unsigned char yyr2[] =
736
 
{
737
 
       0,     2,     2,     1,     1,     1,     1,     1,     2,     2,
738
 
       4,     2,     1,     1,     1,     1,     1,     1,     1,     1,
739
 
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
740
 
       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
741
 
       2,     2,     3,     2,     4,     4,     4,     2,     2,     4,
742
 
       4,     2,     2,     2,     2,     3,     2,     2,     2,     6,
743
 
       2,     1,     1,     1,     1,     1,     1,     2,     2,     4,
744
 
       4,     0,     7,     2,     1,     1,     1,     1,     1,     1,
745
 
       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
746
 
       2,     2,     2,     2,     4,     4,     2,     4,     6,     2,
747
 
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
748
 
       1,     1,     1,     2,     4,     4,     3,     2,     2,     2,
749
 
       2,     4,     2,     0,     6,     2,     1,     1,     1,     0,
750
 
       0,     7,     0,     0,     6,     2,     1,     1,     1,     1,
751
 
       1,     1,     1,     1
752
 
};
753
 
 
754
 
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
755
 
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
756
 
   means the default is an error.  */
757
 
static const unsigned char yydefact[] =
758
 
{
759
 
       0,     0,     0,     0,     0,     0,     3,     6,     7,     4,
760
 
       5,     8,     9,     0,     0,     1,     2,     0,     0,     0,
761
 
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
762
 
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
763
 
       0,     0,     0,     0,    12,    14,    15,    13,    16,    17,
764
 
      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
765
 
      28,    29,    30,    31,    32,    33,    34,    35,    37,    36,
766
 
     128,   127,   123,   132,   142,    39,    51,   141,    54,    52,
767
 
      53,     0,    43,   140,   139,     0,    38,    40,   143,    41,
768
 
       0,     0,    47,    48,     0,     0,     0,    56,    57,    58,
769
 
       0,     0,     0,     0,    10,    11,     0,     0,    42,     0,
770
 
       0,     0,     0,     0,    55,   129,     0,     0,     0,     0,
771
 
     126,   136,   133,    44,    45,    46,    49,    50,     0,    78,
772
 
      79,    75,    77,    76,    71,   101,   102,     0,    62,     0,
773
 
     124,   125,   135,     0,   130,     0,     0,     0,     0,     0,
774
 
       0,     0,     0,     0,     0,     0,     0,   100,   103,   104,
775
 
     105,   106,   107,   109,   108,   110,   111,   112,     0,     0,
776
 
       0,     0,     0,    61,    63,    64,    65,    66,   134,     0,
777
 
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
778
 
      74,    80,    81,    82,    83,    84,    85,    86,    87,    88,
779
 
     113,     0,   137,   138,     0,     0,   117,   118,   119,   120,
780
 
       0,   122,    98,    99,    68,    67,     0,     0,    59,    60,
781
 
     131,    96,     0,    91,    92,    93,     0,     0,    90,    89,
782
 
      72,    73,     0,     0,   116,     0,     0,     0,     0,     0,
783
 
       0,   114,   115,   121,    69,    70,    97,    95,    94
784
 
};
785
 
 
786
 
/* YYDEFGOTO[NTERM-NUM]. */
787
 
static const short int yydefgoto[] =
788
 
{
789
 
      -1,     5,     6,     7,     8,     9,    43,    44,    45,    46,
790
 
      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
791
 
      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
792
 
     172,   139,   173,   174,   175,   176,   177,    67,   145,   189,
793
 
     134,   190,   191,   192,   193,   194,   195,   196,   197,   198,
794
 
     199,    68,   156,   137,   157,   158,   159,   160,   161,   162,
795
 
     163,   164,   165,   166,   167,    10,   106,   119,    69,    70,
796
 
     128,   179,    71,   107,   143,   122,   201,   202,   203,    78,
797
 
      75,    89
798
 
};
799
 
 
800
 
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
801
 
   STATE-NUM.  */
802
 
#define YYPACT_NINF -123
803
 
static const short int yypact[] =
804
 
{
805
 
       3,    27,    33,   -11,    37,    11,  -123,  -123,  -123,  -123,
806
 
    -123,  -123,  -123,   180,    13,  -123,  -123,   -20,    43,    44,
807
 
      47,    47,    47,    47,    48,    29,    43,    47,    49,    29,
808
 
      29,    29,    29,    29,    29,    50,    49,    52,    56,    61,
809
 
      19,    23,    36,    53,  -123,  -123,  -123,  -123,  -123,  -123,
810
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
811
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
812
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
813
 
    -123,    47,  -123,  -123,  -123,    29,  -123,  -123,  -123,  -123,
814
 
      29,    29,  -123,  -123,    29,    29,    59,  -123,  -123,  -123,
815
 
      -9,     8,    25,    57,  -123,  -123,    21,    70,  -123,    29,
816
 
      29,    29,    29,    29,  -123,  -123,     9,   -52,    -7,     6,
817
 
    -123,  -123,   109,  -123,  -123,  -123,  -123,  -123,    70,  -123,
818
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,   191,  -123,   -60,
819
 
    -123,  -123,  -123,    51,   109,    67,   113,    29,    29,    29,
820
 
      29,    29,    29,    29,    29,    43,    78,  -123,  -123,  -123,
821
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,    49,    49,
822
 
      29,    29,   -26,  -123,  -123,  -123,  -123,  -123,  -123,    55,
823
 
     121,    93,    49,    49,    49,    29,    29,   131,   132,   185,
824
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
825
 
    -123,    29,  -123,  -123,    29,    29,  -123,  -123,  -123,  -123,
826
 
      29,  -123,  -123,  -123,  -123,  -123,    29,    29,  -123,  -123,
827
 
    -123,  -123,    21,  -123,  -123,  -123,    29,    29,  -123,  -123,
828
 
    -123,  -123,    29,    29,  -123,    29,    29,    29,    20,    29,
829
 
      29,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123
830
 
};
831
 
 
832
 
/* YYPGOTO[NTERM-NUM].  */
833
 
static const short int yypgoto[] =
834
 
{
835
 
    -123,  -123,   134,  -123,  -123,  -123,  -123,   107,  -123,  -123,
836
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
837
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
838
 
    -123,  -123,   -19,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
839
 
    -123,   -33,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
840
 
    -123,  -123,  -123,  -123,     1,  -123,  -123,  -123,  -123,  -123,
841
 
    -123,  -123,  -123,  -123,  -123,  -123,  -123,   -68,  -103,  -123,
842
 
    -123,  -123,  -123,  -123,  -123,    30,  -110,  -122,   -25,    -2,
843
 
     -24,   -35
844
 
};
845
 
 
846
 
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
847
 
   positive, shift that token.  If negative, reduce the rule which
848
 
   number is the opposite.  If zero, do what YYDEFACT says.
849
 
   If YYTABLE_NINF, syntax error.  */
850
 
#define YYTABLE_NINF -1
851
 
static const unsigned char yytable[] =
852
 
{
853
 
      85,    97,    86,   120,    90,    91,    92,    93,    94,    95,
854
 
     218,    15,    17,   168,     1,     2,   141,   129,   130,    79,
855
 
      80,    81,     1,     2,    13,    87,    17,    17,   206,   207,
856
 
      11,   209,    83,    84,   135,   136,    12,     3,   204,   169,
857
 
     170,   171,   140,    14,    73,     3,    74,   168,    72,    76,
858
 
      77,    82,    88,    96,   101,   115,   246,    98,   102,    17,
859
 
     109,    99,   114,    18,     4,   110,   111,   100,    39,   112,
860
 
     113,   103,     4,   169,   170,   171,   116,   121,   131,   108,
861
 
     132,   133,    39,    39,   123,   124,   125,   126,   127,   104,
862
 
      19,   232,    20,   117,   233,   138,    21,    22,    23,    24,
863
 
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
864
 
      35,    36,    37,    38,   212,    39,   142,   178,   200,   120,
865
 
      40,   220,   241,   242,   205,   118,   221,   208,   222,   210,
866
 
     180,   211,   181,   214,   215,   141,   228,   229,    41,    16,
867
 
     182,   183,   184,   185,   186,   216,   217,   223,   224,   225,
868
 
     105,    42,   187,   219,   238,   188,   231,   213,   144,     0,
869
 
     226,   227,     0,     0,     0,     0,   146,   147,   148,   149,
870
 
     150,   151,   152,   153,   154,   155,     0,     0,     0,     0,
871
 
     234,     0,     0,     0,     0,   235,    17,     0,     0,     0,
872
 
      18,   236,   237,     0,     0,     0,     0,     0,     0,     0,
873
 
       0,   239,   240,     0,     0,     0,     0,     0,     0,     0,
874
 
     243,   244,   245,     0,   247,   248,     0,    19,     0,    20,
875
 
       0,   230,     0,    21,    22,    23,    24,    25,    26,    27,
876
 
      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
877
 
      38,     0,    39,     0,     0,     0,     0,    40,   180,     0,
878
 
     181,     0,     0,     0,     0,     0,     0,     0,   182,   183,
879
 
     184,   185,   186,     0,     0,    41,     0,     0,     0,     0,
880
 
     187,     0,     0,   188,     0,     0,     0,     0,    42,   146,
881
 
     147,   148,   149,   150,   151,   152,   153,   154,   155
882
 
};
883
 
 
884
 
static const short int yycheck[] =
885
 
{
886
 
      25,    36,    26,   106,    29,    30,    31,    32,    33,    34,
887
 
      36,     0,     6,    73,    11,    12,   119,     8,     9,    21,
888
 
      22,    23,    11,    12,    35,    27,     6,     6,   150,   151,
889
 
       3,   153,     3,     4,    86,    87,     3,    34,   148,    99,
890
 
     100,   101,    36,     6,    64,    34,     3,    73,    35,     5,
891
 
       3,     3,     3,     3,    35,    64,    36,     5,    35,     6,
892
 
      85,     5,     3,    10,    61,    90,    91,     6,    62,    94,
893
 
      95,    35,    61,    99,   100,   101,    68,     7,    69,    81,
894
 
      71,    72,    62,    62,   109,   110,   111,   112,   113,    36,
895
 
      37,   201,    39,    68,   204,   102,    43,    44,    45,    46,
896
 
      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
897
 
      57,    58,    59,    60,    36,    62,     7,    66,     5,   222,
898
 
      67,    66,   232,   233,   149,    68,     5,   152,    35,   154,
899
 
      63,   155,    65,   168,   169,   238,     5,     5,    85,     5,
900
 
      73,    74,    75,    76,    77,   170,   171,   182,   183,   184,
901
 
      43,    98,    85,   172,   222,    88,   189,   156,   128,    -1,
902
 
     185,   186,    -1,    -1,    -1,    -1,    88,    89,    90,    91,
903
 
      92,    93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,
904
 
     205,    -1,    -1,    -1,    -1,   210,     6,    -1,    -1,    -1,
905
 
      10,   216,   217,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
906
 
      -1,   226,   227,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
907
 
     235,   236,   237,    -1,   239,   240,    -1,    37,    -1,    39,
908
 
      -1,    36,    -1,    43,    44,    45,    46,    47,    48,    49,
909
 
      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
910
 
      60,    -1,    62,    -1,    -1,    -1,    -1,    67,    63,    -1,
911
 
      65,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,
912
 
      75,    76,    77,    -1,    -1,    85,    -1,    -1,    -1,    -1,
913
 
      85,    -1,    -1,    88,    -1,    -1,    -1,    -1,    98,    88,
914
 
      89,    90,    91,    92,    93,    94,    95,    96,    97
915
 
};
916
 
 
917
 
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
918
 
   symbol of state STATE-NUM.  */
919
 
static const unsigned char yystos[] =
920
 
{
921
 
       0,    11,    12,    34,    61,   108,   109,   110,   111,   112,
922
 
     172,     3,     3,    35,     6,     0,   109,     6,    10,    37,
923
 
      39,    43,    44,    45,    46,    47,    48,    49,    50,    51,
924
 
      52,    53,    54,    55,    56,    57,    58,    59,    60,    62,
925
 
      67,    85,    98,   113,   114,   115,   116,   117,   118,   119,
926
 
     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
927
 
     130,   131,   132,   133,   134,   135,   136,   144,   158,   175,
928
 
     176,   179,    35,    64,     3,   187,     5,     3,   186,   186,
929
 
     186,   186,     3,     3,     4,   185,   187,   186,     3,   188,
930
 
     185,   185,   185,   185,   185,   185,     3,   188,     5,     5,
931
 
       6,    35,    35,    35,    36,   114,   173,   180,   186,   185,
932
 
     185,   185,   185,   185,     3,    64,    68,    68,    68,   174,
933
 
     175,     7,   182,   185,   185,   185,   185,   185,   177,     8,
934
 
       9,    69,    71,    72,   147,    86,    87,   160,   102,   138,
935
 
      36,   175,     7,   181,   182,   145,    88,    89,    90,    91,
936
 
      92,    93,    94,    95,    96,    97,   159,   161,   162,   163,
937
 
     164,   165,   166,   167,   168,   169,   170,   171,    73,    99,
938
 
     100,   101,   137,   139,   140,   141,   142,   143,    66,   178,
939
 
      63,    65,    73,    74,    75,    76,    77,    85,    88,   146,
940
 
     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
941
 
       5,   183,   184,   185,   183,   185,   184,   184,   185,   184,
942
 
     185,   187,    36,   161,   188,   188,   185,   185,    36,   139,
943
 
      66,     5,    35,   188,   188,   188,   185,   185,     5,     5,
944
 
      36,   148,   183,   183,   185,   185,   185,   185,   174,   185,
945
 
     185,   183,   183,   185,   185,   185,    36,   185,   185
946
 
};
947
 
 
948
 
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
949
 
# define YYSIZE_T __SIZE_TYPE__
950
 
#endif
951
 
#if ! defined (YYSIZE_T) && defined (size_t)
952
 
# define YYSIZE_T size_t
953
 
#endif
954
 
#if ! defined (YYSIZE_T)
955
 
# if defined (__STDC__) || defined (__cplusplus)
956
 
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
957
 
#  define YYSIZE_T size_t
958
 
# endif
959
 
#endif
960
 
#if ! defined (YYSIZE_T)
961
 
# define YYSIZE_T unsigned int
962
 
#endif
963
 
 
964
 
#define yyerrok         (yyerrstatus = 0)
965
 
#define yyclearin       (yychar = YYEMPTY)
966
 
#define YYEMPTY         (-2)
967
 
#define YYEOF           0
968
 
 
969
 
#define YYACCEPT        goto yyacceptlab
970
 
#define YYABORT         goto yyabortlab
971
 
#define YYERROR         goto yyerrorlab
972
 
 
973
 
 
974
 
/* Like YYERROR except do call yyerror.  This remains here temporarily
975
 
   to ease the transition to the new meaning of YYERROR, for GCC.
976
 
   Once GCC version 2 has supplanted version 1, this can go.  */
977
 
 
978
 
#define YYFAIL          goto yyerrlab
979
 
 
980
 
#define YYRECOVERING()  (!!yyerrstatus)
981
 
 
982
 
#define YYBACKUP(Token, Value)                                  \
983
 
do                                                              \
984
 
  if (yychar == YYEMPTY && yylen == 1)                          \
985
 
    {                                                           \
986
 
      yychar = (Token);                                         \
987
 
      yylval = (Value);                                         \
988
 
      yytoken = YYTRANSLATE (yychar);                           \
989
 
      YYPOPSTACK;                                               \
990
 
      goto yybackup;                                            \
991
 
    }                                                           \
992
 
  else                                                          \
993
 
    {                                                           \
994
 
      yyerror ("syntax error: cannot back up");\
995
 
      YYERROR;                                                  \
996
 
    }                                                           \
997
 
while (0)
998
 
 
999
 
 
1000
 
#define YYTERROR        1
1001
 
#define YYERRCODE       256
1002
 
 
1003
 
 
1004
 
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1005
 
   If N is 0, then set CURRENT to the empty location which ends
1006
 
   the previous symbol: RHS[0] (always defined).  */
1007
 
 
1008
 
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1009
 
#ifndef YYLLOC_DEFAULT
1010
 
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1011
 
    do                                                                  \
1012
 
      if (N)                                                            \
1013
 
        {                                                               \
1014
 
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1015
 
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1016
 
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1017
 
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1018
 
        }                                                               \
1019
 
      else                                                              \
1020
 
        {                                                               \
1021
 
          (Current).first_line   = (Current).last_line   =              \
1022
 
            YYRHSLOC (Rhs, 0).last_line;                                \
1023
 
          (Current).first_column = (Current).last_column =              \
1024
 
            YYRHSLOC (Rhs, 0).last_column;                              \
1025
 
        }                                                               \
1026
 
    while (0)
1027
 
#endif
1028
 
 
1029
 
 
1030
 
/* YY_LOCATION_PRINT -- Print the location on the stream.
1031
 
   This macro was not mandated originally: define only if we know
1032
 
   we won't break user code: when these are the locations we know.  */
1033
 
 
1034
 
#ifndef YY_LOCATION_PRINT
1035
 
# if YYLTYPE_IS_TRIVIAL
1036
 
#  define YY_LOCATION_PRINT(File, Loc)                  \
1037
 
     fprintf (File, "%d.%d-%d.%d",                      \
1038
 
              (Loc).first_line, (Loc).first_column,     \
1039
 
              (Loc).last_line,  (Loc).last_column)
1040
 
# else
1041
 
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1042
 
# endif
1043
 
#endif
1044
 
 
1045
 
 
1046
 
/* YYLEX -- calling `yylex' with the right arguments.  */
1047
 
 
1048
 
#ifdef YYLEX_PARAM
1049
 
# define YYLEX yylex (YYLEX_PARAM)
1050
 
#else
1051
 
# define YYLEX yylex ()
1052
 
#endif
1053
 
 
1054
 
/* Enable debugging if requested.  */
1055
 
#if YYDEBUG
1056
 
 
1057
 
# ifndef YYFPRINTF
1058
 
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1059
 
#  define YYFPRINTF fprintf
1060
 
# endif
1061
 
 
1062
 
# define YYDPRINTF(Args)                        \
1063
 
do {                                            \
1064
 
  if (yydebug)                                  \
1065
 
    YYFPRINTF Args;                             \
1066
 
} while (0)
1067
 
 
1068
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)          \
1069
 
do {                                                            \
1070
 
  if (yydebug)                                                  \
1071
 
    {                                                           \
1072
 
      YYFPRINTF (stderr, "%s ", Title);                         \
1073
 
      yysymprint (stderr,                                       \
1074
 
                  Type, Value); \
1075
 
      YYFPRINTF (stderr, "\n");                                 \
1076
 
    }                                                           \
1077
 
} while (0)
1078
 
 
1079
 
/*------------------------------------------------------------------.
1080
 
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1081
 
| TOP (included).                                                   |
1082
 
`------------------------------------------------------------------*/
1083
 
 
1084
 
#if defined (__STDC__) || defined (__cplusplus)
1085
 
static void
1086
 
yy_stack_print (short int *bottom, short int *top)
1087
 
#else
1088
 
static void
1089
 
yy_stack_print (bottom, top)
1090
 
    short int *bottom;
1091
 
    short int *top;
1092
 
#endif
1093
 
{
1094
 
  YYFPRINTF (stderr, "Stack now");
1095
 
  for (/* Nothing. */; bottom <= top; ++bottom)
1096
 
    YYFPRINTF (stderr, " %d", *bottom);
1097
 
  YYFPRINTF (stderr, "\n");
1098
 
}
1099
 
 
1100
 
# define YY_STACK_PRINT(Bottom, Top)                            \
1101
 
do {                                                            \
1102
 
  if (yydebug)                                                  \
1103
 
    yy_stack_print ((Bottom), (Top));                           \
1104
 
} while (0)
1105
 
 
1106
 
 
1107
 
/*------------------------------------------------.
1108
 
| Report that the YYRULE is going to be reduced.  |
1109
 
`------------------------------------------------*/
1110
 
 
1111
 
#if defined (__STDC__) || defined (__cplusplus)
1112
 
static void
1113
 
yy_reduce_print (int yyrule)
1114
 
#else
1115
 
static void
1116
 
yy_reduce_print (yyrule)
1117
 
    int yyrule;
1118
 
#endif
1119
 
{
1120
 
  int yyi;
1121
 
  unsigned int yylno = yyrline[yyrule];
1122
 
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
1123
 
             yyrule - 1, yylno);
1124
 
  /* Print the symbols being reduced, and their result.  */
1125
 
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1126
 
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
1127
 
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
1128
 
}
1129
 
 
1130
 
# define YY_REDUCE_PRINT(Rule)          \
1131
 
do {                                    \
1132
 
  if (yydebug)                          \
1133
 
    yy_reduce_print (Rule);             \
1134
 
} while (0)
1135
 
 
1136
 
/* Nonzero means print parse trace.  It is left uninitialized so that
1137
 
   multiple parsers can coexist.  */
1138
 
int yydebug;
1139
 
#else /* !YYDEBUG */
1140
 
# define YYDPRINTF(Args)
1141
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1142
 
# define YY_STACK_PRINT(Bottom, Top)
1143
 
# define YY_REDUCE_PRINT(Rule)
1144
 
#endif /* !YYDEBUG */
1145
 
 
1146
 
 
1147
 
/* YYINITDEPTH -- initial size of the parser's stacks.  */
1148
 
#ifndef YYINITDEPTH
1149
 
# define YYINITDEPTH 200
1150
 
#endif
1151
 
 
1152
 
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1153
 
   if the built-in stack extension method is used).
1154
 
 
1155
 
   Do not make this value too large; the results are undefined if
1156
 
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1157
 
   evaluated with infinite-precision integer arithmetic.  */
1158
 
 
1159
 
#ifndef YYMAXDEPTH
1160
 
# define YYMAXDEPTH 10000
1161
 
#endif
1162
 
 
1163
 
 
1164
 
 
1165
 
#if YYERROR_VERBOSE
1166
 
 
1167
 
# ifndef yystrlen
1168
 
#  if defined (__GLIBC__) && defined (_STRING_H)
1169
 
#   define yystrlen strlen
1170
 
#  else
1171
 
/* Return the length of YYSTR.  */
1172
 
static YYSIZE_T
1173
 
#   if defined (__STDC__) || defined (__cplusplus)
1174
 
yystrlen (const char *yystr)
1175
 
#   else
1176
 
yystrlen (yystr)
1177
 
     const char *yystr;
1178
 
#   endif
1179
 
{
1180
 
  register const char *yys = yystr;
1181
 
 
1182
 
  while (*yys++ != '\0')
1183
 
    continue;
1184
 
 
1185
 
  return yys - yystr - 1;
1186
 
}
1187
 
#  endif
1188
 
# endif
1189
 
 
1190
 
# ifndef yystpcpy
1191
 
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1192
 
#   define yystpcpy stpcpy
1193
 
#  else
1194
 
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1195
 
   YYDEST.  */
1196
 
static char *
1197
 
#   if defined (__STDC__) || defined (__cplusplus)
1198
 
yystpcpy (char *yydest, const char *yysrc)
1199
 
#   else
1200
 
yystpcpy (yydest, yysrc)
1201
 
     char *yydest;
1202
 
     const char *yysrc;
1203
 
#   endif
1204
 
{
1205
 
  register char *yyd = yydest;
1206
 
  register const char *yys = yysrc;
1207
 
 
1208
 
  while ((*yyd++ = *yys++) != '\0')
1209
 
    continue;
1210
 
 
1211
 
  return yyd - 1;
1212
 
}
1213
 
#  endif
1214
 
# endif
1215
 
 
1216
 
#endif /* !YYERROR_VERBOSE */
1217
 
 
1218
 
 
1219
 
 
1220
 
#if YYDEBUG
1221
 
/*--------------------------------.
1222
 
| Print this symbol on YYOUTPUT.  |
1223
 
`--------------------------------*/
1224
 
 
1225
 
#if defined (__STDC__) || defined (__cplusplus)
1226
 
static void
1227
 
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1228
 
#else
1229
 
static void
1230
 
yysymprint (yyoutput, yytype, yyvaluep)
1231
 
    FILE *yyoutput;
1232
 
    int yytype;
1233
 
    YYSTYPE *yyvaluep;
1234
 
#endif
1235
 
{
1236
 
  /* Pacify ``unused variable'' warnings.  */
1237
 
  (void) yyvaluep;
1238
 
 
1239
 
  if (yytype < YYNTOKENS)
1240
 
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1241
 
  else
1242
 
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1243
 
 
1244
 
 
1245
 
# ifdef YYPRINT
1246
 
  if (yytype < YYNTOKENS)
1247
 
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1248
 
# endif
1249
 
  switch (yytype)
1250
 
    {
1251
 
      default:
1252
 
        break;
1253
 
    }
1254
 
  YYFPRINTF (yyoutput, ")");
1255
 
}
1256
 
 
1257
 
#endif /* ! YYDEBUG */
1258
 
/*-----------------------------------------------.
1259
 
| Release the memory associated to this symbol.  |
1260
 
`-----------------------------------------------*/
1261
 
 
1262
 
#if defined (__STDC__) || defined (__cplusplus)
1263
 
static void
1264
 
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1265
 
#else
1266
 
static void
1267
 
yydestruct (yymsg, yytype, yyvaluep)
1268
 
    const char *yymsg;
1269
 
    int yytype;
1270
 
    YYSTYPE *yyvaluep;
1271
 
#endif
1272
 
{
1273
 
  /* Pacify ``unused variable'' warnings.  */
1274
 
  (void) yyvaluep;
1275
 
 
1276
 
  if (!yymsg)
1277
 
    yymsg = "Deleting";
1278
 
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1279
 
 
1280
 
  switch (yytype)
1281
 
    {
1282
 
 
1283
 
      default:
1284
 
        break;
1285
 
    }
1286
 
}
1287
 
 
1288
 
 
1289
 
/* Prevent warnings from -Wmissing-prototypes.  */
1290
 
 
1291
 
#ifdef YYPARSE_PARAM
1292
 
# if defined (__STDC__) || defined (__cplusplus)
1293
 
int yyparse (void *YYPARSE_PARAM);
1294
 
# else
1295
 
int yyparse ();
1296
 
# endif
1297
 
#else /* ! YYPARSE_PARAM */
1298
 
#if defined (__STDC__) || defined (__cplusplus)
1299
 
int yyparse (void);
1300
 
#else
1301
 
int yyparse ();
1302
 
#endif
1303
 
#endif /* ! YYPARSE_PARAM */
1304
 
 
1305
 
 
1306
 
 
1307
 
/* The look-ahead symbol.  */
1308
 
int yychar;
1309
 
 
1310
 
/* The semantic value of the look-ahead symbol.  */
1311
 
YYSTYPE yylval;
1312
 
 
1313
 
/* Number of syntax errors so far.  */
1314
 
int yynerrs;
1315
 
 
1316
 
 
1317
 
 
1318
 
/*----------.
1319
 
| yyparse.  |
1320
 
`----------*/
1321
 
 
1322
 
#ifdef YYPARSE_PARAM
1323
 
# if defined (__STDC__) || defined (__cplusplus)
1324
 
int yyparse (void *YYPARSE_PARAM)
1325
 
# else
1326
 
int yyparse (YYPARSE_PARAM)
1327
 
  void *YYPARSE_PARAM;
1328
 
# endif
1329
 
#else /* ! YYPARSE_PARAM */
1330
 
#if defined (__STDC__) || defined (__cplusplus)
1331
 
int
1332
 
yyparse (void)
1333
 
#else
1334
 
int
1335
 
yyparse ()
1336
 
 
1337
 
#endif
1338
 
#endif
1339
 
{
1340
 
  
1341
 
  register int yystate;
1342
 
  register int yyn;
1343
 
  int yyresult;
1344
 
  /* Number of tokens to shift before error messages enabled.  */
1345
 
  int yyerrstatus;
1346
 
  /* Look-ahead token as an internal (translated) token number.  */
1347
 
  int yytoken = 0;
1348
 
 
1349
 
  /* Three stacks and their tools:
1350
 
     `yyss': related to states,
1351
 
     `yyvs': related to semantic values,
1352
 
     `yyls': related to locations.
1353
 
 
1354
 
     Refer to the stacks thru separate pointers, to allow yyoverflow
1355
 
     to reallocate them elsewhere.  */
1356
 
 
1357
 
  /* The state stack.  */
1358
 
  short int yyssa[YYINITDEPTH];
1359
 
  short int *yyss = yyssa;
1360
 
  register short int *yyssp;
1361
 
 
1362
 
  /* The semantic value stack.  */
1363
 
  YYSTYPE yyvsa[YYINITDEPTH];
1364
 
  YYSTYPE *yyvs = yyvsa;
1365
 
  register YYSTYPE *yyvsp;
1366
 
 
1367
 
 
1368
 
 
1369
 
#define YYPOPSTACK   (yyvsp--, yyssp--)
1370
 
 
1371
 
  YYSIZE_T yystacksize = YYINITDEPTH;
1372
 
 
1373
 
  /* The variables used to return semantic value and location from the
1374
 
     action routines.  */
1375
 
  YYSTYPE yyval;
1376
 
 
1377
 
 
1378
 
  /* When reducing, the number of symbols on the RHS of the reduced
1379
 
     rule.  */
1380
 
  int yylen;
1381
 
 
1382
 
  YYDPRINTF ((stderr, "Starting parse\n"));
1383
 
 
1384
 
  yystate = 0;
1385
 
  yyerrstatus = 0;
1386
 
  yynerrs = 0;
1387
 
  yychar = YYEMPTY;             /* Cause a token to be read.  */
1388
 
 
1389
 
  /* Initialize stack pointers.
1390
 
     Waste one element of value and location stack
1391
 
     so that they stay on the same level as the state stack.
1392
 
     The wasted elements are never initialized.  */
1393
 
 
1394
 
  yyssp = yyss;
1395
 
  yyvsp = yyvs;
1396
 
 
1397
 
 
1398
 
  yyvsp[0] = yylval;
1399
 
 
1400
 
  goto yysetstate;
1401
 
 
1402
 
/*------------------------------------------------------------.
1403
 
| yynewstate -- Push a new state, which is found in yystate.  |
1404
 
`------------------------------------------------------------*/
1405
 
 yynewstate:
1406
 
  /* In all cases, when you get here, the value and location stacks
1407
 
     have just been pushed. so pushing a state here evens the stacks.
1408
 
     */
1409
 
  yyssp++;
1410
 
 
1411
 
 yysetstate:
1412
 
  *yyssp = yystate;
1413
 
 
1414
 
  if (yyss + yystacksize - 1 <= yyssp)
1415
 
    {
1416
 
      /* Get the current used size of the three stacks, in elements.  */
1417
 
      YYSIZE_T yysize = yyssp - yyss + 1;
1418
 
 
1419
 
#ifdef yyoverflow
1420
 
      {
1421
 
        /* Give user a chance to reallocate the stack. Use copies of
1422
 
           these so that the &'s don't force the real ones into
1423
 
           memory.  */
1424
 
        YYSTYPE *yyvs1 = yyvs;
1425
 
        short int *yyss1 = yyss;
1426
 
 
1427
 
 
1428
 
        /* Each stack pointer address is followed by the size of the
1429
 
           data in use in that stack, in bytes.  This used to be a
1430
 
           conditional around just the two extra args, but that might
1431
 
           be undefined if yyoverflow is a macro.  */
1432
 
        yyoverflow ("parser stack overflow",
1433
 
                    &yyss1, yysize * sizeof (*yyssp),
1434
 
                    &yyvs1, yysize * sizeof (*yyvsp),
1435
 
 
1436
 
                    &yystacksize);
1437
 
 
1438
 
        yyss = yyss1;
1439
 
        yyvs = yyvs1;
1440
 
      }
1441
 
#else /* no yyoverflow */
1442
 
# ifndef YYSTACK_RELOCATE
1443
 
      goto yyoverflowlab;
1444
 
# else
1445
 
      /* Extend the stack our own way.  */
1446
 
      if (YYMAXDEPTH <= yystacksize)
1447
 
        goto yyoverflowlab;
1448
 
      yystacksize *= 2;
1449
 
      if (YYMAXDEPTH < yystacksize)
1450
 
        yystacksize = YYMAXDEPTH;
1451
 
 
1452
 
      {
1453
 
        short int *yyss1 = yyss;
1454
 
        union yyalloc *yyptr =
1455
 
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1456
 
        if (! yyptr)
1457
 
          goto yyoverflowlab;
1458
 
        YYSTACK_RELOCATE (yyss);
1459
 
        YYSTACK_RELOCATE (yyvs);
1460
 
 
1461
 
#  undef YYSTACK_RELOCATE
1462
 
        if (yyss1 != yyssa)
1463
 
          YYSTACK_FREE (yyss1);
1464
 
      }
1465
 
# endif
1466
 
#endif /* no yyoverflow */
1467
 
 
1468
 
      yyssp = yyss + yysize - 1;
1469
 
      yyvsp = yyvs + yysize - 1;
1470
 
 
1471
 
 
1472
 
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1473
 
                  (unsigned long int) yystacksize));
1474
 
 
1475
 
      if (yyss + yystacksize - 1 <= yyssp)
1476
 
        YYABORT;
1477
 
    }
1478
 
 
1479
 
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1480
 
 
1481
 
  goto yybackup;
1482
 
 
1483
 
/*-----------.
1484
 
| yybackup.  |
1485
 
`-----------*/
1486
 
yybackup:
1487
 
 
1488
 
/* Do appropriate processing given the current state.  */
1489
 
/* Read a look-ahead token if we need one and don't already have one.  */
1490
 
/* yyresume: */
1491
 
 
1492
 
  /* First try to decide what to do without reference to look-ahead token.  */
1493
 
 
1494
 
  yyn = yypact[yystate];
1495
 
  if (yyn == YYPACT_NINF)
1496
 
    goto yydefault;
1497
 
 
1498
 
  /* Not known => get a look-ahead token if don't already have one.  */
1499
 
 
1500
 
  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1501
 
  if (yychar == YYEMPTY)
1502
 
    {
1503
 
      YYDPRINTF ((stderr, "Reading a token: "));
1504
 
      yychar = YYLEX;
1505
 
    }
1506
 
 
1507
 
  if (yychar <= YYEOF)
1508
 
    {
1509
 
      yychar = yytoken = YYEOF;
1510
 
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1511
 
    }
1512
 
  else
1513
 
    {
1514
 
      yytoken = YYTRANSLATE (yychar);
1515
 
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1516
 
    }
1517
 
 
1518
 
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1519
 
     detect an error, take that action.  */
1520
 
  yyn += yytoken;
1521
 
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1522
 
    goto yydefault;
1523
 
  yyn = yytable[yyn];
1524
 
  if (yyn <= 0)
1525
 
    {
1526
 
      if (yyn == 0 || yyn == YYTABLE_NINF)
1527
 
        goto yyerrlab;
1528
 
      yyn = -yyn;
1529
 
      goto yyreduce;
1530
 
    }
1531
 
 
1532
 
  if (yyn == YYFINAL)
1533
 
    YYACCEPT;
1534
 
 
1535
 
  /* Shift the look-ahead token.  */
1536
 
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1537
 
 
1538
 
  /* Discard the token being shifted unless it is eof.  */
1539
 
  if (yychar != YYEOF)
1540
 
    yychar = YYEMPTY;
1541
 
 
1542
 
  *++yyvsp = yylval;
1543
 
 
1544
 
 
1545
 
  /* Count tokens shifted since error; after three, turn off error
1546
 
     status.  */
1547
 
  if (yyerrstatus)
1548
 
    yyerrstatus--;
1549
 
 
1550
 
  yystate = yyn;
1551
 
  goto yynewstate;
1552
 
 
1553
 
 
1554
 
/*-----------------------------------------------------------.
1555
 
| yydefault -- do the default action for the current state.  |
1556
 
`-----------------------------------------------------------*/
1557
 
yydefault:
1558
 
  yyn = yydefact[yystate];
1559
 
  if (yyn == 0)
1560
 
    goto yyerrlab;
1561
 
  goto yyreduce;
1562
 
 
1563
 
 
1564
 
/*-----------------------------.
1565
 
| yyreduce -- Do a reduction.  |
1566
 
`-----------------------------*/
1567
 
yyreduce:
1568
 
  /* yyn is the number of a rule to reduce with.  */
1569
 
  yylen = yyr2[yyn];
1570
 
 
1571
 
  /* If YYLEN is nonzero, implement the default value of the action:
1572
 
     `$$ = $1'.
1573
 
 
1574
 
     Otherwise, the following line sets YYVAL to garbage.
1575
 
     This behavior is undocumented and Bison
1576
 
     users should not rely upon it.  Assigning to YYVAL
1577
 
     unconditionally makes the parser a bit smaller, and it avoids a
1578
 
     GCC warning that YYVAL may be used uninitialized.  */
1579
 
  yyval = yyvsp[1-yylen];
1580
 
 
1581
 
 
1582
 
  YY_REDUCE_PRINT (yyn);
1583
 
  switch (yyn)
1584
 
    {
1585
 
        case 8:
1586
 
#line 157 "src/cfgparser.yy"
1587
 
    { yy_debug = (yyvsp[0].intValue); }
1588
 
    break;
1589
 
 
1590
 
  case 9:
1591
 
#line 160 "src/cfgparser.yy"
1592
 
    { 
1593
 
                int sdebug = (yyvsp[0].intValue); 
1594
 
                if(sdebug<0) sdebug=0;
1595
 
                if(sdebug>10) sdebug=10;
1596
 
                gDebugLevel = sdebug;
1597
 
        }
1598
 
    break;
1599
 
 
1600
 
  case 38:
1601
 
#line 211 "src/cfgparser.yy"
1602
 
    { reglob->setAniStart( (yyvsp[0].intValue) ); }
1603
 
    break;
1604
 
 
1605
 
  case 39:
1606
 
#line 215 "src/cfgparser.yy"
1607
 
    { /*reglob->setAniFrameTime( $2 );*/ debMsgStd("cfgparser",DM_NOTIFY,"Deprecated setting aniframetime!",1); }
1608
 
    break;
1609
 
 
1610
 
  case 40:
1611
 
#line 220 "src/cfgparser.yy"
1612
 
    { reglob->setAniFrames( ((yyvsp[0].intValue))-1 ); }
1613
 
    break;
1614
 
 
1615
 
  case 41:
1616
 
#line 224 "src/cfgparser.yy"
1617
 
    { reglob->setFrameSkip( ((yyvsp[0].intValue)) ); }
1618
 
    break;
1619
 
 
1620
 
  case 42:
1621
 
#line 230 "src/cfgparser.yy"
1622
 
    { reglob->setResX( (yyvsp[-1].intValue) ); reglob->setResY( (yyvsp[0].intValue)); }
1623
 
    break;
1624
 
 
1625
 
  case 43:
1626
 
#line 234 "src/cfgparser.yy"
1627
 
    { reglob->setAADepth( (yyvsp[0].intValue) ); }
1628
 
    break;
1629
 
 
1630
 
  case 44:
1631
 
#line 238 "src/cfgparser.yy"
1632
 
    { reglob->setEye( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1633
 
    break;
1634
 
 
1635
 
  case 45:
1636
 
#line 242 "src/cfgparser.yy"
1637
 
    { reglob->setLookat( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1638
 
    break;
1639
 
 
1640
 
  case 46:
1641
 
#line 246 "src/cfgparser.yy"
1642
 
    { reglob->setUpVec( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1643
 
    break;
1644
 
 
1645
 
  case 47:
1646
 
#line 250 "src/cfgparser.yy"
1647
 
    { reglob->setFovy( (yyvsp[0].floatValue) ); }
1648
 
    break;
1649
 
 
1650
 
  case 48:
1651
 
#line 254 "src/cfgparser.yy"
1652
 
    { reglob->setAspect( (yyvsp[0].floatValue) ); }
1653
 
    break;
1654
 
 
1655
 
  case 49:
1656
 
#line 258 "src/cfgparser.yy"
1657
 
    { reglob->setAmbientLight( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue))  ); }
1658
 
    break;
1659
 
 
1660
 
  case 50:
1661
 
#line 262 "src/cfgparser.yy"
1662
 
    { reglob->setBackgroundCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1663
 
    break;
1664
 
 
1665
 
  case 51:
1666
 
#line 266 "src/cfgparser.yy"
1667
 
    { reglob->setOutFilename( (yyvsp[0].charValue) ); }
1668
 
    break;
1669
 
 
1670
 
  case 52:
1671
 
#line 270 "src/cfgparser.yy"
1672
 
    { reglob->setTreeMaxDepth( (yyvsp[0].intValue) ); }
1673
 
    break;
1674
 
 
1675
 
  case 53:
1676
 
#line 274 "src/cfgparser.yy"
1677
 
    { reglob->setTreeMaxTriangles( (yyvsp[0].intValue) ); }
1678
 
    break;
1679
 
 
1680
 
  case 54:
1681
 
#line 278 "src/cfgparser.yy"
1682
 
    { reglob->setRayMaxDepth( (yyvsp[0].intValue) ); }
1683
 
    break;
1684
 
 
1685
 
  case 55:
1686
 
#line 282 "src/cfgparser.yy"
1687
 
    { reglob->setDebugPixel( (yyvsp[-1].intValue), (yyvsp[0].intValue) ); }
1688
 
    break;
1689
 
 
1690
 
  case 56:
1691
 
#line 286 "src/cfgparser.yy"
1692
 
    { reglob->setTestMode( (yyvsp[0].intValue) ); }
1693
 
    break;
1694
 
 
1695
 
  case 57:
1696
 
#line 290 "src/cfgparser.yy"
1697
 
    { if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("OPENGL ATTRIBUTES: The attribute was not found!"); }
1698
 
                        reglob->getOpenGlAttributes()->import( attrs[(yyvsp[0].charValue)] ); }
1699
 
    break;
1700
 
 
1701
 
  case 58:
1702
 
#line 295 "src/cfgparser.yy"
1703
 
    { if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("BLENDER ATTRIBUTES: The attribute was not found!"); }
1704
 
                        reglob->getBlenderAttributes()->import( attrs[(yyvsp[0].charValue)] ); }
1705
 
    break;
1706
 
 
1707
 
  case 59:
1708
 
#line 307 "src/cfgparser.yy"
1709
 
    { 
1710
 
                                /* reset light pointers */
1711
 
                                currentLightOmni = NULL; 
1712
 
                        }
1713
 
    break;
1714
 
 
1715
 
  case 62:
1716
 
#line 319 "src/cfgparser.yy"
1717
 
    { currentLightOmni = new ntlLightObject( reglob );
1718
 
                  currentLight = currentLightOmni;
1719
 
                        reglob->getLightList()->push_back(currentLight);
1720
 
                }
1721
 
    break;
1722
 
 
1723
 
  case 67:
1724
 
#line 333 "src/cfgparser.yy"
1725
 
    { 
1726
 
                        currentLight->setActive( (yyvsp[0].intValue) ); 
1727
 
                }
1728
 
    break;
1729
 
 
1730
 
  case 68:
1731
 
#line 338 "src/cfgparser.yy"
1732
 
    { 
1733
 
                        currentLight->setCastShadows( (yyvsp[0].intValue) ); 
1734
 
                }
1735
 
    break;
1736
 
 
1737
 
  case 69:
1738
 
#line 343 "src/cfgparser.yy"
1739
 
    { 
1740
 
                        currentLight->setColor( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); 
1741
 
                }
1742
 
    break;
1743
 
 
1744
 
  case 70:
1745
 
#line 348 "src/cfgparser.yy"
1746
 
    { 
1747
 
                int init = 0;
1748
 
                if(currentLightOmni != NULL) {
1749
 
                        currentLightOmni->setPosition( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init = 1; }
1750
 
                if(!init) yyerror("This property can only be set for omni-directional and rectangular lights!");
1751
 
        }
1752
 
    break;
1753
 
 
1754
 
  case 71:
1755
 
#line 366 "src/cfgparser.yy"
1756
 
    {
1757
 
                                // geo classes have attributes...
1758
 
                                reglob->getScene()->addGeoClass(currentGeoClass);
1759
 
                                currentAttrib = currentGeoClass->getAttributeList();
1760
 
                        }
1761
 
    break;
1762
 
 
1763
 
  case 72:
1764
 
#line 372 "src/cfgparser.yy"
1765
 
    { 
1766
 
                                /* reset geometry object pointers */
1767
 
                                currentGeoObj                    = NULL; 
1768
 
                                currentGeoClass          = NULL; 
1769
 
                                currentGeometrySim = NULL; 
1770
 
                                currentGeometryModel = NULL; 
1771
 
                                currentAttrib = NULL;
1772
 
#ifndef ELBEEM_BLENDER
1773
 
                                currentGeometryBox = NULL; 
1774
 
#endif // ELBEEM_BLENDER
1775
 
                        }
1776
 
    break;
1777
 
 
1778
 
  case 75:
1779
 
#line 390 "src/cfgparser.yy"
1780
 
    { 
1781
 
#ifndef ELBEEM_BLENDER
1782
 
                        currentGeometryBox = new ntlGeometryBox( );
1783
 
                        currentGeoClass = currentGeometryBox;
1784
 
                        currentGeoObj = (ntlGeometryObject*)( currentGeometryBox );
1785
 
#else // ELBEEM_BLENDER
1786
 
                        yyerror("GEOTYPE_BOX : This object type is not supported in this version!");
1787
 
#endif // ELBEEM_BLENDER
1788
 
                }
1789
 
    break;
1790
 
 
1791
 
  case 76:
1792
 
#line 399 "src/cfgparser.yy"
1793
 
    { 
1794
 
#ifndef ELBEEM_BLENDER
1795
 
                        currentGeoClass = new ntlGeometrySphere( );
1796
 
                        currentGeoObj = (ntlGeometryObject*)( currentGeoClass );
1797
 
#else // ELBEEM_BLENDER
1798
 
                        yyerror("GEOTYPE_SPHERE : This object type is not supported in this version!");
1799
 
#endif // ELBEEM_BLENDER
1800
 
                }
1801
 
    break;
1802
 
 
1803
 
  case 77:
1804
 
#line 407 "src/cfgparser.yy"
1805
 
    { 
1806
 
                        currentGeometryModel = new ntlGeometryObjModel( );
1807
 
                        currentGeoClass = currentGeometryModel;
1808
 
                        currentGeoObj = (ntlGeometryObject*)( currentGeometryModel );
1809
 
                }
1810
 
    break;
1811
 
 
1812
 
  case 78:
1813
 
#line 412 "src/cfgparser.yy"
1814
 
    { 
1815
 
                        currentGeometrySim = new SimulationObject();
1816
 
                        currentGeoClass = currentGeometrySim;
1817
 
                        reglob->getSims()->push_back(currentGeometrySim);
1818
 
                        // dont add mcubes to geo list!
1819
 
                }
1820
 
    break;
1821
 
 
1822
 
  case 79:
1823
 
#line 418 "src/cfgparser.yy"
1824
 
    { 
1825
 
#ifdef LBM_INCLUDE_TESTSOLVERS
1826
 
                        currentGeometrySim = new SimulationCompareLbm();
1827
 
                        currentGeoClass = currentGeometrySim;
1828
 
                        reglob->getSims()->push_back(currentGeometrySim);
1829
 
#else // LBM_INCLUDE_TESTSOLVERS
1830
 
                        errMsg("El'Beem::cfg","compare test solver not supported!");
1831
 
#endif // LBM_INCLUDE_TESTSOLVERS
1832
 
                }
1833
 
    break;
1834
 
 
1835
 
  case 89:
1836
 
#line 443 "src/cfgparser.yy"
1837
 
    { 
1838
 
                        currentGeoClass->setName( (yyvsp[0].charValue) ); 
1839
 
                }
1840
 
    break;
1841
 
 
1842
 
  case 90:
1843
 
#line 448 "src/cfgparser.yy"
1844
 
    { 
1845
 
                        if(currentGeoObj == NULL){ yyerror(" MATERIAL : This property can only be set for geometry objects!"); }
1846
 
                        currentGeoObj->setMaterialName( (yyvsp[0].charValue) ); 
1847
 
                }
1848
 
    break;
1849
 
 
1850
 
  case 91:
1851
 
#line 454 "src/cfgparser.yy"
1852
 
    { 
1853
 
                        if(currentGeoObj == NULL){ yyerror(" CAST_SHADOW : This property can only be set for geometry objects!"); }
1854
 
                        currentGeoObj->setCastShadows( (yyvsp[0].intValue) ); 
1855
 
                }
1856
 
    break;
1857
 
 
1858
 
  case 92:
1859
 
#line 460 "src/cfgparser.yy"
1860
 
    { 
1861
 
                        if(currentGeoObj == NULL){ yyerror(" RECEIVE_SHADOW : This property can only be set for geometry objects!"); }
1862
 
                        currentGeoObj->setReceiveShadows( (yyvsp[0].intValue) ); 
1863
 
                }
1864
 
    break;
1865
 
 
1866
 
  case 93:
1867
 
#line 466 "src/cfgparser.yy"
1868
 
    { 
1869
 
                        currentGeoClass->setVisible( (yyvsp[0].intValue) ); 
1870
 
                }
1871
 
    break;
1872
 
 
1873
 
  case 94:
1874
 
#line 471 "src/cfgparser.yy"
1875
 
    { 
1876
 
                int init = 0;
1877
 
#ifndef ELBEEM_BLENDER
1878
 
                if(currentGeometryBox != NULL){ 
1879
 
                        currentGeometryBox->setStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1880
 
#else // ELBEEM_BLENDER
1881
 
#endif // ELBEEM_BLENDER
1882
 
                if(currentGeometrySim != NULL){ 
1883
 
                        currentGeometrySim->setGeoStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1884
 
                if(currentGeometryModel != NULL){ 
1885
 
                        currentGeometryModel->setStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1886
 
                if(!init ){ yyerror("BOXSTART : This property can only be set for box, objmodel, fluid and isosurface objects!"); }
1887
 
        }
1888
 
    break;
1889
 
 
1890
 
  case 95:
1891
 
#line 486 "src/cfgparser.yy"
1892
 
    { 
1893
 
                int init = 0;
1894
 
#ifndef ELBEEM_BLENDER
1895
 
                if(currentGeometryBox != NULL){ 
1896
 
                        currentGeometryBox->setEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1897
 
#else // ELBEEM_BLENDER
1898
 
#endif // ELBEEM_BLENDER
1899
 
                if(currentGeometrySim != NULL){ 
1900
 
                        currentGeometrySim->setGeoEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1901
 
                if(currentGeometryModel != NULL){ 
1902
 
                        currentGeometryModel->setEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; }
1903
 
                if(!init ){ yyerror("BOXEND : This property can only be set for box, objmodel, fluid and isosurface objects!"); }
1904
 
        }
1905
 
    break;
1906
 
 
1907
 
  case 96:
1908
 
#line 502 "src/cfgparser.yy"
1909
 
    { 
1910
 
                        if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("GEO ATTRIBUTES: The attribute was not found!"); }
1911
 
                        currentGeoClass->getAttributeList()->import( attrs[(yyvsp[0].charValue)] ); 
1912
 
                }
1913
 
    break;
1914
 
 
1915
 
  case 97:
1916
 
#line 510 "src/cfgparser.yy"
1917
 
    { }
1918
 
    break;
1919
 
 
1920
 
  case 98:
1921
 
#line 522 "src/cfgparser.yy"
1922
 
    { 
1923
 
                                /* reset geometry object pointers */
1924
 
                                currentMaterial = NULL; 
1925
 
                        }
1926
 
    break;
1927
 
 
1928
 
  case 101:
1929
 
#line 534 "src/cfgparser.yy"
1930
 
    { currentMaterial = new ntlMaterial( );
1931
 
                        currentMaterial = currentMaterial;
1932
 
                        reglob->getMaterials()->push_back(currentMaterial);
1933
 
                }
1934
 
    break;
1935
 
 
1936
 
  case 102:
1937
 
#line 538 "src/cfgparser.yy"
1938
 
    {
1939
 
                yyerror("MATTYPE: Blinn NYI!"); }
1940
 
    break;
1941
 
 
1942
 
  case 113:
1943
 
#line 556 "src/cfgparser.yy"
1944
 
    { 
1945
 
                        currentMaterial->setName( (yyvsp[0].charValue) ); 
1946
 
                }
1947
 
    break;
1948
 
 
1949
 
  case 114:
1950
 
#line 561 "src/cfgparser.yy"
1951
 
    {
1952
 
                        currentMaterial->setAmbientRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); 
1953
 
                }
1954
 
    break;
1955
 
 
1956
 
  case 115:
1957
 
#line 566 "src/cfgparser.yy"
1958
 
    { 
1959
 
                        currentMaterial->setDiffuseRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); 
1960
 
                }
1961
 
    break;
1962
 
 
1963
 
  case 116:
1964
 
#line 571 "src/cfgparser.yy"
1965
 
    { 
1966
 
                        currentMaterial->setSpecular( (yyvsp[-1].floatValue) ); 
1967
 
                        currentMaterial->setSpecExponent( (yyvsp[0].floatValue) ); 
1968
 
                }
1969
 
    break;
1970
 
 
1971
 
  case 117:
1972
 
#line 577 "src/cfgparser.yy"
1973
 
    { 
1974
 
                        currentMaterial->setMirror( (yyvsp[0].floatValue) ); 
1975
 
                }
1976
 
    break;
1977
 
 
1978
 
  case 118:
1979
 
#line 582 "src/cfgparser.yy"
1980
 
    { 
1981
 
                        currentMaterial->setTransparence( (yyvsp[0].floatValue) ); 
1982
 
                }
1983
 
    break;
1984
 
 
1985
 
  case 119:
1986
 
#line 587 "src/cfgparser.yy"
1987
 
    { 
1988
 
                        currentMaterial->setRefracIndex( (yyvsp[0].floatValue) ); 
1989
 
                }
1990
 
    break;
1991
 
 
1992
 
  case 120:
1993
 
#line 592 "src/cfgparser.yy"
1994
 
    { 
1995
 
                        currentMaterial->setTransAdditive( (yyvsp[0].floatValue) ); 
1996
 
                }
1997
 
    break;
1998
 
 
1999
 
  case 121:
2000
 
#line 597 "src/cfgparser.yy"
2001
 
    { 
2002
 
                        currentMaterial->setTransAttCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); 
2003
 
                }
2004
 
    break;
2005
 
 
2006
 
  case 122:
2007
 
#line 602 "src/cfgparser.yy"
2008
 
    {
2009
 
                currentMaterial->setFresnel( (yyvsp[0].intValue) ); 
2010
 
        }
2011
 
    break;
2012
 
 
2013
 
  case 123:
2014
 
#line 613 "src/cfgparser.yy"
2015
 
    { 
2016
 
                currentAttrib = new AttributeList((yyvsp[-1].charValue)); 
2017
 
                currentAttrName = (yyvsp[-1].charValue); }
2018
 
    break;
2019
 
 
2020
 
  case 124:
2021
 
#line 616 "src/cfgparser.yy"
2022
 
    { // store attribute
2023
 
                        //std::cerr << " NEW ATTR " << currentAttrName << std::endl;
2024
 
                        //currentAttrib->print();
2025
 
                        attrs[currentAttrName] = currentAttrib;
2026
 
                        currentAttrib = NULL; }
2027
 
    break;
2028
 
 
2029
 
  case 129:
2030
 
#line 629 "src/cfgparser.yy"
2031
 
    { currentAttrValue.clear(); currentAttribAddName = (yyvsp[-1].charValue); }
2032
 
    break;
2033
 
 
2034
 
  case 130:
2035
 
#line 630 "src/cfgparser.yy"
2036
 
    {
2037
 
      currentAttrib->addAttr( currentAttribAddName, currentAttrValue, lineCount, true); 
2038
 
                        //std::cerr << " ADD ATTRCHANNEL " << currentAttribAddName << std::endl;
2039
 
                        //currentAttrib->find( currentAttribAddName )->print();
2040
 
                }
2041
 
    break;
2042
 
 
2043
 
  case 132:
2044
 
#line 637 "src/cfgparser.yy"
2045
 
    { currentAttrValue.clear(); currentAttribAddName = (yyvsp[-1].charValue); }
2046
 
    break;
2047
 
 
2048
 
  case 133:
2049
 
#line 638 "src/cfgparser.yy"
2050
 
    {
2051
 
      currentAttrib->addAttr( currentAttribAddName, currentAttrValue, lineCount, false); 
2052
 
                        //std::cerr << " ADD ATTRNORM " << currentAttribAddName << std::endl;
2053
 
                        //currentAttrib->find( currentAttribAddName )->print();
2054
 
                }
2055
 
    break;
2056
 
 
2057
 
  case 135:
2058
 
#line 645 "src/cfgparser.yy"
2059
 
    { 
2060
 
                //std::cerr << "LLL "<<$2<<std::endl; // ignore newline entries  
2061
 
                if(strcmp((yyvsp[0].charValue),"\n")) currentAttrValue.push_back((yyvsp[0].charValue)); }
2062
 
    break;
2063
 
 
2064
 
  case 136:
2065
 
#line 648 "src/cfgparser.yy"
2066
 
    {  
2067
 
                //std::cerr << "LRR "<<$1<<std::endl;
2068
 
                if(strcmp((yyvsp[0].charValue),"\n")) currentAttrValue.push_back((yyvsp[0].charValue)); }
2069
 
    break;
2070
 
 
2071
 
  case 138:
2072
 
#line 662 "src/cfgparser.yy"
2073
 
    {
2074
 
  if ( ((yyvsp[0].floatValue) < 0.0) || ((yyvsp[0].floatValue) > 1.0) ) {
2075
 
    yyerror("Value out of range (only 0 to 1 allowed)");
2076
 
  }
2077
 
 
2078
 
  /* pass that value up the tree */
2079
 
  (yyval.floatValue) = (yyvsp[0].floatValue);
2080
 
}
2081
 
    break;
2082
 
 
2083
 
  case 139:
2084
 
#line 674 "src/cfgparser.yy"
2085
 
    { (yyval.floatValue) = (yyvsp[0].floatValue); }
2086
 
    break;
2087
 
 
2088
 
  case 140:
2089
 
#line 676 "src/cfgparser.yy"
2090
 
    { (yyval.floatValue) = (float) (yyvsp[0].intValue); /* conversion from integers */ }
2091
 
    break;
2092
 
 
2093
 
  case 141:
2094
 
#line 682 "src/cfgparser.yy"
2095
 
    {
2096
 
  if ( (yyvsp[0].intValue) <= 0 ) {
2097
 
    yy_error("Value out of range (has to be above zero)");
2098
 
  }
2099
 
 
2100
 
  /* pass that value up the tree */
2101
 
  (yyval.intValue) = (yyvsp[0].intValue);
2102
 
}
2103
 
    break;
2104
 
 
2105
 
  case 142:
2106
 
#line 693 "src/cfgparser.yy"
2107
 
    {
2108
 
  //cout << " " << $1 << " ";
2109
 
  if ( (yyvsp[0].intValue) < 0 ) {
2110
 
    yy_error("Value out of range (has to be above or equal to zero)");
2111
 
  }
2112
 
 
2113
 
  /* pass that value up the tree */
2114
 
  (yyval.intValue) = (yyvsp[0].intValue);
2115
 
}
2116
 
    break;
2117
 
 
2118
 
  case 143:
2119
 
#line 705 "src/cfgparser.yy"
2120
 
    {
2121
 
  if( ( (yyvsp[0].intValue) != 0 ) && ( (yyvsp[0].intValue) != 1 ) ) {
2122
 
    yy_error("Boolean value has to be 1|0, 'true'|'false' or 'on'|'off'!");
2123
 
  }
2124
 
  /* pass that value up the tree */
2125
 
  (yyval.intValue) = (yyvsp[0].intValue);
2126
 
}
2127
 
    break;
2128
 
 
2129
 
 
2130
 
    }
2131
 
 
2132
 
/* Line 1037 of yacc.c.  */
2133
 
#line 2134 "bld-std-gcc/src/cfgparser.cpp"
2134
 
 
2135
 
  yyvsp -= yylen;
2136
 
  yyssp -= yylen;
2137
 
 
2138
 
 
2139
 
  YY_STACK_PRINT (yyss, yyssp);
2140
 
 
2141
 
  *++yyvsp = yyval;
2142
 
 
2143
 
 
2144
 
  /* Now `shift' the result of the reduction.  Determine what state
2145
 
     that goes to, based on the state we popped back to and the rule
2146
 
     number reduced by.  */
2147
 
 
2148
 
  yyn = yyr1[yyn];
2149
 
 
2150
 
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2151
 
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2152
 
    yystate = yytable[yystate];
2153
 
  else
2154
 
    yystate = yydefgoto[yyn - YYNTOKENS];
2155
 
 
2156
 
  goto yynewstate;
2157
 
 
2158
 
 
2159
 
/*------------------------------------.
2160
 
| yyerrlab -- here on detecting error |
2161
 
`------------------------------------*/
2162
 
yyerrlab:
2163
 
  /* If not already recovering from an error, report this error.  */
2164
 
  if (!yyerrstatus)
2165
 
    {
2166
 
      ++yynerrs;
2167
 
#if YYERROR_VERBOSE
2168
 
      yyn = yypact[yystate];
2169
 
 
2170
 
      if (YYPACT_NINF < yyn && yyn < YYLAST)
2171
 
        {
2172
 
          YYSIZE_T yysize = 0;
2173
 
          int yytype = YYTRANSLATE (yychar);
2174
 
          const char* yyprefix;
2175
 
          char *yymsg;
2176
 
          int yyx;
2177
 
 
2178
 
          /* Start YYX at -YYN if negative to avoid negative indexes in
2179
 
             YYCHECK.  */
2180
 
          int yyxbegin = yyn < 0 ? -yyn : 0;
2181
 
 
2182
 
          /* Stay within bounds of both yycheck and yytname.  */
2183
 
          int yychecklim = YYLAST - yyn;
2184
 
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2185
 
          int yycount = 0;
2186
 
 
2187
 
          yyprefix = ", expecting ";
2188
 
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2189
 
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2190
 
              {
2191
 
                yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
2192
 
                yycount += 1;
2193
 
                if (yycount == 5)
2194
 
                  {
2195
 
                    yysize = 0;
2196
 
                    break;
2197
 
                  }
2198
 
              }
2199
 
          yysize += (sizeof ("syntax error, unexpected ")
2200
 
                     + yystrlen (yytname[yytype]));
2201
 
          yymsg = (char *) YYSTACK_ALLOC (yysize);
2202
 
          if (yymsg != 0)
2203
 
            {
2204
 
              char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
2205
 
              yyp = yystpcpy (yyp, yytname[yytype]);
2206
 
 
2207
 
              if (yycount < 5)
2208
 
                {
2209
 
                  yyprefix = ", expecting ";
2210
 
                  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2211
 
                    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2212
 
                      {
2213
 
                        yyp = yystpcpy (yyp, yyprefix);
2214
 
                        yyp = yystpcpy (yyp, yytname[yyx]);
2215
 
                        yyprefix = " or ";
2216
 
                      }
2217
 
                }
2218
 
              yyerror (yymsg);
2219
 
              YYSTACK_FREE (yymsg);
2220
 
            }
2221
 
          else
2222
 
            yyerror ("syntax error; also virtual memory exhausted");
2223
 
        }
2224
 
      else
2225
 
#endif /* YYERROR_VERBOSE */
2226
 
        yyerror ("syntax error");
2227
 
    }
2228
 
 
2229
 
 
2230
 
 
2231
 
  if (yyerrstatus == 3)
2232
 
    {
2233
 
      /* If just tried and failed to reuse look-ahead token after an
2234
 
         error, discard it.  */
2235
 
 
2236
 
      if (yychar <= YYEOF)
2237
 
        {
2238
 
          /* If at end of input, pop the error token,
2239
 
             then the rest of the stack, then return failure.  */
2240
 
          if (yychar == YYEOF)
2241
 
             for (;;)
2242
 
               {
2243
 
 
2244
 
                 YYPOPSTACK;
2245
 
                 if (yyssp == yyss)
2246
 
                   YYABORT;
2247
 
                 yydestruct ("Error: popping",
2248
 
                             yystos[*yyssp], yyvsp);
2249
 
               }
2250
 
        }
2251
 
      else
2252
 
        {
2253
 
          yydestruct ("Error: discarding", yytoken, &yylval);
2254
 
          yychar = YYEMPTY;
2255
 
        }
2256
 
    }
2257
 
 
2258
 
  /* Else will try to reuse look-ahead token after shifting the error
2259
 
     token.  */
2260
 
  goto yyerrlab1;
2261
 
 
2262
 
 
2263
 
/*---------------------------------------------------.
2264
 
| yyerrorlab -- error raised explicitly by YYERROR.  |
2265
 
`---------------------------------------------------*/
2266
 
yyerrorlab:
2267
 
 
2268
 
#ifdef __GNUC__
2269
 
  /* Pacify GCC when the user code never invokes YYERROR and the label
2270
 
     yyerrorlab therefore never appears in user code.  */
2271
 
  if (0)
2272
 
     goto yyerrorlab;
2273
 
#endif
2274
 
 
2275
 
yyvsp -= yylen;
2276
 
  yyssp -= yylen;
2277
 
  yystate = *yyssp;
2278
 
  goto yyerrlab1;
2279
 
 
2280
 
 
2281
 
/*-------------------------------------------------------------.
2282
 
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
2283
 
`-------------------------------------------------------------*/
2284
 
yyerrlab1:
2285
 
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2286
 
 
2287
 
  for (;;)
2288
 
    {
2289
 
      yyn = yypact[yystate];
2290
 
      if (yyn != YYPACT_NINF)
2291
 
        {
2292
 
          yyn += YYTERROR;
2293
 
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2294
 
            {
2295
 
              yyn = yytable[yyn];
2296
 
              if (0 < yyn)
2297
 
                break;
2298
 
            }
2299
 
        }
2300
 
 
2301
 
      /* Pop the current state because it cannot handle the error token.  */
2302
 
      if (yyssp == yyss)
2303
 
        YYABORT;
2304
 
 
2305
 
 
2306
 
      yydestruct ("Error: popping", yystos[yystate], yyvsp);
2307
 
      YYPOPSTACK;
2308
 
      yystate = *yyssp;
2309
 
      YY_STACK_PRINT (yyss, yyssp);
2310
 
    }
2311
 
 
2312
 
  if (yyn == YYFINAL)
2313
 
    YYACCEPT;
2314
 
 
2315
 
  *++yyvsp = yylval;
2316
 
 
2317
 
 
2318
 
  /* Shift the error token. */
2319
 
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2320
 
 
2321
 
  yystate = yyn;
2322
 
  goto yynewstate;
2323
 
 
2324
 
 
2325
 
/*-------------------------------------.
2326
 
| yyacceptlab -- YYACCEPT comes here.  |
2327
 
`-------------------------------------*/
2328
 
yyacceptlab:
2329
 
  yyresult = 0;
2330
 
  goto yyreturn;
2331
 
 
2332
 
/*-----------------------------------.
2333
 
| yyabortlab -- YYABORT comes here.  |
2334
 
`-----------------------------------*/
2335
 
yyabortlab:
2336
 
  yydestruct ("Error: discarding lookahead",
2337
 
              yytoken, &yylval);
2338
 
  yychar = YYEMPTY;
2339
 
  yyresult = 1;
2340
 
  goto yyreturn;
2341
 
 
2342
 
#ifndef yyoverflow
2343
 
/*----------------------------------------------.
2344
 
| yyoverflowlab -- parser overflow comes here.  |
2345
 
`----------------------------------------------*/
2346
 
yyoverflowlab:
2347
 
  yyerror ("parser stack overflow");
2348
 
  yyresult = 2;
2349
 
  /* Fall through.  */
2350
 
#endif
2351
 
 
2352
 
yyreturn:
2353
 
#ifndef yyoverflow
2354
 
  if (yyss != yyssa)
2355
 
    YYSTACK_FREE (yyss);
2356
 
#endif
2357
 
  return yyresult;
2358
 
}
2359
 
 
2360
 
 
2361
 
#line 713 "src/cfgparser.yy"
2362
 
 
2363
 
 
2364
 
/*---------------------------------------------------------------------------*/
2365
 
/* parser functions                                                          */
2366
 
/*---------------------------------------------------------------------------*/
2367
 
 
2368
 
 
2369
 
/* parse warnings */
2370
 
void yy_warn(char *s)
2371
 
{
2372
 
        debMsgStd("yy_warn",DM_WARNING,"Config Parse Warning at Line :"<<lineCount<<" '"<<s<<"' ",1);
2373
 
}
2374
 
 
2375
 
/* parse errors */
2376
 
void yy_error(const char *s)
2377
 
{
2378
 
        //errorOut("Current token: "<<yytname[ (int)yytranslate[yychar] ]);
2379
 
        errFatal("yy_error","Config Parse Error at Line "<<lineCount<<": "<<s,SIMWORLD_INITERROR);
2380
 
        return;
2381
 
}
2382
 
 
2383
 
 
2384
 
/* get the global pointers from calling program */
2385
 
char pointersInited = 0;
2386
 
void setPointers(ntlRenderGlobals *setglob) 
2387
 
{
2388
 
        if(
2389
 
                 (!setglob) ||
2390
 
                 (!setglob) 
2391
 
                 ) {
2392
 
                errFatal("setPointers","Config Parse Error: Invalid Pointers!\n",SIMWORLD_INITERROR);
2393
 
                return;
2394
 
        }      
2395
 
        
2396
 
        reglob = setglob;
2397
 
        pointersInited = 1;
2398
 
}
2399
 
 
2400
 
  
2401
 
/* parse given file as config file */
2402
 
void parseFile(string filename)
2403
 
{
2404
 
        if(!pointersInited) {
2405
 
                errFatal("parseFile","Config Parse Error: Pointers not set!\n", SIMWORLD_INITERROR);
2406
 
                return;
2407
 
        }
2408
 
        
2409
 
        /* open file */
2410
 
        yy_in = fopen( filename.c_str(), "r");
2411
 
        if(!yy_in) {
2412
 
                errFatal("parseFile","Config Parse Error: Unable to open '"<<filename.c_str() <<"'!\n", SIMWORLD_INITERROR );
2413
 
                return;
2414
 
        }
2415
 
 
2416
 
        /* parse */
2417
 
        //yy_debug = 1; /* Enable debugging? */
2418
 
        yy_parse();
2419
 
        
2420
 
        /* close file */
2421
 
        fclose( yy_in );
2422
 
        // cleanup static map<string,AttributeList*> attrs
2423
 
        for(map<string, AttributeList*>::iterator i=attrs.begin();
2424
 
                        i != attrs.end(); i++) {
2425
 
                if((*i).second) {
2426
 
                        delete (*i).second;
2427
 
                        (*i).second = NULL;
2428
 
                }
2429
 
        }
2430
 
}
2431
 
 
2432
 
 
2433
 
 
2434