1
/* A Bison parser, made from parser.yxx
4
#define YYBISON 1 /* Identify Bison output. */
8
# define CHAR_TOKEN 259
9
# define UNKNOWN_TOKEN 260
10
# define INVALID_VALUE 261
11
# define FLOAT_TOKEN 262
12
# define INTEGER_TOKEN 263
13
# define STRING_TOKEN 264
15
# define REQUEST_TOKEN_AREALIGHTSOURCE 266
16
# define REQUEST_TOKEN_ATMOSPHERE 267
17
# define REQUEST_TOKEN_ATTRIBUTE 268
18
# define REQUEST_TOKEN_ATTRIBUTEBEGIN 269
19
# define REQUEST_TOKEN_ATTRIBUTEEND 270
20
# define REQUEST_TOKEN_BASIS 271
21
# define REQUEST_TOKEN_BESSELFILTER 272
22
# define REQUEST_TOKEN_BLOBBY 273
23
# define REQUEST_TOKEN_BOUND 274
24
# define REQUEST_TOKEN_BOXFILTER 275
25
# define REQUEST_TOKEN_CATMULLROMFILTER 276
26
# define REQUEST_TOKEN_CLIPPING 277
27
# define REQUEST_TOKEN_COLOR 278
28
# define REQUEST_TOKEN_COLORSAMPLES 279
29
# define REQUEST_TOKEN_CONCATTRANSFORM 280
30
# define REQUEST_TOKEN_CONE 281
31
# define REQUEST_TOKEN_COORDINATESYSTEM 282
32
# define REQUEST_TOKEN_COORDSYSTRANSFORM 283
33
# define REQUEST_TOKEN_CROPWINDOW 284
34
# define REQUEST_TOKEN_CURVES 285
35
# define REQUEST_TOKEN_CYLINDER 286
36
# define REQUEST_TOKEN_DECLARE 287
37
# define REQUEST_TOKEN_DEFORMATION 288
38
# define REQUEST_TOKEN_DEPTHOFFIELD 289
39
# define REQUEST_TOKEN_DETAIL 290
40
# define REQUEST_TOKEN_DETAILRANGE 291
41
# define REQUEST_TOKEN_DISK 292
42
# define REQUEST_TOKEN_DISKFILTER 293
43
# define REQUEST_TOKEN_DISPLACEMENT 294
44
# define REQUEST_TOKEN_DISPLAY 295
45
# define REQUEST_TOKEN_ERRORABORT 296
46
# define REQUEST_TOKEN_ERRORHANDLER 297
47
# define REQUEST_TOKEN_ERRORIGNORE 298
48
# define REQUEST_TOKEN_ERRORPRINT 299
49
# define REQUEST_TOKEN_EXPOSURE 300
50
# define REQUEST_TOKEN_EXTERIOR 301
51
# define REQUEST_TOKEN_FORMAT 302
52
# define REQUEST_TOKEN_FRAMEASPECTRATIO 303
53
# define REQUEST_TOKEN_FRAMEBEGIN 304
54
# define REQUEST_TOKEN_FRAMEEND 305
55
# define REQUEST_TOKEN_GAUSSIANFILTER 306
56
# define REQUEST_TOKEN_GENERALPOLYGON 307
57
# define REQUEST_TOKEN_GEOMETRICAPPROXIMATION 308
58
# define REQUEST_TOKEN_GEOMETRY 309
59
# define REQUEST_TOKEN_HIDER 310
60
# define REQUEST_TOKEN_HYPERBOLOID 311
61
# define REQUEST_TOKEN_IDENTITY 312
62
# define REQUEST_TOKEN_ILLUMINATE 313
63
# define REQUEST_TOKEN_IMAGER 314
64
# define REQUEST_TOKEN_INTERIOR 315
65
# define REQUEST_TOKEN_LIGHTSOURCE 316
66
# define REQUEST_TOKEN_MAKEOCCLUSION 317
67
# define REQUEST_TOKEN_MAKEBUMP 318
68
# define REQUEST_TOKEN_MAKECUBEFACEENVIRONMENT 319
69
# define REQUEST_TOKEN_MAKELATLONGENVIRONMENT 320
70
# define REQUEST_TOKEN_MAKESHADOW 321
71
# define REQUEST_TOKEN_MAKETEXTURE 322
72
# define REQUEST_TOKEN_MATTE 323
73
# define REQUEST_TOKEN_MOTIONBEGIN 324
74
# define REQUEST_TOKEN_MOTIONEND 325
75
# define REQUEST_TOKEN_NUPATCH 326
76
# define REQUEST_TOKEN_OBJECTBEGIN 327
77
# define REQUEST_TOKEN_OBJECTEND 328
78
# define REQUEST_TOKEN_OBJECTINSTANCE 329
79
# define REQUEST_TOKEN_OPACITY 330
80
# define REQUEST_TOKEN_OPTION 331
81
# define REQUEST_TOKEN_ORIENTATION 332
82
# define REQUEST_TOKEN_PARABOLOID 333
83
# define REQUEST_TOKEN_PATCH 334
84
# define REQUEST_TOKEN_PATCHMESH 335
85
# define REQUEST_TOKEN_PERSPECTIVE 336
86
# define REQUEST_TOKEN_PIXELFILTER 337
87
# define REQUEST_TOKEN_PIXELSAMPLES 338
88
# define REQUEST_TOKEN_PIXELVARIANCE 339
89
# define REQUEST_TOKEN_POINTS 340
90
# define REQUEST_TOKEN_POINTSGENERALPOLYGONS 341
91
# define REQUEST_TOKEN_POINTSPOLYGONS 342
92
# define REQUEST_TOKEN_POLYGON 343
93
# define REQUEST_TOKEN_PROCEDURAL 344
94
# define REQUEST_TOKEN_PROJECTION 345
95
# define REQUEST_TOKEN_QUANTIZE 346
96
# define REQUEST_TOKEN_READARCHIVE 347
97
# define REQUEST_TOKEN_RELATIVEDETAIL 348
98
# define REQUEST_TOKEN_REVERSEORIENTATION 349
99
# define REQUEST_TOKEN_ROTATE 350
100
# define REQUEST_TOKEN_SCALE 351
101
# define REQUEST_TOKEN_SCREENWINDOW 352
102
# define REQUEST_TOKEN_SHADINGINTERPOLATION 353
103
# define REQUEST_TOKEN_SHADINGRATE 354
104
# define REQUEST_TOKEN_SHUTTER 355
105
# define REQUEST_TOKEN_SIDES 356
106
# define REQUEST_TOKEN_SINCFILTER 357
107
# define REQUEST_TOKEN_SKEW 358
108
# define REQUEST_TOKEN_SOLIDBEGIN 359
109
# define REQUEST_TOKEN_SOLIDEND 360
110
# define REQUEST_TOKEN_SPHERE 361
111
# define REQUEST_TOKEN_SUBDIVISIONMESH 362
112
# define REQUEST_TOKEN_SURFACE 363
113
# define REQUEST_TOKEN_TEXTURECOORDINATES 364
114
# define REQUEST_TOKEN_TORUS 365
115
# define REQUEST_TOKEN_TRANSFORM 366
116
# define REQUEST_TOKEN_TRANSFORMBEGIN 367
117
# define REQUEST_TOKEN_TRANSFORMEND 368
118
# define REQUEST_TOKEN_TRANSFORMPOINTS 369
119
# define REQUEST_TOKEN_TRANSLATE 370
120
# define REQUEST_TOKEN_TRIANGLEFILTER 371
121
# define REQUEST_TOKEN_TRIMCURVE 372
122
# define REQUEST_TOKEN_VERSION 373
123
# define REQUEST_TOKEN_WORLDBEGIN 374
124
# define REQUEST_TOKEN_WORLDEND 375
130
#pragma warning(disable : 4786)
142
using namespace librib;
144
#include "libribtypes.h"
160
void ParserDeclare(librib::RendermanInterface& CallbackInterface, const std::string Name, const std::string Type);
161
extern std::string ParseStreamName;
162
extern RendermanInterface* ParseCallbackInterface;
163
extern std::ostream* ParseErrorStream;
164
extern unsigned int ParseLineNumber;
165
extern bool ParseSucceeded;
166
extern bool fRequest;
168
extern RtArchiveCallback pArchiveCallback;
172
}; // namespace librib
176
#line 55 "parser.yxx"
185
IntegerArray* aitype;
188
TokenValuePair* tvtype;
189
TokenValuePairs* atvtype;
191
# define YYSTYPE yystype
192
# define YYSTYPE_IS_TRIVIAL 1
194
#line 70 "parser.yxx"
197
extern int yylex( YYSTYPE* );
199
static void yyerror(const std::string Message);
201
static void ExpectRequest();
202
static void ExpectParams();
203
static void DiscardStringValue(char* const Value);
204
static void DiscardTokenValuePairs(TokenValuePairs* const Value);
205
static void DiscardArrayValue(Array* const Value);
207
static void DeclareLightHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtLightHandle Handle);
208
static RendermanInterface::RtLightHandle LookupLightHandle(const RendermanInterface::RtInt ID);
210
static void DeclareLightHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtLightHandle Handle);
211
static RendermanInterface::RtLightHandle LookupLightHandleString(const RendermanInterface::RtString ID);
213
static void DeclareObjectHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtObjectHandle Handle);
214
static RendermanInterface::RtObjectHandle LookupObjectHandle(const RendermanInterface::RtInt ID);
216
static void DeclareObjectHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtObjectHandle Handle);
217
static RendermanInterface::RtObjectHandle LookupObjectHandleString(const RendermanInterface::RtString ID);
219
static ParameterType DeclareParameterType(const std::string& Name, const std::string& Type);
220
static ParameterType LookupParameterType(const std::string& Name);
222
static RendermanInterface::RtInt ColorSamples = 3;
231
#define YYFLAG -32768
234
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
235
#define YYTRANSLATE(x) ((unsigned)(x) <= 375 ? yytranslate[x] : 247)
237
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
238
static const char yytranslate[] =
240
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
241
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
242
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
243
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
244
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
245
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
246
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
247
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
248
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
249
2, 122, 2, 123, 2, 2, 2, 2, 2, 2,
250
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
251
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
252
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
253
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
254
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
255
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
256
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
257
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
258
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
259
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
260
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
261
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
262
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
263
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
264
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
265
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
266
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
267
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
268
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
269
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
270
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
271
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
272
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
273
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
274
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
275
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
276
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
277
116, 117, 118, 119, 120, 121
281
static const short yyprhs[] =
283
0, 0, 2, 4, 7, 9, 11, 14, 18, 21,
284
23, 25, 27, 32, 35, 41, 47, 51, 55, 60,
285
64, 67, 71, 76, 80, 84, 91, 97, 101, 105,
286
108, 112, 114, 116, 119, 124, 127, 132, 142, 145,
287
150, 155, 160, 165, 169, 173, 177, 181, 185, 189,
288
192, 195, 198, 206, 209, 217, 220, 226, 229, 233,
289
237, 240, 242, 245, 247, 250, 253, 256, 261, 267,
290
272, 281, 284, 288, 292, 295, 298, 300, 302, 304,
291
308, 311, 315, 321, 328, 331, 337, 340, 345, 351,
292
357, 363, 369, 375, 379, 387, 400, 411, 418, 424,
293
431, 435, 445, 452, 458, 466, 470, 473, 475, 478,
294
481, 483, 486, 489, 492, 494, 504, 514, 522, 536,
295
541, 546, 549, 551, 553, 555, 565, 571, 573, 575,
296
577, 579, 581, 583, 585, 587, 589, 591, 593, 595,
297
597, 599, 601, 603, 605, 607, 609, 611, 613, 615,
298
617, 619, 621, 623, 625, 627, 629, 631, 633, 635,
299
637, 639, 641, 643, 645, 647, 649, 651, 653, 655,
300
657, 659, 661, 663, 665, 667, 669, 671, 673, 675,
301
677, 679, 681, 683, 685, 687, 689, 691, 693, 695,
302
697, 699, 701, 703, 705, 707, 709, 711, 713, 715,
303
717, 719, 721, 723, 725, 727, 729, 731, 733, 735,
304
737, 739, 741, 743, 745, 747, 749, 751, 753, 755,
305
757, 759, 761, 763, 765, 767, 769, 771, 773, 775,
306
777, 779, 781, 783, 785, 787, 789, 792, 795, 798,
307
802, 804, 806, 809, 813, 815, 818, 820, 822, 825,
308
829, 831, 834, 836, 838, 840, 843, 846, 849, 852,
309
855, 858, 861, 862, 864, 866, 868, 871, 874
311
static const short yyrhs[] =
313
125, 0, 126, 0, 125, 126, 0, 127, 0, 11,
314
0, 228, 231, 0, 145, 238, 238, 0, 161, 234,
315
0, 162, 0, 229, 0, 230, 0, 159, 234, 234,
316
231, 0, 160, 231, 0, 209, 231, 231, 231, 231,
317
0, 143, 231, 231, 231, 231, 0, 202, 238, 245,
318
0, 136, 231, 231, 0, 147, 231, 231, 231, 0,
319
212, 231, 231, 0, 195, 231, 0, 194, 231, 231,
320
0, 193, 238, 231, 231, 0, 157, 231, 231, 0,
321
170, 238, 245, 0, 203, 238, 234, 234, 234, 231,
322
0, 152, 238, 238, 238, 245, 0, 166, 238, 245,
323
0, 138, 242, 242, 0, 205, 231, 0, 187, 238,
324
245, 0, 131, 0, 132, 0, 137, 242, 0, 137,
325
231, 231, 231, 0, 186, 242, 0, 186, 231, 231,
326
231, 0, 220, 231, 231, 231, 231, 231, 231, 231,
327
231, 0, 220, 242, 0, 172, 238, 234, 245, 0,
328
172, 238, 238, 245, 0, 128, 238, 234, 245, 0,
329
128, 238, 238, 245, 0, 169, 234, 234, 0, 169,
330
238, 234, 0, 219, 238, 245, 0, 129, 238, 245,
331
0, 171, 238, 245, 0, 158, 238, 245, 0, 211,
332
231, 0, 210, 238, 0, 179, 234, 0, 135, 231,
333
231, 231, 231, 231, 231, 0, 135, 242, 0, 148,
334
231, 231, 231, 231, 231, 231, 0, 148, 242, 0,
335
149, 231, 231, 231, 231, 0, 149, 242, 0, 164,
336
238, 231, 0, 164, 238, 242, 0, 188, 238, 0,
337
206, 0, 213, 234, 0, 168, 0, 222, 242, 0,
338
139, 242, 0, 192, 231, 0, 226, 231, 231, 231,
339
0, 207, 231, 231, 231, 231, 0, 208, 231, 231,
340
231, 0, 214, 231, 231, 231, 231, 231, 231, 231,
341
0, 214, 242, 0, 146, 238, 245, 0, 151, 238,
342
245, 0, 141, 238, 0, 142, 238, 0, 225, 0,
343
223, 0, 224, 0, 130, 238, 245, 0, 201, 246,
344
0, 163, 236, 246, 0, 196, 238, 236, 238, 245,
345
0, 134, 234, 236, 233, 240, 245, 0, 204, 238,
346
0, 197, 238, 240, 242, 245, 0, 198, 245, 0,
347
200, 236, 236, 246, 0, 199, 236, 236, 236, 246,
348
0, 133, 238, 234, 238, 234, 0, 133, 238, 234,
349
242, 234, 0, 133, 242, 234, 238, 234, 0, 133,
350
242, 234, 242, 234, 0, 190, 238, 246, 0, 191,
351
238, 234, 238, 234, 238, 246, 0, 182, 234, 234,
352
242, 231, 231, 234, 234, 242, 231, 231, 246, 0,
353
227, 236, 236, 242, 242, 242, 236, 242, 242, 242,
354
0, 217, 231, 231, 231, 231, 245, 0, 140, 231,
355
231, 231, 245, 0, 144, 231, 231, 231, 231, 245,
356
0, 167, 242, 245, 0, 167, 231, 231, 231, 231,
357
231, 231, 231, 245, 0, 189, 231, 231, 231, 231,
358
245, 0, 150, 231, 231, 231, 245, 0, 221, 231,
359
231, 231, 231, 231, 245, 0, 165, 238, 245, 0,
360
215, 238, 0, 216, 0, 183, 234, 0, 183, 238,
361
0, 184, 0, 185, 234, 0, 185, 238, 0, 180,
362
242, 0, 181, 0, 178, 238, 238, 238, 238, 238,
363
231, 231, 245, 0, 174, 238, 238, 238, 238, 238,
364
231, 231, 245, 0, 176, 238, 238, 238, 231, 231,
365
245, 0, 175, 238, 238, 238, 238, 238, 238, 238,
366
231, 238, 231, 231, 245, 0, 177, 238, 238, 245,
367
0, 173, 240, 238, 245, 0, 154, 238, 0, 155,
368
0, 156, 0, 153, 0, 218, 238, 236, 236, 241,
369
237, 237, 243, 246, 0, 218, 238, 236, 236, 246,
370
0, 6, 0, 1, 0, 7, 0, 12, 0, 13,
371
0, 14, 0, 15, 0, 16, 0, 17, 0, 19,
372
0, 20, 0, 23, 0, 24, 0, 25, 0, 26,
373
0, 27, 0, 28, 0, 29, 0, 30, 0, 32,
374
0, 33, 0, 34, 0, 35, 0, 36, 0, 37,
375
0, 38, 0, 40, 0, 41, 0, 42, 0, 43,
376
0, 44, 0, 45, 0, 46, 0, 47, 0, 48,
377
0, 49, 0, 50, 0, 51, 0, 53, 0, 54,
378
0, 55, 0, 56, 0, 57, 0, 58, 0, 59,
379
0, 60, 0, 61, 0, 62, 0, 63, 0, 64,
380
0, 65, 0, 66, 0, 67, 0, 68, 0, 69,
381
0, 70, 0, 71, 0, 72, 0, 73, 0, 74,
382
0, 75, 0, 76, 0, 77, 0, 78, 0, 79,
383
0, 80, 0, 81, 0, 82, 0, 83, 0, 84,
384
0, 85, 0, 31, 0, 90, 0, 86, 0, 87,
385
0, 88, 0, 89, 0, 91, 0, 92, 0, 93,
386
0, 94, 0, 95, 0, 96, 0, 97, 0, 98,
387
0, 99, 0, 100, 0, 101, 0, 102, 0, 104,
388
0, 105, 0, 106, 0, 107, 0, 108, 0, 109,
389
0, 110, 0, 111, 0, 112, 0, 113, 0, 114,
390
0, 115, 0, 116, 0, 118, 0, 119, 0, 120,
391
0, 121, 0, 8, 0, 234, 0, 8, 0, 232,
392
8, 0, 232, 9, 0, 235, 8, 0, 122, 232,
393
123, 0, 9, 0, 9, 0, 235, 234, 0, 122,
394
235, 123, 0, 236, 0, 122, 123, 0, 10, 0,
395
10, 0, 239, 10, 0, 122, 239, 123, 0, 240,
396
0, 122, 123, 0, 233, 0, 236, 0, 242, 0,
397
122, 123, 0, 238, 9, 0, 238, 236, 0, 238,
398
8, 0, 238, 233, 0, 238, 10, 0, 238, 240,
399
0, 0, 1, 0, 246, 0, 244, 0, 1, 244,
400
0, 246, 244, 0, 246, 1, 0
406
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
407
static const short yyrline[] =
409
0, 335, 339, 340, 343, 348, 378, 380, 386, 388,
410
390, 392, 394, 396, 398, 400, 402, 408, 410, 412,
411
414, 416, 418, 425, 427, 433, 438, 446, 452, 459,
412
461, 467, 469, 471, 480, 495, 504, 519, 521, 530,
413
536, 543, 549, 556, 564, 573, 579, 585, 591, 597,
414
599, 604, 606, 612, 621, 627, 635, 637, 645, 650,
415
657, 662, 664, 666, 668, 697, 726, 728, 730, 732,
416
734, 736, 744, 750, 756, 761, 766, 768, 770, 772,
417
778, 789, 795, 812, 823, 828, 867, 882, 889, 897,
418
907, 929, 952, 976, 982, 990, 997, 1010, 1015, 1020,
419
1025, 1031, 1043, 1048, 1053, 1058, 1064, 1069, 1071, 1075,
420
1080, 1082, 1090, 1099, 1104, 1106, 1112, 1118, 1124, 1137,
421
1141, 1145, 1157, 1159, 1161, 1163, 1195, 1203, 1212, 1224,
422
1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239,
423
1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249,
424
1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259,
425
1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269,
426
1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279,
427
1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289,
428
1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299,
429
1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309,
430
1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319,
431
1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329,
432
1330, 1331, 1332, 1335, 1336, 1340, 1344, 1349, 1354, 1363,
433
1369, 1375, 1379, 1386, 1392, 1393, 1399, 1405, 1409, 1416,
434
1422, 1423, 1429, 1430, 1438, 1439, 1445, 1480, 1518, 1541,
435
1572, 1597, 1624, 1628, 1632, 1636, 1641, 1646, 1653
440
#if (YYDEBUG) || defined YYERROR_VERBOSE
442
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
443
static const char *const yytname[] =
445
"$", "error", "$undefined.", "EOL_TOKEN", "EOF_TOKEN", "CHAR_TOKEN",
446
"UNKNOWN_TOKEN", "INVALID_VALUE", "FLOAT_TOKEN", "INTEGER_TOKEN",
447
"STRING_TOKEN", "COMMENT", "REQUEST_TOKEN_AREALIGHTSOURCE",
448
"REQUEST_TOKEN_ATMOSPHERE", "REQUEST_TOKEN_ATTRIBUTE",
449
"REQUEST_TOKEN_ATTRIBUTEBEGIN", "REQUEST_TOKEN_ATTRIBUTEEND",
450
"REQUEST_TOKEN_BASIS", "REQUEST_TOKEN_BESSELFILTER",
451
"REQUEST_TOKEN_BLOBBY", "REQUEST_TOKEN_BOUND",
452
"REQUEST_TOKEN_BOXFILTER", "REQUEST_TOKEN_CATMULLROMFILTER",
453
"REQUEST_TOKEN_CLIPPING", "REQUEST_TOKEN_COLOR",
454
"REQUEST_TOKEN_COLORSAMPLES", "REQUEST_TOKEN_CONCATTRANSFORM",
455
"REQUEST_TOKEN_CONE", "REQUEST_TOKEN_COORDINATESYSTEM",
456
"REQUEST_TOKEN_COORDSYSTRANSFORM", "REQUEST_TOKEN_CROPWINDOW",
457
"REQUEST_TOKEN_CURVES", "REQUEST_TOKEN_CYLINDER",
458
"REQUEST_TOKEN_DECLARE", "REQUEST_TOKEN_DEFORMATION",
459
"REQUEST_TOKEN_DEPTHOFFIELD", "REQUEST_TOKEN_DETAIL",
460
"REQUEST_TOKEN_DETAILRANGE", "REQUEST_TOKEN_DISK",
461
"REQUEST_TOKEN_DISKFILTER", "REQUEST_TOKEN_DISPLACEMENT",
462
"REQUEST_TOKEN_DISPLAY", "REQUEST_TOKEN_ERRORABORT",
463
"REQUEST_TOKEN_ERRORHANDLER", "REQUEST_TOKEN_ERRORIGNORE",
464
"REQUEST_TOKEN_ERRORPRINT", "REQUEST_TOKEN_EXPOSURE",
465
"REQUEST_TOKEN_EXTERIOR", "REQUEST_TOKEN_FORMAT",
466
"REQUEST_TOKEN_FRAMEASPECTRATIO", "REQUEST_TOKEN_FRAMEBEGIN",
467
"REQUEST_TOKEN_FRAMEEND", "REQUEST_TOKEN_GAUSSIANFILTER",
468
"REQUEST_TOKEN_GENERALPOLYGON", "REQUEST_TOKEN_GEOMETRICAPPROXIMATION",
469
"REQUEST_TOKEN_GEOMETRY", "REQUEST_TOKEN_HIDER",
470
"REQUEST_TOKEN_HYPERBOLOID", "REQUEST_TOKEN_IDENTITY",
471
"REQUEST_TOKEN_ILLUMINATE", "REQUEST_TOKEN_IMAGER",
472
"REQUEST_TOKEN_INTERIOR", "REQUEST_TOKEN_LIGHTSOURCE",
473
"REQUEST_TOKEN_MAKEOCCLUSION", "REQUEST_TOKEN_MAKEBUMP",
474
"REQUEST_TOKEN_MAKECUBEFACEENVIRONMENT",
475
"REQUEST_TOKEN_MAKELATLONGENVIRONMENT", "REQUEST_TOKEN_MAKESHADOW",
476
"REQUEST_TOKEN_MAKETEXTURE", "REQUEST_TOKEN_MATTE",
477
"REQUEST_TOKEN_MOTIONBEGIN", "REQUEST_TOKEN_MOTIONEND",
478
"REQUEST_TOKEN_NUPATCH", "REQUEST_TOKEN_OBJECTBEGIN",
479
"REQUEST_TOKEN_OBJECTEND", "REQUEST_TOKEN_OBJECTINSTANCE",
480
"REQUEST_TOKEN_OPACITY", "REQUEST_TOKEN_OPTION",
481
"REQUEST_TOKEN_ORIENTATION", "REQUEST_TOKEN_PARABOLOID",
482
"REQUEST_TOKEN_PATCH", "REQUEST_TOKEN_PATCHMESH",
483
"REQUEST_TOKEN_PERSPECTIVE", "REQUEST_TOKEN_PIXELFILTER",
484
"REQUEST_TOKEN_PIXELSAMPLES", "REQUEST_TOKEN_PIXELVARIANCE",
485
"REQUEST_TOKEN_POINTS", "REQUEST_TOKEN_POINTSGENERALPOLYGONS",
486
"REQUEST_TOKEN_POINTSPOLYGONS", "REQUEST_TOKEN_POLYGON",
487
"REQUEST_TOKEN_PROCEDURAL", "REQUEST_TOKEN_PROJECTION",
488
"REQUEST_TOKEN_QUANTIZE", "REQUEST_TOKEN_READARCHIVE",
489
"REQUEST_TOKEN_RELATIVEDETAIL", "REQUEST_TOKEN_REVERSEORIENTATION",
490
"REQUEST_TOKEN_ROTATE", "REQUEST_TOKEN_SCALE",
491
"REQUEST_TOKEN_SCREENWINDOW", "REQUEST_TOKEN_SHADINGINTERPOLATION",
492
"REQUEST_TOKEN_SHADINGRATE", "REQUEST_TOKEN_SHUTTER",
493
"REQUEST_TOKEN_SIDES", "REQUEST_TOKEN_SINCFILTER", "REQUEST_TOKEN_SKEW",
494
"REQUEST_TOKEN_SOLIDBEGIN", "REQUEST_TOKEN_SOLIDEND",
495
"REQUEST_TOKEN_SPHERE", "REQUEST_TOKEN_SUBDIVISIONMESH",
496
"REQUEST_TOKEN_SURFACE", "REQUEST_TOKEN_TEXTURECOORDINATES",
497
"REQUEST_TOKEN_TORUS", "REQUEST_TOKEN_TRANSFORM",
498
"REQUEST_TOKEN_TRANSFORMBEGIN", "REQUEST_TOKEN_TRANSFORMEND",
499
"REQUEST_TOKEN_TRANSFORMPOINTS", "REQUEST_TOKEN_TRANSLATE",
500
"REQUEST_TOKEN_TRIANGLEFILTER", "REQUEST_TOKEN_TRIMCURVE",
501
"REQUEST_TOKEN_VERSION", "REQUEST_TOKEN_WORLDBEGIN",
502
"REQUEST_TOKEN_WORLDEND", "'['", "']'", "file", "requests", "request",
503
"complete_request", "arealightsource", "atmosphere", "attribute",
504
"attributebegin", "attributeend", "basis", "blobby", "bound",
505
"clipping", "color", "colorsamples", "concattransform", "cone",
506
"coordinatesystem", "coordsystransform", "cropwindow", "cylinder",
507
"declare", "deformation", "depthoffield", "detail", "detailrange",
508
"disk", "displacement", "display", "errorabort", "errorhandler",
509
"errorignore", "errorprint", "exposure", "exterior", "format",
510
"frameaspectratio", "framebegin", "frameend", "generalpolygon",
511
"geometricapproximation", "geometry", "hider", "hyperboloid",
512
"identity", "illuminate", "imager", "interior", "lightsource",
513
"makeocclusion", "makebump", "makecubefaceenvironment",
514
"makelatlongenvironment", "makeshadow", "maketexture", "matte",
515
"motionbegin", "motionend", "nupatch", "objectbegin", "objectend",
516
"objectinstance", "opacity", "option", "orientation", "paraboloid",
517
"patch", "patchmesh", "perspective", "pixelfilter", "pixelsamples",
518
"pixelvariance", "curves", "procedural", "points",
519
"pointsgeneralpolygons", "pointspolygons", "polygon", "projection",
520
"quantize", "readarchive", "relativedetail", "reverseorientation",
521
"rotate", "scale", "screenwindow", "shadinginterpolation",
522
"shadingrate", "shutter", "sides", "skew", "solidbegin", "solidend",
523
"sphere", "subdivisionmesh", "surface", "texturecoordinates", "torus",
524
"transform", "transformbegin", "transformend", "transformpoints",
525
"translate", "trimcurve", "version", "worldbegin", "worldend", "float",
526
"floats", "float_array", "integer", "integers", "integer_array",
527
"integer_array_or_empty", "string", "strings", "string_array",
528
"string_array_or_empty", "scalar_array", "scalar_array_or_empty",
529
"tvpair", "opttvpairs", "tvpairs", 0
533
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
534
static const short yyr1[] =
536
0, 124, 125, 125, 126, 126, 127, 127, 127, 127,
537
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
538
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
539
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
540
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
541
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
542
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
543
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
544
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
545
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
546
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
547
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
548
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
549
128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
550
138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
551
148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
552
158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
553
168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
554
178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
555
188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
556
198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
557
208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
558
218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
559
228, 229, 230, 231, 231, 232, 232, 232, 232, 233,
560
234, 235, 235, 236, 237, 237, 238, 239, 239, 240,
561
241, 241, 242, 242, 243, 243, 244, 244, 244, 244,
562
244, 244, 245, 245, 245, 246, 246, 246, 246
565
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
566
static const short yyr2[] =
568
0, 1, 1, 2, 1, 1, 2, 3, 2, 1,
569
1, 1, 4, 2, 5, 5, 3, 3, 4, 3,
570
2, 3, 4, 3, 3, 6, 5, 3, 3, 2,
571
3, 1, 1, 2, 4, 2, 4, 9, 2, 4,
572
4, 4, 4, 3, 3, 3, 3, 3, 3, 2,
573
2, 2, 7, 2, 7, 2, 5, 2, 3, 3,
574
2, 1, 2, 1, 2, 2, 2, 4, 5, 4,
575
8, 2, 3, 3, 2, 2, 1, 1, 1, 3,
576
2, 3, 5, 6, 2, 5, 2, 4, 5, 5,
577
5, 5, 5, 3, 7, 12, 10, 6, 5, 6,
578
3, 9, 6, 5, 7, 3, 2, 1, 2, 2,
579
1, 2, 2, 2, 1, 9, 9, 7, 13, 4,
580
4, 2, 1, 1, 1, 9, 5, 1, 1, 1,
581
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
582
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
583
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
584
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
585
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
586
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
587
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
588
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
589
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
590
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
591
1, 1, 1, 1, 1, 1, 2, 2, 2, 3,
592
1, 1, 2, 3, 1, 2, 1, 1, 2, 3,
593
1, 2, 1, 1, 1, 2, 2, 2, 2, 2,
594
2, 2, 0, 1, 1, 1, 2, 2, 2
597
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
598
doesn't specify something else to do. Zero means the default is an
600
static const short yydefact[] =
602
0, 128, 127, 129, 5, 130, 131, 132, 133, 134,
603
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
604
145, 198, 146, 147, 148, 149, 150, 151, 152, 153,
605
154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
606
164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
607
174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
608
184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
609
194, 195, 196, 197, 200, 201, 202, 203, 199, 204,
610
205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
611
215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
612
225, 226, 227, 228, 229, 230, 231, 232, 0, 2,
613
4, 0, 0, 0, 31, 32, 0, 0, 0, 0,
614
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
615
0, 0, 0, 0, 0, 0, 124, 0, 122, 123,
616
0, 0, 0, 0, 0, 9, 0, 0, 0, 0,
617
0, 63, 0, 0, 0, 0, 0, 0, 0, 0,
618
0, 0, 0, 0, 114, 0, 0, 110, 0, 0,
619
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
620
0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
621
0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
622
0, 0, 0, 0, 0, 0, 77, 78, 76, 0,
623
0, 0, 10, 11, 3, 246, 0, 0, 0, 0,
624
252, 253, 0, 0, 240, 0, 233, 0, 234, 53,
625
0, 0, 33, 0, 65, 0, 74, 75, 0, 0,
626
0, 0, 0, 0, 55, 0, 57, 0, 0, 0,
627
121, 0, 0, 0, 13, 8, 0, 0, 0, 0,
628
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
629
0, 0, 0, 0, 0, 51, 113, 0, 108, 109,
630
111, 112, 0, 35, 0, 60, 0, 0, 0, 66,
631
0, 0, 20, 0, 0, 263, 0, 265, 86, 0,
632
0, 0, 0, 0, 0, 0, 84, 29, 0, 0,
633
0, 50, 49, 0, 62, 0, 71, 106, 0, 0,
634
0, 0, 38, 0, 64, 0, 0, 6, 0, 0,
635
46, 79, 235, 241, 0, 0, 0, 0, 0, 0,
636
17, 0, 28, 0, 0, 0, 7, 72, 0, 0,
637
0, 0, 73, 0, 23, 48, 0, 0, 0, 58,
638
59, 105, 27, 0, 100, 43, 44, 24, 47, 0,
639
0, 247, 0, 0, 0, 0, 0, 0, 0, 0,
640
0, 30, 0, 0, 0, 0, 21, 0, 0, 266,
641
258, 256, 260, 0, 259, 257, 261, 268, 267, 0,
642
0, 16, 0, 0, 0, 0, 19, 0, 0, 0,
643
45, 0, 0, 0, 0, 41, 42, 236, 237, 239,
644
238, 243, 242, 0, 0, 0, 0, 0, 0, 0,
645
34, 0, 0, 0, 18, 0, 0, 0, 0, 12,
646
0, 39, 40, 248, 249, 120, 0, 0, 0, 119,
647
0, 0, 36, 0, 0, 22, 0, 0, 0, 0,
648
0, 0, 69, 0, 0, 0, 0, 0, 0, 67,
649
0, 89, 90, 91, 92, 0, 0, 0, 98, 15,
650
0, 0, 56, 103, 26, 0, 0, 0, 0, 0,
651
0, 0, 0, 82, 85, 0, 0, 68, 14, 0,
652
0, 0, 250, 0, 0, 0, 0, 0, 83, 0,
653
99, 0, 0, 0, 0, 0, 0, 0, 102, 0,
654
25, 0, 97, 251, 0, 244, 0, 0, 0, 0,
655
52, 54, 0, 0, 0, 117, 0, 0, 0, 0,
656
245, 0, 0, 104, 0, 0, 0, 0, 0, 0,
657
70, 0, 254, 0, 0, 0, 101, 116, 0, 115,
658
0, 255, 0, 37, 0, 0, 0, 96, 0, 0,
662
static const short yydefgoto[] =
664
573, 108, 109, 110, 111, 112, 113, 114, 115, 116,
665
117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
666
127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
667
137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
668
147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
669
157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
670
167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
671
177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
672
187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
673
197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
674
207, 208, 209, 210, 211, 212, 213, 227, 334, 220,
675
228, 335, 221, 526, 296, 372, 269, 503, 223, 553,
679
static const short yypact[] =
681
2486,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
682
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
683
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
684
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
685
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
686
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
687
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
688
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
689
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
690
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
691
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 2370,-32768,
692
-32768, 0, 0, 0,-32768,-32768, -4, 46, 30, 38,
693
30, -105, -105, 38, 0, 0, 38, 38, 0, 0,
694
38, 30, 30, 38, 0, 0,-32768, 0,-32768,-32768,
695
38, 0, 46, 38, 46,-32768, -65, 0, 0, 0,
696
30,-32768, 39, 0, 0, 0, -58, 0, 0, 0,
697
0, 0, 46, -105,-32768, 46, 39,-32768, 39, 30,
698
0, 0, 38, 0, 0, 38, 0, 38, 38, 0,
699
0, 1028, -65, -65, 44, 0, 0, 0, 38,-32768,
700
38, 38, 38, 0, 38, 38, 46, 30, 0,-32768,
701
38, 0, 0, 30, 38, -105,-32768,-32768,-32768, 38,
702
-65, 38,-32768,-32768,-32768,-32768, 39, 1028, 1028, 52,
703
-32768,-32768, 46, 46,-32768, -65,-32768, 38,-32768,-32768,
704
38, 38,-32768, -105,-32768, 38,-32768,-32768, 38, 38,
705
0, 1028, 38, 38,-32768, 38,-32768, 38, 1028, 0,
706
-32768, 38, 1028, 46,-32768,-32768, 56, 44, 30, 1028,
707
1028, 38, 1028, 46, 46, 1028, 1028, 39, 57, 0,
708
0, 0, 0, 0, 0,-32768,-32768, 46,-32768,-32768,
709
-32768,-32768, 38,-32768, 1028,-32768, 38, 44, 46,-32768,
710
38, 38,-32768, -65, -58, 0, 26,-32768,-32768, 1150,
711
-65, -65, 0, 1272, 1028, 46,-32768,-32768, 38, 38,
712
38,-32768,-32768, 38,-32768, 38,-32768,-32768, 38, -65,
713
1028, 38,-32768, 38,-32768, 38, -65,-32768, 1028, 1028,
714
-32768,-32768,-32768,-32768, 11, 17, -4, -4, -56, 38,
715
-32768, 38,-32768, 38, 38, 38,-32768,-32768, 38, 38,
716
38, 38,-32768, 0,-32768,-32768, 38, 18, 1394,-32768,
717
-32768,-32768,-32768, 38,-32768,-32768,-32768,-32768,-32768, 1028,
718
1028,-32768, 6, 1028, 0, 0, 0, 1028, 0, -105,
719
38,-32768, 38, 1516, 0, 38,-32768, 0, -105,-32768,
720
-32768,-32768,-32768, 34,-32768,-32768,-32768,-32768,-32768, -65,
721
44,-32768, 46, 38, 38, 38,-32768, 38, 38, -65,
722
-32768, 38, 38, 38, -105,-32768,-32768,-32768,-32768,-32768,
723
-32768,-32768,-32768, 46, 46, 46, 46, 52, -58, 38,
724
-32768, 1028, 38, 38,-32768, 38, 38, 1028, 1028,-32768,
725
38,-32768,-32768,-32768,-32768,-32768, 0, 0, 38,-32768,
726
0, 38,-32768, 38, 46,-32768, 1028, 1028, 44, 1638,
727
46, 38,-32768, 38, 38, 38, 8, 38, 38,-32768,
728
-105,-32768,-32768,-32768,-32768, 54, 1028, 38,-32768,-32768,
729
1028, 38,-32768,-32768,-32768, 38, 0, 0, 38, 0,
730
38, 1028, 0,-32768,-32768, 1760, 38,-32768,-32768, 38,
731
1028, 13,-32768, -54, 1882, 38, 38, -105,-32768, 38,
732
-32768, 38, 38, 38, 0, 1028, 38, 46,-32768, 44,
733
-32768, 38,-32768,-32768, 21,-32768, -54, 38, 1028, -65,
734
-32768,-32768, 38, 38, 0,-32768, 38, 46, 2004, 38,
735
-32768, -52, 38,-32768, -105, 1028, 1028, 38, 1028, -105,
736
-32768, 20,-32768, 44, 38, -105,-32768,-32768, 0,-32768,
737
38,-32768, 2126,-32768, -105, 38, 38,-32768, 38, 44,
738
1028, 2248,-32768, 77, 80,-32768
741
static const short yypgoto[] =
743
-32768,-32768, -26,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
744
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
745
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
746
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
747
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
748
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
749
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
750
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
751
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
752
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
753
-32768,-32768,-32768,-32768,-32768,-32768,-32768, -119,-32768, -264,
754
469, -254, -131, -443, 326,-32768, -291,-32768, 413,-32768,
762
static const short yytable[] =
764
230, 231, 357, 388, 235, 396, 215, 238, 239, 302,
765
215, 242, 243, 245, 247, 257, 443, 219, 215, 417,
766
418, 251, 303, 371, 254, 420, 224, 224, 332, 333,
767
333, 261, 394, 389, 390, 391, 392, 398, 226, 224,
768
389, 398, 332, 333, 371, 302, 226, 224, 224, 215,
769
282, 300, 301, 286, 215, 224, 289, 256, 291, 292,
770
332, 333, 420, 224, 268, 333, 427, 371, 524, 307,
771
551, 308, 309, 310, 428, 312, 313, 574, 315, 326,
772
575, 318, 214, 541, 321, 323, 0, 0, 0, 0,
773
325, 0, 327, 0, 338, 358, 398, 0, 0, 0,
774
0, 0, 0, 0, 0, 0, 0, 0, 339, 0,
775
0, 340, 341, 0, 0, 0, 343, 0, 219, 344,
776
345, 398, 0, 348, 349, 383, 350, 0, 351, 444,
777
501, 0, 354, 0, 419, 0, 523, 476, 0, 359,
778
421, 421, 363, 561, 540, 0, 0, 0, 393, 0,
779
0, 0, 219, 0, 0, 0, 0, 0, 0, 0,
780
0, 0, 387, 380, 0, 395, 0, 382, 0, 399,
781
400, 385, 386, 475, 0, 502, 0, 0, 0, 0,
782
0, 0, 0, 0, 0, 0, 0, 0, 409, 403,
783
404, 405, 0, 0, 406, 414, 407, 398, 0, 408,
784
0, 0, 411, 0, 412, 0, 413, 0, 0, 0,
785
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
786
429, 0, 430, 0, 431, 432, 433, 0, 0, 434,
787
435, 436, 437, 398, 0, 0, 0, 439, 459, 0,
788
0, 0, 398, 0, 440, 0, 0, 0, 0, 0,
789
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
790
0, 452, 0, 453, 0, 0, 455, 0, 458, 0,
791
357, 0, 0, 0, 0, 0, 398, 0, 466, 0,
792
0, 0, 0, 0, 461, 462, 463, 0, 464, 465,
793
0, 0, 467, 468, 469, 0, 495, 0, 0, 0,
794
398, 0, 0, 0, 504, 0, 0, 0, 0, 398,
795
477, 0, 0, 479, 480, 0, 481, 482, 0, 0,
796
0, 485, 0, 0, 0, 0, 0, 0, 0, 488,
797
0, 0, 490, 0, 491, 0, 0, 0, 0, 0,
798
0, 0, 497, 0, 498, 499, 500, 0, 505, 506,
799
0, 0, 0, 0, 0, 0, 0, 538, 509, 0,
800
0, 0, 511, 0, 0, 0, 512, 0, 0, 515,
801
0, 517, 525, 0, 0, 0, 0, 520, 0, 0,
802
521, 0, 0, 0, 0, 0, 527, 528, 0, 0,
803
530, 562, 531, 532, 533, 525, 0, 536, 544, 0,
804
0, 0, 539, 0, 0, 0, 0, 571, 542, 0,
805
0, 0, 0, 545, 546, 0, 0, 548, 0, 0,
806
550, 0, 0, 554, 0, 0, 0, 0, 558, 0,
807
0, 0, 0, 0, 0, 563, 0, 216, 217, 218,
808
0, 566, 222, 0, 0, 0, 568, 569, 0, 570,
809
236, 237, 0, 0, 240, 241, 0, 0, 0, 0,
810
248, 249, 0, 250, 0, 0, 0, 252, 0, 0,
811
0, 0, 0, 258, 259, 260, 0, 0, 264, 265,
812
266, 267, 0, 270, 271, 272, 273, 274, 0, 0,
813
0, 0, 279, 0, 281, 0, 284, 285, 0, 287,
814
288, 0, 290, 0, 0, 293, 294, 0, 0, 0,
815
0, 304, 305, 306, 0, 0, 0, 0, 0, 311,
816
0, 0, 0, 0, 317, 0, 0, 319, 320, 0,
817
0, 229, 0, 232, 233, 234, 0, 0, 0, 0,
818
0, 0, 329, 0, 244, 246, 0, 0, 0, 0,
819
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
820
0, 0, 0, 262, 0, 0, 346, 0, 0, 0,
821
0, 0, 0, 0, 0, 353, 276, 0, 0, 0,
822
0, 0, 283, 0, 0, 0, 225, 0, 0, 0,
823
0, 0, 0, 370, 0, 373, 374, 375, 376, 377,
824
378, 0, 0, 0, 0, 0, 0, 0, 0, 0,
825
316, 253, 0, 255, 0, 0, 322, 0, 324, 0,
826
0, 263, 0, 0, 0, 0, 0, 0, 0, 0,
827
0, 275, 0, 0, 277, 278, 0, 280, 0, 0,
828
0, 0, 0, 0, 0, 0, 342, 0, 0, 0,
829
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
830
0, 0, 423, 425, 0, 314, 0, 0, 0, 0,
831
0, 360, 0, 0, 0, 0, 0, 0, 0, 438,
832
0, 0, 0, 0, 0, 328, 0, 0, 0, 0,
833
0, 336, 337, 0, 0, 0, 330, 331, 0, 0,
834
446, 447, 448, 0, 450, 0, 0, 0, 0, 0,
835
454, 0, 0, 456, 0, 0, 0, 0, 0, 0,
836
347, 0, 356, 0, 0, 0, 0, 352, 0, 0,
837
0, 355, 365, 366, 0, 0, 369, 0, 361, 362,
838
0, 364, 0, 0, 367, 368, 379, 0, 0, 424,
839
426, 0, 0, 0, 0, 0, 0, 384, 0, 0,
840
0, 0, 0, 381, 0, 0, 0, 0, 0, 0,
841
0, 0, 486, 487, 402, 0, 489, 0, 0, 0,
842
0, 0, 0, 401, 0, 0, 0, 0, 0, 0,
843
0, 0, 451, 0, 0, 0, 0, 0, 0, 410,
844
0, 457, 0, 0, 422, 0, 0, 415, 416, 0,
845
0, 0, 513, 514, 0, 516, 0, 0, 519, 0,
846
0, 0, 0, 0, 0, 0, 422, 470, 0, 0,
847
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
848
534, 0, 0, 0, 0, 0, 0, 0, 441, 442,
849
0, 0, 445, 0, 0, 0, 449, 0, 0, 0,
850
547, 0, 0, 0, 0, 0, 0, 0, 0, 0,
851
0, 460, 0, 0, 0, 0, 0, 0, 0, 0,
852
0, 0, 0, 507, 565, 0, 0, 0, 0, 0,
853
0, 0, 471, 472, 473, 474, 0, 0, 0, 0,
854
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
855
478, 0, 0, 0, 0, 0, 483, 484, 0, 0,
856
529, 0, 0, 492, 0, 0, 0, 0, 0, 496,
857
0, 0, 0, 0, 0, 493, 494, 0, 0, 0,
858
0, 0, 0, 0, 422, 0, 0, 0, 0, 0,
859
0, 0, 0, 0, 552, 508, 0, 555, 0, 510,
860
0, 0, 560, 0, 0, 0, 0, 0, 564, 0,
861
518, 0, 0, 0, 0, 0, 0, 567, 0, 522,
862
0, 0, 0, 0, 0, 0, 537, 0, 0, 0,
863
0, 0, 0, 0, 535, 0, 0, 0, 0, 0,
864
0, 0, 0, 0, 0, 0, 549, 543, 0, 0,
865
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
866
0, 0, 0, 0, 556, 557, 0, 559, -262, 295,
867
0, 0, 0, 0, -262, -262, 0, 0, 215, -262,
868
-262, -262, -262, -262, -262, -262, 0, -262, -262, 572,
869
0, -262, -262, -262, -262, -262, -262, -262, -262, -262,
870
-262, -262, -262, -262, -262, -262, -262, 0, -262, -262,
871
-262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
872
0, -262, -262, -262, -262, -262, -262, -262, -262, -262,
873
-262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
874
-262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
875
-262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
876
-262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
877
-262, 0, -262, -262, -262, -262, -262, -262, -262, -262,
878
-262, -262, -262, -262, -262, 0, -262, -262, -262, -262,
879
-264, 397, 0, 0, 0, 0, -264, -264, 0, 0,
880
215, -264, -264, -264, -264, -264, -264, -264, 0, -264,
881
-264, 0, 0, -264, -264, -264, -264, -264, -264, -264,
882
-264, -264, -264, -264, -264, -264, -264, -264, -264, 0,
883
-264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
884
-264, -264, 0, -264, -264, -264, -264, -264, -264, -264,
885
-264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
886
-264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
887
-264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
888
-264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
889
-264, -264, -264, 0, -264, -264, -264, -264, -264, -264,
890
-264, -264, -264, -264, -264, -264, -264, 0, -264, -264,
891
-264, -264, -80, 397, 0, 0, 0, 0, -80, -80,
892
0, 0, 215, -80, -80, -80, -80, -80, -80, -80,
893
0, -80, -80, 0, 0, -80, -80, -80, -80, -80,
894
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
895
-80, 0, -80, -80, -80, -80, -80, -80, -80, -80,
896
-80, -80, -80, -80, 0, -80, -80, -80, -80, -80,
897
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
898
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
899
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
900
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
901
-80, -80, -80, -80, -80, 0, -80, -80, -80, -80,
902
-80, -80, -80, -80, -80, -80, -80, -80, -80, 0,
903
-80, -80, -80, -80, -81, 397, 0, 0, 0, 0,
904
-81, -81, 0, 0, 215, -81, -81, -81, -81, -81,
905
-81, -81, 0, -81, -81, 0, 0, -81, -81, -81,
906
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
907
-81, -81, -81, 0, -81, -81, -81, -81, -81, -81,
908
-81, -81, -81, -81, -81, -81, 0, -81, -81, -81,
909
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
910
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
911
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
912
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
913
-81, -81, -81, -81, -81, -81, -81, 0, -81, -81,
914
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
915
-81, 0, -81, -81, -81, -81, -93, 397, 0, 0,
916
0, 0, -93, -93, 0, 0, 215, -93, -93, -93,
917
-93, -93, -93, -93, 0, -93, -93, 0, 0, -93,
918
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
919
-93, -93, -93, -93, -93, 0, -93, -93, -93, -93,
920
-93, -93, -93, -93, -93, -93, -93, -93, 0, -93,
921
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
922
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
923
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
924
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
925
-93, -93, -93, -93, -93, -93, -93, -93, -93, 0,
926
-93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
927
-93, -93, -93, 0, -93, -93, -93, -93, -87, 397,
928
0, 0, 0, 0, -87, -87, 0, 0, 215, -87,
929
-87, -87, -87, -87, -87, -87, 0, -87, -87, 0,
930
0, -87, -87, -87, -87, -87, -87, -87, -87, -87,
931
-87, -87, -87, -87, -87, -87, -87, 0, -87, -87,
932
-87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
933
0, -87, -87, -87, -87, -87, -87, -87, -87, -87,
934
-87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
935
-87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
936
-87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
937
-87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
938
-87, 0, -87, -87, -87, -87, -87, -87, -87, -87,
939
-87, -87, -87, -87, -87, 0, -87, -87, -87, -87,
940
-88, 397, 0, 0, 0, 0, -88, -88, 0, 0,
941
215, -88, -88, -88, -88, -88, -88, -88, 0, -88,
942
-88, 0, 0, -88, -88, -88, -88, -88, -88, -88,
943
-88, -88, -88, -88, -88, -88, -88, -88, -88, 0,
944
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
945
-88, -88, 0, -88, -88, -88, -88, -88, -88, -88,
946
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
947
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
948
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
949
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
950
-88, -88, -88, 0, -88, -88, -88, -88, -88, -88,
951
-88, -88, -88, -88, -88, -88, -88, 0, -88, -88,
952
-88, -88, -126, 397, 0, 0, 0, 0, -126, -126,
953
0, 0, 215, -126, -126, -126, -126, -126, -126, -126,
954
0, -126, -126, 0, 0, -126, -126, -126, -126, -126,
955
-126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
956
-126, 0, -126, -126, -126, -126, -126, -126, -126, -126,
957
-126, -126, -126, -126, 0, -126, -126, -126, -126, -126,
958
-126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
959
-126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
960
-126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
961
-126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
962
-126, -126, -126, -126, -126, 0, -126, -126, -126, -126,
963
-126, -126, -126, -126, -126, -126, -126, -126, -126, 0,
964
-126, -126, -126, -126, -94, 397, 0, 0, 0, 0,
965
-94, -94, 0, 0, 215, -94, -94, -94, -94, -94,
966
-94, -94, 0, -94, -94, 0, 0, -94, -94, -94,
967
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
968
-94, -94, -94, 0, -94, -94, -94, -94, -94, -94,
969
-94, -94, -94, -94, -94, -94, 0, -94, -94, -94,
970
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
971
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
972
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
973
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
974
-94, -94, -94, -94, -94, -94, -94, 0, -94, -94,
975
-94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
976
-94, 0, -94, -94, -94, -94, -125, 397, 0, 0,
977
0, 0, -125, -125, 0, 0, 215, -125, -125, -125,
978
-125, -125, -125, -125, 0, -125, -125, 0, 0, -125,
979
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
980
-125, -125, -125, -125, -125, 0, -125, -125, -125, -125,
981
-125, -125, -125, -125, -125, -125, -125, -125, 0, -125,
982
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
983
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
984
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
985
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
986
-125, -125, -125, -125, -125, -125, -125, -125, -125, 0,
987
-125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
988
-125, -125, -125, 0, -125, -125, -125, -125, -95, 397,
989
0, 0, 0, 0, -95, -95, 0, 0, 215, -95,
990
-95, -95, -95, -95, -95, -95, 0, -95, -95, 0,
991
0, -95, -95, -95, -95, -95, -95, -95, -95, -95,
992
-95, -95, -95, -95, -95, -95, -95, 0, -95, -95,
993
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
994
0, -95, -95, -95, -95, -95, -95, -95, -95, -95,
995
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
996
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
997
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
998
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
999
-95, 0, -95, -95, -95, -95, -95, -95, -95, -95,
1000
-95, -95, -95, -95, -95, 0, -95, -95, -95, -95,
1001
-1, 1, 0, 0, 0, 0, 2, 3, 0, 0,
1002
0, 4, 5, 6, 7, 8, 9, 10, 0, 11,
1003
12, 0, 0, 13, 14, 15, 16, 17, 18, 19,
1004
20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1005
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1006
39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
1007
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1008
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1009
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1010
78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1011
88, 89, 90, 0, 91, 92, 93, 94, 95, 96,
1012
97, 98, 99, 100, 101, 102, 103, 1, 104, 105,
1013
106, 107, 2, 3, 0, 0, 0, 4, 5, 6,
1014
7, 8, 9, 10, 0, 11, 12, 0, 0, 13,
1015
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1016
24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1017
33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
1018
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1019
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1020
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1021
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1022
82, 83, 84, 85, 86, 87, 88, 89, 90, 0,
1023
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1024
101, 102, 103, 0, 104, 105, 106, 107
1027
static const short yycheck[] =
1029
119, 120, 256, 294, 123, 296, 10, 126, 127, 1,
1030
10, 130, 131, 132, 133, 146, 10, 122, 10, 8,
1031
9, 140, 184, 10, 143, 8, 9, 9, 8, 9,
1032
9, 150, 296, 295, 8, 9, 10, 299, 8, 9,
1033
302, 303, 8, 9, 10, 1, 8, 9, 9, 10,
1034
169, 182, 183, 172, 10, 9, 175, 122, 177, 178,
1035
8, 9, 8, 9, 122, 9, 122, 10, 122, 188,
1036
122, 190, 191, 192, 338, 194, 195, 0, 197, 210,
1037
0, 200, 108, 526, 203, 204, -1, -1, -1, -1,
1038
209, -1, 211, -1, 225, 257, 358, -1, -1, -1,
1039
-1, -1, -1, -1, -1, -1, -1, -1, 227, -1,
1040
-1, 230, 231, -1, -1, -1, 235, -1, 122, 238,
1041
239, 383, -1, 242, 243, 287, 245, -1, 247, 123,
1042
122, -1, 251, -1, 123, -1, 123, 428, -1, 258,
1043
123, 123, 261, 123, 123, -1, -1, -1, 122, -1,
1044
-1, -1, 122, -1, -1, -1, -1, -1, -1, -1,
1045
-1, -1, 293, 282, -1, 296, -1, 286, -1, 300,
1046
301, 290, 291, 427, -1, 466, -1, -1, -1, -1,
1047
-1, -1, -1, -1, -1, -1, -1, -1, 319, 308,
1048
309, 310, -1, -1, 313, 326, 315, 459, -1, 318,
1049
-1, -1, 321, -1, 323, -1, 325, -1, -1, -1,
1050
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1051
339, -1, 341, -1, 343, 344, 345, -1, -1, 348,
1052
349, 350, 351, 495, -1, -1, -1, 356, 400, -1,
1053
-1, -1, 504, -1, 363, -1, -1, -1, -1, -1,
1054
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1055
-1, 380, -1, 382, -1, -1, 385, -1, 399, -1,
1056
524, -1, -1, -1, -1, -1, 538, -1, 409, -1,
1057
-1, -1, -1, -1, 403, 404, 405, -1, 407, 408,
1058
-1, -1, 411, 412, 413, -1, 458, -1, -1, -1,
1059
562, -1, -1, -1, 466, -1, -1, -1, -1, 571,
1060
429, -1, -1, 432, 433, -1, 435, 436, -1, -1,
1061
-1, 440, -1, -1, -1, -1, -1, -1, -1, 448,
1062
-1, -1, 451, -1, 453, -1, -1, -1, -1, -1,
1063
-1, -1, 461, -1, 463, 464, 465, -1, 467, 468,
1064
-1, -1, -1, -1, -1, -1, -1, 519, 477, -1,
1065
-1, -1, 481, -1, -1, -1, 485, -1, -1, 488,
1066
-1, 490, 503, -1, -1, -1, -1, 496, -1, -1,
1067
499, -1, -1, -1, -1, -1, 505, 506, -1, -1,
1068
509, 553, 511, 512, 513, 526, -1, 516, 529, -1,
1069
-1, -1, 521, -1, -1, -1, -1, 569, 527, -1,
1070
-1, -1, -1, 532, 533, -1, -1, 536, -1, -1,
1071
539, -1, -1, 542, -1, -1, -1, -1, 547, -1,
1072
-1, -1, -1, -1, -1, 554, -1, 111, 112, 113,
1073
-1, 560, 116, -1, -1, -1, 565, 566, -1, 568,
1074
124, 125, -1, -1, 128, 129, -1, -1, -1, -1,
1075
134, 135, -1, 137, -1, -1, -1, 141, -1, -1,
1076
-1, -1, -1, 147, 148, 149, -1, -1, 152, 153,
1077
154, 155, -1, 157, 158, 159, 160, 161, -1, -1,
1078
-1, -1, 166, -1, 168, -1, 170, 171, -1, 173,
1079
174, -1, 176, -1, -1, 179, 180, -1, -1, -1,
1080
-1, 185, 186, 187, -1, -1, -1, -1, -1, 193,
1081
-1, -1, -1, -1, 198, -1, -1, 201, 202, -1,
1082
-1, 118, -1, 120, 121, 122, -1, -1, -1, -1,
1083
-1, -1, 216, -1, 131, 132, -1, -1, -1, -1,
1084
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1085
-1, -1, -1, 150, -1, -1, 240, -1, -1, -1,
1086
-1, -1, -1, -1, -1, 249, 163, -1, -1, -1,
1087
-1, -1, 169, -1, -1, -1, 117, -1, -1, -1,
1088
-1, -1, -1, 267, -1, 269, 270, 271, 272, 273,
1089
274, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1090
197, 142, -1, 144, -1, -1, 203, -1, 205, -1,
1091
-1, 152, -1, -1, -1, -1, -1, -1, -1, -1,
1092
-1, 162, -1, -1, 165, 166, -1, 168, -1, -1,
1093
-1, -1, -1, -1, -1, -1, 233, -1, -1, -1,
1094
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1095
-1, -1, 336, 337, -1, 196, -1, -1, -1, -1,
1096
-1, 258, -1, -1, -1, -1, -1, -1, -1, 353,
1097
-1, -1, -1, -1, -1, 216, -1, -1, -1, -1,
1098
-1, 222, 223, -1, -1, -1, 217, 218, -1, -1,
1099
374, 375, 376, -1, 378, -1, -1, -1, -1, -1,
1100
384, -1, -1, 387, -1, -1, -1, -1, -1, -1,
1101
241, -1, 253, -1, -1, -1, -1, 248, -1, -1,
1102
-1, 252, 263, 264, -1, -1, 267, -1, 259, 260,
1103
-1, 262, -1, -1, 265, 266, 277, -1, -1, 336,
1104
337, -1, -1, -1, -1, -1, -1, 288, -1, -1,
1105
-1, -1, -1, 284, -1, -1, -1, -1, -1, -1,
1106
-1, -1, 446, 447, 305, -1, 450, -1, -1, -1,
1107
-1, -1, -1, 304, -1, -1, -1, -1, -1, -1,
1108
-1, -1, 379, -1, -1, -1, -1, -1, -1, 320,
1109
-1, 388, -1, -1, 335, -1, -1, 328, 329, -1,
1110
-1, -1, 486, 487, -1, 489, -1, -1, 492, -1,
1111
-1, -1, -1, -1, -1, -1, 357, 414, -1, -1,
1112
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1113
514, -1, -1, -1, -1, -1, -1, -1, 369, 370,
1114
-1, -1, 373, -1, -1, -1, 377, -1, -1, -1,
1115
534, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1116
-1, 402, -1, -1, -1, -1, -1, -1, -1, -1,
1117
-1, -1, -1, 470, 558, -1, -1, -1, -1, -1,
1118
-1, -1, 423, 424, 425, 426, -1, -1, -1, -1,
1119
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1120
431, -1, -1, -1, -1, -1, 437, 438, -1, -1,
1121
507, -1, -1, 454, -1, -1, -1, -1, -1, 460,
1122
-1, -1, -1, -1, -1, 456, 457, -1, -1, -1,
1123
-1, -1, -1, -1, 475, -1, -1, -1, -1, -1,
1124
-1, -1, -1, -1, 541, 476, -1, 544, -1, 480,
1125
-1, -1, 549, -1, -1, -1, -1, -1, 555, -1,
1126
491, -1, -1, -1, -1, -1, -1, 564, -1, 500,
1127
-1, -1, -1, -1, -1, -1, 517, -1, -1, -1,
1128
-1, -1, -1, -1, 515, -1, -1, -1, -1, -1,
1129
-1, -1, -1, -1, -1, -1, 537, 528, -1, -1,
1130
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1131
-1, -1, -1, -1, 545, 546, -1, 548, 0, 1,
1132
-1, -1, -1, -1, 6, 7, -1, -1, 10, 11,
1133
12, 13, 14, 15, 16, 17, -1, 19, 20, 570,
1134
-1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1135
32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
1136
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1137
-1, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1138
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1139
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1140
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1141
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
1142
102, -1, 104, 105, 106, 107, 108, 109, 110, 111,
1143
112, 113, 114, 115, 116, -1, 118, 119, 120, 121,
1144
0, 1, -1, -1, -1, -1, 6, 7, -1, -1,
1145
10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
1146
20, -1, -1, 23, 24, 25, 26, 27, 28, 29,
1147
30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
1148
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1149
50, 51, -1, 53, 54, 55, 56, 57, 58, 59,
1150
60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1151
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1152
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1153
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1154
100, 101, 102, -1, 104, 105, 106, 107, 108, 109,
1155
110, 111, 112, 113, 114, 115, 116, -1, 118, 119,
1156
120, 121, 0, 1, -1, -1, -1, -1, 6, 7,
1157
-1, -1, 10, 11, 12, 13, 14, 15, 16, 17,
1158
-1, 19, 20, -1, -1, 23, 24, 25, 26, 27,
1159
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1160
38, -1, 40, 41, 42, 43, 44, 45, 46, 47,
1161
48, 49, 50, 51, -1, 53, 54, 55, 56, 57,
1162
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1163
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1164
78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1165
88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1166
98, 99, 100, 101, 102, -1, 104, 105, 106, 107,
1167
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
1168
118, 119, 120, 121, 0, 1, -1, -1, -1, -1,
1169
6, 7, -1, -1, 10, 11, 12, 13, 14, 15,
1170
16, 17, -1, 19, 20, -1, -1, 23, 24, 25,
1171
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1172
36, 37, 38, -1, 40, 41, 42, 43, 44, 45,
1173
46, 47, 48, 49, 50, 51, -1, 53, 54, 55,
1174
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1175
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1176
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1177
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1178
96, 97, 98, 99, 100, 101, 102, -1, 104, 105,
1179
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
1180
116, -1, 118, 119, 120, 121, 0, 1, -1, -1,
1181
-1, -1, 6, 7, -1, -1, 10, 11, 12, 13,
1182
14, 15, 16, 17, -1, 19, 20, -1, -1, 23,
1183
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1184
34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
1185
44, 45, 46, 47, 48, 49, 50, 51, -1, 53,
1186
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1187
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1188
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1189
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1190
94, 95, 96, 97, 98, 99, 100, 101, 102, -1,
1191
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1192
114, 115, 116, -1, 118, 119, 120, 121, 0, 1,
1193
-1, -1, -1, -1, 6, 7, -1, -1, 10, 11,
1194
12, 13, 14, 15, 16, 17, -1, 19, 20, -1,
1195
-1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1196
32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
1197
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1198
-1, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1199
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1200
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1201
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1202
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
1203
102, -1, 104, 105, 106, 107, 108, 109, 110, 111,
1204
112, 113, 114, 115, 116, -1, 118, 119, 120, 121,
1205
0, 1, -1, -1, -1, -1, 6, 7, -1, -1,
1206
10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
1207
20, -1, -1, 23, 24, 25, 26, 27, 28, 29,
1208
30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
1209
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1210
50, 51, -1, 53, 54, 55, 56, 57, 58, 59,
1211
60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1212
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1213
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1214
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1215
100, 101, 102, -1, 104, 105, 106, 107, 108, 109,
1216
110, 111, 112, 113, 114, 115, 116, -1, 118, 119,
1217
120, 121, 0, 1, -1, -1, -1, -1, 6, 7,
1218
-1, -1, 10, 11, 12, 13, 14, 15, 16, 17,
1219
-1, 19, 20, -1, -1, 23, 24, 25, 26, 27,
1220
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1221
38, -1, 40, 41, 42, 43, 44, 45, 46, 47,
1222
48, 49, 50, 51, -1, 53, 54, 55, 56, 57,
1223
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1224
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1225
78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1226
88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1227
98, 99, 100, 101, 102, -1, 104, 105, 106, 107,
1228
108, 109, 110, 111, 112, 113, 114, 115, 116, -1,
1229
118, 119, 120, 121, 0, 1, -1, -1, -1, -1,
1230
6, 7, -1, -1, 10, 11, 12, 13, 14, 15,
1231
16, 17, -1, 19, 20, -1, -1, 23, 24, 25,
1232
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1233
36, 37, 38, -1, 40, 41, 42, 43, 44, 45,
1234
46, 47, 48, 49, 50, 51, -1, 53, 54, 55,
1235
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1236
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1237
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1238
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1239
96, 97, 98, 99, 100, 101, 102, -1, 104, 105,
1240
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
1241
116, -1, 118, 119, 120, 121, 0, 1, -1, -1,
1242
-1, -1, 6, 7, -1, -1, 10, 11, 12, 13,
1243
14, 15, 16, 17, -1, 19, 20, -1, -1, 23,
1244
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1245
34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
1246
44, 45, 46, 47, 48, 49, 50, 51, -1, 53,
1247
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1248
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1249
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1250
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1251
94, 95, 96, 97, 98, 99, 100, 101, 102, -1,
1252
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1253
114, 115, 116, -1, 118, 119, 120, 121, 0, 1,
1254
-1, -1, -1, -1, 6, 7, -1, -1, 10, 11,
1255
12, 13, 14, 15, 16, 17, -1, 19, 20, -1,
1256
-1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1257
32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
1258
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1259
-1, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1260
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1261
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1262
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1263
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
1264
102, -1, 104, 105, 106, 107, 108, 109, 110, 111,
1265
112, 113, 114, 115, 116, -1, 118, 119, 120, 121,
1266
0, 1, -1, -1, -1, -1, 6, 7, -1, -1,
1267
-1, 11, 12, 13, 14, 15, 16, 17, -1, 19,
1268
20, -1, -1, 23, 24, 25, 26, 27, 28, 29,
1269
30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
1270
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1271
50, 51, -1, 53, 54, 55, 56, 57, 58, 59,
1272
60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1273
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1274
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1275
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1276
100, 101, 102, -1, 104, 105, 106, 107, 108, 109,
1277
110, 111, 112, 113, 114, 115, 116, 1, 118, 119,
1278
120, 121, 6, 7, -1, -1, -1, 11, 12, 13,
1279
14, 15, 16, 17, -1, 19, 20, -1, -1, 23,
1280
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1281
34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
1282
44, 45, 46, 47, 48, 49, 50, 51, -1, 53,
1283
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1284
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1285
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1286
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1287
94, 95, 96, 97, 98, 99, 100, 101, 102, -1,
1288
104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1289
114, 115, 116, -1, 118, 119, 120, 121
1293
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1294
#line 3 "/usr/share/bison/bison.simple"
1296
/* Skeleton output parser for bison,
1298
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
1301
This program is free software; you can redistribute it and/or modify
1302
it under the terms of the GNU General Public License as published by
1303
the Free Software Foundation; either version 2, or (at your option)
1306
This program is distributed in the hope that it will be useful,
1307
but WITHOUT ANY WARRANTY; without even the implied warranty of
1308
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1309
GNU General Public License for more details.
1311
You should have received a copy of the GNU General Public License
1312
along with this program; if not, write to the Free Software
1313
Foundation, Inc., 59 Temple Place - Suite 330,
1314
Boston, MA 02111-1307, USA. */
1316
/* As a special exception, when this file is copied by Bison into a
1317
Bison output file, you may use that output file without restriction.
1318
This special exception was added by the Free Software Foundation
1319
in version 1.24 of Bison. */
1321
/* This is the parser code that is written into each bison parser when
1322
the %semantic_parser declaration is not specified in the grammar.
1323
It was written by Richard Stallman by simplifying the hairy parser
1324
used when %semantic_parser is specified. */
1326
/* All symbols defined below should begin with yy or YY, to avoid
1327
infringing on user name space. This should be done even for local
1328
variables, as they might otherwise be expanded by user macros.
1329
There are some unavoidable exceptions within include files to
1330
define necessary library symbols; they are noted "INFRINGES ON
1331
USER NAME SPACE" below. */
1333
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
1335
/* The parser invokes alloca or malloc; define the necessary symbols. */
1337
# if YYSTACK_USE_ALLOCA
1338
# define YYSTACK_ALLOC alloca
1340
# ifndef YYSTACK_USE_ALLOCA
1341
# if defined (alloca) || defined (_ALLOCA_H)
1342
# define YYSTACK_ALLOC alloca
1345
# define YYSTACK_ALLOC __builtin_alloca
1351
# ifdef YYSTACK_ALLOC
1352
/* Pacify GCC's `empty if-body' warning. */
1353
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1355
# if defined (__STDC__) || defined (__cplusplus)
1356
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1357
# define YYSIZE_T size_t
1359
# define YYSTACK_ALLOC malloc
1360
# define YYSTACK_FREE free
1362
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
1365
#if (! defined (yyoverflow) \
1366
&& (! defined (__cplusplus) \
1367
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1369
/* A type that is properly aligned for any stack member. */
1379
/* The size of the maximum gap between one aligned stack and the next. */
1380
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
1382
/* The size of an array large to enough to hold all stacks, each with
1385
# define YYSTACK_BYTES(N) \
1386
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1387
+ 2 * YYSTACK_GAP_MAX)
1389
# define YYSTACK_BYTES(N) \
1390
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
1394
/* Copy COUNT objects from FROM to TO. The source and destination do
1398
# define YYCOPY(To, From, Count) \
1399
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1401
# define YYCOPY(To, From, Count) \
1404
register YYSIZE_T yyi; \
1405
for (yyi = 0; yyi < (Count); yyi++) \
1406
(To)[yyi] = (From)[yyi]; \
1412
/* Relocate STACK from its old location to the new one. The
1413
local variables YYSIZE and YYSTACKSIZE give the old and new number of
1414
elements in the stack, and YYPTR gives the new location of the
1415
stack. Advance YYPTR to a properly aligned location for the next
1417
# define YYSTACK_RELOCATE(Stack) \
1420
YYSIZE_T yynewbytes; \
1421
YYCOPY (&yyptr->Stack, Stack, yysize); \
1422
Stack = &yyptr->Stack; \
1423
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
1424
yyptr += yynewbytes / sizeof (*yyptr); \
1431
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1432
# define YYSIZE_T __SIZE_TYPE__
1434
#if ! defined (YYSIZE_T) && defined (size_t)
1435
# define YYSIZE_T size_t
1437
#if ! defined (YYSIZE_T)
1438
# if defined (__STDC__) || defined (__cplusplus)
1439
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1440
# define YYSIZE_T size_t
1443
#if ! defined (YYSIZE_T)
1444
# define YYSIZE_T unsigned int
1447
#define yyerrok (yyerrstatus = 0)
1448
#define yyclearin (yychar = YYEMPTY)
1451
#define YYACCEPT goto yyacceptlab
1452
#define YYABORT goto yyabortlab
1453
#define YYERROR goto yyerrlab1
1454
/* Like YYERROR except do call yyerror. This remains here temporarily
1455
to ease the transition to the new meaning of YYERROR, for GCC.
1456
Once GCC version 2 has supplanted version 1, this can go. */
1457
#define YYFAIL goto yyerrlab
1458
#define YYRECOVERING() (!!yyerrstatus)
1459
#define YYBACKUP(Token, Value) \
1461
if (yychar == YYEMPTY && yylen == 1) \
1465
yychar1 = YYTRANSLATE (yychar); \
1471
yyerror ("syntax error: cannot back up"); \
1477
#define YYERRCODE 256
1480
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
1483
When YYLLOC_DEFAULT is run, CURRENT is set the location of the
1484
first token. By default, to implement support for ranges, extend
1485
its range to the last symbol. */
1487
#ifndef YYLLOC_DEFAULT
1488
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1489
Current.last_line = Rhs[N].last_line; \
1490
Current.last_column = Rhs[N].last_column;
1494
/* YYLEX -- calling `yylex' with the right arguments. */
1499
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1501
# define YYLEX yylex (&yylval, &yylloc)
1503
# else /* !YYLSP_NEEDED */
1505
# define YYLEX yylex (&yylval, YYLEX_PARAM)
1507
# define YYLEX yylex (&yylval)
1509
# endif /* !YYLSP_NEEDED */
1511
# define YYLEX yylex ()
1512
#endif /* !YYPURE */
1515
/* Enable debugging if requested. */
1519
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1520
# define YYFPRINTF fprintf
1523
# define YYDPRINTF(Args) \
1528
/* Nonzero means print parse trace. It is left uninitialized so that
1529
multiple parsers can coexist. */
1531
#else /* !YYDEBUG */
1532
# define YYDPRINTF(Args)
1533
#endif /* !YYDEBUG */
1535
/* YYINITDEPTH -- initial size of the parser's stacks. */
1537
# define YYINITDEPTH 200
1540
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1541
if the built-in stack extension method is used).
1543
Do not make this value too large; the results are undefined if
1544
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1545
evaluated with infinite-precision integer arithmetic. */
1552
# define YYMAXDEPTH 10000
1555
#ifdef YYERROR_VERBOSE
1558
# if defined (__GLIBC__) && defined (_STRING_H)
1559
# define yystrlen strlen
1561
/* Return the length of YYSTR. */
1563
# if defined (__STDC__) || defined (__cplusplus)
1564
yystrlen (const char *yystr)
1570
register const char *yys = yystr;
1572
while (*yys++ != '\0')
1575
return yys - yystr - 1;
1581
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1582
# define yystpcpy stpcpy
1584
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1587
# if defined (__STDC__) || defined (__cplusplus)
1588
yystpcpy (char *yydest, const char *yysrc)
1590
yystpcpy (yydest, yysrc)
1595
register char *yyd = yydest;
1596
register const char *yys = yysrc;
1598
while ((*yyd++ = *yys++) != '\0')
1607
#line 315 "/usr/share/bison/bison.simple"
1610
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1611
into yyparse. The argument should have type void *.
1612
It should actually point to an object.
1613
Grammar actions can access the variable by casting it
1614
to the proper pointer type. */
1616
#ifdef YYPARSE_PARAM
1617
# if defined (__STDC__) || defined (__cplusplus)
1618
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1619
# define YYPARSE_PARAM_DECL
1621
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
1622
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1624
#else /* !YYPARSE_PARAM */
1625
# define YYPARSE_PARAM_ARG
1626
# define YYPARSE_PARAM_DECL
1627
#endif /* !YYPARSE_PARAM */
1629
/* Prevent warning if -Wstrict-prototypes. */
1631
# ifdef YYPARSE_PARAM
1632
int yyparse (void *);
1638
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
1639
variables are global, or local to YYPARSE. */
1641
#define YY_DECL_NON_LSP_VARIABLES \
1642
/* The lookahead symbol. */ \
1645
/* The semantic value of the lookahead symbol. */ \
1648
/* Number of parse errors so far. */ \
1652
# define YY_DECL_VARIABLES \
1653
YY_DECL_NON_LSP_VARIABLES \
1655
/* Location data for the lookahead symbol. */ \
1658
# define YY_DECL_VARIABLES \
1659
YY_DECL_NON_LSP_VARIABLES
1663
/* If nonreentrant, generate the variables here. */
1667
#endif /* !YYPURE */
1670
yyparse (YYPARSE_PARAM_ARG)
1673
/* If reentrant, generate the variables here. */
1676
#endif /* !YYPURE */
1678
register int yystate;
1681
/* Number of tokens to shift before error messages enabled. */
1683
/* Lookahead token as an internal (translated) token number. */
1686
/* Three stacks and their tools:
1687
`yyss': related to states,
1688
`yyvs': related to semantic values,
1689
`yyls': related to locations.
1691
Refer to the stacks thru separate pointers, to allow yyoverflow
1692
to reallocate them elsewhere. */
1694
/* The state stack. */
1695
short yyssa[YYINITDEPTH];
1696
short *yyss = yyssa;
1697
register short *yyssp;
1699
/* The semantic value stack. */
1700
YYSTYPE yyvsa[YYINITDEPTH];
1701
YYSTYPE *yyvs = yyvsa;
1702
register YYSTYPE *yyvsp;
1705
/* The location stack. */
1706
YYLTYPE yylsa[YYINITDEPTH];
1707
YYLTYPE *yyls = yylsa;
1712
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1714
# define YYPOPSTACK (yyvsp--, yyssp--)
1717
YYSIZE_T yystacksize = YYINITDEPTH;
1720
/* The variables used to return semantic value and location from the
1727
/* When reducing, the number of symbols on the RHS of the reduced
1731
YYDPRINTF ((stderr, "Starting parse\n"));
1736
yychar = YYEMPTY; /* Cause a token to be read. */
1738
/* Initialize stack pointers.
1739
Waste one element of value and location stack
1740
so that they stay on the same level as the state stack.
1741
The wasted elements are never initialized. */
1750
/*------------------------------------------------------------.
1751
| yynewstate -- Push a new state, which is found in yystate. |
1752
`------------------------------------------------------------*/
1754
/* In all cases, when you get here, the value and location stacks
1755
have just been pushed. so pushing a state here evens the stacks.
1762
if (yyssp >= yyss + yystacksize - 1)
1764
/* Get the current used size of the three stacks, in elements. */
1765
YYSIZE_T yysize = yyssp - yyss + 1;
1769
/* Give user a chance to reallocate the stack. Use copies of
1770
these so that the &'s don't force the real ones into
1772
YYSTYPE *yyvs1 = yyvs;
1773
short *yyss1 = yyss;
1775
/* Each stack pointer address is followed by the size of the
1776
data in use in that stack, in bytes. */
1778
YYLTYPE *yyls1 = yyls;
1779
/* This used to be a conditional around just the two extra args,
1780
but that might be undefined if yyoverflow is a macro. */
1781
yyoverflow ("parser stack overflow",
1782
&yyss1, yysize * sizeof (*yyssp),
1783
&yyvs1, yysize * sizeof (*yyvsp),
1784
&yyls1, yysize * sizeof (*yylsp),
1788
yyoverflow ("parser stack overflow",
1789
&yyss1, yysize * sizeof (*yyssp),
1790
&yyvs1, yysize * sizeof (*yyvsp),
1796
#else /* no yyoverflow */
1797
# ifndef YYSTACK_RELOCATE
1800
/* Extend the stack our own way. */
1801
if (yystacksize >= YYMAXDEPTH)
1804
if (yystacksize > YYMAXDEPTH)
1805
yystacksize = YYMAXDEPTH;
1808
short *yyss1 = yyss;
1809
union yyalloc *yyptr =
1810
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1813
YYSTACK_RELOCATE (yyss);
1814
YYSTACK_RELOCATE (yyvs);
1816
YYSTACK_RELOCATE (yyls);
1818
# undef YYSTACK_RELOCATE
1820
YYSTACK_FREE (yyss1);
1823
#endif /* no yyoverflow */
1825
yyssp = yyss + yysize - 1;
1826
yyvsp = yyvs + yysize - 1;
1828
yylsp = yyls + yysize - 1;
1831
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1832
(unsigned long int) yystacksize));
1834
if (yyssp >= yyss + yystacksize - 1)
1838
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1848
/* Do appropriate processing given the current state. */
1849
/* Read a lookahead token if we need one and don't already have one. */
1852
/* First try to decide what to do without reference to lookahead token. */
1854
yyn = yypact[yystate];
1858
/* Not known => get a lookahead token if don't already have one. */
1860
/* yychar is either YYEMPTY or YYEOF
1861
or a valid token in external form. */
1863
if (yychar == YYEMPTY)
1865
YYDPRINTF ((stderr, "Reading a token: "));
1869
/* Convert token to internal form (in yychar1) for indexing tables with */
1871
if (yychar <= 0) /* This means end of input. */
1874
yychar = YYEOF; /* Don't call YYLEX any more */
1876
YYDPRINTF ((stderr, "Now at end of input.\n"));
1880
yychar1 = YYTRANSLATE (yychar);
1883
/* We have to keep this `#if YYDEBUG', since we use variables
1884
which are defined only if `YYDEBUG' is set. */
1887
YYFPRINTF (stderr, "Next token is %d (%s",
1888
yychar, yytname[yychar1]);
1889
/* Give the individual parser a way to print the precise
1890
meaning of a token, for further debugging info. */
1892
YYPRINT (stderr, yychar, yylval);
1894
YYFPRINTF (stderr, ")\n");
1900
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1905
/* yyn is what to do for this token type in this state.
1906
Negative => reduce, -yyn is rule number.
1907
Positive => shift, yyn is new state.
1908
New state is final state => don't bother to shift,
1909
just return success.
1910
0, or most negative number => error. */
1925
/* Shift the lookahead token. */
1926
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1927
yychar, yytname[yychar1]));
1929
/* Discard the token being shifted unless it is eof. */
1930
if (yychar != YYEOF)
1938
/* Count tokens shifted since error; after three, turn off error
1947
/*-----------------------------------------------------------.
1948
| yydefault -- do the default action for the current state. |
1949
`-----------------------------------------------------------*/
1951
yyn = yydefact[yystate];
1957
/*-----------------------------.
1958
| yyreduce -- Do a reduction. |
1959
`-----------------------------*/
1961
/* yyn is the number of a rule to reduce with. */
1964
/* If YYLEN is nonzero, implement the default value of the action:
1967
Otherwise, the following line sets YYVAL to the semantic value of
1968
the lookahead token. This behavior is undocumented and Bison
1969
users should not rely upon it. Assigning to YYVAL
1970
unconditionally makes the parser a bit smaller, and it avoids a
1971
GCC warning that YYVAL may be used uninitialized. */
1972
yyval = yyvsp[1-yylen];
1975
/* Similarly for the default location. Let the user run additional
1976
commands if for instance locations are ranges. */
1977
yyloc = yylsp[1-yylen];
1978
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1982
/* We have to keep this `#if YYDEBUG', since we use variables which
1983
are defined only if `YYDEBUG' is set. */
1988
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1991
/* Print the symbols being reduced, and their result. */
1992
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1993
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1994
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
2001
#line 336 "parser.yxx"
2005
#line 344 "parser.yxx"
2008
fRecovering = false;
2012
#line 349 "parser.yxx"
2014
// This is used to mark the end of a RunProgram chunk
2015
// TODO: limit this to within a RunProgram only
2016
if (strchr(yyvsp[0].stype, 0377))
2018
DiscardStringValue(yyvsp[0].stype);
2020
fRecovering = false;
2024
if( pArchiveCallback != NULL )
2026
// RISpec 3.2 isn't very clear, not sure if stripping the '#'s is right or not
2027
if( yyvsp[0].stype[0] == '#' && yyvsp[0].stype[1] == '#' ) // Structure comment
2029
pArchiveCallback("structure", "%s", &( yyvsp[0].stype[2]) );
2030
} else { // User Data Record comment
2031
pArchiveCallback("comment", "%s", &( yyvsp[0].stype[1]) );
2034
DiscardStringValue(yyvsp[0].stype);
2037
fRecovering = false;
2041
#line 379 "parser.yxx"
2045
#line 381 "parser.yxx"
2047
ParserDeclare(*ParseCallbackInterface, yyvsp[-1].stype, yyvsp[0].stype);
2048
DiscardStringValue(yyvsp[-1].stype);
2049
DiscardStringValue(yyvsp[0].stype);
2053
#line 387 "parser.yxx"
2054
{ ParseCallbackInterface->RiFrameBegin(yyvsp[0].itype); }
2057
#line 389 "parser.yxx"
2058
{ ParseCallbackInterface->RiFrameEnd(); }
2061
#line 391 "parser.yxx"
2062
{ ParseCallbackInterface->RiWorldBegin(); }
2065
#line 393 "parser.yxx"
2066
{ ParseCallbackInterface->RiWorldEnd(); /* YYACCEPT; */ }
2069
#line 395 "parser.yxx"
2070
{ ParseCallbackInterface->RiFormat(yyvsp[-2].itype, yyvsp[-1].itype, yyvsp[0].ftype); }
2073
#line 397 "parser.yxx"
2074
{ ParseCallbackInterface->RiFrameAspectRatio(yyvsp[0].ftype); }
2077
#line 399 "parser.yxx"
2078
{ ParseCallbackInterface->RiScreenWindow(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2081
#line 401 "parser.yxx"
2082
{ ParseCallbackInterface->RiCropWindow(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2085
#line 403 "parser.yxx"
2087
ParseCallbackInterface->RiProjectionV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2088
DiscardStringValue(yyvsp[-1].stype);
2089
DiscardTokenValuePairs(yyvsp[0].atvtype);
2093
#line 409 "parser.yxx"
2094
{ ParseCallbackInterface->RiClipping(yyvsp[-1].ftype, yyvsp[0].ftype); }
2097
#line 411 "parser.yxx"
2098
{ ParseCallbackInterface->RiDepthOfField(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2101
#line 413 "parser.yxx"
2102
{ ParseCallbackInterface->RiShutter(yyvsp[-1].ftype, yyvsp[0].ftype); }
2105
#line 415 "parser.yxx"
2106
{ ParseCallbackInterface->RiPixelVariance(yyvsp[0].ftype); }
2109
#line 417 "parser.yxx"
2110
{ ParseCallbackInterface->RiPixelSamples(yyvsp[-1].ftype, yyvsp[0].ftype); }
2113
#line 419 "parser.yxx"
2115
RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-2].stype);
2116
ParseCallbackInterface->RiPixelFilter(pFilter, yyvsp[-1].ftype, yyvsp[0].ftype);
2118
DiscardStringValue(yyvsp[-2].stype);
2122
#line 426 "parser.yxx"
2123
{ ParseCallbackInterface->RiExposure(yyvsp[-1].ftype, yyvsp[0].ftype); }
2126
#line 428 "parser.yxx"
2128
ParseCallbackInterface->RiImagerV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2129
DiscardStringValue(yyvsp[-1].stype);
2130
DiscardTokenValuePairs(yyvsp[0].atvtype);
2134
#line 434 "parser.yxx"
2136
ParseCallbackInterface->RiQuantize((char*)(yyvsp[-4].stype), yyvsp[-3].itype, yyvsp[-2].itype, yyvsp[-1].itype, yyvsp[0].ftype);
2137
DiscardStringValue(yyvsp[-4].stype);
2141
#line 439 "parser.yxx"
2143
ParseCallbackInterface->RiDisplayV(yyvsp[-3].stype, const_cast<char*>(yyvsp[-2].stype), const_cast<char*>(yyvsp[-1].stype), yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2144
DiscardStringValue(yyvsp[-3].stype);
2145
DiscardStringValue(yyvsp[-2].stype);
2146
DiscardStringValue(yyvsp[-1].stype);
2147
DiscardTokenValuePairs(yyvsp[0].atvtype);
2151
#line 447 "parser.yxx"
2153
ParseCallbackInterface->RiHiderV(const_cast<char*>(yyvsp[-1].stype), yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2154
DiscardStringValue(yyvsp[-1].stype);
2155
DiscardTokenValuePairs(yyvsp[0].atvtype);
2159
#line 453 "parser.yxx"
2161
ColorSamples = yyvsp[-1].aftype->Count();
2162
ParseCallbackInterface->RiColorSamples(yyvsp[-1].aftype->Count(), &(*yyvsp[-1].aftype)[0], &(*yyvsp[0].aftype)[0]);
2163
DiscardArrayValue(yyvsp[-1].aftype);
2164
DiscardArrayValue(yyvsp[0].aftype);
2168
#line 460 "parser.yxx"
2169
{ ParseCallbackInterface->RiRelativeDetail(yyvsp[0].ftype); }
2172
#line 462 "parser.yxx"
2174
ParseCallbackInterface->RiOptionV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2175
DiscardStringValue(yyvsp[-1].stype);
2176
DiscardTokenValuePairs(yyvsp[0].atvtype);
2180
#line 468 "parser.yxx"
2181
{ ParseCallbackInterface->RiAttributeBegin(); }
2184
#line 470 "parser.yxx"
2185
{ ParseCallbackInterface->RiAttributeEnd(); }
2188
#line 472 "parser.yxx"
2190
if(yyvsp[0].aftype->Count() == ColorSamples)
2191
ParseCallbackInterface->RiColor(&(*yyvsp[0].aftype)[0]);
2193
yyerror("Incorrect Number of Color Samples");
2195
DiscardArrayValue(yyvsp[0].aftype);
2199
#line 481 "parser.yxx"
2201
if(3 == ColorSamples)
2203
RendermanInterface::RtColor Cq;
2204
Cq[0] = yyvsp[-2].ftype;
2205
Cq[1] = yyvsp[-1].ftype;
2206
Cq[2] = yyvsp[0].ftype;
2207
ParseCallbackInterface->RiColor(Cq);
2211
yyerror("Incorrect Number of Color Samples");
2216
#line 496 "parser.yxx"
2218
if(yyvsp[0].aftype->Count() == ColorSamples)
2219
ParseCallbackInterface->RiOpacity(&(*yyvsp[0].aftype)[0]);
2221
yyerror("Incorrect Number of Color Samples");
2223
DiscardArrayValue(yyvsp[0].aftype);
2227
#line 505 "parser.yxx"
2229
if(3 == ColorSamples)
2231
RendermanInterface::RtColor Cq;
2232
Cq[0]=yyvsp[-2].ftype;
2233
Cq[1]=yyvsp[-1].ftype;
2234
Cq[2]=yyvsp[0].ftype;
2235
ParseCallbackInterface->RiOpacity(Cq);
2239
yyerror("Incorrect Number of Color Samples");
2244
#line 520 "parser.yxx"
2245
{ ParseCallbackInterface->RiTextureCoordinates(yyvsp[-7].ftype, yyvsp[-6].ftype, yyvsp[-5].ftype, yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2248
#line 522 "parser.yxx"
2250
if(yyvsp[0].aftype->Count() == 8)
2251
ParseCallbackInterface->RiTextureCoordinates((*yyvsp[0].aftype)[0], (*yyvsp[0].aftype)[1], (*yyvsp[0].aftype)[2], (*yyvsp[0].aftype)[3], (*yyvsp[0].aftype)[4], (*yyvsp[0].aftype)[5], (*yyvsp[0].aftype)[6], (*yyvsp[0].aftype)[7]);
2253
yyerror("Expecting 8 Values");
2255
DiscardArrayValue(yyvsp[0].aftype);
2259
#line 531 "parser.yxx"
2261
DeclareLightHandle(yyvsp[-1].itype, ParseCallbackInterface->RiLightSourceV(yyvsp[-2].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values()));
2262
DiscardStringValue(yyvsp[-2].stype);
2263
DiscardTokenValuePairs(yyvsp[0].atvtype);
2267
#line 537 "parser.yxx"
2269
DeclareLightHandleString(yyvsp[-1].stype, ParseCallbackInterface->RiLightSourceV(yyvsp[-2].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values()));
2270
DiscardStringValue(yyvsp[-2].stype);
2271
DiscardStringValue(yyvsp[-1].stype);
2272
DiscardTokenValuePairs(yyvsp[0].atvtype);
2276
#line 544 "parser.yxx"
2278
DeclareLightHandle(yyvsp[-1].itype, ParseCallbackInterface->RiAreaLightSourceV(yyvsp[-2].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values()));
2279
DiscardStringValue(yyvsp[-2].stype);
2280
DiscardTokenValuePairs(yyvsp[0].atvtype);
2284
#line 550 "parser.yxx"
2286
DeclareLightHandleString(yyvsp[-1].stype, ParseCallbackInterface->RiAreaLightSourceV(yyvsp[-2].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values()));
2287
DiscardStringValue(yyvsp[-2].stype);
2288
DiscardStringValue(yyvsp[-1].stype);
2289
DiscardTokenValuePairs(yyvsp[0].atvtype);
2293
#line 557 "parser.yxx"
2295
RendermanInterface::RtLightHandle handle = LookupLightHandle(yyvsp[-1].itype);
2297
ParseCallbackInterface->RiIlluminate(handle, yyvsp[0].itype != 0);
2299
yyerror("Undeclared Light");
2303
#line 565 "parser.yxx"
2305
RendermanInterface::RtLightHandle handle = LookupLightHandleString(yyvsp[-1].stype);
2307
ParseCallbackInterface->RiIlluminate(handle, yyvsp[0].itype != 0);
2309
yyerror("Undeclared Light");
2310
DiscardStringValue(yyvsp[-1].stype);
2314
#line 574 "parser.yxx"
2316
ParseCallbackInterface->RiSurfaceV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2317
DiscardStringValue(yyvsp[-1].stype);
2318
DiscardTokenValuePairs(yyvsp[0].atvtype);
2322
#line 580 "parser.yxx"
2324
ParseCallbackInterface->RiAtmosphereV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2325
DiscardStringValue(yyvsp[-1].stype);
2326
DiscardTokenValuePairs(yyvsp[0].atvtype);
2330
#line 586 "parser.yxx"
2332
ParseCallbackInterface->RiInteriorV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2333
DiscardStringValue(yyvsp[-1].stype);
2334
DiscardTokenValuePairs(yyvsp[0].atvtype);
2338
#line 592 "parser.yxx"
2340
ParseCallbackInterface->RiExteriorV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2341
DiscardStringValue(yyvsp[-1].stype);
2342
DiscardTokenValuePairs(yyvsp[0].atvtype);
2346
#line 598 "parser.yxx"
2347
{ ParseCallbackInterface->RiShadingRate(yyvsp[0].ftype); }
2350
#line 600 "parser.yxx"
2352
ParseCallbackInterface->RiShadingInterpolation((char*)(yyvsp[0].stype));
2353
DiscardStringValue(yyvsp[0].stype);
2357
#line 605 "parser.yxx"
2358
{ ParseCallbackInterface->RiMatte(yyvsp[0].itype!=0); }
2361
#line 607 "parser.yxx"
2363
RendermanInterface::RtBound b;
2364
b[0]=yyvsp[-5].ftype; b[1]=yyvsp[-4].ftype; b[2]=yyvsp[-3].ftype; b[3]=yyvsp[-2].ftype; b[4]=yyvsp[-1].ftype; b[5]=yyvsp[0].ftype;
2365
ParseCallbackInterface->RiBound(b);
2369
#line 613 "parser.yxx"
2371
if(yyvsp[0].aftype->Count() == 6)
2372
ParseCallbackInterface->RiBound(&(*yyvsp[0].aftype)[0]);
2374
yyerror("Expecting 6 Values");
2376
DiscardArrayValue(yyvsp[0].aftype);
2380
#line 622 "parser.yxx"
2382
RendermanInterface::RtBound b;
2383
b[0]=yyvsp[-5].ftype; b[1]=yyvsp[-4].ftype; b[2]=yyvsp[-3].ftype; b[3]=yyvsp[-2].ftype; b[4]=yyvsp[-1].ftype; b[5]=yyvsp[0].ftype;
2384
ParseCallbackInterface->RiDetail(b);
2388
#line 628 "parser.yxx"
2390
if(yyvsp[0].aftype->Count() == 6)
2391
ParseCallbackInterface->RiDetail(&(*yyvsp[0].aftype)[0]);
2393
yyerror("Expecting 6 Values");
2394
DiscardArrayValue(yyvsp[0].aftype);
2398
#line 636 "parser.yxx"
2399
{ ParseCallbackInterface->RiDetailRange(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2402
#line 638 "parser.yxx"
2404
if(yyvsp[0].aftype->Count() == 4)
2405
ParseCallbackInterface->RiDetailRange((*yyvsp[0].aftype)[0], (*yyvsp[0].aftype)[1], (*yyvsp[0].aftype)[2], (*yyvsp[0].aftype)[3]);
2407
yyerror("Expecting 4 Values");
2408
DiscardArrayValue(yyvsp[0].aftype);
2412
#line 646 "parser.yxx"
2414
ParseCallbackInterface->RiGeometricApproximation((char*)(yyvsp[-1].stype), yyvsp[0].ftype);
2415
DiscardStringValue(yyvsp[-1].stype);
2419
#line 651 "parser.yxx"
2421
// Note: This version is only included to allow invalid RIB files to work.
2422
ParseCallbackInterface->RiGeometricApproximation((char*)(yyvsp[-1].stype), (*yyvsp[0].aftype)[0]);
2423
DiscardStringValue(yyvsp[-1].stype);
2424
DiscardArrayValue(yyvsp[0].aftype);
2428
#line 658 "parser.yxx"
2430
ParseCallbackInterface->RiOrientation((char*)(yyvsp[0].stype));
2431
DiscardStringValue(yyvsp[0].stype);
2435
#line 663 "parser.yxx"
2436
{ ParseCallbackInterface->RiReverseOrientation(); }
2439
#line 665 "parser.yxx"
2440
{ ParseCallbackInterface->RiSides(yyvsp[0].itype); }
2443
#line 667 "parser.yxx"
2444
{ ParseCallbackInterface->RiIdentity(); }
2447
#line 669 "parser.yxx"
2449
RendermanInterface::RtMatrix Trans;
2450
if(yyvsp[0].aftype->Count() == 16)
2452
Trans[0][0]=(*yyvsp[0].aftype)[0];
2453
Trans[0][1]=(*yyvsp[0].aftype)[1];
2454
Trans[0][2]=(*yyvsp[0].aftype)[2];
2455
Trans[0][3]=(*yyvsp[0].aftype)[3];
2456
Trans[1][0]=(*yyvsp[0].aftype)[4];
2457
Trans[1][1]=(*yyvsp[0].aftype)[5];
2458
Trans[1][2]=(*yyvsp[0].aftype)[6];
2459
Trans[1][3]=(*yyvsp[0].aftype)[7];
2460
Trans[2][0]=(*yyvsp[0].aftype)[8];
2461
Trans[2][1]=(*yyvsp[0].aftype)[9];
2462
Trans[2][2]=(*yyvsp[0].aftype)[10];
2463
Trans[2][3]=(*yyvsp[0].aftype)[11];
2464
Trans[3][0]=(*yyvsp[0].aftype)[12];
2465
Trans[3][1]=(*yyvsp[0].aftype)[13];
2466
Trans[3][2]=(*yyvsp[0].aftype)[14];
2467
Trans[3][3]=(*yyvsp[0].aftype)[15];
2468
ParseCallbackInterface->RiTransform(Trans);
2472
yyerror("Expecting 16 Values");
2474
DiscardArrayValue(yyvsp[0].aftype);
2478
#line 698 "parser.yxx"
2480
RendermanInterface::RtMatrix Trans;
2481
if(yyvsp[0].aftype->Count() == 16)
2483
Trans[0][0]=(*yyvsp[0].aftype)[0];
2484
Trans[0][1]=(*yyvsp[0].aftype)[1];
2485
Trans[0][2]=(*yyvsp[0].aftype)[2];
2486
Trans[0][3]=(*yyvsp[0].aftype)[3];
2487
Trans[1][0]=(*yyvsp[0].aftype)[4];
2488
Trans[1][1]=(*yyvsp[0].aftype)[5];
2489
Trans[1][2]=(*yyvsp[0].aftype)[6];
2490
Trans[1][3]=(*yyvsp[0].aftype)[7];
2491
Trans[2][0]=(*yyvsp[0].aftype)[8];
2492
Trans[2][1]=(*yyvsp[0].aftype)[9];
2493
Trans[2][2]=(*yyvsp[0].aftype)[10];
2494
Trans[2][3]=(*yyvsp[0].aftype)[11];
2495
Trans[3][0]=(*yyvsp[0].aftype)[12];
2496
Trans[3][1]=(*yyvsp[0].aftype)[13];
2497
Trans[3][2]=(*yyvsp[0].aftype)[14];
2498
Trans[3][3]=(*yyvsp[0].aftype)[15];
2499
ParseCallbackInterface->RiConcatTransform(Trans);
2503
yyerror("Expecting 16 Values");
2505
DiscardArrayValue(yyvsp[0].aftype);
2509
#line 727 "parser.yxx"
2510
{ ParseCallbackInterface->RiPerspective(yyvsp[0].ftype); }
2513
#line 729 "parser.yxx"
2514
{ ParseCallbackInterface->RiTranslate(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2517
#line 731 "parser.yxx"
2518
{ ParseCallbackInterface->RiRotate(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2521
#line 733 "parser.yxx"
2522
{ ParseCallbackInterface->RiScale(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2525
#line 735 "parser.yxx"
2526
{ ParseCallbackInterface->RiSkew(yyvsp[-6].ftype, yyvsp[-5].ftype, yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
2529
#line 737 "parser.yxx"
2531
if(yyvsp[0].aftype->Count( ) == 7)
2532
ParseCallbackInterface->RiSkew((*yyvsp[0].aftype)[0], (*yyvsp[0].aftype)[1], (*yyvsp[0].aftype)[2], (*yyvsp[0].aftype)[3], (*yyvsp[0].aftype)[4], (*yyvsp[0].aftype)[5], (*yyvsp[0].aftype)[6]);
2534
yyerror("Expecting 7 Values");
2535
DiscardArrayValue(yyvsp[0].aftype);
2539
#line 745 "parser.yxx"
2541
ParseCallbackInterface->RiDeformationV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2542
DiscardStringValue(yyvsp[-1].stype);
2543
DiscardTokenValuePairs(yyvsp[0].atvtype);
2547
#line 751 "parser.yxx"
2549
ParseCallbackInterface->RiDisplacementV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2550
DiscardStringValue(yyvsp[-1].stype);
2551
DiscardTokenValuePairs(yyvsp[0].atvtype);
2555
#line 757 "parser.yxx"
2557
ParseCallbackInterface->RiCoordinateSystem(yyvsp[0].stype);
2558
DiscardStringValue(yyvsp[0].stype);
2562
#line 762 "parser.yxx"
2564
ParseCallbackInterface->RiCoordSysTransform(yyvsp[0].stype);
2565
DiscardStringValue(yyvsp[0].stype);
2569
#line 767 "parser.yxx"
2570
{ printf("TRANSFORMPOINTS\n"); }
2573
#line 769 "parser.yxx"
2574
{ ParseCallbackInterface->RiTransformBegin(); }
2577
#line 771 "parser.yxx"
2578
{ ParseCallbackInterface->RiTransformEnd(); }
2581
#line 773 "parser.yxx"
2583
ParseCallbackInterface->RiAttributeV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2584
DiscardStringValue(yyvsp[-1].stype);
2585
DiscardTokenValuePairs(yyvsp[0].atvtype);
2589
#line 779 "parser.yxx"
2592
for(int i = 0; i < yyvsp[0].atvtype->Count(); i++)
2594
if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
2595
vertices = yyvsp[0].atvtype->Counts()[i] / 3;
2597
ParseCallbackInterface->RiPolygonV(vertices, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2598
DiscardTokenValuePairs(yyvsp[0].atvtype);
2602
#line 790 "parser.yxx"
2604
ParseCallbackInterface->RiGeneralPolygonV(yyvsp[-1].aitype->Count(), &(*yyvsp[-1].aitype)[0], yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2605
DiscardArrayValue(yyvsp[-1].aitype);
2606
DiscardTokenValuePairs(yyvsp[0].atvtype);
2610
#line 796 "parser.yxx"
2613
for(int i = 0; i < yyvsp[0].atvtype->Count(); i++)
2615
if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
2616
vertices = yyvsp[0].atvtype->Counts()[i] / 3;
2619
ParseCallbackInterface->RiCurvesV(yyvsp[-3].stype, yyvsp[-2].aitype->Count(), &(*yyvsp[-2].aitype)[0], yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2621
yyerror("Expecting \"P\"");
2622
DiscardStringValue(yyvsp[-3].stype);
2623
DiscardArrayValue(yyvsp[-2].aitype);
2624
DiscardStringValue(yyvsp[-1].stype);
2625
DiscardTokenValuePairs(yyvsp[0].atvtype);
2629
#line 813 "parser.yxx"
2631
ParseCallbackInterface->RiBlobbyV(yyvsp[-4].itype, yyvsp[-3].aitype->Count(), &(*yyvsp[-3].aitype)[0],
2632
yyvsp[-2].aftype->Count(), &(*yyvsp[-2].aftype)[0],
2633
yyvsp[-1].astype->Count(), &(*yyvsp[-1].astype)[0],
2634
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2635
DiscardArrayValue(yyvsp[-3].aitype);
2636
DiscardArrayValue(yyvsp[-2].aftype);
2637
DiscardArrayValue(yyvsp[-1].astype);
2638
DiscardTokenValuePairs(yyvsp[0].atvtype);
2642
#line 824 "parser.yxx"
2644
ParseCallbackInterface->RiReadArchive( yyvsp[0].stype, NULL );
2645
DiscardStringValue( yyvsp[0].stype );
2649
#line 829 "parser.yxx"
2652
(strcmp(yyvsp[-3].stype, "RunProgram") == 0) ||
2653
(strcmp(yyvsp[-3].stype, "DelayedReadArchive") == 0) ||
2654
(strcmp(yyvsp[-3].stype, "DynamicLoad") == 0) ) )
2655
yyerror("Expect RunProgram, DelayedReadArchive or DynamicLoad");
2657
if(yyvsp[-1].aftype->Count() != 6)
2658
yyerror("Expecting 6 Values");
2660
// We jump through a few hoops here to meet the spec
2661
// The arguments should be free()'able, so we must allocate them in one
2665
for(i=0; i<yyvsp[-2].astype->Count(); i++)
2667
size += sizeof( char* ); //one pointer for this entry
2668
size += strlen((*yyvsp[-2].astype)[i]) + 1; //and space for the string
2671
void* pdata = (void *) malloc( size );
2672
char* stringstart = (char*) ((char**) pdata + yyvsp[-2].astype->Count() ) ;
2673
for(i=0; i<yyvsp[-2].astype->Count(); i++)
2675
((char**) pdata)[i] = stringstart;
2676
strcpy(stringstart, (*yyvsp[-2].astype)[i]);
2677
stringstart += strlen( stringstart ) + 1;
2680
RendermanInterface::RtFunc pFunc = ParseCallbackInterface->GetProceduralFunction( yyvsp[-3].stype );
2681
RendermanInterface::RtFunc pFreeFunc = ParseCallbackInterface->GetProceduralFunction( "RiProcFree" );
2682
ParseCallbackInterface->RiProcedural(pdata, &(*yyvsp[-1].aftype)[0], (void (*)(void ) ) pFunc, pFreeFunc);
2683
DiscardStringValue(yyvsp[-3].stype);
2684
DiscardArrayValue(yyvsp[-2].astype);
2685
DiscardArrayValue(yyvsp[-1].aftype);
2686
DiscardTokenValuePairs(yyvsp[0].atvtype);
2690
#line 868 "parser.yxx"
2693
for(int i = 0; i < yyvsp[0].atvtype->Count(); i++)
2695
if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
2696
vertices = yyvsp[0].atvtype->Counts()[i] / 3;
2699
ParseCallbackInterface->RiPointsV(vertices, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2701
yyerror("Expecting \"P\"");
2703
DiscardTokenValuePairs(yyvsp[0].atvtype);
2707
#line 883 "parser.yxx"
2709
ParseCallbackInterface->RiPointsPolygonsV(yyvsp[-2].aitype->Count(), &(*yyvsp[-2].aitype)[0], &(*yyvsp[-1].aitype)[0], yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2710
DiscardArrayValue(yyvsp[-2].aitype);
2711
DiscardArrayValue(yyvsp[-1].aitype);
2712
DiscardTokenValuePairs(yyvsp[0].atvtype);
2716
#line 890 "parser.yxx"
2718
ParseCallbackInterface->RiPointsGeneralPolygonsV(yyvsp[-3].aitype->Count(), &(*yyvsp[-3].aitype)[0], &(*yyvsp[-2].aitype)[0], &(*yyvsp[-1].aitype)[0], yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2719
DiscardArrayValue(yyvsp[-3].aitype);
2720
DiscardArrayValue(yyvsp[-2].aitype);
2721
DiscardArrayValue(yyvsp[-1].aitype);
2722
DiscardTokenValuePairs(yyvsp[0].atvtype);
2726
#line 898 "parser.yxx"
2729
RendermanInterface::RtBasis *u=ParseCallbackInterface->GetBasisMatrix(yyvsp[-3].stype);
2730
RendermanInterface::RtBasis *v=ParseCallbackInterface->GetBasisMatrix(yyvsp[-1].stype);
2731
ParseCallbackInterface->RiBasis(*u, yyvsp[-2].itype, *v, yyvsp[0].itype);
2732
DiscardStringValue(yyvsp[-3].stype);
2733
DiscardStringValue(yyvsp[-1].stype);
2738
#line 908 "parser.yxx"
2741
if(yyvsp[-1].aftype->Count() == 16)
2747
v[i][j]=(*yyvsp[-1].aftype)[(i*4)+j];
2749
RendermanInterface::RtBasis *u=ParseCallbackInterface->GetBasisMatrix(yyvsp[-3].stype);
2750
ParseCallbackInterface->RiBasis(*u, yyvsp[-2].itype,v, yyvsp[0].itype);
2754
yyerror("Expecting 16 floats");
2756
DiscardStringValue(yyvsp[-3].stype);
2757
DiscardArrayValue(yyvsp[-1].aftype);
2762
#line 930 "parser.yxx"
2765
if(yyvsp[-3].aftype->Count() == 16)
2772
u[i][j]=(*yyvsp[-3].aftype)[(i*4)+j];
2774
RendermanInterface::RtBasis *v=ParseCallbackInterface->GetBasisMatrix(yyvsp[-1].stype);
2775
ParseCallbackInterface->RiBasis(u, yyvsp[-2].itype,*v, yyvsp[0].itype);
2779
yyerror("Expecting 16 floats");
2781
DiscardArrayValue(yyvsp[-3].aftype);
2782
DiscardStringValue(yyvsp[-1].stype);
2787
#line 953 "parser.yxx"
2789
if(yyvsp[-3].aftype->Count( ) == 16 && yyvsp[-1].aftype->Count() == 16)
2791
// Build a matrix for the u and v directions
2792
RendermanInterface::RtBasis u, v;
2798
u[i][j]=(*yyvsp[-3].aftype)[(i*4)+j];
2799
v[i][j]=(*yyvsp[-1].aftype)[(i*4)+j];
2802
ParseCallbackInterface->RiBasis(u, yyvsp[-2].itype,v, yyvsp[0].itype);
2806
yyerror("Expecting 16 Values");
2808
DiscardArrayValue(yyvsp[-3].aftype);
2809
DiscardArrayValue(yyvsp[-1].aftype);
2813
#line 977 "parser.yxx"
2815
ParseCallbackInterface->RiPatchV(const_cast<char*>(yyvsp[-1].stype), yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2816
DiscardStringValue(yyvsp[-1].stype);
2817
DiscardTokenValuePairs(yyvsp[0].atvtype);
2821
#line 983 "parser.yxx"
2823
ParseCallbackInterface->RiPatchMeshV(const_cast<char*>(yyvsp[-5].stype), yyvsp[-4].itype, const_cast<char*>(yyvsp[-3].stype), yyvsp[-2].itype, const_cast<char*>(yyvsp[-1].stype), yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2824
DiscardStringValue(yyvsp[-5].stype);
2825
DiscardStringValue(yyvsp[-3].stype);
2826
DiscardStringValue(yyvsp[-1].stype);
2827
DiscardTokenValuePairs(yyvsp[0].atvtype);
2831
#line 991 "parser.yxx"
2833
ParseCallbackInterface->RiNuPatchV(yyvsp[-10].itype, yyvsp[-9].itype, &(*yyvsp[-8].aftype)[0], yyvsp[-7].ftype, yyvsp[-6].ftype, yyvsp[-5].itype, yyvsp[-4].itype, &(*yyvsp[-3].aftype)[0], yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2834
DiscardArrayValue(yyvsp[-8].aftype);
2835
DiscardArrayValue(yyvsp[-3].aftype);
2836
DiscardTokenValuePairs(yyvsp[0].atvtype);
2840
#line 998 "parser.yxx"
2842
ParseCallbackInterface->RiTrimCurve(yyvsp[-8].aitype->Count(), &(*yyvsp[-8].aitype)[0], &(*yyvsp[-7].aitype)[0], &(*yyvsp[-6].aftype)[0], &(*yyvsp[-5].aftype)[0], &(*yyvsp[-4].aftype)[0], &(*yyvsp[-3].aitype)[0], &(*yyvsp[-2].aftype)[0], &(*yyvsp[-1].aftype)[0], &(*yyvsp[0].aftype)[0]);
2843
DiscardArrayValue(yyvsp[-8].aitype);
2844
DiscardArrayValue(yyvsp[-7].aitype);
2845
DiscardArrayValue(yyvsp[-6].aftype);
2846
DiscardArrayValue(yyvsp[-5].aftype);
2847
DiscardArrayValue(yyvsp[-4].aftype);
2848
DiscardArrayValue(yyvsp[-3].aitype);
2849
DiscardArrayValue(yyvsp[-2].aftype);
2850
DiscardArrayValue(yyvsp[-1].aftype);
2851
DiscardArrayValue(yyvsp[0].aftype);
2855
#line 1011 "parser.yxx"
2857
ParseCallbackInterface->RiSphereV(yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2858
DiscardTokenValuePairs(yyvsp[0].atvtype);
2862
#line 1016 "parser.yxx"
2864
ParseCallbackInterface->RiConeV(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2865
DiscardTokenValuePairs(yyvsp[0].atvtype);
2869
#line 1021 "parser.yxx"
2871
ParseCallbackInterface->RiCylinderV(yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2872
DiscardTokenValuePairs(yyvsp[0].atvtype);
2876
#line 1026 "parser.yxx"
2878
ParseCallbackInterface->RiHyperboloidV(&(*yyvsp[-1].aftype)[0], &(*yyvsp[-1].aftype)[3], (*yyvsp[-1].aftype)[6], yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2879
DiscardArrayValue(yyvsp[-1].aftype);
2880
DiscardTokenValuePairs(yyvsp[0].atvtype);
2884
#line 1032 "parser.yxx"
2886
RendermanInterface::RtPoint p1, p2;
2887
p1[0]=yyvsp[-7].ftype;
2888
p1[1]=yyvsp[-6].ftype;
2889
p1[2]=yyvsp[-5].ftype;
2890
p2[0]=yyvsp[-4].ftype;
2891
p2[1]=yyvsp[-3].ftype;
2892
p2[2]=yyvsp[-2].ftype;
2893
ParseCallbackInterface->RiHyperboloidV(p1, p2, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2894
DiscardTokenValuePairs(yyvsp[0].atvtype);
2898
#line 1044 "parser.yxx"
2900
ParseCallbackInterface->RiParaboloidV(yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2901
DiscardTokenValuePairs(yyvsp[0].atvtype);
2905
#line 1049 "parser.yxx"
2907
ParseCallbackInterface->RiDiskV(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2908
DiscardTokenValuePairs(yyvsp[0].atvtype);
2912
#line 1054 "parser.yxx"
2914
ParseCallbackInterface->RiTorusV(yyvsp[-5].ftype, yyvsp[-4].ftype, yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2915
DiscardTokenValuePairs(yyvsp[0].atvtype);
2919
#line 1059 "parser.yxx"
2921
ParseCallbackInterface->RiGeometryV(yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2922
DiscardStringValue(yyvsp[-1].stype);
2923
DiscardTokenValuePairs(yyvsp[0].atvtype);
2927
#line 1065 "parser.yxx"
2929
ParseCallbackInterface->RiSolidBegin(const_cast<char*>(yyvsp[0].stype));
2930
DiscardStringValue(yyvsp[0].stype);
2934
#line 1070 "parser.yxx"
2935
{ ParseCallbackInterface->RiSolidEnd(); }
2938
#line 1072 "parser.yxx"
2940
DeclareObjectHandle(yyvsp[0].itype, ParseCallbackInterface->RiObjectBegin());
2944
#line 1076 "parser.yxx"
2946
DeclareObjectHandleString(yyvsp[0].stype, ParseCallbackInterface->RiObjectBegin());
2947
DiscardStringValue(yyvsp[0].stype);
2951
#line 1081 "parser.yxx"
2952
{ ParseCallbackInterface->RiObjectEnd(); }
2955
#line 1083 "parser.yxx"
2957
RendermanInterface::RtObjectHandle handle = LookupObjectHandle(yyvsp[0].itype);
2959
ParseCallbackInterface->RiObjectInstance(handle);
2961
yyerror("Undeclared Object");
2965
#line 1091 "parser.yxx"
2967
RendermanInterface::RtObjectHandle handle = LookupObjectHandleString(yyvsp[0].stype);
2969
ParseCallbackInterface->RiObjectInstance(handle);
2971
yyerror("Undeclared Object");
2972
DiscardStringValue(yyvsp[0].stype);
2976
#line 1100 "parser.yxx"
2978
ParseCallbackInterface->RiMotionBeginV(yyvsp[0].aftype->Count(), &(*yyvsp[0].aftype)[0]);
2979
DiscardArrayValue(yyvsp[0].aftype);
2983
#line 1105 "parser.yxx"
2984
{ ParseCallbackInterface->RiMotionEnd(); }
2987
#line 1107 "parser.yxx"
2989
RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-3].stype);
2990
ParseCallbackInterface->RiMakeTextureV((char*)(yyvsp[-7].stype), (char*)(yyvsp[-6].stype), (char*)(yyvsp[-5].stype), (char*)(yyvsp[-4].stype), pFilter, yyvsp[-2].ftype, yyvsp[-1].ftype,
2991
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
2995
#line 1113 "parser.yxx"
2997
RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-3].stype);
2998
ParseCallbackInterface->RiMakeBumpV((char*)(yyvsp[-7].stype), (char*)(yyvsp[-6].stype),(char*)(yyvsp[-5].stype), (char*)(yyvsp[-4].stype),pFilter,yyvsp[-2].ftype, yyvsp[-1].ftype,
2999
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3003
#line 1119 "parser.yxx"
3005
RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-3].stype);
3006
ParseCallbackInterface->RiMakeLatLongEnvironmentV((char*)(yyvsp[-5].stype), (char*)(yyvsp[-4].stype),pFilter,yyvsp[-2].ftype, yyvsp[-1].ftype,
3007
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3011
#line 1125 "parser.yxx"
3013
RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-3].stype);
3014
ParseCallbackInterface->RiMakeCubeFaceEnvironmentV(
3015
(char*)(yyvsp[-11].stype), (char*)(yyvsp[-10].stype),
3016
(char*)(yyvsp[-9].stype), (char*)(yyvsp[-8].stype),
3017
(char*)(yyvsp[-7].stype), (char*)(yyvsp[-6].stype),
3018
(char*)(yyvsp[-5].stype),
3021
yyvsp[-2].ftype, yyvsp[-1].ftype,
3022
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3026
#line 1138 "parser.yxx"
3028
ParseCallbackInterface->RiMakeShadowV(yyvsp[-2].stype, yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3032
#line 1142 "parser.yxx"
3034
ParseCallbackInterface->RiMakeOcclusionV(yyvsp[-2].astype->Count(), (RtString*)&(*yyvsp[-2].astype)[0], yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3038
#line 1146 "parser.yxx"
3041
// TODO: names should be stored elsewhere.
3042
if(strcmp($2,"ignore")==0)
3043
ParseCallbackInterface->RiErrorHandler(&ParseCallbackInterface->RiErrorIgnore);
3044
else if(strcmp($2,"print")==0)
3045
ParseCallbackInterface->RiErrorHandler(&ParseCallbackInterface->RiErrorPrint);
3046
else if(strcmp($2,"abort")==0)
3047
ParseCallbackInterface->RiErrorHandler(&ParseCallbackInterface->RiErrorAbort);
3052
#line 1158 "parser.yxx"
3053
{ printf("ERRORIGNORE\n"); }
3056
#line 1160 "parser.yxx"
3057
{ printf("ERRORPRINT\n"); }
3060
#line 1162 "parser.yxx"
3061
{ printf("ERRORABORT\n"); }
3064
#line 1164 "parser.yxx"
3066
char** ptags=new char*[yyvsp[-4].astype->Count()];
3068
for(i=0; i<yyvsp[-4].astype->Count(); i++)
3070
char* ptag=new char[strlen((*yyvsp[-4].astype)[i]) + 1];
3071
strcpy(ptag, (*yyvsp[-4].astype)[i]);
3075
ParseCallbackInterface->RiSubdivisionMeshV(const_cast<char*>(yyvsp[-7].stype),
3076
yyvsp[-6].aitype->Count(),&(*yyvsp[-6].aitype)[0], &(*yyvsp[-5].aitype)[0],
3077
yyvsp[-4].astype->Count(), ptags,
3078
&(*yyvsp[-3].aitype)[0],
3079
&(*yyvsp[-2].aitype)[0],
3080
&(*yyvsp[-1].aftype)[0],
3081
yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3083
for(i=0; i<yyvsp[-4].astype->Count(); i++)
3087
DiscardStringValue(yyvsp[-7].stype);
3088
DiscardArrayValue(yyvsp[-6].aitype);
3089
DiscardArrayValue(yyvsp[-5].aitype);
3090
DiscardArrayValue(yyvsp[-4].astype);
3091
DiscardArrayValue(yyvsp[-3].aitype);
3092
DiscardArrayValue(yyvsp[-2].aitype);
3093
DiscardArrayValue(yyvsp[-1].aftype);
3094
DiscardTokenValuePairs(yyvsp[0].atvtype);
3098
#line 1196 "parser.yxx"
3100
ParseCallbackInterface->RiSubdivisionMeshV(const_cast<char*>(yyvsp[-3].stype), yyvsp[-2].aitype->Count(), &(*yyvsp[-2].aitype)[0], &(*yyvsp[-1].aitype)[0], 0, NULL, NULL, NULL, NULL, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
3101
DiscardStringValue(yyvsp[-3].stype);
3102
DiscardArrayValue(yyvsp[-2].aitype);
3103
DiscardArrayValue(yyvsp[-1].aitype);
3104
DiscardTokenValuePairs(yyvsp[0].atvtype);
3108
#line 1204 "parser.yxx"
3110
// Print the error, then force the scanner into 'request'
3111
// mode which will make it ignore all parameters until the
3112
// next request token.
3113
yyerror("Unrecognised RIB request");
3119
#line 1213 "parser.yxx"
3121
// Print the error, then force the scanner into 'request'
3122
// mode which will make it ignore all parameters until the
3123
// next request token.
3126
yyerror("Unrecognised RIB request");
3133
#line 1225 "parser.yxx"
3135
// A value has been found when a request is expected, quietly eat it...
3139
#line 1230 "parser.yxx"
3143
#line 1231 "parser.yxx"
3147
#line 1232 "parser.yxx"
3151
#line 1233 "parser.yxx"
3155
#line 1234 "parser.yxx"
3159
#line 1235 "parser.yxx"
3163
#line 1236 "parser.yxx"
3167
#line 1237 "parser.yxx"
3171
#line 1238 "parser.yxx"
3175
#line 1239 "parser.yxx"
3179
#line 1240 "parser.yxx"
3183
#line 1241 "parser.yxx"
3187
#line 1242 "parser.yxx"
3191
#line 1243 "parser.yxx"
3195
#line 1244 "parser.yxx"
3199
#line 1245 "parser.yxx"
3203
#line 1246 "parser.yxx"
3207
#line 1247 "parser.yxx"
3211
#line 1248 "parser.yxx"
3215
#line 1249 "parser.yxx"
3219
#line 1250 "parser.yxx"
3223
#line 1251 "parser.yxx"
3227
#line 1252 "parser.yxx"
3231
#line 1253 "parser.yxx"
3235
#line 1254 "parser.yxx"
3239
#line 1255 "parser.yxx"
3243
#line 1256 "parser.yxx"
3247
#line 1257 "parser.yxx"
3251
#line 1258 "parser.yxx"
3255
#line 1259 "parser.yxx"
3259
#line 1260 "parser.yxx"
3263
#line 1261 "parser.yxx"
3267
#line 1262 "parser.yxx"
3271
#line 1263 "parser.yxx"
3275
#line 1264 "parser.yxx"
3279
#line 1265 "parser.yxx"
3283
#line 1266 "parser.yxx"
3287
#line 1267 "parser.yxx"
3291
#line 1268 "parser.yxx"
3295
#line 1269 "parser.yxx"
3299
#line 1270 "parser.yxx"
3303
#line 1271 "parser.yxx"
3307
#line 1272 "parser.yxx"
3311
#line 1273 "parser.yxx"
3315
#line 1274 "parser.yxx"
3319
#line 1275 "parser.yxx"
3323
#line 1276 "parser.yxx"
3327
#line 1277 "parser.yxx"
3331
#line 1278 "parser.yxx"
3335
#line 1279 "parser.yxx"
3339
#line 1280 "parser.yxx"
3343
#line 1281 "parser.yxx"
3347
#line 1282 "parser.yxx"
3351
#line 1283 "parser.yxx"
3355
#line 1284 "parser.yxx"
3359
#line 1285 "parser.yxx"
3363
#line 1286 "parser.yxx"
3367
#line 1287 "parser.yxx"
3371
#line 1288 "parser.yxx"
3375
#line 1289 "parser.yxx"
3379
#line 1290 "parser.yxx"
3383
#line 1291 "parser.yxx"
3387
#line 1292 "parser.yxx"
3391
#line 1293 "parser.yxx"
3395
#line 1294 "parser.yxx"
3399
#line 1295 "parser.yxx"
3403
#line 1296 "parser.yxx"
3407
#line 1297 "parser.yxx"
3411
#line 1298 "parser.yxx"
3415
#line 1299 "parser.yxx"
3419
#line 1300 "parser.yxx"
3423
#line 1301 "parser.yxx"
3427
#line 1302 "parser.yxx"
3431
#line 1303 "parser.yxx"
3435
#line 1304 "parser.yxx"
3439
#line 1305 "parser.yxx"
3443
#line 1306 "parser.yxx"
3447
#line 1307 "parser.yxx"
3451
#line 1308 "parser.yxx"
3455
#line 1309 "parser.yxx"
3459
#line 1310 "parser.yxx"
3463
#line 1311 "parser.yxx"
3467
#line 1312 "parser.yxx"
3471
#line 1313 "parser.yxx"
3475
#line 1314 "parser.yxx"
3479
#line 1315 "parser.yxx"
3483
#line 1316 "parser.yxx"
3487
#line 1317 "parser.yxx"
3491
#line 1318 "parser.yxx"
3495
#line 1319 "parser.yxx"
3499
#line 1320 "parser.yxx"
3503
#line 1321 "parser.yxx"
3507
#line 1322 "parser.yxx"
3511
#line 1323 "parser.yxx"
3515
#line 1324 "parser.yxx"
3519
#line 1325 "parser.yxx"
3523
#line 1326 "parser.yxx"
3527
#line 1327 "parser.yxx"
3531
#line 1328 "parser.yxx"
3535
#line 1329 "parser.yxx"
3539
#line 1330 "parser.yxx"
3543
#line 1331 "parser.yxx"
3547
#line 1332 "parser.yxx"
3551
#line 1337 "parser.yxx"
3552
{ yyval.ftype = static_cast<float>(yyvsp[0].itype); }
3555
#line 1341 "parser.yxx"
3557
yyval.aftype = new FloatArray(yyvsp[0].ftype);
3561
#line 1345 "parser.yxx"
3563
yyval.aftype = yyvsp[-1].aftype;
3564
yyval.aftype->push_back(yyvsp[0].ftype);
3568
#line 1350 "parser.yxx"
3570
yyval.aftype = yyvsp[-1].aftype;
3571
yyval.aftype->push_back(yyvsp[0].itype);
3575
#line 1355 "parser.yxx"
3577
yyval.aftype = new FloatArray(yyvsp[-1].aitype);
3578
yyval.aftype->push_back(yyvsp[0].ftype);
3579
DiscardArrayValue(yyvsp[-1].aitype);
3583
#line 1364 "parser.yxx"
3585
yyval.aftype = yyvsp[-1].aftype;
3589
#line 1370 "parser.yxx"
3591
yyval.itype = yyvsp[0].itype;
3595
#line 1376 "parser.yxx"
3597
yyval.aitype = new IntegerArray(yyvsp[0].itype);
3601
#line 1380 "parser.yxx"
3603
yyval.aitype = yyvsp[-1].aitype;
3604
yyval.aitype->push_back(yyvsp[0].itype);
3608
#line 1387 "parser.yxx"
3610
yyval.aitype = yyvsp[-1].aitype;
3614
#line 1394 "parser.yxx"
3616
yyval.aitype = new IntegerArray;
3620
#line 1400 "parser.yxx"
3622
yyval.stype = yyvsp[0].stype;
3626
#line 1406 "parser.yxx"
3628
yyval.astype = new StringArray(yyvsp[0].stype);
3632
#line 1410 "parser.yxx"
3634
yyval.astype = yyvsp[-1].astype;
3635
yyval.astype->push_back(yyvsp[0].stype);
3639
#line 1417 "parser.yxx"
3641
yyval.astype = yyvsp[-1].astype;
3645
#line 1424 "parser.yxx"
3647
yyval.astype = new StringArray;
3651
#line 1431 "parser.yxx"
3653
yyval.aftype = new FloatArray(yyvsp[0].aitype);
3654
DiscardArrayValue(yyvsp[0].aitype);
3658
#line 1440 "parser.yxx"
3660
yyval.aftype = new FloatArray;
3664
#line 1446 "parser.yxx"
3666
// Set default value ...
3669
switch(LookupParameterType(yyvsp[-1].stype))
3672
yyerror("Undeclared Integer Parameter [" + std::string(yyvsp[-1].stype) + "]");
3673
DiscardStringValue(yyvsp[-1].stype);
3677
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3678
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, new IntegerArray(yyvsp[0].itype));
3681
// This is where we perform type conversion from integer to float, based on the declared parameter type ...
3689
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3690
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, new FloatArray(static_cast<RendermanInterface::RtFloat>(yyvsp[0].itype)));
3694
yyerror("Integer Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3695
DiscardStringValue(yyvsp[-1].stype);
3701
#line 1481 "parser.yxx"
3703
// Set default value ...
3706
switch(LookupParameterType(yyvsp[-1].stype))
3709
yyerror("Undeclared Integer Array Parameter [" + std::string(yyvsp[-1].stype) + "]");
3710
DiscardStringValue(yyvsp[-1].stype);
3711
DiscardArrayValue(yyvsp[0].aitype);
3715
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3716
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, yyvsp[0].aitype);
3719
// This is where we perform type conversion from integer to float, based on the declared parameter type ...
3727
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3728
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, new FloatArray(yyvsp[0].aitype));
3729
DiscardArrayValue(yyvsp[0].aitype);
3733
yyerror("Integer Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3734
DiscardStringValue(yyvsp[-1].stype);
3735
DiscardArrayValue(yyvsp[0].aitype);
3741
#line 1519 "parser.yxx"
3743
// Set default value ...
3746
switch(LookupParameterType(yyvsp[-1].stype))
3749
yyerror("Undeclared Float Parameter: [" + std::string(yyvsp[-1].stype) + "]");
3750
DiscardStringValue(yyvsp[-1].stype);
3754
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3755
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, new FloatArray(yyvsp[0].ftype));
3759
yyerror("Float Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3760
DiscardStringValue(yyvsp[-1].stype);
3766
#line 1542 "parser.yxx"
3768
// Set default value ...
3771
switch(LookupParameterType(yyvsp[-1].stype))
3774
yyerror("Undeclared Float Array Parameter: [" + std::string(yyvsp[-1].stype) + "]");
3775
DiscardStringValue(yyvsp[-1].stype);
3776
DiscardArrayValue(yyvsp[0].aftype);
3786
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3787
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, yyvsp[0].aftype);
3791
yyerror("Float Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3792
DiscardStringValue(yyvsp[-1].stype);
3793
DiscardArrayValue(yyvsp[0].aftype);
3799
#line 1573 "parser.yxx"
3801
// Set default value ...
3804
switch(LookupParameterType(yyvsp[-1].stype))
3807
yyerror("Undeclared String Parameter [" + std::string(yyvsp[-1].stype) + "]");
3808
DiscardStringValue(yyvsp[-1].stype);
3809
DiscardStringValue(yyvsp[0].stype);
3813
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3814
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, new StringArray(yyvsp[0].stype));
3818
yyerror("String Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3819
DiscardStringValue(yyvsp[-1].stype);
3820
DiscardStringValue(yyvsp[0].stype);
3826
#line 1598 "parser.yxx"
3828
// Set default value ...
3831
switch(LookupParameterType(yyvsp[-1].stype))
3834
yyerror("Undeclared String Array Parameter [" + std::string(yyvsp[-1].stype) + "]");
3835
DiscardStringValue(yyvsp[-1].stype);
3836
DiscardArrayValue(yyvsp[0].astype);
3840
// We don't have to discard $1 because the TokenValuePair assumes ownership of the string ...
3841
yyval.tvtype = new TokenValuePair(yyvsp[-1].stype, yyvsp[0].astype);
3845
yyerror("String Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
3846
DiscardStringValue(yyvsp[-1].stype);
3847
DiscardArrayValue(yyvsp[0].astype);
3853
#line 1625 "parser.yxx"
3855
yyval.atvtype = new TokenValuePairs;
3859
#line 1629 "parser.yxx"
3861
yyval.atvtype = new TokenValuePairs;
3865
#line 1637 "parser.yxx"
3867
// We don't need to delete $1 here, because the new TokenValuePairs object owns it, now ...
3868
yyval.atvtype = new TokenValuePairs(yyvsp[0].tvtype);
3872
#line 1642 "parser.yxx"
3874
// We don't need to delete $2 here, because the new TokenValuePairs object owns it, now ...
3875
yyval.atvtype = new TokenValuePairs(yyvsp[0].tvtype);
3879
#line 1647 "parser.yxx"
3881
// We don't need to delete $1 here, because we transfer its ownership to $$ ...
3882
// We don't need to delete $2 here, because the TokenValuePairs object in $$ owns it, now ...
3883
yyval.atvtype = yyvsp[-1].atvtype;
3884
yyval.atvtype->AddPair(yyvsp[0].tvtype);
3889
#line 705 "/usr/share/bison/bison.simple"
3901
short *yyssp1 = yyss - 1;
3902
YYFPRINTF (stderr, "state stack now");
3903
while (yyssp1 != yyssp)
3904
YYFPRINTF (stderr, " %d", *++yyssp1);
3905
YYFPRINTF (stderr, "\n");
3914
/* Now `shift' the result of the reduction. Determine what state
3915
that goes to, based on the state we popped back to and the rule
3916
number reduced by. */
3920
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3921
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3922
yystate = yytable[yystate];
3924
yystate = yydefgoto[yyn - YYNTBASE];
3929
/*------------------------------------.
3930
| yyerrlab -- here on detecting error |
3931
`------------------------------------*/
3933
/* If not already recovering from an error, report this error. */
3938
#ifdef YYERROR_VERBOSE
3939
yyn = yypact[yystate];
3941
if (yyn > YYFLAG && yyn < YYLAST)
3943
YYSIZE_T yysize = 0;
3948
/* Start YYX at -YYN if negative to avoid negative indexes in
3950
for (yyx = yyn < 0 ? -yyn : 0;
3951
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
3952
if (yycheck[yyx + yyn] == yyx)
3953
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
3954
yysize += yystrlen ("parse error, unexpected ") + 1;
3955
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
3956
yymsg = (char *) YYSTACK_ALLOC (yysize);
3959
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
3960
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
3965
for (yyx = yyn < 0 ? -yyn : 0;
3966
yyx < (int) (sizeof (yytname) / sizeof (char *));
3968
if (yycheck[yyx + yyn] == yyx)
3970
const char *yyq = ! yycount ? ", expecting " : " or ";
3971
yyp = yystpcpy (yyp, yyq);
3972
yyp = yystpcpy (yyp, yytname[yyx]);
3977
YYSTACK_FREE (yymsg);
3980
yyerror ("parse error; also virtual memory exhausted");
3983
#endif /* defined (YYERROR_VERBOSE) */
3984
yyerror ("parse error");
3989
/*--------------------------------------------------.
3990
| yyerrlab1 -- error raised explicitly by an action |
3991
`--------------------------------------------------*/
3993
if (yyerrstatus == 3)
3995
/* If just tried and failed to reuse lookahead token after an
3996
error, discard it. */
3998
/* return failure if at end of input */
3999
if (yychar == YYEOF)
4001
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
4002
yychar, yytname[yychar1]));
4006
/* Else will try to reuse lookahead token after shifting the error
4009
yyerrstatus = 3; /* Each real token shifted decrements this */
4014
/*-------------------------------------------------------------------.
4015
| yyerrdefault -- current state does not do anything special for the |
4017
`-------------------------------------------------------------------*/
4020
/* This is wrong; only states that explicitly want error tokens
4021
should shift them. */
4023
/* If its default is to accept any token, ok. Otherwise pop it. */
4024
yyn = yydefact[yystate];
4030
/*---------------------------------------------------------------.
4031
| yyerrpop -- pop the current state because it cannot handle the |
4033
`---------------------------------------------------------------*/
4046
short *yyssp1 = yyss - 1;
4047
YYFPRINTF (stderr, "Error: state stack now");
4048
while (yyssp1 != yyssp)
4049
YYFPRINTF (stderr, " %d", *++yyssp1);
4050
YYFPRINTF (stderr, "\n");
4058
yyn = yypact[yystate];
4063
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
4080
YYDPRINTF ((stderr, "Shifting error token, "));
4091
/*-------------------------------------.
4092
| yyacceptlab -- YYACCEPT comes here. |
4093
`-------------------------------------*/
4098
/*-----------------------------------.
4099
| yyabortlab -- YYABORT comes here. |
4100
`-----------------------------------*/
4105
/*---------------------------------------------.
4106
| yyoverflowab -- parser overflow comes here. |
4107
`---------------------------------------------*/
4109
yyerror ("parser stack overflow");
4116
YYSTACK_FREE (yyss);
4120
#line 1656 "parser.yxx"
4123
static void yyerror(const std::string Message)
4125
ParseSucceeded = false;
4126
(*ParseErrorStream) << "librib > parser > error: " << Message << " at " << ParseStreamName << " line " << ParseLineNumber << std::endl;
4129
static void ExpectRequest()
4134
static void ExpectParams()
4139
static void DiscardStringValue(char* const Value)
4144
static void DiscardTokenValuePairs(TokenValuePairs* const Value)
4149
static void DiscardArrayValue(Array* const Value)
4154
static bool notspace(char C)
4159
(( C >= 0x09 ) && (C <= 0x0D)))
4164
static bool sspace(char C)
4166
bool retval = false;
4169
(( C >= 0x09 ) && (C <= 0x0D)))
4178
typedef std::vector<std::string> Strings;
4179
typedef Strings::iterator StringIterator;
4180
static Strings Words(const std::string& Source)
4184
std::string::const_iterator i = Source.begin();
4185
while(i != Source.end())
4187
i = std::find_if(i, Source.end(), notspace);
4188
if(i == Source.end())
4191
std::string::const_iterator j = std::find_if(i, Source.end(), sspace);
4194
results.push_back(std::string(i, j));
4202
static std::string CleanParameterType(const std::string& Source)
4204
return Source.substr(0, Source.find("["));
4207
static ParameterType ParseParameterType(const std::string& Source)
4209
if(0 == Source.size())
4211
yyerror("Cannot Parse Empty Parameter Type");
4212
return Type_Unknown;
4215
// Break the source string into whitespace delimited "words" ...
4216
Strings words(Words(Source));
4218
// Figure out the parameter type ...
4219
for(StringIterator word = words.begin(); word != words.end(); word++)
4221
std::string cleanword = CleanParameterType(*word);
4223
if(cleanword == "integer")
4224
return Type_Integer;
4226
if(cleanword == "int")
4227
return Type_Integer;
4229
if(cleanword == "float")
4232
if(cleanword == "hpoint")
4235
if(cleanword == "point")
4238
if(cleanword == "color")
4241
if(cleanword == "vector")
4244
if(cleanword == "normal")
4247
if(cleanword == "matrix")
4250
if(cleanword == "string")
4254
return Type_Unknown;
4257
typedef std::map<RendermanInterface::RtInt, RendermanInterface::RtLightHandle> LightHandleMap;
4258
typedef LightHandleMap::iterator LightHandleIterator;
4259
static LightHandleMap LightMap;
4261
typedef std::map<std::string, RendermanInterface::RtLightHandle> LightStringHandleMap;
4262
typedef LightStringHandleMap::iterator LightStringHandleIterator;
4263
static LightStringHandleMap LightMapString;
4265
typedef std::map<RendermanInterface::RtInt, RendermanInterface::RtObjectHandle> ObjectHandleMap;
4266
typedef ObjectHandleMap::iterator ObjectHandleIterator;
4267
static ObjectHandleMap ObjectMap;
4269
typedef std::map<std::string, RendermanInterface::RtObjectHandle> ObjectStringHandleMap;
4270
typedef ObjectStringHandleMap::iterator ObjectStringHandleIterator;
4271
static ObjectStringHandleMap ObjectMapString;
4273
static void DeclareLightHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtLightHandle Handle)
4277
yyerror("NULL Light Handle");
4281
LightMap[ID] = Handle;
4284
static RendermanInterface::RtLightHandle LookupLightHandle(const RendermanInterface::RtInt ID)
4286
if(LightMap.find(ID) == LightMap.end())
4288
yyerror("Undeclared Light ID");
4292
return LightMap[ID];
4296
static void DeclareLightHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtLightHandle Handle)
4300
yyerror("NULL Light Handle");
4304
LightMapString[ID] = Handle;
4307
static RendermanInterface::RtLightHandle LookupLightHandleString(const RendermanInterface::RtString ID)
4309
if(LightMapString.find(ID) == LightMapString.end())
4311
yyerror("Undeclared Light name");
4315
return LightMapString[ID];
4319
static void DeclareObjectHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtObjectHandle Handle)
4323
yyerror("NULL Object Handle");
4327
ObjectMap[ID] = Handle;
4330
static RendermanInterface::RtObjectHandle LookupObjectHandle(const RendermanInterface::RtInt ID)
4332
if(ObjectMap.find(ID) == ObjectMap.end())
4334
yyerror("Undeclared Object ID");
4338
return ObjectMap[ID];
4342
static void DeclareObjectHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtObjectHandle Handle)
4346
yyerror("NULL Object Handle");
4350
ObjectMapString[ID] = Handle;
4353
static RendermanInterface::RtObjectHandle LookupObjectHandleString(const RendermanInterface::RtString ID)
4355
if(ObjectMapString.find(ID) == ObjectMapString.end())
4357
yyerror("Undeclared Object name");
4361
return ObjectMapString[ID];
4364
typedef std::map<std::string, ParameterType> ParameterTypeMap;
4365
typedef ParameterTypeMap::iterator ParameterTypeIterator;
4366
static ParameterTypeMap TypeMap;
4368
static ParameterType DeclareParameterType(const std::string& Name, const std::string& Type)
4370
if(0 == Name.size())
4372
yyerror("Cannot Declare Unnamed Type");
4373
return Type_Unknown;
4376
const ParameterType type = ParseParameterType(Type);
4378
if(type != Type_Unknown)
4379
TypeMap[Name] = type;
4384
static ParameterType LookupParameterType(const std::string& Name)
4386
if(0 == Name.size())
4388
yyerror("Cannot Lookup Unnamed Type");
4389
return Type_Unknown;
4392
// See if this parameter has already been declared ...
4393
ParameterTypeIterator parameter = TypeMap.find(Name);
4394
if(parameter != TypeMap.end())
4395
return static_cast<ParameterType>(parameter->second & Type_Mask);
4397
// Check to see if the type declaration is part of the parameter name ...
4398
return ParseParameterType(Name);
4405
void ParserDeclare(librib::RendermanInterface& CallbackInterface, const std::string Name, const std::string Type)
4407
if(Type_Unknown == DeclareParameterType(Name, Type))
4408
yyerror("RiDeclare: Unknown type [" + Name + ", " + Type + "]");
4410
char *_name = new char[Name.length()+1];
4411
strcpy(_name, Name.c_str());
4412
char *_type = new char[Type.length()+1];
4413
strcpy(_type, Type.c_str());
4414
CallbackInterface.RiDeclare(_name, _type);
4419
void ClearDeclarations()
4424
}; // namespace librib