1
/* A Bison parser, made by GNU Bison 2.0. */
3
/* Skeleton parser for Yacc-like parsing with Bison,
4
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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)
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.
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. */
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. */
26
/* Written by Richard Stallman by simplifying the original so called
27
``semantic'' parser. */
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. */
36
/* Identify Bison output. */
40
#define YYSKELETON_NAME "yacc.c"
45
/* Using locations. */
46
#define YYLSP_NEEDED 0
48
/* Substitute the variable and function names. */
49
#define yyparse yy_parse
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
61
/* Put the tokens into the symbol table, so that GDB and other debuggers
71
KW_ANIFRAMETIME = 265,
77
KW_P_SOUNDSPEED = 271,
78
KW_P_DOMAINSIZE = 272,
80
KW_P_TIMELENGTH = 274,
82
KW_P_TIMEFACTOR = 276,
83
KW_P_ANIFRAMETIME = 277,
85
KW_P_SURFACETENSION = 279,
87
KW_P_DEACTIVATE = 281,
92
KW_PARTLINELENGTH = 286,
94
KW_FRAMESPERSEC = 288,
100
KW_MAXRAYDEPTH = 294,
101
KW_CAUSTICDIST = 295,
102
KW_CAUSTICPHOT = 296,
103
KW_SHADOWMAPBIAS = 297,
104
KW_TREEMAXDEPTH = 298,
105
KW_TREEMAXTRIANGLES = 299,
121
KW_BLENDERATTR = 315,
123
KW_ATTRCHANNEL = 317,
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,
140
KW_NUMVERTICES = 334,
142
KW_NUMPOLYGONS = 336,
147
KW_MATTYPE_PHONG = 341,
148
KW_MATTYPE_BLINN = 342,
154
KW_TRANSPARENCE = 348,
155
KW_REFRACINDEX = 349,
156
KW_TRANSADDITIVE = 350,
157
KW_TRANSATTCOL = 351,
164
KW_CAUSTICPHOTONS = 358,
165
KW_CAUSTICSTRENGTH = 359,
170
#define DT_INTEGER 258
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
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
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
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
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
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
278
/* Copy the first part of user declarations. */
279
#line 14 "src/cfgparser.yy"
284
/* library functions */
288
#include "attributes.h"
290
void yy_warn(char *s);
291
void yy_error(const char *s);
293
/* imported from flex... */
295
extern int lineCount;
298
/* the parse function from bison */
299
int yy_parse( void );
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
307
#include "parametrizer.h"
308
#include "ntl_renderglobals.h"
309
#include "ntl_scene.h"
311
#include "ntl_lightobject.h"
312
#include "ntl_material.h"
313
#include "ntl_geometrymodel.h"
316
/* global variables */
317
static map<string,AttributeList*> attrs; /* global attribute storage */
318
vector<string> currentAttrValue; /* build string vector */
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 */
324
/* light initialization checks */
325
ntlLightObject *currentLight;
326
ntlLightObject *currentLightOmni;
328
/* geometry initialization checks */
329
ntlGeometryClass *currentGeoClass;
330
ntlGeometryObject *currentGeoObj;
331
SimulationObject *currentGeometrySim;
332
ntlGeometryObjModel *currentGeometryModel;
333
AttributeList *currentAttrib;
334
string currentAttrName, currentAttribAddName;
336
#ifndef ELBEEM_BLENDER
337
#include "ntl_geometrybox.h"
338
#include "ntl_geometrysphere.h"
339
ntlGeometryBox *currentGeometryBox;
340
#endif //ELBEEM_BLENDER
342
/* material init checks */
343
ntlMaterial *currentMaterial;
347
/* Enabling traces. */
352
/* Enabling verbose error messages. */
353
#ifdef YYERROR_VERBOSE
354
# undef YYERROR_VERBOSE
355
# define YYERROR_VERBOSE 1
357
# define YYERROR_VERBOSE 0
360
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
361
#line 87 "src/cfgparser.yy"
362
typedef union 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
376
/* Copy the second part of user declarations. */
379
/* Line 213 of yacc.c. */
380
#line 381 "bld-std-gcc/src/cfgparser.cpp"
382
#if ! defined (yyoverflow) || YYERROR_VERBOSE
388
# define YYMALLOC malloc
391
/* The parser invokes alloca or malloc; define the necessary symbols. */
393
# ifdef YYSTACK_USE_ALLOCA
394
# if YYSTACK_USE_ALLOCA
396
# define YYSTACK_ALLOC __builtin_alloca
398
# define YYSTACK_ALLOC alloca
403
# ifdef YYSTACK_ALLOC
404
/* Pacify GCC's `empty if-body' warning. */
405
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
407
# if defined (__STDC__) || defined (__cplusplus)
408
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
409
# define YYSIZE_T size_t
411
# define YYSTACK_ALLOC YYMALLOC
412
# define YYSTACK_FREE YYFREE
414
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
417
#if (! defined (yyoverflow) \
418
&& (! defined (__cplusplus) \
419
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
421
/* A type that is properly aligned for any stack member. */
428
/* The size of the maximum gap between one aligned stack and the next. */
429
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
431
/* The size of an array large to enough to hold all stacks, each with
433
# define YYSTACK_BYTES(N) \
434
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
435
+ YYSTACK_GAP_MAXIMUM)
437
/* Copy COUNT objects from FROM to TO. The source and destination do
440
# if defined (__GNUC__) && 1 < __GNUC__
441
# define YYCOPY(To, From, Count) \
442
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
444
# define YYCOPY(To, From, Count) \
447
register YYSIZE_T yyi; \
448
for (yyi = 0; yyi < (Count); yyi++) \
449
(To)[yyi] = (From)[yyi]; \
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
460
# define YYSTACK_RELOCATE(Stack) \
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); \
473
#if defined (__STDC__) || defined (__cplusplus)
474
typedef signed char yysigned_char;
476
typedef short int yysigned_char;
479
/* YYFINAL -- State number of the termination state. */
481
/* YYLAST -- Last index in YYTABLE. */
484
/* YYNTOKENS -- Number of terminals. */
485
#define YYNTOKENS 107
486
/* YYNNTS -- Number of nonterminals. */
488
/* YYNRULES -- Number of rules. */
490
/* YYNRULES -- Number of states. */
491
#define YYNSTATES 249
493
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
495
#define YYMAXUTOK 361
497
#define YYTRANSLATE(YYX) \
498
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
500
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
501
static const unsigned char yytranslate[] =
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,
543
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
545
static const unsigned short int yyprhs[] =
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,
564
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
565
static const short int yyrhs[] =
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
609
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
610
static const unsigned short int yyrline[] =
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,
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[] =
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
696
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
698
static const unsigned short int yytoknum[] =
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
714
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
715
static const unsigned char yyr1[] =
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,
734
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
735
static const unsigned char yyr2[] =
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,
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[] =
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
786
/* YYDEFGOTO[NTERM-NUM]. */
787
static const short int yydefgoto[] =
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,
800
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
802
#define YYPACT_NINF -123
803
static const short int yypact[] =
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
832
/* YYPGOTO[NTERM-NUM]. */
833
static const short int yypgoto[] =
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,
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[] =
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
884
static const short int yycheck[] =
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
917
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
918
symbol of state STATE-NUM. */
919
static const unsigned char yystos[] =
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
948
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
949
# define YYSIZE_T __SIZE_TYPE__
951
#if ! defined (YYSIZE_T) && defined (size_t)
952
# define YYSIZE_T size_t
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
960
#if ! defined (YYSIZE_T)
961
# define YYSIZE_T unsigned int
964
#define yyerrok (yyerrstatus = 0)
965
#define yyclearin (yychar = YYEMPTY)
969
#define YYACCEPT goto yyacceptlab
970
#define YYABORT goto yyabortlab
971
#define YYERROR goto yyerrorlab
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. */
978
#define YYFAIL goto yyerrlab
980
#define YYRECOVERING() (!!yyerrstatus)
982
#define YYBACKUP(Token, Value) \
984
if (yychar == YYEMPTY && yylen == 1) \
988
yytoken = YYTRANSLATE (yychar); \
994
yyerror ("syntax error: cannot back up");\
1001
#define YYERRCODE 256
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). */
1008
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1009
#ifndef YYLLOC_DEFAULT
1010
# define YYLLOC_DEFAULT(Current, Rhs, N) \
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; \
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; \
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. */
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)
1041
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1046
/* YYLEX -- calling `yylex' with the right arguments. */
1049
# define YYLEX yylex (YYLEX_PARAM)
1051
# define YYLEX yylex ()
1054
/* Enable debugging if requested. */
1058
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1059
# define YYFPRINTF fprintf
1062
# define YYDPRINTF(Args) \
1068
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1072
YYFPRINTF (stderr, "%s ", Title); \
1073
yysymprint (stderr, \
1075
YYFPRINTF (stderr, "\n"); \
1079
/*------------------------------------------------------------------.
1080
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1082
`------------------------------------------------------------------*/
1084
#if defined (__STDC__) || defined (__cplusplus)
1086
yy_stack_print (short int *bottom, short int *top)
1089
yy_stack_print (bottom, top)
1094
YYFPRINTF (stderr, "Stack now");
1095
for (/* Nothing. */; bottom <= top; ++bottom)
1096
YYFPRINTF (stderr, " %d", *bottom);
1097
YYFPRINTF (stderr, "\n");
1100
# define YY_STACK_PRINT(Bottom, Top) \
1103
yy_stack_print ((Bottom), (Top)); \
1107
/*------------------------------------------------.
1108
| Report that the YYRULE is going to be reduced. |
1109
`------------------------------------------------*/
1111
#if defined (__STDC__) || defined (__cplusplus)
1113
yy_reduce_print (int yyrule)
1116
yy_reduce_print (yyrule)
1121
unsigned int yylno = yyrline[yyrule];
1122
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
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]]);
1130
# define YY_REDUCE_PRINT(Rule) \
1133
yy_reduce_print (Rule); \
1136
/* Nonzero means print parse trace. It is left uninitialized so that
1137
multiple parsers can coexist. */
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 */
1147
/* YYINITDEPTH -- initial size of the parser's stacks. */
1149
# define YYINITDEPTH 200
1152
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1153
if the built-in stack extension method is used).
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. */
1160
# define YYMAXDEPTH 10000
1168
# if defined (__GLIBC__) && defined (_STRING_H)
1169
# define yystrlen strlen
1171
/* Return the length of YYSTR. */
1173
# if defined (__STDC__) || defined (__cplusplus)
1174
yystrlen (const char *yystr)
1180
register const char *yys = yystr;
1182
while (*yys++ != '\0')
1185
return yys - yystr - 1;
1191
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1192
# define yystpcpy stpcpy
1194
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1197
# if defined (__STDC__) || defined (__cplusplus)
1198
yystpcpy (char *yydest, const char *yysrc)
1200
yystpcpy (yydest, yysrc)
1205
register char *yyd = yydest;
1206
register const char *yys = yysrc;
1208
while ((*yyd++ = *yys++) != '\0')
1216
#endif /* !YYERROR_VERBOSE */
1221
/*--------------------------------.
1222
| Print this symbol on YYOUTPUT. |
1223
`--------------------------------*/
1225
#if defined (__STDC__) || defined (__cplusplus)
1227
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1230
yysymprint (yyoutput, yytype, yyvaluep)
1236
/* Pacify ``unused variable'' warnings. */
1239
if (yytype < YYNTOKENS)
1240
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1242
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1246
if (yytype < YYNTOKENS)
1247
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1254
YYFPRINTF (yyoutput, ")");
1257
#endif /* ! YYDEBUG */
1258
/*-----------------------------------------------.
1259
| Release the memory associated to this symbol. |
1260
`-----------------------------------------------*/
1262
#if defined (__STDC__) || defined (__cplusplus)
1264
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1267
yydestruct (yymsg, yytype, yyvaluep)
1273
/* Pacify ``unused variable'' warnings. */
1278
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1289
/* Prevent warnings from -Wmissing-prototypes. */
1291
#ifdef YYPARSE_PARAM
1292
# if defined (__STDC__) || defined (__cplusplus)
1293
int yyparse (void *YYPARSE_PARAM);
1297
#else /* ! YYPARSE_PARAM */
1298
#if defined (__STDC__) || defined (__cplusplus)
1303
#endif /* ! YYPARSE_PARAM */
1307
/* The look-ahead symbol. */
1310
/* The semantic value of the look-ahead symbol. */
1313
/* Number of syntax errors so far. */
1322
#ifdef YYPARSE_PARAM
1323
# if defined (__STDC__) || defined (__cplusplus)
1324
int yyparse (void *YYPARSE_PARAM)
1326
int yyparse (YYPARSE_PARAM)
1327
void *YYPARSE_PARAM;
1329
#else /* ! YYPARSE_PARAM */
1330
#if defined (__STDC__) || defined (__cplusplus)
1341
register int yystate;
1344
/* Number of tokens to shift before error messages enabled. */
1346
/* Look-ahead token as an internal (translated) token number. */
1349
/* Three stacks and their tools:
1350
`yyss': related to states,
1351
`yyvs': related to semantic values,
1352
`yyls': related to locations.
1354
Refer to the stacks thru separate pointers, to allow yyoverflow
1355
to reallocate them elsewhere. */
1357
/* The state stack. */
1358
short int yyssa[YYINITDEPTH];
1359
short int *yyss = yyssa;
1360
register short int *yyssp;
1362
/* The semantic value stack. */
1363
YYSTYPE yyvsa[YYINITDEPTH];
1364
YYSTYPE *yyvs = yyvsa;
1365
register YYSTYPE *yyvsp;
1369
#define YYPOPSTACK (yyvsp--, yyssp--)
1371
YYSIZE_T yystacksize = YYINITDEPTH;
1373
/* The variables used to return semantic value and location from the
1378
/* When reducing, the number of symbols on the RHS of the reduced
1382
YYDPRINTF ((stderr, "Starting parse\n"));
1387
yychar = YYEMPTY; /* Cause a token to be read. */
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. */
1402
/*------------------------------------------------------------.
1403
| yynewstate -- Push a new state, which is found in yystate. |
1404
`------------------------------------------------------------*/
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.
1414
if (yyss + yystacksize - 1 <= yyssp)
1416
/* Get the current used size of the three stacks, in elements. */
1417
YYSIZE_T yysize = yyssp - yyss + 1;
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
1424
YYSTYPE *yyvs1 = yyvs;
1425
short int *yyss1 = yyss;
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),
1441
#else /* no yyoverflow */
1442
# ifndef YYSTACK_RELOCATE
1445
/* Extend the stack our own way. */
1446
if (YYMAXDEPTH <= yystacksize)
1449
if (YYMAXDEPTH < yystacksize)
1450
yystacksize = YYMAXDEPTH;
1453
short int *yyss1 = yyss;
1454
union yyalloc *yyptr =
1455
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1458
YYSTACK_RELOCATE (yyss);
1459
YYSTACK_RELOCATE (yyvs);
1461
# undef YYSTACK_RELOCATE
1463
YYSTACK_FREE (yyss1);
1466
#endif /* no yyoverflow */
1468
yyssp = yyss + yysize - 1;
1469
yyvsp = yyvs + yysize - 1;
1472
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1473
(unsigned long int) yystacksize));
1475
if (yyss + yystacksize - 1 <= yyssp)
1479
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1488
/* Do appropriate processing given the current state. */
1489
/* Read a look-ahead token if we need one and don't already have one. */
1492
/* First try to decide what to do without reference to look-ahead token. */
1494
yyn = yypact[yystate];
1495
if (yyn == YYPACT_NINF)
1498
/* Not known => get a look-ahead token if don't already have one. */
1500
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1501
if (yychar == YYEMPTY)
1503
YYDPRINTF ((stderr, "Reading a token: "));
1507
if (yychar <= YYEOF)
1509
yychar = yytoken = YYEOF;
1510
YYDPRINTF ((stderr, "Now at end of input.\n"));
1514
yytoken = YYTRANSLATE (yychar);
1515
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1518
/* If the proper action on seeing token YYTOKEN is to reduce or to
1519
detect an error, take that action. */
1521
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1526
if (yyn == 0 || yyn == YYTABLE_NINF)
1535
/* Shift the look-ahead token. */
1536
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1538
/* Discard the token being shifted unless it is eof. */
1539
if (yychar != YYEOF)
1545
/* Count tokens shifted since error; after three, turn off error
1554
/*-----------------------------------------------------------.
1555
| yydefault -- do the default action for the current state. |
1556
`-----------------------------------------------------------*/
1558
yyn = yydefact[yystate];
1564
/*-----------------------------.
1565
| yyreduce -- Do a reduction. |
1566
`-----------------------------*/
1568
/* yyn is the number of a rule to reduce with. */
1571
/* If YYLEN is nonzero, implement the default value of the action:
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];
1582
YY_REDUCE_PRINT (yyn);
1586
#line 157 "src/cfgparser.yy"
1587
{ yy_debug = (yyvsp[0].intValue); }
1591
#line 160 "src/cfgparser.yy"
1593
int sdebug = (yyvsp[0].intValue);
1594
if(sdebug<0) sdebug=0;
1595
if(sdebug>10) sdebug=10;
1596
gDebugLevel = sdebug;
1601
#line 211 "src/cfgparser.yy"
1602
{ reglob->setAniStart( (yyvsp[0].intValue) ); }
1606
#line 215 "src/cfgparser.yy"
1607
{ /*reglob->setAniFrameTime( $2 );*/ debMsgStd("cfgparser",DM_NOTIFY,"Deprecated setting aniframetime!",1); }
1611
#line 220 "src/cfgparser.yy"
1612
{ reglob->setAniFrames( ((yyvsp[0].intValue))-1 ); }
1616
#line 224 "src/cfgparser.yy"
1617
{ reglob->setFrameSkip( ((yyvsp[0].intValue)) ); }
1621
#line 230 "src/cfgparser.yy"
1622
{ reglob->setResX( (yyvsp[-1].intValue) ); reglob->setResY( (yyvsp[0].intValue)); }
1626
#line 234 "src/cfgparser.yy"
1627
{ reglob->setAADepth( (yyvsp[0].intValue) ); }
1631
#line 238 "src/cfgparser.yy"
1632
{ reglob->setEye( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1636
#line 242 "src/cfgparser.yy"
1637
{ reglob->setLookat( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1641
#line 246 "src/cfgparser.yy"
1642
{ reglob->setUpVec( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1646
#line 250 "src/cfgparser.yy"
1647
{ reglob->setFovy( (yyvsp[0].floatValue) ); }
1651
#line 254 "src/cfgparser.yy"
1652
{ reglob->setAspect( (yyvsp[0].floatValue) ); }
1656
#line 258 "src/cfgparser.yy"
1657
{ reglob->setAmbientLight( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1661
#line 262 "src/cfgparser.yy"
1662
{ reglob->setBackgroundCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); }
1666
#line 266 "src/cfgparser.yy"
1667
{ reglob->setOutFilename( (yyvsp[0].charValue) ); }
1671
#line 270 "src/cfgparser.yy"
1672
{ reglob->setTreeMaxDepth( (yyvsp[0].intValue) ); }
1676
#line 274 "src/cfgparser.yy"
1677
{ reglob->setTreeMaxTriangles( (yyvsp[0].intValue) ); }
1681
#line 278 "src/cfgparser.yy"
1682
{ reglob->setRayMaxDepth( (yyvsp[0].intValue) ); }
1686
#line 282 "src/cfgparser.yy"
1687
{ reglob->setDebugPixel( (yyvsp[-1].intValue), (yyvsp[0].intValue) ); }
1691
#line 286 "src/cfgparser.yy"
1692
{ reglob->setTestMode( (yyvsp[0].intValue) ); }
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)] ); }
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)] ); }
1708
#line 307 "src/cfgparser.yy"
1710
/* reset light pointers */
1711
currentLightOmni = NULL;
1716
#line 319 "src/cfgparser.yy"
1717
{ currentLightOmni = new ntlLightObject( reglob );
1718
currentLight = currentLightOmni;
1719
reglob->getLightList()->push_back(currentLight);
1724
#line 333 "src/cfgparser.yy"
1726
currentLight->setActive( (yyvsp[0].intValue) );
1731
#line 338 "src/cfgparser.yy"
1733
currentLight->setCastShadows( (yyvsp[0].intValue) );
1738
#line 343 "src/cfgparser.yy"
1740
currentLight->setColor( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) );
1745
#line 348 "src/cfgparser.yy"
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!");
1755
#line 366 "src/cfgparser.yy"
1757
// geo classes have attributes...
1758
reglob->getScene()->addGeoClass(currentGeoClass);
1759
currentAttrib = currentGeoClass->getAttributeList();
1764
#line 372 "src/cfgparser.yy"
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
1779
#line 390 "src/cfgparser.yy"
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
1792
#line 399 "src/cfgparser.yy"
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
1804
#line 407 "src/cfgparser.yy"
1806
currentGeometryModel = new ntlGeometryObjModel( );
1807
currentGeoClass = currentGeometryModel;
1808
currentGeoObj = (ntlGeometryObject*)( currentGeometryModel );
1813
#line 412 "src/cfgparser.yy"
1815
currentGeometrySim = new SimulationObject();
1816
currentGeoClass = currentGeometrySim;
1817
reglob->getSims()->push_back(currentGeometrySim);
1818
// dont add mcubes to geo list!
1823
#line 418 "src/cfgparser.yy"
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
1836
#line 443 "src/cfgparser.yy"
1838
currentGeoClass->setName( (yyvsp[0].charValue) );
1843
#line 448 "src/cfgparser.yy"
1845
if(currentGeoObj == NULL){ yyerror(" MATERIAL : This property can only be set for geometry objects!"); }
1846
currentGeoObj->setMaterialName( (yyvsp[0].charValue) );
1851
#line 454 "src/cfgparser.yy"
1853
if(currentGeoObj == NULL){ yyerror(" CAST_SHADOW : This property can only be set for geometry objects!"); }
1854
currentGeoObj->setCastShadows( (yyvsp[0].intValue) );
1859
#line 460 "src/cfgparser.yy"
1861
if(currentGeoObj == NULL){ yyerror(" RECEIVE_SHADOW : This property can only be set for geometry objects!"); }
1862
currentGeoObj->setReceiveShadows( (yyvsp[0].intValue) );
1867
#line 466 "src/cfgparser.yy"
1869
currentGeoClass->setVisible( (yyvsp[0].intValue) );
1874
#line 471 "src/cfgparser.yy"
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!"); }
1891
#line 486 "src/cfgparser.yy"
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!"); }
1908
#line 502 "src/cfgparser.yy"
1910
if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("GEO ATTRIBUTES: The attribute was not found!"); }
1911
currentGeoClass->getAttributeList()->import( attrs[(yyvsp[0].charValue)] );
1916
#line 510 "src/cfgparser.yy"
1921
#line 522 "src/cfgparser.yy"
1923
/* reset geometry object pointers */
1924
currentMaterial = NULL;
1929
#line 534 "src/cfgparser.yy"
1930
{ currentMaterial = new ntlMaterial( );
1931
currentMaterial = currentMaterial;
1932
reglob->getMaterials()->push_back(currentMaterial);
1937
#line 538 "src/cfgparser.yy"
1939
yyerror("MATTYPE: Blinn NYI!"); }
1943
#line 556 "src/cfgparser.yy"
1945
currentMaterial->setName( (yyvsp[0].charValue) );
1950
#line 561 "src/cfgparser.yy"
1952
currentMaterial->setAmbientRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) );
1957
#line 566 "src/cfgparser.yy"
1959
currentMaterial->setDiffuseRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) );
1964
#line 571 "src/cfgparser.yy"
1966
currentMaterial->setSpecular( (yyvsp[-1].floatValue) );
1967
currentMaterial->setSpecExponent( (yyvsp[0].floatValue) );
1972
#line 577 "src/cfgparser.yy"
1974
currentMaterial->setMirror( (yyvsp[0].floatValue) );
1979
#line 582 "src/cfgparser.yy"
1981
currentMaterial->setTransparence( (yyvsp[0].floatValue) );
1986
#line 587 "src/cfgparser.yy"
1988
currentMaterial->setRefracIndex( (yyvsp[0].floatValue) );
1993
#line 592 "src/cfgparser.yy"
1995
currentMaterial->setTransAdditive( (yyvsp[0].floatValue) );
2000
#line 597 "src/cfgparser.yy"
2002
currentMaterial->setTransAttCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) );
2007
#line 602 "src/cfgparser.yy"
2009
currentMaterial->setFresnel( (yyvsp[0].intValue) );
2014
#line 613 "src/cfgparser.yy"
2016
currentAttrib = new AttributeList((yyvsp[-1].charValue));
2017
currentAttrName = (yyvsp[-1].charValue); }
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; }
2030
#line 629 "src/cfgparser.yy"
2031
{ currentAttrValue.clear(); currentAttribAddName = (yyvsp[-1].charValue); }
2035
#line 630 "src/cfgparser.yy"
2037
currentAttrib->addAttr( currentAttribAddName, currentAttrValue, lineCount, true);
2038
//std::cerr << " ADD ATTRCHANNEL " << currentAttribAddName << std::endl;
2039
//currentAttrib->find( currentAttribAddName )->print();
2044
#line 637 "src/cfgparser.yy"
2045
{ currentAttrValue.clear(); currentAttribAddName = (yyvsp[-1].charValue); }
2049
#line 638 "src/cfgparser.yy"
2051
currentAttrib->addAttr( currentAttribAddName, currentAttrValue, lineCount, false);
2052
//std::cerr << " ADD ATTRNORM " << currentAttribAddName << std::endl;
2053
//currentAttrib->find( currentAttribAddName )->print();
2058
#line 645 "src/cfgparser.yy"
2060
//std::cerr << "LLL "<<$2<<std::endl; // ignore newline entries
2061
if(strcmp((yyvsp[0].charValue),"\n")) currentAttrValue.push_back((yyvsp[0].charValue)); }
2065
#line 648 "src/cfgparser.yy"
2067
//std::cerr << "LRR "<<$1<<std::endl;
2068
if(strcmp((yyvsp[0].charValue),"\n")) currentAttrValue.push_back((yyvsp[0].charValue)); }
2072
#line 662 "src/cfgparser.yy"
2074
if ( ((yyvsp[0].floatValue) < 0.0) || ((yyvsp[0].floatValue) > 1.0) ) {
2075
yyerror("Value out of range (only 0 to 1 allowed)");
2078
/* pass that value up the tree */
2079
(yyval.floatValue) = (yyvsp[0].floatValue);
2084
#line 674 "src/cfgparser.yy"
2085
{ (yyval.floatValue) = (yyvsp[0].floatValue); }
2089
#line 676 "src/cfgparser.yy"
2090
{ (yyval.floatValue) = (float) (yyvsp[0].intValue); /* conversion from integers */ }
2094
#line 682 "src/cfgparser.yy"
2096
if ( (yyvsp[0].intValue) <= 0 ) {
2097
yy_error("Value out of range (has to be above zero)");
2100
/* pass that value up the tree */
2101
(yyval.intValue) = (yyvsp[0].intValue);
2106
#line 693 "src/cfgparser.yy"
2108
//cout << " " << $1 << " ";
2109
if ( (yyvsp[0].intValue) < 0 ) {
2110
yy_error("Value out of range (has to be above or equal to zero)");
2113
/* pass that value up the tree */
2114
(yyval.intValue) = (yyvsp[0].intValue);
2119
#line 705 "src/cfgparser.yy"
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'!");
2124
/* pass that value up the tree */
2125
(yyval.intValue) = (yyvsp[0].intValue);
2132
/* Line 1037 of yacc.c. */
2133
#line 2134 "bld-std-gcc/src/cfgparser.cpp"
2139
YY_STACK_PRINT (yyss, yyssp);
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. */
2150
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2151
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2152
yystate = yytable[yystate];
2154
yystate = yydefgoto[yyn - YYNTOKENS];
2159
/*------------------------------------.
2160
| yyerrlab -- here on detecting error |
2161
`------------------------------------*/
2163
/* If not already recovering from an error, report this error. */
2168
yyn = yypact[yystate];
2170
if (YYPACT_NINF < yyn && yyn < YYLAST)
2172
YYSIZE_T yysize = 0;
2173
int yytype = YYTRANSLATE (yychar);
2174
const char* yyprefix;
2178
/* Start YYX at -YYN if negative to avoid negative indexes in
2180
int yyxbegin = yyn < 0 ? -yyn : 0;
2182
/* Stay within bounds of both yycheck and yytname. */
2183
int yychecklim = YYLAST - yyn;
2184
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2187
yyprefix = ", expecting ";
2188
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2189
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2191
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
2199
yysize += (sizeof ("syntax error, unexpected ")
2200
+ yystrlen (yytname[yytype]));
2201
yymsg = (char *) YYSTACK_ALLOC (yysize);
2204
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
2205
yyp = yystpcpy (yyp, yytname[yytype]);
2209
yyprefix = ", expecting ";
2210
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2211
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2213
yyp = yystpcpy (yyp, yyprefix);
2214
yyp = yystpcpy (yyp, yytname[yyx]);
2219
YYSTACK_FREE (yymsg);
2222
yyerror ("syntax error; also virtual memory exhausted");
2225
#endif /* YYERROR_VERBOSE */
2226
yyerror ("syntax error");
2231
if (yyerrstatus == 3)
2233
/* If just tried and failed to reuse look-ahead token after an
2234
error, discard it. */
2236
if (yychar <= YYEOF)
2238
/* If at end of input, pop the error token,
2239
then the rest of the stack, then return failure. */
2240
if (yychar == YYEOF)
2247
yydestruct ("Error: popping",
2248
yystos[*yyssp], yyvsp);
2253
yydestruct ("Error: discarding", yytoken, &yylval);
2258
/* Else will try to reuse look-ahead token after shifting the error
2263
/*---------------------------------------------------.
2264
| yyerrorlab -- error raised explicitly by YYERROR. |
2265
`---------------------------------------------------*/
2269
/* Pacify GCC when the user code never invokes YYERROR and the label
2270
yyerrorlab therefore never appears in user code. */
2281
/*-------------------------------------------------------------.
2282
| yyerrlab1 -- common code for both syntax error and YYERROR. |
2283
`-------------------------------------------------------------*/
2285
yyerrstatus = 3; /* Each real token shifted decrements this. */
2289
yyn = yypact[yystate];
2290
if (yyn != YYPACT_NINF)
2293
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2301
/* Pop the current state because it cannot handle the error token. */
2306
yydestruct ("Error: popping", yystos[yystate], yyvsp);
2309
YY_STACK_PRINT (yyss, yyssp);
2318
/* Shift the error token. */
2319
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2325
/*-------------------------------------.
2326
| yyacceptlab -- YYACCEPT comes here. |
2327
`-------------------------------------*/
2332
/*-----------------------------------.
2333
| yyabortlab -- YYABORT comes here. |
2334
`-----------------------------------*/
2336
yydestruct ("Error: discarding lookahead",
2343
/*----------------------------------------------.
2344
| yyoverflowlab -- parser overflow comes here. |
2345
`----------------------------------------------*/
2347
yyerror ("parser stack overflow");
2355
YYSTACK_FREE (yyss);
2361
#line 713 "src/cfgparser.yy"
2364
/*---------------------------------------------------------------------------*/
2365
/* parser functions */
2366
/*---------------------------------------------------------------------------*/
2369
/* parse warnings */
2370
void yy_warn(char *s)
2372
debMsgStd("yy_warn",DM_WARNING,"Config Parse Warning at Line :"<<lineCount<<" '"<<s<<"' ",1);
2376
void yy_error(const char *s)
2378
//errorOut("Current token: "<<yytname[ (int)yytranslate[yychar] ]);
2379
errFatal("yy_error","Config Parse Error at Line "<<lineCount<<": "<<s,SIMWORLD_INITERROR);
2384
/* get the global pointers from calling program */
2385
char pointersInited = 0;
2386
void setPointers(ntlRenderGlobals *setglob)
2392
errFatal("setPointers","Config Parse Error: Invalid Pointers!\n",SIMWORLD_INITERROR);
2401
/* parse given file as config file */
2402
void parseFile(string filename)
2404
if(!pointersInited) {
2405
errFatal("parseFile","Config Parse Error: Pointers not set!\n", SIMWORLD_INITERROR);
2410
yy_in = fopen( filename.c_str(), "r");
2412
errFatal("parseFile","Config Parse Error: Unable to open '"<<filename.c_str() <<"'!\n", SIMWORLD_INITERROR );
2417
//yy_debug = 1; /* Enable debugging? */
2422
// cleanup static map<string,AttributeList*> attrs
2423
for(map<string, AttributeList*>::iterator i=attrs.begin();
2424
i != attrs.end(); i++) {